diff options
Diffstat (limited to 'org.eclipse.debug.ui')
10 files changed, 232 insertions, 82 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java index b34f2fbb3..844d3b934 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java @@ -116,6 +116,7 @@ public interface IDebugHelpContextIds { public static final String SELECT_LAUNCH_CONFIGURATION_DIALOG = PREFIX + "select_launch_configuration_dialog"; //$NON-NLS-1$ public static final String SELECT_DIRECTORY_SOURCE_CONTAINER_DIALOG = PREFIX + "select_directory_source_container_dialog"; //$NON-NLS-1$ public static final String SELECT_CONFIGURATION_TYPE_DIALOG = PREFIX + "select_configuration_type_dialog"; //$NON-NLS-1$ + public static final String SELECT_FAVORITES_DIALOG = PREFIX + "select_favorites_dialog"; //$NON-NLS-1$ // Property pages public static final String PROCESS_PROPERTY_PAGE = PREFIX + "process_property_page_context"; //$NON-NLS-1$ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/AbstractDebugCheckboxSelectionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/AbstractDebugCheckboxSelectionDialog.java index ac47164bf..2c99d80e8 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/AbstractDebugCheckboxSelectionDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/AbstractDebugCheckboxSelectionDialog.java @@ -29,9 +29,6 @@ import org.eclipse.swt.widgets.Table; * @since 3.3 */ public abstract class AbstractDebugCheckboxSelectionDialog extends AbstractDebugSelectionDialog { - - protected CheckboxTableViewer fTableViewer; - protected Table fTable; /** * Constructor @@ -43,6 +40,14 @@ public abstract class AbstractDebugCheckboxSelectionDialog extends AbstractDebug } /** + * Returns the viewer cast to the correct instance + * @return + */ + protected CheckboxTableViewer getCheckBoxTableViewer() { + return (CheckboxTableViewer) fViewer; + } + + /** * Create and return a viewer to use in this dialog. * * @param parent the composite the viewer should be created in @@ -50,17 +55,16 @@ public abstract class AbstractDebugCheckboxSelectionDialog extends AbstractDebug */ protected StructuredViewer createViewer(Composite parent){ //by default return a checkbox table viewer - fTable = new Table(parent, SWT.BORDER | SWT.SINGLE | SWT.CHECK); - fTable.setLayoutData(new GridData(GridData.FILL_BOTH)); - fTableViewer = new CheckboxTableViewer(fTable); - return fTableViewer; + Table table = new Table(parent, SWT.BORDER | SWT.SINGLE | SWT.CHECK); + table.setLayoutData(new GridData(GridData.FILL_BOTH)); + return new CheckboxTableViewer(table); } /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#addViewerListeners(org.eclipse.jface.viewers.StructuredViewer) */ protected void addViewerListeners(StructuredViewer viewer) { - fTableViewer.addCheckStateListener(new DefaultCheckboxListener()); + getCheckBoxTableViewer().addCheckStateListener(new DefaultCheckboxListener()); } /** @@ -70,8 +74,7 @@ public abstract class AbstractDebugCheckboxSelectionDialog extends AbstractDebug */ private class DefaultCheckboxListener implements ICheckStateListener{ public void checkStateChanged(CheckStateChangedEvent event) { - fTableViewer.setCheckedElements(new Object[] {event.getElement()}); - getButton(IDialogConstants.OK_ID).setEnabled(true); + getButton(IDialogConstants.OK_ID).setEnabled(getCheckBoxTableViewer().getCheckedElements().length > 0); } } @@ -87,7 +90,7 @@ public abstract class AbstractDebugCheckboxSelectionDialog extends AbstractDebug * @see org.eclipse.jface.dialogs.Dialog#okPressed() */ protected void okPressed() { - Object[] elements = fTableViewer.getCheckedElements(); + Object[] elements = getCheckBoxTableViewer().getCheckedElements(); setResult(Arrays.asList(elements)); super.okPressed(); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/AbstractDebugSelectionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/AbstractDebugSelectionDialog.java index 931197d2c..3cd5cd375 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/AbstractDebugSelectionDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/AbstractDebugSelectionDialog.java @@ -89,10 +89,7 @@ public abstract class AbstractDebugSelectionDialog extends SelectionDialog { * Returns the help context id for this dialog * @return the help context id for this dialog */ - protected String getHelpContextId() { - //do nothing by default - return null; - } + abstract protected String getHelpContextId(); /** * This method allows listeners to be added to the viewer after it @@ -140,9 +137,13 @@ public abstract class AbstractDebugSelectionDialog extends SelectionDialog { Composite comp = (Composite) super.createDialogArea(parent); addCustomHeaderControls(comp); String label = getMessage(); - if(label != null) { + if(label != null && !"".equals(label)) { //$NON-NLS-1$ SWTFactory.createWrapLabel(comp, label, 1); } + label = getViewerLabel(); + if(label != null && !"".equals(label)) { //$NON-NLS-1$ + SWTFactory.createLabel(comp, label, 1); + } fViewer = createViewer(comp); fViewer.setLabelProvider(getLabelProvider()); fViewer.setContentProvider(getContentProvider()); @@ -158,6 +159,13 @@ public abstract class AbstractDebugSelectionDialog extends SelectionDialog { return comp; } + /** + * This method returns the label describing what to do with the viewer. Typically this label + * will include the key accelerator to get to the viewer via the keyboard + * @return the label for the viewer + */ + abstract protected String getViewerLabel(); + /* (non-Javadoc) * @see org.eclipse.ui.dialogs.SelectionDialog#getDialogBoundsSettings() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java index b67b73775..01f9ac381 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java @@ -19,7 +19,6 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.debug.internal.ui.DebugUIPlugin; @@ -35,7 +34,6 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.Viewer; -import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.swt.SWT; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; @@ -50,8 +48,6 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.dialogs.ListSelectionDialog; -import org.eclipse.ui.model.WorkbenchViewerComparator; import com.ibm.icu.text.MessageFormat; @@ -142,37 +138,6 @@ public class FavoritesDialog extends TrayDialog { } } - - /** - * Content provider for recent table - */ - protected class LaunchConfigurationContentProvider extends FavoritesContentProvider { - - /** - * @see IStructuredContentProvider#getElements(Object) - */ - public Object[] getElements(Object inputElement) { - ILaunchConfiguration[] all = null; - try { - all = LaunchConfigurationManager.filterConfigs(DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations()); - } catch (CoreException e) { - DebugUIPlugin.log(e); - return new ILaunchConfiguration[0]; - } - List list = new ArrayList(all.length); - ViewerFilter filter = new LaunchGroupFilter(getLaunchHistory().getLaunchGroup()); - for (int i = 0; i < all.length; i++) { - if (filter.select(null, null, all[i])) { - list.add(all[i]); - } - } - list.removeAll(getFavorites()); - Object[] objs = list.toArray(); - new WorkbenchViewerComparator().sort(getFavoritesTable(), objs); - return objs; - } - - } /** * Constructs a favorites dialog. @@ -190,13 +155,9 @@ public class FavoritesDialog extends TrayDialog { * The 'add config' button has been pressed */ protected void handleAddConfigButtonSelected() { - - ListSelectionDialog dialog = new ListSelectionDialog(fFavoritesTable.getControl().getShell(), - getMode(), new LaunchConfigurationContentProvider(), DebugUITools.newDebugModelPresentation(), - LaunchConfigurationsMessages.FavoritesDialog_7); - dialog.setTitle(MessageFormat.format(LaunchConfigurationsMessages.FavoritesDialog_0, new String[]{getModeLabel()})); - dialog.open(); - Object[] selection = dialog.getResult(); + SelectFavoritesDialog sfd = new SelectFavoritesDialog(fFavoritesTable.getControl().getShell(), getLaunchHistory(), getFavorites()); + sfd.open(); + Object[] selection = sfd.getResult(); if (selection != null) { for (int i = 0; i < selection.length; i++) { getFavorites().add(selection[i]); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java index 6accbd929..939c7645a 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java @@ -206,6 +206,9 @@ public class LaunchConfigurationsMessages extends NLS { public static String CollapseAllLaunchConfigurationAction_1; public static String CollapseAllLaunchConfigurationAction_2; + public static String SelectFavoritesDialog_0; + public static String SelectFavoritesDialog_1; + public static String SelectLaunchersDialog_0; public static String SelectLaunchersDialog_1; public static String SelectLaunchersDialog_2; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties index 96f374a12..077c8b482 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties @@ -194,3 +194,5 @@ SelectLaunchersDialog_1=&Override workspace settings: SelectLaunchersDialog_2=This dialog allows you to specify which launcher to use when multiple launchers are available for a configuration and launch mode. SelectLaunchersDialog_4=<a href="ws">Change Workspace Settings...</a> SelectLaunchersDialog_5=Description +SelectFavoritesDialog_0=&Select All +SelectFavoritesDialog_1=&Deselect All diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectFavoritesDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectFavoritesDialog.java new file mode 100644 index 000000000..d812bbe4b --- /dev/null +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectFavoritesDialog.java @@ -0,0 +1,156 @@ +/******************************************************************************* + * Copyright (c) 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.debug.internal.ui.launchConfigurations; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.internal.ui.DebugUIPlugin; +import org.eclipse.debug.internal.ui.IDebugHelpContextIds; +import org.eclipse.debug.internal.ui.SWTFactory; +import org.eclipse.debug.ui.IDebugUIConstants; +import org.eclipse.jface.viewers.IContentProvider; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.jface.viewers.ViewerFilter; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.model.WorkbenchViewerComparator; + +import com.ibm.icu.text.MessageFormat; + +/** + * This dialog is used to select one or more launch configurations to add to your favorites + * + * @since 3.3.0 + */ +public class SelectFavoritesDialog extends AbstractDebugCheckboxSelectionDialog { + + /** + * Content provider for table + */ + protected class LaunchConfigurationContentProvider implements IStructuredContentProvider { + public Object[] getElements(Object inputElement) { + ILaunchConfiguration[] all = null; + try { + all = LaunchConfigurationManager.filterConfigs(DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations()); + } catch (CoreException e) { + DebugUIPlugin.log(e); + return new ILaunchConfiguration[0]; + } + List list = new ArrayList(all.length); + ViewerFilter filter = new LaunchGroupFilter(fHistory.getLaunchGroup()); + for (int i = 0; i < all.length; i++) { + if (filter.select(null, null, all[i])) { + list.add(all[i]); + } + } + list.removeAll(fCurrentFavoriteSet); + Object[] objs = list.toArray(); + new WorkbenchViewerComparator().sort(getCheckBoxTableViewer(), objs); + return objs; + } + + public void dispose() {} + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} + } + + private LaunchHistory fHistory; + private List fCurrentFavoriteSet; + + /** + * Constructor + * @param parentShell + * @param history + * @param favorites + */ + public SelectFavoritesDialog(Shell parentShell, LaunchHistory history, List favorites) { + super(parentShell); + fHistory = history; + fCurrentFavoriteSet = favorites; + setTitle(MessageFormat.format(LaunchConfigurationsMessages.FavoritesDialog_0, new String[]{getModeLabel()})); + } + + /** + * Returns a label to use for launch mode with accelerators removed. + * + * @return label to use for launch mode with accelerators removed + */ + private String getModeLabel() { + return DebugUIPlugin.removeAccelerators(fHistory.getLaunchGroup().getLabel()); + } + + /* (non-Javadoc) + * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getDialogSettingsId() + */ + protected String getDialogSettingsId() { + return IDebugUIConstants.PLUGIN_ID + ".SELECT_FAVORITESS_DIALOG"; //$NON-NLS-1$ + } + + /* (non-Javadoc) + * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerInput() + */ + protected Object getViewerInput() { + return fHistory.getLaunchGroup().getMode(); + } + + /* (non-Javadoc) + * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getContentProvider() + */ + protected IContentProvider getContentProvider() { + return new LaunchConfigurationContentProvider(); + } + + /* (non-Javadoc) + * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getHelpContextId() + */ + protected String getHelpContextId() { + return IDebugHelpContextIds.SELECT_FAVORITES_DIALOG; + } + + /* (non-Javadoc) + * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerLabel() + */ + protected String getViewerLabel() { + return LaunchConfigurationsMessages.FavoritesDialog_7; + } + + /* (non-Javadoc) + * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#addCustomFooterControls(org.eclipse.swt.widgets.Composite) + */ + protected void addCustomFooterControls(Composite parent) { + Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_HORIZONTAL); + GridData gd = (GridData) comp.getLayoutData(); + gd.horizontalAlignment = SWT.END; + Button button = SWTFactory.createPushButton(comp, LaunchConfigurationsMessages.SelectFavoritesDialog_0, null); + button.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + getCheckBoxTableViewer().setAllChecked(true); + getOkButton().setEnabled(true); + } + }); + button = SWTFactory.createPushButton(comp, LaunchConfigurationsMessages.SelectFavoritesDialog_1, null); + button.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + getCheckBoxTableViewer().setAllChecked(false); + getOkButton().setEnabled(false); + } + }); + } +} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchModesDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchModesDialog.java index a0cc7b0a3..3178ae545 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchModesDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchModesDialog.java @@ -90,13 +90,6 @@ public class SelectLaunchModesDialog extends AbstractDebugListSelectionDialog{ protected IBaseLabelProvider getLabelProvider() { return new OptionsLabelProvider(); } - - /* (non-Javadoc) - * @see org.eclipse.ui.dialogs.SelectionDialog#getMessage() - */ - protected String getMessage() { - return LaunchConfigurationsMessages.SelectLaunchOptionsDialog_4; - } /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerInput() @@ -112,4 +105,10 @@ public class SelectLaunchModesDialog extends AbstractDebugListSelectionDialog{ return IDebugHelpContextIds.SELECT_LAUNCH_MODES_DIALOG; } + /* (non-Javadoc) + * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerLabel() + */ + protected String getViewerLabel() { + return LaunchConfigurationsMessages.SelectLaunchOptionsDialog_4; + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchersDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchersDialog.java index 1b1a4f7e8..f6ffa6676 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchersDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchersDialog.java @@ -23,7 +23,10 @@ import org.eclipse.debug.internal.ui.SWTFactory; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.IDialogSettings; +import org.eclipse.jface.viewers.CheckStateChangedEvent; +import org.eclipse.jface.viewers.CheckboxTableViewer; import org.eclipse.jface.viewers.IBaseLabelProvider; +import org.eclipse.jface.viewers.ICheckStateListener; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.jface.viewers.ISelectionChangedListener; @@ -171,7 +174,7 @@ public class SelectLaunchersDialog extends AbstractDebugCheckboxSelectionDialog public void widgetDefaultSelected(SelectionEvent e) {} public void widgetSelected(SelectionEvent e) { boolean checked = ((Button)e.widget).getSelection(); - fTable.setEnabled(checked); + getCheckBoxTableViewer().getTable().setEnabled(checked); resetDelegate(); } }); @@ -182,7 +185,7 @@ public class SelectLaunchersDialog extends AbstractDebugCheckboxSelectionDialog * @return the currently selected launch delegate or <code>null</code> if none are checked */ protected ILaunchDelegate getSelectedDelegate() { - Object[] checked = fTableViewer.getCheckedElements(); + Object[] checked = getCheckBoxTableViewer().getCheckedElements(); if(checked.length > 0) { return (ILaunchDelegate) checked[0]; } @@ -220,13 +223,14 @@ public class SelectLaunchersDialog extends AbstractDebugCheckboxSelectionDialog if(!fUseSystemLauncher.getSelection()) { try { ILaunchDelegate preferred = fConfiguration.getType().getPreferredDelegate(getCurrentModeSet()); + CheckboxTableViewer viewer = getCheckBoxTableViewer(); if(preferred != null) { - fTableViewer.setSelection(new StructuredSelection(preferred)); - fTableViewer.setCheckedElements(new Object[] {preferred}); + viewer.setSelection(new StructuredSelection(preferred)); + viewer.setCheckedElements(new Object[] {preferred}); } else { - fTableViewer.setSelection(new StructuredSelection()); - fTableViewer.setAllChecked(false); + viewer.setSelection(new StructuredSelection()); + viewer.setAllChecked(false); } } catch (CoreException ce) {DebugUIPlugin.log(ce);} @@ -259,7 +263,13 @@ public class SelectLaunchersDialog extends AbstractDebugCheckboxSelectionDialog * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#initializeControls() */ protected void initializeControls() { - fTableViewer.addSelectionChangedListener(new ISelectionChangedListener() { + final CheckboxTableViewer viewer = getCheckBoxTableViewer(); + viewer.addCheckStateListener(new ICheckStateListener() { + public void checkStateChanged(CheckStateChangedEvent event) { + viewer.setCheckedElements(new Object[]{event.getElement()}); + } + }); + viewer.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection ss = (IStructuredSelection) event.getSelection(); if(ss != null && !ss.isEmpty()) { @@ -275,14 +285,21 @@ public class SelectLaunchersDialog extends AbstractDebugCheckboxSelectionDialog boolean custom = delegate != null; fUseSystemLauncher.setSelection(custom); if(custom) { - fTableViewer.setSelection(new StructuredSelection(delegate)); - fTableViewer.setCheckedElements(new Object[] {delegate}); + viewer.setSelection(new StructuredSelection(delegate)); + viewer.setCheckedElements(new Object[] {delegate}); } else { resetDelegate(); - fTable.setEnabled(false); + getCheckBoxTableViewer().getTable().setEnabled(false); } } catch (CoreException ce) {DebugUIPlugin.log(ce);} } + + /* (non-Javadoc) + * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerLabel() + */ + protected String getViewerLabel() { + return null; + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java index ad5806061..663a32343 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java @@ -433,13 +433,6 @@ public class RunDebugPropertiesPage extends PropertyPage { protected Object getViewerInput() { return typeCandidates; } - - /* (non-Javadoc) - * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getMessage() - */ - protected String getMessage() { - return DebugPreferencesMessages.DefaultLaunchConfigurationsPropertiesPage_12; - } /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getHelpContextId() @@ -447,6 +440,13 @@ public class RunDebugPropertiesPage extends PropertyPage { protected String getHelpContextId() { return IDebugHelpContextIds.SELECT_CONFIGURATION_TYPE_DIALOG; } + + /* (non-Javadoc) + * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerLabel() + */ + protected String getViewerLabel() { + return DebugPreferencesMessages.DefaultLaunchConfigurationsPropertiesPage_12; + } }; dialog.setTitle(DebugPreferencesMessages.DefaultLaunchConfigurationsPropertiesPage_11); |