Bug 535468 - Link with prototype does not set an initial selection
Set an initial selection in the dialog to indicate what is currently the
linked prototype.
Change-Id: I9414b8f020b7b80de95464db35cdc4d2481a94c3
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Bug:535468
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LinkPrototypeAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LinkPrototypeAction.java
index a1b28b7..1bbdf07 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LinkPrototypeAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LinkPrototypeAction.java
@@ -64,6 +64,7 @@
DecoratingLabelProvider labelProvider = new DecoratingLabelProvider(DebugUITools.newDebugModelPresentation(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator());
ElementListSelectionDialog selectPrototypeDialog = new ElementListSelectionDialog(getShell(), labelProvider);
selectPrototypeDialog.setElements(prototypes);
+ selectPrototypeDialog.setInitialSelections(firstLaunchConfiguration.getPrototype());
selectPrototypeDialog.setMultipleSelection(false);
selectPrototypeDialog.setEmptySelectionMessage("You have to select a prototype."); //$NON-NLS-1$
selectPrototypeDialog.setTitle("Please select a prototype"); //$NON-NLS-1$