diff options
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations')
51 files changed, 1136 insertions, 1136 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/AbstractLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/AbstractLaunchConfigurationAction.java index 771ca395f..1559bebfa 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/AbstractLaunchConfigurationAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/AbstractLaunchConfigurationAction.java @@ -22,12 +22,12 @@ import org.eclipse.ui.actions.SelectionListenerAction; * Common function/behavior for launch configuration view actions */ public abstract class AbstractLaunchConfigurationAction extends SelectionListenerAction { - - /** + + /** * The mode this action was created in (run, debug, ...) */ private String fMode; - + /** * Allows a requestor to abort this action. */ @@ -35,17 +35,17 @@ public abstract class AbstractLaunchConfigurationAction extends SelectionListene /** * Returns whether this action should proceed. Confirmation is requested * when an action is run. - * + * * @return whether this action should proceed */ public boolean getConfirmation(); } - + /** * This action's confirmation requestor or <code>null</code> if none */ private IConfirmationRequestor fConfirmationRequestor; - + /** * The viewer this action is working on */ @@ -66,28 +66,28 @@ public abstract class AbstractLaunchConfigurationAction extends SelectionListene /** * Returns the shell this action is contained in. - * + * * @return the shell this action is contained in */ protected Shell getShell() { return getViewer().getControl().getShell(); } - + /** * Returns the viewer this action is working on - * + * * @return the viewer this action is working on */ protected Viewer getViewer() { return fViewer; } - + /** * Performs this action once confirmation has been aquired. Subclasses * should override this method. */ protected abstract void performAction(); - + /** * @see org.eclipse.jface.action.IAction#run() */ @@ -109,26 +109,26 @@ public abstract class AbstractLaunchConfigurationAction extends SelectionListene }; BusyIndicator.showWhile(getShell().getDisplay(), r); } - + /** * Sets this action's confirmation requestor. - * + * * @param confirmationRequestor the new {@link IConfirmationRequestor} */ public void setConfirmationRequestor(IConfirmationRequestor confirmationRequestor) { fConfirmationRequestor = confirmationRequestor; } - + /** * Disposes this action */ public void dispose() { fViewer.removeSelectionChangedListener(this); } - + /** * Show an error dialog on the given exception. - * + * * @param exception the exception to show in the dialog */ protected void errorDialog(CoreException exception) { @@ -137,7 +137,7 @@ public abstract class AbstractLaunchConfigurationAction extends SelectionListene /** * Return this action's mode. - * + * * @return launch mode */ protected String getMode() { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ClosedProjectFilter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ClosedProjectFilter.java index 2a4d66c74..7b47fbbe2 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ClosedProjectFilter.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ClosedProjectFilter.java @@ -19,11 +19,11 @@ import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; /** - * + * * This implementation is used to filter closed projects from the launch configuration dialog. - * It is (de)activated via the <code>IInternalDebugUIConstants.PREF_FILTER_LAUNCH_CLOSED</code> preference, and is + * It is (de)activated via the <code>IInternalDebugUIConstants.PREF_FILTER_LAUNCH_CLOSED</code> preference, and is * provided to fix bug 19521. - * + * * @since 3.2 * */ @@ -60,7 +60,7 @@ public class ClosedProjectFilter extends ViewerFilter { return true; } } - } + } catch (CoreException e) {} } return false; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CollapseAllLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CollapseAllLaunchConfigurationAction.java index ad47df486..edaa8ef83 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CollapseAllLaunchConfigurationAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CollapseAllLaunchConfigurationAction.java @@ -4,7 +4,7 @@ * 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 *******************************************************************************/ @@ -27,12 +27,12 @@ public class CollapseAllLaunchConfigurationAction extends Action { * Action identifier for IDebugView#getAction(String) */ public static final String ID_COLLAPSEALL_ACTION = DebugUIPlugin.getUniqueIdentifier() + ".ID_COLLAPSEALL_ACTION"; //$NON-NLS-1$ - + /** - * the viewer to perform the collapse all on + * the viewer to perform the collapse all on */ private TreeViewer fViewer = null; - + /** * Constructor * @param viewer the viewer to perform the collapse all on @@ -87,5 +87,5 @@ public class CollapseAllLaunchConfigurationAction extends Action { @Override public String getDescription() { return LaunchConfigurationsMessages.CollapseAllLaunchConfigurationAction_2; - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorProjectPromptStatusHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorProjectPromptStatusHandler.java index f8124b2f3..af014e1ed 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorProjectPromptStatusHandler.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorProjectPromptStatusHandler.java @@ -54,7 +54,7 @@ public class CompileErrorProjectPromptStatusHandler implements IStatusHandler { projects.add(arg); } } - } + } Shell shell = DebugUIPlugin.getShell(); StringBuffer projectList = new StringBuffer(); //we need to limit this @@ -71,22 +71,22 @@ public class CompileErrorProjectPromptStatusHandler implements IStatusHandler { } else{ projectMessage = projectList.toString(); } - String title = LaunchConfigurationsMessages.CompileErrorPromptStatusHandler_0; + String title = LaunchConfigurationsMessages.CompileErrorPromptStatusHandler_0; String message = MessageFormat.format(LaunchConfigurationsMessages.CompileErrorPromptStatusHandler_2, new Object[] { projectMessage }); - IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore(); - + IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore(); + String pref = store.getString(IInternalDebugUIConstants.PREF_CONTINUE_WITH_COMPILE_ERROR); if (pref != null) { if (pref.equals(MessageDialogWithToggle.ALWAYS)) { return Boolean.TRUE; } } - MessageDialogWithToggle dialog = new MessageDialogWithToggle(shell, - title, - null, - message, + MessageDialogWithToggle dialog = new MessageDialogWithToggle(shell, + title, + null, + message, MessageDialog.QUESTION, - new String[] {IDialogConstants.PROCEED_LABEL, IDialogConstants.CANCEL_LABEL}, + new String[] {IDialogConstants.PROCEED_LABEL, IDialogConstants.CANCEL_LABEL}, 0, LaunchConfigurationsMessages.CompileErrorProjectPromptStatusHandler_1, false); @@ -96,7 +96,7 @@ public class CompileErrorProjectPromptStatusHandler implements IStatusHandler { store.setValue(IInternalDebugUIConstants.PREF_CONTINUE_WITH_COMPILE_ERROR, MessageDialogWithToggle.ALWAYS); } return Boolean.TRUE; - } + } else { return Boolean.FALSE; } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorPromptStatusHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorPromptStatusHandler.java index 5d411606e..63894630e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorPromptStatusHandler.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorPromptStatusHandler.java @@ -4,7 +4,7 @@ * 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 *******************************************************************************/ @@ -37,12 +37,12 @@ public class CompileErrorPromptStatusHandler implements IStatusHandler { return Boolean.TRUE; } } - + Shell shell = DebugUIPlugin.getShell(); - String title = LaunchConfigurationsMessages.CompileErrorPromptStatusHandler_0; - String message = LaunchConfigurationsMessages.CompileErrorPromptStatusHandler_1; - IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore(); - + String title = LaunchConfigurationsMessages.CompileErrorPromptStatusHandler_0; + String message = LaunchConfigurationsMessages.CompileErrorPromptStatusHandler_1; + IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore(); + String pref = store.getString(IInternalDebugUIConstants.PREF_CONTINUE_WITH_COMPILE_ERROR); if (pref != null) { if (pref.equals(MessageDialogWithToggle.ALWAYS)) { @@ -50,19 +50,19 @@ public class CompileErrorPromptStatusHandler implements IStatusHandler { } } MessageDialogWithToggle dialog = new MessageDialogWithToggle( - shell, - title, - null, - message, + shell, + title, + null, + message, MessageDialog.WARNING, - new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL}, - 1, - LaunchConfigurationsMessages.CompileErrorProjectPromptStatusHandler_1, + new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL}, + 1, + LaunchConfigurationsMessages.CompileErrorProjectPromptStatusHandler_1, false); dialog.setPrefKey(IInternalDebugUIConstants.PREF_CONTINUE_WITH_COMPILE_ERROR); dialog.setPrefStore(store); dialog.open(); - + int returnValue = dialog.getReturnCode(); if (returnValue == IDialogConstants.YES_ID) { return Boolean.TRUE; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CreateLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CreateLaunchConfigurationAction.java index d49e50f23..f836199b8 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CreateLaunchConfigurationAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CreateLaunchConfigurationAction.java @@ -35,14 +35,14 @@ public class CreateLaunchConfigurationAction extends AbstractLaunchConfiguration * Action identifier for IDebugView#getAction(String) */ public static final String ID_CREATE_ACTION = DebugUIPlugin.getUniqueIdentifier() + ".ID_CREATE_ACTION"; //$NON-NLS-1$ - + /** - * Constructs an action to create a launch configuration + * Constructs an action to create a launch configuration * @param viewer the viewer * @param mode the mode the action applies to */ public CreateLaunchConfigurationAction(Viewer viewer, String mode) { - super(LaunchConfigurationsMessages.CreateLaunchConfigurationAction_Ne_w_1, viewer, mode); + super(LaunchConfigurationsMessages.CreateLaunchConfigurationAction_Ne_w_1, viewer, mode); } /** @@ -68,7 +68,7 @@ public class CreateLaunchConfigurationAction extends AbstractLaunchConfiguration type = (ILaunchConfigurationType) object; } try { - ILaunchConfigurationWorkingCopy wc = type.newInstance(null, DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(LaunchConfigurationsMessages.CreateLaunchConfigurationAction_New_configuration_2)); + ILaunchConfigurationWorkingCopy wc = type.newInstance(null, DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(LaunchConfigurationsMessages.CreateLaunchConfigurationAction_New_configuration_2)); ILaunchConfigurationTabGroup tabGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(wc, getMode()); // this only works because this action is only present when the dialog is open ILaunchConfigurationDialog dialog = LaunchConfigurationsDialog.getCurrentlyVisibleLaunchConfigurationDialog(); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DebugModePromptStatusHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DebugModePromptStatusHandler.java index c14731486..674b9611d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DebugModePromptStatusHandler.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DebugModePromptStatusHandler.java @@ -4,7 +4,7 @@ * 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 *******************************************************************************/ @@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.Shell; public class DebugModePromptStatusHandler implements IStatusHandler { - + /* (non-Javadoc) * @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object) */ @@ -35,33 +35,33 @@ public class DebugModePromptStatusHandler implements IStatusHandler { ILaunchConfiguration config = (ILaunchConfiguration)source; if (DebugUITools.isPrivate(config)) { return Boolean.FALSE; - } + } } - + IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore(); ILaunchConfiguration configuration = (ILaunchConfiguration)source; - String pref = store.getString(IInternalDebugUIConstants.PREF_RELAUNCH_IN_DEBUG_MODE); + String pref = store.getString(IInternalDebugUIConstants.PREF_RELAUNCH_IN_DEBUG_MODE); if (pref != null) { if (pref.equals(MessageDialogWithToggle.NEVER)) { return Boolean.FALSE; - } else if (pref.equals(MessageDialogWithToggle.ALWAYS)) { + } else if (pref.equals(MessageDialogWithToggle.ALWAYS)) { relaunchInDebugMode(configuration); return Boolean.TRUE; } } - + Shell activeShell = DebugUIPlugin.getShell(); - String title = LaunchConfigurationsMessages.DebugModePromptStatusHandler_0; - String message = LaunchConfigurationsMessages.DebugModePromptStatusHandler_1; - - MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoCancelQuestion(activeShell, title, message, null, false, store, IInternalDebugUIConstants.PREF_RELAUNCH_IN_DEBUG_MODE); + String title = LaunchConfigurationsMessages.DebugModePromptStatusHandler_0; + String message = LaunchConfigurationsMessages.DebugModePromptStatusHandler_1; + + MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoCancelQuestion(activeShell, title, message, null, false, store, IInternalDebugUIConstants.PREF_RELAUNCH_IN_DEBUG_MODE); int buttonId = dialog.getReturnCode(); - if (buttonId == IDialogConstants.YES_ID) { + if (buttonId == IDialogConstants.YES_ID) { relaunchInDebugMode(configuration); return Boolean.TRUE; // stops launch } else if (buttonId == IDialogConstants.NO_ID) { return Boolean.FALSE; // continue launch - } else { //CANCEL + } else { //CANCEL return Boolean.TRUE; // stops the launch } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeleteLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeleteLaunchConfigurationAction.java index a9cc4fefd..5897781f6 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeleteLaunchConfigurationAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeleteLaunchConfigurationAction.java @@ -32,12 +32,12 @@ public class DeleteLaunchConfigurationAction extends AbstractLaunchConfiguration * Action identifier for IDebugView#getAction(String) */ public static final String ID_DELETE_ACTION = DebugUIPlugin.getUniqueIdentifier() + ".ID_DELETE_ACTION"; //$NON-NLS-1$ - + /** - * Constructs an action to delete launch configuration(s) + * Constructs an action to delete launch configuration(s) */ public DeleteLaunchConfigurationAction(Viewer viewer, String mode) { - super(LaunchConfigurationsMessages.DeleteLaunchConfigurationAction_Dele_te_1, viewer, mode); + super(LaunchConfigurationsMessages.DeleteLaunchConfigurationAction_Dele_te_1, viewer, mode); } /** @@ -48,10 +48,10 @@ public class DeleteLaunchConfigurationAction extends AbstractLaunchConfiguration protected boolean shouldDelete() { IStructuredSelection selection = getStructuredSelection(); // Make the user confirm the deletion - String dialogMessage = selection.size() > 1 ? LaunchConfigurationsMessages.LaunchConfigurationDialog_Do_you_wish_to_delete_the_selected_launch_configurations__1 : LaunchConfigurationsMessages.LaunchConfigurationDialog_Do_you_wish_to_delete_the_selected_launch_configuration__2; // - return MessageDialog.openQuestion(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Confirm_Launch_Configuration_Deletion_3, dialogMessage); + String dialogMessage = selection.size() > 1 ? LaunchConfigurationsMessages.LaunchConfigurationDialog_Do_you_wish_to_delete_the_selected_launch_configurations__1 : LaunchConfigurationsMessages.LaunchConfigurationDialog_Do_you_wish_to_delete_the_selected_launch_configuration__2; // + return MessageDialog.openQuestion(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Confirm_Launch_Configuration_Deletion_3, dialogMessage); } - + /** * @see AbstractLaunchConfigurationAction#performAction() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeletedProjectFilter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeletedProjectFilter.java index c7496285d..353eb2802 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeletedProjectFilter.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeletedProjectFilter.java @@ -19,10 +19,10 @@ import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; /** - * + * * Provides implementation to filter unavailable projects form the launch configuration dialog. * It is (de) activated via the <code>IInternalDebugUIConstants.PREF_FILTER_LAUNCH_DELETED</code> preference. - * + * * @since 3.2 * */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchConfigurationAction.java index 00947544c..54f4f9aaf 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchConfigurationAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchConfigurationAction.java @@ -26,17 +26,17 @@ import org.eclipse.jface.viewers.Viewer; * Duplicates the selected launch configuration. */ public class DuplicateLaunchConfigurationAction extends AbstractLaunchConfigurationAction { - + /** * Action identifier for IDebugView#getAction(String) */ public static final String ID_DUPLICATE_ACTION = DebugUIPlugin.getUniqueIdentifier() + ".ID_DUPLICATE_ACTION"; //$NON-NLS-1$ /** - * Constructs an action to duplicate a launch configuration + * Constructs an action to duplicate a launch configuration */ public DuplicateLaunchConfigurationAction(Viewer viewer, String mode) { - super(LaunchConfigurationsMessages.DuplicateLaunchConfigurationAction__Duplicate_1, viewer, mode); + super(LaunchConfigurationsMessages.DuplicateLaunchConfigurationAction__Duplicate_1, viewer, mode); } /** @@ -61,7 +61,7 @@ public class DuplicateLaunchConfigurationAction extends AbstractLaunchConfigurat protected boolean updateSelection(IStructuredSelection selection) { return selection.size() == 1 && selection.getFirstElement() instanceof ILaunchConfiguration; } - + /* (non-Javadoc) * @see org.eclipse.jface.action.Action#getDisabledImageDescriptor() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchDelegatesStatusHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchDelegatesStatusHandler.java index d2c5ec444..d93229262 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchDelegatesStatusHandler.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchDelegatesStatusHandler.java @@ -4,7 +4,7 @@ * 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 *******************************************************************************/ @@ -25,14 +25,14 @@ import org.eclipse.swt.widgets.Shell; /** * This class provides a mechanism to prompt users in the UI thread from debug.core in the case where * duplicate launch delegates have been detected and a preferred delegate needs to be selected. - * + * * As this handler is used once a launch has been started, and only prompts in the event that the launch <i>can</i> * continue with further input, it must be a blocking operation. - * + * * @since 3.3 */ public class DuplicateLaunchDelegatesStatusHandler implements IStatusHandler { - + /** * @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/EnvironmentVariable.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/EnvironmentVariable.java index 4421aa195..0a6c911a7 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/EnvironmentVariable.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/EnvironmentVariable.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2000, 2005 Keith Seitz and others. - * All rights reserved. This program and the accompanying materials + * 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: * Keith Seitz (keiths@redhat.com) - initial implementation * IBM Corporation - integration and code cleanup @@ -18,10 +18,10 @@ public class EnvironmentVariable { // The name of the environment variable private String name; - + // The value of the environment variable private String value; - + public EnvironmentVariable(String name, String value) { this.name = name; @@ -31,24 +31,24 @@ public class EnvironmentVariable /** * Returns this variable's name, which serves as the key in the key/value * pair this variable represents - * + * * @return this variable's name */ public String getName() { return name; } - + /** * Returns this variables value. - * + * * @return this variable's value */ public String getValue() { return value; } - + /** * Sets this variable's value * @param value @@ -57,7 +57,7 @@ public class EnvironmentVariable { this.value = value; } - + /* (non-Javadoc) * @see java.lang.Object#toString() */ @@ -65,8 +65,8 @@ public class EnvironmentVariable public String toString() { return getName(); } - - + + /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ @@ -77,7 +77,7 @@ public class EnvironmentVariable EnvironmentVariable var = (EnvironmentVariable)obj; equal = var.getName().equals(name); } - return equal; + return equal; } /* (non-Javadoc) * @see java.lang.Object#hashCode() 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 86780ffa3..5b6487a35 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 @@ -55,15 +55,15 @@ import com.ibm.icu.text.MessageFormat; * Dialog for organizing favorite launch configurations */ public class FavoritesDialog extends TrayDialog { - + /** * Table of favorite launch configurations */ - private TableViewer fFavoritesTable; + private TableViewer fFavoritesTable; // history being organized private LaunchHistory fHistory; - + // favorites collection under edit private List<ILaunchConfiguration> fFavorites; @@ -91,8 +91,8 @@ public class FavoritesDialog extends TrayDialog { handleMoveDownButtonSelected(); } } - }; - + }; + /** * Listener that delegates when the selection changes in a table */ @@ -101,8 +101,8 @@ public class FavoritesDialog extends TrayDialog { public void selectionChanged(SelectionChangedEvent event) { handleFavoriteSelectionChanged(); } - }; - + }; + /** * Listener that delegates when a key is pressed in a table */ @@ -110,11 +110,11 @@ public class FavoritesDialog extends TrayDialog { @Override public void keyPressed(KeyEvent event) { if (event.character == SWT.DEL && event.stateMask == 0) { - removeSelectedFavorites(); + removeSelectedFavorites(); } } }; - + /** * Content provider for favorites table */ @@ -129,10 +129,10 @@ public class FavoritesDialog extends TrayDialog { @Override public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} } - + /** * Constructs a favorites dialog. - * + * * @param parentShell shell to open the dialog on * @param history launch history to edit */ @@ -155,8 +155,8 @@ public class FavoritesDialog extends TrayDialog { } updateStatus(); } - } - + } + /** * The 'remove favorites' button has been pressed */ @@ -167,16 +167,16 @@ public class FavoritesDialog extends TrayDialog { Object config = iter.next(); getFavorites().remove(config); } - getFavoritesTable().refresh(); - } - + getFavoritesTable().refresh(); + } + /** * The 'move up' button has been pressed */ protected void handleMoveUpButtonSelected() { handleMove(-1); - } - + } + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#getInitialSize() */ @@ -184,14 +184,14 @@ public class FavoritesDialog extends TrayDialog { protected Point getInitialSize() { return new Point(350, 400); } - + /** * The 'move down' button has been pressed */ protected void handleMoveDownButtonSelected() { handleMove(1); - } - + } + /** * Handles moving a favorite up or down the listing * @param direction the direction to make the move (up or down) @@ -206,28 +206,28 @@ public class FavoritesDialog extends TrayDialog { i= getFavorites().indexOf(config); movedFavs[i + direction]= config; } - + getFavorites().removeAll(selList); - + for (int j = 0; j < movedFavs.length; j++) { Object config = movedFavs[j]; if (config != null) { getFavorites().add(j, (ILaunchConfiguration) config); } } - getFavoritesTable().refresh(); - handleFavoriteSelectionChanged(); + getFavoritesTable().refresh(); + handleFavoriteSelectionChanged(); } - + /** * Returns the table of favorite launch configurations. - * + * * @return table viewer */ protected TableViewer getFavoritesTable() { return fFavoritesTable; } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite) @@ -253,7 +253,7 @@ public class FavoritesDialog extends TrayDialog { /** * Returns a label to use for launch mode with accelerators removed. - * + * * @return label to use for launch mode with accelerators removed */ private String getModeLabel() { @@ -261,15 +261,15 @@ public class FavoritesDialog extends TrayDialog { } /** - * Creates the main area of the dialog + * Creates the main area of the dialog * @param parent the parent to add this content to */ protected void createFavoritesArea(Composite parent) { Composite topComp = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_BOTH, 0, 0); - SWTFactory.createLabel(topComp, LaunchConfigurationsMessages.FavoritesDialog_2, 2); + SWTFactory.createLabel(topComp, LaunchConfigurationsMessages.FavoritesDialog_2, 2); fFavoritesTable = createTable(topComp, new FavoritesContentProvider()); Composite buttonComp = SWTFactory.createComposite(topComp, topComp.getFont(), 1, 1, GridData.VERTICAL_ALIGN_BEGINNING, 0, 0); - fAddFavoriteButton = SWTFactory.createPushButton(buttonComp, LaunchConfigurationsMessages.FavoritesDialog_3, null); + fAddFavoriteButton = SWTFactory.createPushButton(buttonComp, LaunchConfigurationsMessages.FavoritesDialog_3, null); fAddFavoriteButton.addSelectionListener(fButtonListener); fAddFavoriteButton.setEnabled(true); fRemoveFavoritesButton = SWTFactory.createPushButton(buttonComp, LaunchConfigurationsMessages.FavoritesDialog_4, null); @@ -279,7 +279,7 @@ public class FavoritesDialog extends TrayDialog { fMoveDownButton = SWTFactory.createPushButton(buttonComp, LaunchConfigurationsMessages.FavoritesDialog_6, null); fMoveDownButton.addSelectionListener(fButtonListener); } - + /** * Creates a fully configured table with the given content provider */ @@ -295,8 +295,8 @@ public class FavoritesDialog extends TrayDialog { tableViewer.getTable().setFont(parent.getFont()); tableViewer.addSelectionChangedListener(fSelectionChangedListener); tableViewer.getControl().addKeyListener(fKeyListener); - return tableViewer; - } + return tableViewer; + } /** * Returns the current list of favorites. @@ -308,26 +308,26 @@ public class FavoritesDialog extends TrayDialog { addAll(favs, fFavorites); } return fFavorites; - } - + } + protected LaunchHistory getLaunchHistory() { return fHistory; - } - + } + /** * Returns the initial content for the favorites list */ protected ILaunchConfiguration[] getInitialFavorites() { return getLaunchHistory().getFavorites(); - } - + } + /** * Returns the mode of this page - run or debug. */ protected String getMode() { return getLaunchHistory().getLaunchGroup().getMode(); } - + /** * Copies the array into the list */ @@ -336,14 +336,14 @@ public class FavoritesDialog extends TrayDialog { list.add(array[i]); } } - + /** * Refresh all tables and buttons */ protected void updateStatus() { getFavoritesTable().refresh(); - handleFavoriteSelectionChanged(); - } + handleFavoriteSelectionChanged(); + } /** * The selection in the favorites list has changed @@ -365,18 +365,18 @@ public class FavoritesDialog extends TrayDialog { last= true; } } - + fRemoveFavoritesButton.setEnabled(notEmpty); fMoveUpButton.setEnabled(notEmpty && !first); fMoveDownButton.setEnabled(notEmpty && !last); } - + /** * Method performOK. Uses scheduled Job format. * @since 3.2 */ public void saveFavorites() { - + final Job job = new Job(LaunchConfigurationsMessages.FavoritesDialog_8) { @SuppressWarnings("deprecation") @Override @@ -384,10 +384,10 @@ public class FavoritesDialog extends TrayDialog { ILaunchConfiguration[] initial = getInitialFavorites(); List<ILaunchConfiguration> current = getFavorites(); String groupId = getLaunchHistory().getLaunchGroup().getIdentifier(); - + int taskSize = Math.abs(initial.length-current.size());//get task size monitor.beginTask(LaunchConfigurationsMessages.FavoritesDialog_8, taskSize);//and set it - + // removed favorites for (int i = 0; i < initial.length; i++) { ILaunchConfiguration configuration = initial[i]; @@ -401,7 +401,7 @@ public class FavoritesDialog extends TrayDialog { if (groups != null) { groups.remove(groupId); if (groups.isEmpty()) { - groups = null; + groups = null; } workingCopy.setAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, groups); } @@ -409,11 +409,11 @@ public class FavoritesDialog extends TrayDialog { } catch (CoreException e) { DebugUIPlugin.log(e); return Status.CANCEL_STATUS; - } + } } monitor.worked(1); } - + // update added favorites Iterator<ILaunchConfiguration> favs = current.iterator(); while (favs.hasNext()) { @@ -435,22 +435,22 @@ public class FavoritesDialog extends TrayDialog { } monitor.worked(1); } - + fHistory.setFavorites(getArray(current)); monitor.done(); return Status.OK_STATUS; - } + } }; job.setPriority(Job.LONG); PlatformUI.getWorkbench().getProgressService().showInDialog(getParentShell(), job); job.schedule(); - - } - + + } + protected ILaunchConfiguration[] getArray(List<ILaunchConfiguration> list) { return list.toArray(new ILaunchConfiguration[list.size()]); - } - + } + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#okPressed() */ @@ -459,7 +459,7 @@ public class FavoritesDialog extends TrayDialog { saveFavorites(); super.okPressed(); } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings() */ @@ -469,13 +469,13 @@ public class FavoritesDialog extends TrayDialog { IDialogSettings section = settings.getSection(getDialogSettingsSectionName()); if (section == null) { section = settings.addNewSection(getDialogSettingsSectionName()); - } + } return section; } - + /** * Returns the name of the section that this dialog stores its settings in - * + * * @return String */ private String getDialogSettingsSectionName() { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FilterDropDownMenuCreator.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FilterDropDownMenuCreator.java index bfaafe5ff..86cc3a5d8 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FilterDropDownMenuCreator.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FilterDropDownMenuCreator.java @@ -34,13 +34,13 @@ public class FilterDropDownMenuCreator implements IMenuCreator { * @since 3.2 */ class FilterAction extends Action { - + /** The preference store. */ private IPreferenceStore fStore = null; /** The preference key for the value in the store. */ private String fKey = null; - + /** * Constructor for check style menu items * @param store the pref store @@ -54,7 +54,7 @@ public class FilterDropDownMenuCreator implements IMenuCreator { setChecked(fStore.getBoolean(fKey)); fillIntoMenu(menu, this); } - + /** * Constructor for flyout menu style actions * @param menu the parent menu @@ -66,7 +66,7 @@ public class FilterDropDownMenuCreator implements IMenuCreator { setMenuCreator(creator); fillIntoMenu(menu, this); } - + /** * fills the new action into the specified menu * @param menu the parent menu @@ -76,7 +76,7 @@ public class FilterDropDownMenuCreator implements IMenuCreator { ActionContributionItem item = new ActionContributionItem(action); item.fill(menu, -1); } - + /* (non-Javadoc) * @see org.eclipse.jface.action.Action#run() */ @@ -87,7 +87,7 @@ public class FilterDropDownMenuCreator implements IMenuCreator { } } } - + /** * the menu created via this class */ @@ -100,7 +100,7 @@ public class FilterDropDownMenuCreator implements IMenuCreator { private IPreferenceStore getDebugPrefStore() { return DebugUIPlugin.getDefault().getPreferenceStore(); } - + /* (non-Javadoc) * @see org.eclipse.jface.action.IMenuCreator#dispose() */ @@ -123,10 +123,10 @@ public class FilterDropDownMenuCreator implements IMenuCreator { new FilterAction(fCreatedMenu, getDebugPrefStore(), LaunchConfigurationsMessages.FilterDropDownMenuCreator_1, IInternalDebugUIConstants.PREF_FILTER_LAUNCH_DELETED); new FilterAction(fCreatedMenu, getDebugPrefStore(), LaunchConfigurationsMessages.FilterDropDownMenuCreator_2, IInternalDebugUIConstants.PREF_FILTER_LAUNCH_TYPES); new FilterAction(fCreatedMenu, getDebugPrefStore(), LaunchConfigurationsMessages.FilterDropDownMenuCreator_4, IInternalDebugUIConstants.PREF_FILTER_WORKING_SETS); - + //add separator new MenuItem(fCreatedMenu, SWT.SEPARATOR); - + //add pref action IAction action = new Action(LaunchConfigurationsMessages.FilterDropDownMenuCreator_3) { @Override @@ -137,7 +137,7 @@ public class FilterDropDownMenuCreator implements IMenuCreator { new ActionContributionItem(action).fill(fCreatedMenu, -1); return fCreatedMenu; } - + /* (non-Javadoc) * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FilterLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FilterLaunchConfigurationAction.java index 2dfc44491..c94bf10c7 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FilterLaunchConfigurationAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FilterLaunchConfigurationAction.java @@ -20,7 +20,7 @@ import org.eclipse.jface.action.IMenuCreator; import org.eclipse.jface.resource.ImageDescriptor; /** - * provides the implementation of the filtering action for the launch configuration view within the + * provides the implementation of the filtering action for the launch configuration view within the * Launch Configuration Dialog * @since 3.2 */ @@ -30,12 +30,12 @@ public class FilterLaunchConfigurationAction extends Action { * Action identifier for IDebugView#getAction(String) */ public static final String ID_FILTER_ACTION = DebugUIPlugin.getUniqueIdentifier() + ".ID_FILTER_ACTION"; //$NON-NLS-1$ - + /** * the menu for this drop down style action */ private FilterDropDownMenuCreator fMenuCreator; - + /** * Constructor * @param text the text for the action diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchCategoryFilter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchCategoryFilter.java index 3abc9efd7..ed97b7883 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchCategoryFilter.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchCategoryFilter.java @@ -24,13 +24,13 @@ import org.eclipse.ui.activities.WorkbenchActivityHelper; * types from a specific launch category. */ public class LaunchCategoryFilter extends ViewerFilter { - + private String fCategory; - + /** * Constructs a filter that hides configurations from a specific * category. - * + * * @param groupExtension */ public LaunchCategoryFilter(String category) { @@ -54,7 +54,7 @@ public class LaunchCategoryFilter extends ViewerFilter { config = (ILaunchConfiguration)element; try { type = config.getType(); - } + } catch (CoreException e) {} } boolean priv = false; @@ -71,10 +71,10 @@ public class LaunchCategoryFilter extends ViewerFilter { } return true; } - + /** * Returns whether the given categories are equal. - * + * * @param c1 category identifier or <code>null</code> * @param c2 category identifier or <code>null</code> * @return boolean @@ -84,6 +84,6 @@ public class LaunchCategoryFilter extends ViewerFilter { return c1 == c2; } return c1.equals(c2); - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java index 7a6d99a72..3f90d858c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java @@ -26,7 +26,7 @@ import org.eclipse.ui.model.WorkbenchViewerComparator; /** * Groups configurations by type. - * + * * @since 3.3 */ public class LaunchConfigurationComparator extends WorkbenchViewerComparator { @@ -35,7 +35,7 @@ public class LaunchConfigurationComparator extends WorkbenchViewerComparator { * the map of categories of <code>ILaunchConfigurationType</code>s to <code>Integer</code>s entries */ private static Map<ILaunchConfigurationType, Integer> fgCategories; - + /** * @see org.eclipse.jface.viewers.ViewerComparator#category(java.lang.Object) */ @@ -54,7 +54,7 @@ public class LaunchConfigurationComparator extends WorkbenchViewerComparator { } return map.size(); } - + /** * Returns the map of categories * @return the map of categories @@ -70,7 +70,7 @@ public class LaunchConfigurationComparator extends WorkbenchViewerComparator { ILaunchConfigurationType t2 = o2; return t1.getName().compareTo(t2.getName()); } - + }); Iterator<ILaunchConfigurationType> iterator = types.iterator(); int i = 0; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java index 170414a1c..3c640efe2 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java @@ -24,7 +24,7 @@ public class LaunchConfigurationDialog extends LaunchConfigurationPropertiesDial /** * Constructs a dialog - * + * * @param shell * @param launchConfiguration * @param group @@ -32,24 +32,24 @@ public class LaunchConfigurationDialog extends LaunchConfigurationPropertiesDial public LaunchConfigurationDialog(Shell shell, ILaunchConfiguration launchConfiguration, LaunchGroupExtension group) { super(shell, launchConfiguration, group); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite) */ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, ID_LAUNCH_BUTTON, getLaunchButtonText(), true); - createButton(parent, ID_CLOSE_BUTTON, LaunchConfigurationsMessages.LaunchConfigurationDialog_Close_1, false); + createButton(parent, ID_CLOSE_BUTTON, LaunchConfigurationsMessages.LaunchConfigurationDialog_Close_1, false); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#getTitleAreaTitle() */ @Override protected String getTitleAreaTitle() { - return LaunchConfigurationsMessages.LaunchConfigurationDialog_Modify_attributes_and_launch__1; + return LaunchConfigurationsMessages.LaunchConfigurationDialog_Modify_attributes_and_launch__1; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#getHelpContextId() */ @@ -57,7 +57,7 @@ public class LaunchConfigurationDialog extends LaunchConfigurationPropertiesDial protected String getHelpContextId() { return IDebugHelpContextIds.SINGLE_LAUNCH_CONFIGURATION_DIALOG; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#updateButtons() */ @@ -66,9 +66,9 @@ public class LaunchConfigurationDialog extends LaunchConfigurationPropertiesDial // Launch button getTabViewer().refresh(); getButton(ID_LAUNCH_BUTTON).setEnabled(getTabViewer().canLaunch() & getTabViewer().canLaunchWithModes() & !getTabViewer().hasDuplicateDelegates()); - + } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#getDialogSettingsSectionName() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationEditDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationEditDialog.java index bda318063..8459b57c6 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationEditDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationEditDialog.java @@ -19,13 +19,13 @@ import org.eclipse.swt.widgets.Shell; /** * This class is used to construct a launch configuration dialog used to edit a launch configuration and continue or cancel (optional), * not allowing a launch to occur. - * + * * @since 3.3 */ public class LaunchConfigurationEditDialog extends LaunchConfigurationDialog { private boolean fShowCancel = false; - + /** * Constructor * @param shell the shell to create this dialog on @@ -43,9 +43,9 @@ public class LaunchConfigurationEditDialog extends LaunchConfigurationDialog { */ @Override protected String getTitleAreaTitle() { - return LaunchConfigurationsMessages.LaunchConfigurationEditDialog_0; + return LaunchConfigurationsMessages.LaunchConfigurationEditDialog_0; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite) */ @@ -56,7 +56,7 @@ public class LaunchConfigurationEditDialog extends LaunchConfigurationDialog { createButton(parent, ID_CANCEL_BUTTON, IDialogConstants.CANCEL_LABEL, false); } } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#updateButtons() */ @@ -65,7 +65,7 @@ public class LaunchConfigurationEditDialog extends LaunchConfigurationDialog { getTabViewer().refresh(); getButton(ID_LAUNCH_BUTTON).setEnabled(getTabViewer().canLaunch() & getTabViewer().canLaunchWithModes() & !getTabViewer().hasDuplicateDelegates()); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#getDialogSettingsSectionName() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationFilteredTree.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationFilteredTree.java index 06f858bab..abd3658ec 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationFilteredTree.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationFilteredTree.java @@ -4,7 +4,7 @@ * 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 * Eike Stepper - bug 343228 @@ -38,11 +38,11 @@ import org.eclipse.ui.model.WorkbenchViewerComparator; /** * Overrides the default filtered tree to use our own tree viewer which supports preserving selection after filtering - * + * * @see LaunchConfigurationView * @see LaunchConfigurationViewer - * - * @since 3.3 + * + * @since 3.3 */ public final class LaunchConfigurationFilteredTree extends FilteredTree { @@ -50,7 +50,7 @@ public final class LaunchConfigurationFilteredTree extends FilteredTree { private ViewerFilter[] fFilters = null; private int fTreeStyle = -1; private PatternFilter fPatternFilter = null; - + /** * Constructor * @param parent the parent {@link Composite} @@ -66,7 +66,7 @@ public final class LaunchConfigurationFilteredTree extends FilteredTree { fPatternFilter = filter; fTreeStyle = treeStyle; } - + /** * @see org.eclipse.ui.dialogs.FilteredTree#doCreateTreeViewer(org.eclipse.swt.widgets.Composite, int) */ @@ -92,7 +92,7 @@ public final class LaunchConfigurationFilteredTree extends FilteredTree { }); return treeViewer; } - + /** * @see org.eclipse.ui.dialogs.FilteredTree#createControl(org.eclipse.swt.widgets.Composite, int) */ @@ -115,7 +115,7 @@ public final class LaunchConfigurationFilteredTree extends FilteredTree { public void createViewControl() { super.init(fTreeStyle, fPatternFilter); } - + /** * Handle help events locally rather than deferring to WorkbenchHelp. This * allows help specific to the selected config type to be presented. @@ -132,7 +132,7 @@ public final class LaunchConfigurationFilteredTree extends FilteredTree { } PlatformUI.getWorkbench().getHelpSystem().displayHelp(id); } - + /* (non-Javadoc) * @see org.eclipse.ui.dialogs.FilteredTree#textChanged() */ @@ -182,7 +182,7 @@ public final class LaunchConfigurationFilteredTree extends FilteredTree { super.textChanged(); } } - + /** * Computes the context id for this viewer * @return the context id @@ -196,7 +196,7 @@ public final class LaunchConfigurationFilteredTree extends FilteredTree { ILaunchConfigurationType configType = null; if (firstSelected instanceof ILaunchConfigurationType) { configType = (ILaunchConfigurationType) firstSelected; - } + } else if (firstSelected instanceof ILaunchConfiguration) { configType = ((ILaunchConfiguration) firstSelected).getType(); } @@ -207,11 +207,11 @@ public final class LaunchConfigurationFilteredTree extends FilteredTree { } } } - } + } catch (CoreException ce) {DebugUIPlugin.log(ce);} return null; } - + /** * Returns the launch configuration viewer for this filtered tree * @return the tree viewer appropriately cast @@ -221,10 +221,10 @@ public final class LaunchConfigurationFilteredTree extends FilteredTree { } /* (non-Javadoc) - * + * * Called after a re-filter due to user typing text. Update the filter count * in the LCD - * + * * @see org.eclipse.ui.dialogs.FilteredTree#updateToolbar(boolean) */ @Override diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java index 08f9135af..33fd45f6f 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java @@ -81,10 +81,10 @@ import org.xml.sax.helpers.DefaultHandler; /** * Manages UI related launch configuration artifacts - * + * * Since 3.3 the Launch Configuration Manager is an <code>ISaveParticipant</code>, allowing it to participate in * workspace persistence life-cycles. - * + * * @see ISaveParticipant * @see org.eclipse.debug.ui.ILaunchShortcut * @see ILaunchGroup @@ -110,7 +110,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici LaunchShortcutExtension shortcutB = b; String labelB = shortcutB.getLabel(); String pathB = shortcutB.getMenuPath(); - + // group by path, then sort by label // a null path sorts last (i.e. highest) if (nullOrEqual(pathA, pathB)) { @@ -135,7 +135,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } return pathA.compareToIgnoreCase(pathB); } - + private boolean nullOrEqual(String a, String b) { if (a == null) { return b == null; @@ -144,17 +144,17 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } } - + /** * Launch group extensions, keyed by launch group identifier. */ protected Map<String, LaunchGroupExtension> fLaunchGroups; - + /** * Launch histories keyed by launch group identifier - */ + */ protected Map<String, LaunchHistory> fLaunchHistories; - + /** * The list of registered implementors of <code>ILaunchHistoryChangedListener</code> */ @@ -164,33 +164,33 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici * Launch shortcuts */ private List<LaunchShortcutExtension> fLaunchShortcuts = null; - + /** * Launch shortcuts, cached by perspective ids */ private Map<String, List<LaunchShortcutExtension>> fLaunchShortcutsByPerspective = null; - + /** * Cache of launch configuration tab images with error overlays */ protected ImageRegistry fErrorImages = null; - + /** * true when restoring launch history */ protected boolean fRestoring = false; - + /** * The name of the file used to persist the launch history. */ private static final String LAUNCH_CONFIGURATION_HISTORY_FILENAME = "launchConfigurationHistory.xml"; //$NON-NLS-1$ - + /** - * performs initialization of the manager when it is started + * performs initialization of the manager when it is started */ - public void startup() { + public void startup() { ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); - launchManager.addLaunchListener(this); + launchManager.addLaunchListener(this); DebugUIPlugin.getDefault().addSaveParticipant(this); //update histories for launches already registered ILaunch[] launches = launchManager.getLaunches(); @@ -198,23 +198,23 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici launchAdded(launches[i]); } } - + /** * Returns whether any launch config supports the given mode. - * + * * @param mode launch mode * @return whether any launch config supports the given mode */ public boolean launchModeAvailable(String mode) { return ((LaunchManager)DebugPlugin.getDefault().getLaunchManager()).launchModeAvailable(mode); } - + /** * Returns whether the given launch configuration should be visible in the * debug UI. If the config is marked as private, or belongs to a different * category (i.e. non-null), then this configuration should not be displayed * in the debug UI. - * + * * @param launchConfiguration the configuration to check for the {@link IDebugUIConstants#ATTR_PRIVATE} attribute * @return boolean */ @@ -225,11 +225,11 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } return false; } - + /** * Returns a collection of launch configurations that does not contain * configurations from disabled activities. - * + * * @param configurations a collection of configurations * @return the given collection minus any configurations from disabled activities */ @@ -250,7 +250,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici if (DebugUIPlugin.doLaunchConfigurationFiltering(configuration) & !WorkbenchActivityHelper.filterItem(contribution)) { filteredConfigs.add(configuration); } - } + } catch (CoreException e) {DebugUIPlugin.log(e.getStatus());} } return filteredConfigs.toArray(new ILaunchConfiguration[filteredConfigs.size()]); @@ -279,9 +279,9 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } return set.toArray(new ILaunchDelegate[set.size()]); } - + /** - * Performs cleanup operations when the manager is being disposed of. + * Performs cleanup operations when the manager is being disposed of. */ public void shutdown() { ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); @@ -293,13 +293,13 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } DebugUIPlugin.getDefault().removeSaveParticipant(this); } - + /** * @see ILaunchListener#launchRemoved(ILaunch) */ @Override public void launchRemoved(ILaunch launch) {} - + /** * @see ILaunchListener#launchChanged(ILaunch) */ @@ -315,7 +315,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici public void launchAdded(final ILaunch launch) { removeTerminatedLaunches(launch); } - + /** * Removes terminated launches from the launch view, leaving the specified launch in the view * @param newLaunch the newly added launch to leave in the view @@ -332,16 +332,16 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } } } - + /** * Returns the most recent launch for the given group, or <code>null</code> * if none. This method does not include any filtering for the returned launch configuration. - * + * * This method is exposed via DebugTools.getLastLaunch * @param groupId the identifier of the {@link ILaunchGroup} to get the last launch from * * @return the last launch, or <code>null</code> if none - */ + */ public ILaunchConfiguration getLastLaunch(String groupId) { LaunchHistory history = getLaunchHistory(groupId); if (history != null) { @@ -349,11 +349,11 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } return null; } - + /** * Returns the most recent launch for the given group taking launch configuration * filters into account, or <code>null</code> if none. - * + * * @param groupId launch group * @return the most recent, un-filtered launch */ @@ -367,7 +367,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } return null; } - + /** * Add the specified listener to the list of listeners that will be notified when the * launch history changes. @@ -378,7 +378,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici fLaunchHistoryChangedListeners.add(listener); } } - + /** * Remove the specified listener from the list of listeners that will be notified when the * launch history changes. @@ -387,7 +387,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici public void removeLaunchHistoryListener(ILaunchHistoryChangedListener listener) { fLaunchHistoryChangedListeners.remove(listener); } - + /** * Notify all launch history listeners that the launch history has changed in some way. */ @@ -405,7 +405,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici */ protected String getHistoryAsXML() throws CoreException, ParserConfigurationException { Document doc = DebugUIPlugin.getDocument(); - Element historyRootElement = doc.createElement(IConfigurationElementConstants.LAUNCH_HISTORY); + Element historyRootElement = doc.createElement(IConfigurationElementConstants.LAUNCH_HISTORY); doc.appendChild(historyRootElement); for (LaunchHistory history : fLaunchHistories.values()) { Element groupElement = doc.createElement(IConfigurationElementConstants.LAUNCH_GROUP); @@ -439,13 +439,13 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } } } - + /** * Returns the path to the local file for the launch history * @return the file path for the launch history file */ protected IPath getHistoryFilePath() { - return DebugUIPlugin.getDefault().getStateLocation().append(LAUNCH_CONFIGURATION_HISTORY_FILENAME); + return DebugUIPlugin.getDefault().getStateLocation().append(LAUNCH_CONFIGURATION_HISTORY_FILENAME); } /** @@ -459,7 +459,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici synchronized (this) { if (fLaunchHistories == null || fRestoring) { return; - } + } } boolean shouldsave = false; for (LaunchHistory history : fLaunchHistories.values()) { @@ -471,13 +471,13 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici String xml = getHistoryAsXML(); File file = new File(osHistoryPath); file.createNewFile(); - + try (FileOutputStream stream = new FileOutputStream(file)) { stream.write(xml.getBytes("UTF8")); //$NON-NLS-1$ } } } - + /** * Find the XML history file and parse it. Place the corresponding configurations * in the appropriate history, and set the most recent launch. @@ -509,9 +509,9 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } catch (IOException exception) { DebugUIPlugin.log(exception); return; - } + } // If root node isn't what we expect, return - if (!rootHistoryElement.getNodeName().equalsIgnoreCase(IConfigurationElementConstants.LAUNCH_HISTORY)) { + if (!rootHistoryElement.getNodeName().equalsIgnoreCase(IConfigurationElementConstants.LAUNCH_HISTORY)) { return; } // For each child of the root node, construct a launch config handle and add it to @@ -526,7 +526,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici short type = node.getNodeType(); if (type == Node.ELEMENT_NODE) { entry = (Element) node; - if (entry.getNodeName().equalsIgnoreCase(IConfigurationElementConstants.LAUNCH)) { + if (entry.getNodeName().equalsIgnoreCase(IConfigurationElementConstants.LAUNCH)) { createHistoryElement(entry, histories, false); } else if (entry.getNodeName().equalsIgnoreCase(IConfigurationElementConstants.LAST_LAUNCH)) { createHistoryElement(entry, histories, true); @@ -534,7 +534,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici String id = entry.getAttribute(IConfigurationElementConstants.ID); if (id != null) { LaunchHistory history = getLaunchHistory(id); - if (history != null) { + if (history != null) { restoreHistory(entry, history); } } @@ -542,10 +542,10 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } } } - + /** * Restores the given launch history. - * + * * @param groupElement launch group history * @param history associated history cache */ @@ -574,8 +574,8 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } } } - - /** + + /** * Restores a list of configurations. * @param root element * @return list of configurations under the element @@ -589,7 +589,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici if (node.getNodeType() == Node.ELEMENT_NODE) { Element element = (Element) node; if (element.getNodeName().equals(IConfigurationElementConstants.LAUNCH)) { - String memento = element.getAttribute(IConfigurationElementConstants.MEMENTO); + String memento = element.getAttribute(IConfigurationElementConstants.MEMENTO); if (memento != null) { try { ILaunchConfiguration configuration = DebugPlugin.getDefault().getLaunchManager().getLaunchConfiguration(memento); @@ -607,7 +607,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } return configs.toArray(new ILaunchConfiguration[configs.size()]); } - + /** * Construct a launch configuration corresponding to the specified XML * element, and place it in the appropriate history. @@ -616,8 +616,8 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici * @param prepend if any restored items should be added to to top of the launch history */ private void createHistoryElement(Element entry, LaunchHistory[] histories, boolean prepend) { - String memento = entry.getAttribute(IConfigurationElementConstants.MEMENTO); - String mode = entry.getAttribute(IConfigurationElementConstants.MODE); + String memento = entry.getAttribute(IConfigurationElementConstants.MEMENTO); + String mode = entry.getAttribute(IConfigurationElementConstants.MODE); try { ILaunchConfiguration launchConfig = DebugPlugin.getDefault().getLaunchManager().getLaunchConfiguration(memento); //touch the type to see if its type exists @@ -633,9 +633,9 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } } catch (CoreException e) { //do nothing, as we want to throw away invalid launch history entries silently - } + } } - + /** * Load all registered extensions of the 'launch shortcut' extension point. */ @@ -644,8 +644,8 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici // Get the configuration elements IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_LAUNCH_SHORTCUTS); IConfigurationElement[] infos = extensionPoint.getConfigurationElements(); - - // Load the configuration elements into a Map + + // Load the configuration elements into a Map fLaunchShortcuts = new ArrayList<LaunchShortcutExtension>(infos.length); for (int i = 0; i < infos.length; i++) { fLaunchShortcuts.add(new LaunchShortcutExtension(infos[i])); @@ -653,7 +653,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici Collections.sort(fLaunchShortcuts, new ShortcutComparator()); } } - + /** * Load all registered extensions of the 'launch groups' extension point. */ @@ -662,8 +662,8 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici // Get the configuration elements IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_LAUNCH_GROUPS); IConfigurationElement[] infos= extensionPoint.getConfigurationElements(); - - // Load the configuration elements into a Map + + // Load the configuration elements into a Map fLaunchGroups = new HashMap<String, LaunchGroupExtension>(infos.length); LaunchGroupExtension ext = null; for (int i = 0; i < infos.length; i++) { @@ -671,11 +671,11 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici fLaunchGroups.put(ext.getIdentifier(), ext); } } - } - + } + /** * Returns all launch shortcuts - * + * * @return all launch shortcuts */ public List<LaunchShortcutExtension> getLaunchShortcuts() { @@ -712,11 +712,11 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } return list; } - + /** * Returns an array of all of the ids of the <code>ILaunchConfigurationType</code>s that apply to the currently * specified <code>IResource</code>. - * + * * @param resource the resource context * @return an array of applicable <code>ILaunchConfigurationType</code> ids, or an empty array, never <code>null</code> * @since 3.3 @@ -747,7 +747,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici ILaunchConfigurationType type = null; for (String id : set) { type = lm.getLaunchConfigurationType(id); - if(type != null) { + if(type != null) { if(!types.contains(type) && type.isPublic() && !"org.eclipse.ui.externaltools.builder".equals(type.getCategory())) { //$NON-NLS-1$ types.add(type.getIdentifier()); } @@ -755,12 +755,12 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } return types.toArray(new String[types.size()]); } - + /** * Returns an array of the <code>ILaunchConfiguration</code>s that apply to the specified <code>IResource</code> * @param types the array of launch configuration type identifiers * @param resource the resource - * @return an array of applicable <code>ILaunchConfiguration</code>s for the specified <code>IResource</code> or an empty + * @return an array of applicable <code>ILaunchConfiguration</code>s for the specified <code>IResource</code> or an empty * array if none, never <code>null</code> * @since 3.3 */ @@ -805,7 +805,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } return list.toArray(new ILaunchConfiguration[list.size()]); } - + /** * Returns if the specified configuration should be considered as a potential candidate * @param config to configuration @@ -826,7 +826,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } return false; } - + /** * Returns all launch shortcuts for the given category * @param category the identifier of the category @@ -835,11 +835,11 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici */ public List<LaunchShortcutExtension> getLaunchShortcuts(String category) { return filterShortcuts(getLaunchShortcuts(), category); - } - + } + /** * Return a list of filtered launch shortcuts, based on the given category. - * + * * @param unfiltered the raw list of shortcuts to filter * @param category the category to filter by * @return List @@ -855,18 +855,18 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici filtered.add(extension); } } - return filtered; + return filtered; } - + /** * Returns all launch shortcuts defined for the given perspective, * empty list if none. - * + * * @param perpsective perspective identifier * @param category the category for the shortcut * @return all launch shortcuts defined for the given perspective, * empty list if none. - * @deprecated the use of perspectives for launch shortcuts has been + * @deprecated the use of perspectives for launch shortcuts has been * deprecated since 3.1, use a contextualLaunch element instead */ @Deprecated @@ -887,10 +887,10 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici List<LaunchShortcutExtension> list = fLaunchShortcutsByPerspective.get(perpsective); if (list == null) { return Collections.EMPTY_LIST; - } + } return filterShortcuts(list, category); } - + /** * Returns the first occurrence of any one of the configurations in the provided list, if they are found in the launch history * for the corresponding launch group @@ -942,7 +942,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } return null; } - + /** * Returns the shared config from the selected resource or <code>null</code> if the selected resources is not a shared config * @param receiver the object to test if it is a shared launch configuration @@ -978,7 +978,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } return null; } - + /** * Returns the image used to display an error in the given tab * @param tab the tab to get the error image for @@ -1003,11 +1003,11 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } return image; } - + /** * Return the launch group with the given id, or <code>null</code> * @param id the identifier of the {@link LaunchGroupExtension} - * + * * @return the launch group with the given id, or <code>null</code> */ public LaunchGroupExtension getLaunchGroup(String id) { @@ -1016,10 +1016,10 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } return fLaunchGroups.get(id); } - + /** * Return all defined launch groups - * + * * @return all defined launch groups */ public ILaunchGroup[] getLaunchGroups() { @@ -1027,18 +1027,18 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici loadLaunchGroups(); } return fLaunchGroups.values().toArray(new ILaunchGroup[fLaunchGroups.size()]); - } - + } + /** * Return the launch history with the given group id, or <code>null</code> - * @param id the identifier of the launch history + * @param id the identifier of the launch history * @return the launch history with the given group id, or <code>null</code> */ public LaunchHistory getLaunchHistory(String id) { loadLaunchHistories(); return fLaunchHistories.get(id); - } - + } + /** * Returns the singleton instance of the launch manager * @return the singleton instance of the launch manager @@ -1047,7 +1047,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici private LaunchManager getLaunchManager() { return (LaunchManager) DebugPlugin.getDefault().getLaunchManager(); } - + /** * Restore launch history */ @@ -1067,10 +1067,10 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici fRestoring = false; } } - + /** * Returns the default launch group for the given mode. - * + * * @param mode the mode identifier * @return launch group */ @@ -1080,11 +1080,11 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } return getLaunchGroup(IDebugUIConstants.ID_RUN_LAUNCH_GROUP); } - + /** * Returns the launch group the given launch configuration type belongs to, in * the specified mode, or <code>null</code> if none. - * + * * @param type the type * @param mode the mode * @return the launch group the given launch configuration belongs to, in @@ -1113,12 +1113,12 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } /** - * Returns the {@link ILaunchGroup} for the given mode set and + * Returns the {@link ILaunchGroup} for the given mode set and * {@link ILaunchConfigurationType}. * @param type the type * @param modeset the set of modes, which are combined to one mode string * @return the associated {@link ILaunchGroup} or <code>null</code> - * + * * @since 3.4.0 */ public ILaunchGroup getLaunchGroup(ILaunchConfigurationType type, Set<String> modeset) { @@ -1131,11 +1131,11 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici } return getLaunchGroup(type, buff.toString()); } - + /** * Returns the private launch configuration used as a place-holder to represent/store * the information associated with a launch configuration type. - * + * * @param type launch configuration type * @return launch configuration * @throws CoreException if an excpetion occurs @@ -1154,7 +1154,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici break; } } - + if (shared == null) { // create a new shared config ILaunchConfigurationWorkingCopy workingCopy; @@ -1197,14 +1197,14 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), "Internal error saving launch history", e)); //$NON-NLS-1$ } catch (ParserConfigurationException e) { throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), "Internal error saving launch history", e)); //$NON-NLS-1$ - } + } } - + /** * Sets the given launch to be the most recent launch in the launch * history (for applicable histories). * <p> - * @param launch the launch to prepend to its associated histories + * @param launch the launch to prepend to its associated histories * @since 3.3 */ public void setRecentLaunch(ILaunch launch) { @@ -1217,6 +1217,6 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici history.launchAdded(launch); } } - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java index 8116486ec..5741f17d7 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.launchConfigurations; - + import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; @@ -43,18 +43,18 @@ import org.eclipse.ui.activities.WorkbenchActivityHelper; /** * Manages contributed launch configuration tabs - * + * * @see LaunchConfigurationTabGroupWrapper * @see LaunchConfigurationTabExtension * @see LaunchConfigurationTabGroupExtension - */ + */ public class LaunchConfigurationPresentationManager { - + /** * The singleton launch configuration presentation manager */ private static LaunchConfigurationPresentationManager fgDefault; - + /** * Collection of launch configuration tab group extensions * defined in plug-in xml. Entries are keyed by launch @@ -64,17 +64,17 @@ public class LaunchConfigurationPresentationManager { * used to represent the default tab group (i.e. unspecified mode). */ private Hashtable<String, Map<Set<String>, LaunchConfigurationTabGroupExtension>> fTabGroupExtensions; - + /** * contributed tabs are stored by the tab group id that they contribute to. * each entry is a <code>Hashtable</code> consisting of the corresponding - * <code>LaunchConfigurationTabExtension</code> objects for each contributed tab stored by their + * <code>LaunchConfigurationTabExtension</code> objects for each contributed tab stored by their * id - * + * * @since 3.3 */ private Hashtable<String, Hashtable<String, LaunchConfigurationTabExtension>> fContributedTabs; - + private static Set<String> ALL_MODES = new HashSet<String>(1); static { @@ -98,7 +98,7 @@ public class LaunchConfigurationPresentationManager { } return fgDefault; } - + /** * Creates launch configuration tab group extensions for each extension * defined in XML, and adds them to the table of tab group extensions. @@ -129,26 +129,26 @@ public class LaunchConfigurationPresentationManager { } } } - } - + } + /** * Reports if a tab group extension has been replaced by another contribution * @param oldext the old tab group extension from the cache * @param newext the new one being cached * @param mode the mode(s) the group applies to - * + * * @since 3.6 */ void reportReplacement(LaunchConfigurationTabGroupExtension oldext, LaunchConfigurationTabGroupExtension newext, Object mode) { if(oldext != null) { - Status status = new Status(IStatus.ERROR, - DebugUIPlugin.getUniqueIdentifier(), - NLS.bind(LaunchConfigurationsMessages.LaunchConfigurationPresentationManager_0, + Status status = new Status(IStatus.ERROR, + DebugUIPlugin.getUniqueIdentifier(), + NLS.bind(LaunchConfigurationsMessages.LaunchConfigurationPresentationManager_0, new String[]{oldext.getIdentifier(), oldext.getTypeIdentifier(), mode.toString(), newext.getIdentifier()})); DebugUIPlugin.log(status); } } - + /** * This method is used to collect all of the contributed tabs defined by the <code>launchConfigurationTabs</code> * extension point @@ -172,10 +172,10 @@ public class LaunchConfigurationPresentationManager { element.put(tab.getIdentifier(), tab); } } - + /** * Returns the tab group for the given launch configuration type and mode. - * + * * @param type launch configuration type * @param mode launch mode * @return the tab group for the given type of launch configuration, or <code>null</code> if none @@ -188,10 +188,10 @@ public class LaunchConfigurationPresentationManager { if (ext == null) { IStatus status = new Status(IStatus.ERROR, IDebugUIConstants.PLUGIN_ID, IDebugUIConstants.INTERNAL_ERROR, "No tab group defined for launch configuration type " + type.getIdentifier(), null); //$NON-NLS-1$ throw new CoreException(status); - } - return new LaunchConfigurationTabGroupWrapper(ext.newTabGroup(), ext.getIdentifier(), null); + } + return new LaunchConfigurationTabGroupWrapper(ext.newTabGroup(), ext.getIdentifier(), null); } - + /** * Returns the tab group for the given launch configuration and the mode the dialog opened in * @param type the type of the configuration @@ -207,17 +207,17 @@ public class LaunchConfigurationPresentationManager { if (ext == null) { IStatus status = new Status(IStatus.ERROR, IDebugUIConstants.PLUGIN_ID, IDebugUIConstants.INTERNAL_ERROR, "No tab group defined for launch configuration type " + config.getType().getIdentifier(), null); //$NON-NLS-1$ throw new CoreException(status); - } + } return new LaunchConfigurationTabGroupWrapper(ext.newTabGroup(), ext.getIdentifier(), config); } - + /** * Returns the proxy elements for all contributed tabs for the specified tab group id * @param groupid the id of the tab group * @param config the config the tab group is opened on * @param mode the mode the associated launch dialog is opened on * @return the listing of all of the tab extensions or an empty array, never <code>null</code> - * + * * @since 3.3 */ protected LaunchConfigurationTabExtension[] getTabExtensions(String groupid, ILaunchConfiguration config, String mode) throws CoreException { @@ -228,7 +228,7 @@ public class LaunchConfigurationPresentationManager { } return new LaunchConfigurationTabExtension[0]; } - + /** * Returns a listing of <code>LaunchConfiguraitonTabExtension</code>s that does not contain any tabs * from disabled activities @@ -242,7 +242,7 @@ public class LaunchConfigurationPresentationManager { * </p> * @param tabs the raw listing of tabs to filter * @return the listing of filtered <code>LaunchConfigurationTabExtension</code>s or an empty array, never <code>null</code> - * + * * @since 3.3 */ protected LaunchConfigurationTabExtension[] filterLaunchTabExtensions(LaunchConfigurationTabExtension[] tabs, ILaunchConfiguration config, String mode) throws CoreException { @@ -281,11 +281,11 @@ public class LaunchConfigurationPresentationManager { } return set.toArray(new LaunchConfigurationTabExtension[set.size()]); } - + /** * Returns the launch tab group extension for the given type and mode, or * <code>null</code> if none - * + * * @param type launch configuration type identifier * @param mode launch mode identifier * @return launch tab group extension or <code>null</code> @@ -303,11 +303,11 @@ public class LaunchConfigurationPresentationManager { } return null; } - + /** * Returns the identifier of the help context that is associated with the * specified launch configuration type and mode, or <code>null</code> if none. - * + * * @param type launch config type * @param mode launch mode * @return the identifier for the help context associated with the given @@ -322,14 +322,14 @@ public class LaunchConfigurationPresentationManager { if (ext == null) { IStatus status = new Status(IStatus.ERROR, IDebugUIConstants.PLUGIN_ID, IDebugUIConstants.INTERNAL_ERROR, "No tab group defined for launch configuration type " + type.getIdentifier(), null); //$NON-NLS-1$ throw new CoreException(status); - } - return ext.getHelpContextId(); + } + return ext.getHelpContextId(); } - + /** * Returns the description of the given configuration type * in the specified mode or <code>null</code> if none. - * + * * @param configType the config type * @param mode the launch mode * @return the description of the given configuration type, possible <code>null</code> @@ -339,11 +339,11 @@ public class LaunchConfigurationPresentationManager { modes.add(mode); LaunchConfigurationTabGroupExtension extension = getExtension(configType.getAttribute(IConfigurationElementConstants.ID), modes); return (extension != null ? extension.getDescription(modes) : null); - } - + } + /** * Returns a sorted list of launch mode names corresponding to the given identifiers. - * + * * @param modes set of launch mode identifiers * @return sorted list of launch mode names */ @@ -361,7 +361,7 @@ public class LaunchConfigurationPresentationManager { Collections.sort(names); return names; } - + /** * Returns the label of the mode id with all accelerators removed * @param modeid the id of the mode i.e. 'run' @@ -377,6 +377,6 @@ public class LaunchConfigurationPresentationManager { } return mode; } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java index 8fcf468ff..f458a2414 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java @@ -28,13 +28,13 @@ import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell; - + /** * A dialog used to edit a single launch configuration. */ public class LaunchConfigurationPropertiesDialog extends LaunchConfigurationsDialog implements ILaunchConfigurationListener { - + /** * The launch configuration to display */ @@ -43,9 +43,9 @@ public class LaunchConfigurationPropertiesDialog extends LaunchConfigurationsDia /** * Constructs a new launch configuration dialog on the given * parent shell. - * + * * @param shell the parent shell - * @param selection the selection used to initialize this dialog, typically the + * @param selection the selection used to initialize this dialog, typically the * current workbench selection * @param group launch group */ @@ -54,15 +54,15 @@ public class LaunchConfigurationPropertiesDialog extends LaunchConfigurationsDia fLaunchConfiguration = launchConfiguration; DebugPlugin.getDefault().getLaunchManager().addLaunchConfigurationListener(this); } - + /** * Constructs a new launch configuration dialog on the given * parent shell. - * + * * @param shell the parent shell - * @param selection the selection used to initialize this dialog, typically the + * @param selection the selection used to initialize this dialog, typically the * current workbench selection - * @param reservednames a set of names of virtual launch configurations that need to be considered + * @param reservednames a set of names of virtual launch configurations that need to be considered * when configuration names are generated * @param group launch group */ @@ -72,10 +72,10 @@ public class LaunchConfigurationPropertiesDialog extends LaunchConfigurationsDia DebugPlugin.getDefault().getLaunchManager().addLaunchConfigurationListener(this); fReservedNames = reservednames; } - + /** * Returns the launch configuration being displayed. - * + * * @return ILaunchConfiguration */ protected ILaunchConfiguration getLaunchConfiguration() { @@ -105,9 +105,9 @@ public class LaunchConfigurationPropertiesDialog extends LaunchConfigurationsDia IStatus status = getInitialStatus(); if (status != null) { handleStatus(status); - } + } } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#close() */ @@ -119,7 +119,7 @@ public class LaunchConfigurationPropertiesDialog extends LaunchConfigurationsDia DebugPlugin.getDefault().getLaunchManager().removeLaunchConfigurationListener(this); return super.close(); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#addContent(org.eclipse.swt.widgets.Composite) */ @@ -135,30 +135,30 @@ public class LaunchConfigurationPropertiesDialog extends LaunchConfigurationsDia topLayout.marginWidth = 5; topComp.setLayout(topLayout); topComp.setFont(dialogComp.getFont()); - - // Set the things that TitleAreaDialog takes care of + + // Set the things that TitleAreaDialog takes care of setTitle(getTitleAreaTitle()); setMessage(IInternalDebugCoreConstants.EMPTY_STRING); setModeLabelState(); - + // Build the launch configuration edit area and put it into the composite. Composite editAreaComp = createLaunchConfigurationEditArea(topComp); gd = new GridData(GridData.FILL_BOTH); editAreaComp.setLayoutData(gd); editAreaComp.setFont(dialogComp.getFont()); - + dialogComp.layout(true); applyDialogFont(dialogComp); } - + /** * returns the title area title of the dialog * @return the title area title */ protected String getTitleAreaTitle() { - return LaunchConfigurationsMessages.LaunchConfigurationPropertiesDialog_Edit_launch_configuration_properties_1; + return LaunchConfigurationsMessages.LaunchConfigurationPropertiesDialog_Edit_launch_configuration_properties_1; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite) */ @@ -168,7 +168,7 @@ public class LaunchConfigurationPropertiesDialog extends LaunchConfigurationsDia createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#getShellTitle() */ @@ -176,7 +176,7 @@ public class LaunchConfigurationPropertiesDialog extends LaunchConfigurationsDia protected String getShellTitle() { return LaunchConfigurationsMessages.LaunchConfigurationPropertiesDialog_Properties_for__0__2; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#getHelpContextId() */ @@ -184,7 +184,7 @@ public class LaunchConfigurationPropertiesDialog extends LaunchConfigurationsDia protected String getHelpContextId() { return IDebugHelpContextIds.LAUNCH_CONFIGURATION_PROPERTIES_DIALOG; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#updateButtons() */ @@ -192,9 +192,9 @@ public class LaunchConfigurationPropertiesDialog extends LaunchConfigurationsDia public void updateButtons() { getTabViewer().refresh(); getButton(IDialogConstants.OK_ID).setEnabled(getTabViewer().canSave()); - + } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#okPressed() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationSelectionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationSelectionDialog.java index 949638627..a0632167d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationSelectionDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationSelectionDialog.java @@ -18,7 +18,7 @@ import org.eclipse.swt.widgets.Shell; /** * This class provides a dialog for selecting a given launch configuration from a listing - * + * * @since 3.3.0 * CONTEXTLAUNCHING */ @@ -26,7 +26,7 @@ public class LaunchConfigurationSelectionDialog extends AbstractDebugListSelecti private static final String DIALOG_SETTINGS = IDebugUIConstants.PLUGIN_ID + ".SELECT_LAUNCH_CONFIGURATION_DIALOG"; //$NON-NLS-1$; private Object fInput; - + /** * Constructor * @param parent @@ -68,5 +68,5 @@ public class LaunchConfigurationSelectionDialog extends AbstractDebugListSelecti protected String getViewerLabel() { return LaunchConfigurationsMessages.LaunchConfigurationSelectionDialog_1; } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupExtension.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupExtension.java index dae26a1ee..e761b30f4 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupExtension.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupExtension.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.launchConfigurations; - + import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -30,33 +30,33 @@ import org.eclipse.debug.ui.ILaunchConfigurationTabGroup; * Proxy to a launch configuration tab group element */ public class LaunchConfigurationTabGroupExtension { - + /** * The configuration element defining this tab group. */ private IConfigurationElement fConfig = null; - + /** * A list of sets of modes that this tab group supports * @since 3.3 */ private List<Set<String>> fModes = null; - + /** * A map of mode sets to descriptions * @since 3.3 */ private Map<Set<String>, String> fDescriptions = null; - + /** * Perspectives for each mode */ private Map<Set<String>, String> fPerspectives = null; - + /** * Constructs a launch configuration tab extension based * on the given configuration element - * + * * @param element the configuration element defining the * attributes of this launch configuration tab extension * @return a new launch configuration tab extension @@ -64,32 +64,32 @@ public class LaunchConfigurationTabGroupExtension { public LaunchConfigurationTabGroupExtension(IConfigurationElement element) { setConfigurationElement(element); } - + /** * Sets the configuration element that defines the attributes * for this launch configuration tab group extension. - * + * * @param element configuration element */ private void setConfigurationElement(IConfigurationElement element) { fConfig = element; } - + /** * Returns the configuration element that defines the attributes * for this launch configuration tab group extension. - * + * * @param configuration element that defines the attributes * for this launch configuration tab extension */ protected IConfigurationElement getConfigurationElement() { return fConfig; } - + /** * Returns the set of modes specified in the configuration data, or <code>null</code> * if none (i.e. default tab group) - * + * * @return the set of modes specified in the configuration data, or * <code>null</code> */ @@ -117,11 +117,11 @@ public class LaunchConfigurationTabGroupExtension { } return fModes; } - + /** * Returns the perspective associated with the given launch * mode, as specified in plug-in XML, or <code>null</code> if none. - * + * * @param modes the set of launch modes * @return perspective identifier, or <code>null</code> */ @@ -129,49 +129,49 @@ public class LaunchConfigurationTabGroupExtension { getModes(); return fPerspectives.get(modes); } - + /** * Returns the identifier of the type of launch configuration this * tab group is associated with - * + * * @return the identifier of the type of launch configuration this * tab group is associated with - */ + */ protected String getTypeIdentifier() { return getConfigurationElement().getAttribute(IConfigurationElementConstants.TYPE); } - + /** * Returns the identifier of the help context associated with this tab * group, or <code>null</code> if one was not specified. - * + * * @return the identifier of this tab group's help context or * <code>null</code> * @since 2.1 - */ + */ protected String getHelpContextId() { - return getConfigurationElement().getAttribute(IConfigurationElementConstants.HELP_CONTEXT_ID); + return getConfigurationElement().getAttribute(IConfigurationElementConstants.HELP_CONTEXT_ID); } - + /** * Returns the identifier of the tab group * @return the id of the tab group - * + * * @since 3.3 */ protected String getIdentifier() { - return getConfigurationElement().getAttribute(IConfigurationElementConstants.ID); + return getConfigurationElement().getAttribute(IConfigurationElementConstants.ID); } - + /** * Returns a new tab group defined by this extension - * + * * @return a new tab group defined by this extension * @exception CoreException if an exception occurs instantiating * the tab group */ public ILaunchConfigurationTabGroup newTabGroup() throws CoreException { - return (ILaunchConfigurationTabGroup)getConfigurationElement().createExecutableExtension(IConfigurationElementConstants.CLASS); + return (ILaunchConfigurationTabGroup)getConfigurationElement().createExecutableExtension(IConfigurationElementConstants.CLASS); } /** @@ -201,15 +201,15 @@ public class LaunchConfigurationTabGroupExtension { fDescriptions.put(set, description); } } - - } + + } description = fDescriptions.get(modes); if(description == null) { description = fConfig.getAttribute(IConfigurationElementConstants.DESCRIPTION); - + } return (description == null ? IInternalDebugCoreConstants.EMPTY_STRING : description); } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java index f4f60cedd..dc91023de 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java @@ -4,7 +4,7 @@ * 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 * Mohamed Hussein (Mentor Graphics) - Added getWarningMessage (Bug 386673) @@ -83,58 +83,58 @@ import com.ibm.icu.text.MessageFormat; * buttons. */ public class LaunchConfigurationTabGroupViewer { - + /** * Containing launch dialog */ private ILaunchConfigurationDialog fDialog; - + /** * The launch configuration (original) being edited */ private ILaunchConfiguration fOriginal; - + /** * The working copy of the original */ private ILaunchConfigurationWorkingCopy fWorkingCopy; - + /** * This view's control, which contains a composite area of controls */ private Composite fViewerControl; - + /** * Name text widget */ private Text fNameWidget; - + /** * Composite containing the launch config tab widgets */ private Composite fGroupComposite; - + /** * Tab folder */ private CTabFolder fTabFolder; - + /** * The current tab group being displayed */ private ILaunchConfigurationTabGroup fTabGroup; - + /** * Index of the active tab */ private int fCurrentTabIndex = -1; - + /** * Apply & Revert buttons */ private Button fApplyButton; private Button fRevertButton; - + /** * Whether tabs are currently being disposed or initialized */ @@ -146,13 +146,13 @@ public class LaunchConfigurationTabGroupViewer { * launch configuration type or <code>null</code> if none. */ private String fDescription = null; - + /** * A place holder for switching between the tabs for a config and the getting started tab * @since 3.2 */ private Composite fTabPlaceHolder = null; - + /** * A link to allow users to select a valid set of launch options for the specified mode * @since 3.3 @@ -164,7 +164,7 @@ public class LaunchConfigurationTabGroupViewer { * @since 3.5 */ private Label fOptionsErrorLabel = null; - + /** * A new composite replacing the perspectives tab * @since 3.2 @@ -172,16 +172,16 @@ public class LaunchConfigurationTabGroupViewer { private Composite fGettingStarted = null; private ViewForm fViewform; - + /** * Job to update the dialog after a delay. */ private Job fRefreshJob; - + /** * Constructs a viewer in the given composite, contained by the given * launch configuration dialog. - * + * * @param parent composite containing this viewer * @param dialog containing launch configuration dialog */ @@ -190,7 +190,7 @@ public class LaunchConfigurationTabGroupViewer { fDialog = dialog; createControl(parent); } - + /** * Cleanup */ @@ -206,8 +206,8 @@ public class LaunchConfigurationTabGroupViewer { fTabGroup.dispose(); fTabGroup = null; } - } - + } + /** * Creates this viewer's control This area displays the name of the launch * configuration currently being edited, as well as a tab folder of tabs @@ -225,19 +225,19 @@ public class LaunchConfigurationTabGroupViewer { GridData gd = new GridData(GridData.FILL_BOTH); fViewform.setLayoutData(gd); fViewform.setTopLeft(null); - + Composite mainComp = SWTFactory.createComposite(fViewform, fViewform.getFont(), 1, 1, 1, 0, 0); fViewform.setContent(mainComp); fTabPlaceHolder = SWTFactory.createComposite(mainComp, 1, 1, GridData.FILL_BOTH); fTabPlaceHolder.setLayout(new StackLayout()); fGettingStarted = SWTFactory.createComposite(fTabPlaceHolder, 1, 1, GridData.FILL_BOTH); - + createGettingStarted(fGettingStarted); - + fGroupComposite = SWTFactory.createComposite(fTabPlaceHolder, fTabPlaceHolder.getFont(), 2, 2, GridData.FILL_BOTH, 5, 5); SWTFactory.createLabel(fGroupComposite, LaunchConfigurationsMessages.LaunchConfigurationDialog__Name__16, 1); - + fNameWidget = new Text(fGroupComposite, SWT.SINGLE | SWT.BORDER); fNameWidget.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fNameWidget.addModifyListener(new ModifyListener() { @@ -249,9 +249,9 @@ public class LaunchConfigurationTabGroupViewer { } } ); - + createTabFolder(fGroupComposite); - + Composite blComp = SWTFactory.createComposite(mainComp, mainComp.getFont(), 2, 1, GridData.FILL_HORIZONTAL); Composite linkComp = SWTFactory.createComposite(blComp, blComp.getFont(), 2, 1, GridData.FILL_HORIZONTAL); @@ -259,7 +259,7 @@ public class LaunchConfigurationTabGroupViewer { fOptionsErrorLabel = new Label(linkComp, SWT.NONE); gd = new GridData(); fOptionsErrorLabel.setLayoutData(gd); - + fOptionsLink = new Link(linkComp, SWT.WRAP); fOptionsLink.setFont(linkComp.getFont()); gd = new GridData(SWT.LEFT); @@ -271,7 +271,7 @@ public class LaunchConfigurationTabGroupViewer { //collect the options available try { if(!canLaunchWithModes()) { - SelectLaunchModesDialog sld = new SelectLaunchModesDialog(getShell(), + SelectLaunchModesDialog sld = new SelectLaunchModesDialog(getShell(), getLaunchConfigurationDialog().getMode(), getWorkingCopy()); if(sld.open() == IDialogConstants.OK_ID) { //set the options to the config @@ -287,9 +287,9 @@ public class LaunchConfigurationTabGroupViewer { } } else if(hasMultipleDelegates()) { - SelectLaunchersDialog sldd = new SelectLaunchersDialog(getShell(), - getWorkingCopy().getType().getDelegates(getCurrentModeSet()), - getWorkingCopy(), + SelectLaunchersDialog sldd = new SelectLaunchersDialog(getShell(), + getWorkingCopy().getType().getDelegates(getCurrentModeSet()), + getWorkingCopy(), getLaunchConfigurationDialog().getMode()); if(sldd.open() == IDialogConstants.OK_ID) { displayInstanceTabs(true); @@ -300,7 +300,7 @@ public class LaunchConfigurationTabGroupViewer { } }); fOptionsLink.setVisible(false); - + Composite buttonComp = SWTFactory.createComposite(blComp, 2, 1, GridData.HORIZONTAL_ALIGN_END); fRevertButton = SWTFactory.createPushButton(buttonComp, LaunchConfigurationsMessages.LaunchConfigurationDialog_Revert_2, null, GridData.HORIZONTAL_ALIGN_END); @@ -320,7 +320,7 @@ public class LaunchConfigurationTabGroupViewer { }); Dialog.applyDialogFont(parent); } - + /** * Creates some help text for the tab group launch types * @param parent the parent composite @@ -336,7 +336,7 @@ public class LaunchConfigurationTabGroupViewer { SWTFactory.createWrapCLabel(parent, LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_4, DebugUITools.getImage(IInternalDebugUIConstants.IMG_ELCL_DELETE_CONFIG), 1, width); SWTFactory.createWrapCLabel(parent, LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_8, DebugUITools.getImage(IInternalDebugUIConstants.IMG_ELCL_FILTER_CONFIGS), 1, width); SWTFactory.createWrapCLabel(parent, LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_3, DebugUITools.getImage(IInternalDebugUIConstants.IMG_OVR_TRANSPARENT), 1, width); - + SWTFactory.createHorizontalSpacer(parent, 2); Link link = new Link(parent, SWT.LEFT | SWT.WRAP); link.setText(LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_5); @@ -351,7 +351,7 @@ public class LaunchConfigurationTabGroupViewer { } }); } - + /** * Creates the tab folder for displaying config instances * @param parent the parent {@link Composite} @@ -378,17 +378,17 @@ public class LaunchConfigurationTabGroupViewer { refresh(); } } - }); + }); } } - + /** * Returns the apply button * @return the 'Apply' button */ protected Button getApplyButton() { return fApplyButton; - } + } /** * Returns the revert button @@ -396,7 +396,7 @@ public class LaunchConfigurationTabGroupViewer { */ protected Button getRevertButton() { return fRevertButton; - } + } /** * Sets the current name @@ -412,7 +412,7 @@ public class LaunchConfigurationTabGroupViewer { } refreshStatus(); } - } + } /** * @return the backing viewer control @@ -420,7 +420,7 @@ public class LaunchConfigurationTabGroupViewer { public Control getControl() { return fViewerControl; } - + /** * Returns the shell this viewer is contained in. * @return the current dialog shell @@ -430,10 +430,10 @@ public class LaunchConfigurationTabGroupViewer { } /** - * Returns the current input to the viewer. Input will + * Returns the current input to the viewer. Input will * be one of {@link ILaunchConfiguration} or {@link ILaunchConfigurationType} - * - * @return returns the current input + * + * @return returns the current input */ public Object getInput() { return getConfiguration(); @@ -460,7 +460,7 @@ public class LaunchConfigurationTabGroupViewer { if(copy != null) { copy.doSave(); } - } + } catch (CoreException e) {DebugUIPlugin.log(e);} } updateButtons(); @@ -483,10 +483,10 @@ public class LaunchConfigurationTabGroupViewer { getLaunchConfigurationDialog().updateMessage(); } } - + /** * Shows the link for either multiple launch delegates or bad launch mode combinations - * + * * @since 3.3 */ private void showLink() { @@ -520,11 +520,11 @@ public class LaunchConfigurationTabGroupViewer { } fViewform.layout(true, true); } - + /** * Returns the preferred launch delegate for the current launch configuration and mode set * @return the preferred launch delegate - * + * * @since 3.3 */ protected ILaunchDelegate getPreferredDelegate() { @@ -542,7 +542,7 @@ public class LaunchConfigurationTabGroupViewer { } return preferred; } - + /** * Returns the listing of modes for the current config * @return the listing of modes for the current config @@ -560,10 +560,10 @@ public class LaunchConfigurationTabGroupViewer { } return set; } - + /** * @return returns the configuration input - * + * * @since 3.6 */ ILaunchConfiguration getConfiguration() { @@ -572,7 +572,7 @@ public class LaunchConfigurationTabGroupViewer { } return fOriginal; } - + /** * updates the button states */ @@ -597,7 +597,7 @@ public class LaunchConfigurationTabGroupViewer { } }); } - + } /** * Sets the input to the tab group viewer @@ -616,10 +616,10 @@ public class LaunchConfigurationTabGroupViewer { } } } - + /** * The input has changed to the given object, possibly <code>null</code>. - * + * * @param input the new input, possibly <code>null</code> */ protected void inputChanged(Object input) { @@ -653,16 +653,16 @@ public class LaunchConfigurationTabGroupViewer { }; BusyIndicator.showWhile(getShell().getDisplay(), r); } - + /** * Sets the tab group viewer to have no input, this is the case when null is passed as an input type * Setting no input is equivalent to resetting all items, clearing any messages and showing the 'getting started' pane - * @since 3.2 + * @since 3.2 */ private void setNoInput() { fOriginal = null; fWorkingCopy = null; - disposeExistingTabs(); + disposeExistingTabs(); updateButtons(); updateVisibleControls(false); ILaunchConfigurationDialog lcd = getLaunchConfigurationDialog(); @@ -672,7 +672,7 @@ public class LaunchConfigurationTabGroupViewer { } } } - + /** * Returns if the two configurations are using the same <code>ILaunchDelegate</code> or not * @param config1 the config to compare to @@ -705,9 +705,9 @@ public class LaunchConfigurationTabGroupViewer { catch(CoreException ce) {DebugUIPlugin.log(ce);} return false; } - + /** - * Updates the visibility of controls based on the status provided + * Updates the visibility of controls based on the status provided * @param visible the visibility status to be applied to the controls */ private void updateVisibleControls(boolean visible) { @@ -722,14 +722,14 @@ public class LaunchConfigurationTabGroupViewer { } fTabPlaceHolder.layout(true, true); } - + /** * sets the current widget focus to the 'Name' widget */ protected void setFocusOnName() { fNameWidget.setFocus(); } - + /** * Displays tabs for the current working copy * @param redrawTabs if the tabs should be redrawn @@ -740,7 +740,7 @@ public class LaunchConfigurationTabGroupViewer { ILaunchConfigurationType type = null; try { type = getWorkingCopy().getType(); - } + } catch (CoreException e) { errorDialog(e); fInitializingTabs = false; @@ -767,17 +767,17 @@ public class LaunchConfigurationTabGroupViewer { // Update the name field fNameWidget.setText(getWorkingCopy().getName()); - + fCurrentTabIndex = fTabFolder.getSelectionIndex(); // Turn off initializing flag to update message fInitializingTabs = false; - + if (!fViewform.isVisible()) { fViewform.setVisible(true); - } + } } - + /** * Populate the tabs in the configuration edit area to be appropriate to the current * launch configuration type. @@ -794,7 +794,7 @@ public class LaunchConfigurationTabGroupViewer { try { group = createGroup(); } catch (CoreException ce) { - DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Error_19, LaunchConfigurationsMessages.LaunchConfigurationDialog_Exception_occurred_creating_launch_configuration_tabs_27,ce); // + DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Error_19, LaunchConfigurationsMessages.LaunchConfigurationDialog_Exception_occurred_creating_launch_configuration_tabs_27,ce); // return; } disposeExistingTabs(); @@ -807,7 +807,7 @@ public class LaunchConfigurationTabGroupViewer { tab = new CTabItem(fTabFolder, SWT.BORDER); name = tabs[i].getName(); if (name == null) { - name = LaunchConfigurationsMessages.LaunchConfigurationDialog_unspecified_28; + name = LaunchConfigurationsMessages.LaunchConfigurationDialog_unspecified_28; } tab.setText(name); tab.setImage(tabs[i].getImage()); @@ -836,12 +836,12 @@ public class LaunchConfigurationTabGroupViewer { } } fDescription = getDescription(configType); - } + } /** * Returns the description of the given configuration type * in the current mode or <code>null</code> if none. - * + * * @param configType the config type * @return the description of the given configuration type or <code>null</code> */ @@ -850,13 +850,13 @@ public class LaunchConfigurationTabGroupViewer { if(configType != null) { String mode = fDialog.getMode(); description = LaunchConfigurationPresentationManager.getDefault().getDescription(configType, mode); - } + } if (description == null) { description = IInternalDebugCoreConstants.EMPTY_STRING; } return description; } - + /** * Returns tab group for the given type of launch configuration. * Tabs are initialized to be contained in this dialog. @@ -897,8 +897,8 @@ public class LaunchConfigurationTabGroupViewer { // Otherwise return the tab group return (ILaunchConfigurationTabGroup)finalArray[0]; - } - + } + /** * Returns the tabs currently being displayed, or * <code>null</code> if none. @@ -928,11 +928,11 @@ public class LaunchConfigurationTabGroupViewer { } return null; } - + /** * Returns whether the launch configuration being edited is dirty (i.e. * needs saving) - * + * * @return whether the launch configuration being edited needs saving */ public boolean isDirty() { @@ -949,10 +949,10 @@ public class LaunchConfigurationTabGroupViewer { } return fOriginal != null && !fOriginal.contentsEqual(workingCopy); } - + /** * Returns the job to update the launch configuration dialog. - * + * * @return update job */ private Job getUpdateJob() { @@ -962,10 +962,10 @@ public class LaunchConfigurationTabGroupViewer { } return fRefreshJob; } - + /** * Schedules the update job to run for this tab based on this tab's delay. - * + * * @since 3.6 */ protected void scheduleUpdateJob() { @@ -973,22 +973,22 @@ public class LaunchConfigurationTabGroupViewer { job.cancel(); // cancel existing job job.schedule(getUpdateJobDelay()); } - + /** * Return the time delay that should be used when scheduling the * update job. Subclasses may override. - * + * * @return a time delay in milliseconds before the job should run * @since 3.6 */ protected long getUpdateJobDelay() { return 200; - } - + } + /** * Creates and returns a job used to update the launch configuration dialog * for this tab. Subclasses may override. - * + * * @return job to update the launch dialog for this tab * @since 3.6 */ @@ -1006,8 +1006,8 @@ public class LaunchConfigurationTabGroupViewer { return !getControl().isDisposed(); } }; - } - + } + /** * Update apply & revert buttons, as well as buttons and message on the * launch config dialog. @@ -1017,8 +1017,8 @@ public class LaunchConfigurationTabGroupViewer { LaunchConfigurationsDialog lcd = (LaunchConfigurationsDialog) getLaunchConfigurationDialog(); lcd.refreshStatus(); } - } - + } + /** * Returns the containing launch dialog * @return the current {@link ILaunchConfigurationDialog} @@ -1030,13 +1030,13 @@ public class LaunchConfigurationTabGroupViewer { /** * Returns the original launch configuration being edited, possibly * <code>null</code>. - * + * * @return ILaunchConfiguration */ protected ILaunchConfiguration getOriginal() { return fOriginal; } - + /** * Returns the working copy used to edit the original, possibly * <code>null</code>. @@ -1045,7 +1045,7 @@ public class LaunchConfigurationTabGroupViewer { protected ILaunchConfigurationWorkingCopy getWorkingCopy() { return fWorkingCopy; } - + /** * Return whether the current configuration can be saved. * <p> @@ -1079,8 +1079,8 @@ public class LaunchConfigurationTabGroupViewer { } } return true; - } - + } + /** * @return if the dialog can launch in its current state */ @@ -1107,14 +1107,14 @@ public class LaunchConfigurationTabGroupViewer { } } return true; - } - + } + /** * Determines if the tab groups that is currently visible can launch with the currently selected * set of options. - * + * * @return true if the dialog can launch with the given set of modes, false otherwise - * + * * @since 3.3 */ public boolean canLaunchWithModes() { @@ -1131,14 +1131,14 @@ public class LaunchConfigurationTabGroupViewer { } return true; } - + /** * Returns if the type currently showing in the tab group viewer has duplicate launch delegates for the given set of modes. - * + * * The given set of modes comprises the current mode that the launch dialog was opened in as well as any modes that have been set on the launch * configuration. * @return the true if there are duplicates, false otherwise - * + * * @since 3.3 */ public boolean hasDuplicateDelegates() { @@ -1153,7 +1153,7 @@ public class LaunchConfigurationTabGroupViewer { } return false; } - + /** * Determines if the currently showing launch configuration has multiple launch delegates for the same mode set, but does not care * if there has been a default selected yet or not @@ -1171,7 +1171,7 @@ public class LaunchConfigurationTabGroupViewer { } return false; } - + /** * Returns the current error message or <code>null</code> if none. * @return the error message for the tab @@ -1180,7 +1180,7 @@ public class LaunchConfigurationTabGroupViewer { if (fInitializingTabs) { return null; } - + if (getWorkingCopy() == null) { return null; } @@ -1198,12 +1198,12 @@ public class LaunchConfigurationTabGroupViewer { ILaunchConfigurationTab activeTab = getActiveTab(); if (activeTab == null) { return null; - } + } message = activeTab.getErrorMessage(); if (message != null) { return message; } - + ILaunchConfigurationTab[] allTabs = getTabs(); for (int i = 0; i < allTabs.length; i++) { ILaunchConfigurationTab tab = allTabs[i]; @@ -1226,23 +1226,23 @@ public class LaunchConfigurationTabGroupViewer { return MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_14, new Object[] { names.toString() }); } return null; - } - + } + /** * Returns the current message or <code>null</code> if none. * @return Returns an appropriate message for display to user. The message returned will be: * The message defined by the visible tab, * or The tab group description for the particular launch mode, * or The generic tab group description, - * or <code>null</code> if no message is defined + * or <code>null</code> if no message is defined */ public String getMessage() { if (fInitializingTabs) { return null; } - + String message = fDescription; - + ILaunchConfigurationTab tab = getActiveTab(); if (tab != null) { String tabMessage = tab.getMessage(); @@ -1250,23 +1250,23 @@ public class LaunchConfigurationTabGroupViewer { message = tabMessage; } } - + return message; - } - + } + /** * Returns the current warning message or <code>null</code> if none. * @return Returns an appropriate warning message for display to user. The message returned will be: * The warning message defined by the visible tab - * or <code>null</code> if no message is defined + * or <code>null</code> if no message is defined */ public String getWarningMessage() { if (fInitializingTabs) { return null; } - + String message = null; - + ILaunchConfigurationTab tab = getActiveTab(); if (tab instanceof ILaunchConfigurationTab2) { String tabMessage = ((ILaunchConfigurationTab2)tab).getWarningMessage(); @@ -1274,10 +1274,10 @@ public class LaunchConfigurationTabGroupViewer { message = tabMessage; } } - + return message; - } - + } + /** * Verify that the launch configuration name is valid. * @throws CoreException if a name conflict occurs @@ -1286,13 +1286,13 @@ public class LaunchConfigurationTabGroupViewer { if (fNameWidget.isVisible()) { ILaunchManager mgr = DebugPlugin.getDefault().getLaunchManager(); String currentName = fNameWidget.getText().trim(); - + // If there is no name, complain if (currentName.length() < 1) { throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), 0, - LaunchConfigurationsMessages.LaunchConfigurationDialog_Name_required_for_launch_configuration_11, + LaunchConfigurationsMessages.LaunchConfigurationDialog_Name_required_for_launch_configuration_11, null)); } try { @@ -1316,15 +1316,15 @@ public class LaunchConfigurationTabGroupViewer { throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), 0, - NLS.bind(LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_configuration_already_exists_with_this_name_12, configTypeName), + NLS.bind(LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_configuration_already_exists_with_this_name_12, configTypeName), null)); } } } - } - + } + /** - * Remove the existing tabs that are showing + * Remove the existing tabs that are showing */ private void disposeExistingTabs() { fDisposingTabs = true; @@ -1333,7 +1333,7 @@ public class LaunchConfigurationTabGroupViewer { createTabFolder(fGroupComposite); disposeTabGroup(); fDisposingTabs = false; - } + } /** * Returns the current tab group @@ -1343,7 +1343,7 @@ public class LaunchConfigurationTabGroupViewer { public ILaunchConfigurationTabGroup getTabGroup() { return fTabGroup; } - + /** * Notification that a tab has been selected * @@ -1369,18 +1369,18 @@ public class LaunchConfigurationTabGroupViewer { } fCurrentTabIndex = fTabFolder.getSelectionIndex(); } - + /** * Notification the name field has been modified */ protected void handleNameModified() { getWorkingCopy().rename(fNameWidget.getText().trim()); scheduleUpdateJob(); - } - + } + /** * Notification that the 'Apply' button has been pressed. - * + * * @return the saved launch configuration or <code>null</code> if not saved */ protected ILaunchConfiguration handleApplyPressed() { @@ -1410,7 +1410,7 @@ public class LaunchConfigurationTabGroupViewer { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { saved[0] = ((LaunchConfigurationWorkingCopy)fWorkingCopy).doSave(monitor); - } + } catch (CoreException e) {DebugUIPlugin.log(e);} } }; @@ -1422,12 +1422,12 @@ public class LaunchConfigurationTabGroupViewer { } updateButtons(); fInitializingTabs = false; - } - catch (CoreException e) {exception = e;} - catch (InvocationTargetException e) {exception = e;} - catch (InterruptedException e) {exception = e;} + } + catch (CoreException e) {exception = e;} + catch (InvocationTargetException e) {exception = e;} + catch (InterruptedException e) {exception = e;} if(exception != null) { - DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_Configuration_Error_46, LaunchConfigurationsMessages.LaunchConfigurationDialog_Exception_occurred_while_saving_launch_configuration_47, exception); // + DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_Configuration_Error_46, LaunchConfigurationsMessages.LaunchConfigurationDialog_Exception_occurred_while_saving_launch_configuration_47, exception); // return null; } else { return saved[0]; @@ -1445,10 +1445,10 @@ public class LaunchConfigurationTabGroupViewer { fWorkingCopy = fOriginal.getWorkingCopy(); refreshStatus(); } - } + } catch (CoreException e) {DebugUIPlugin.log(e);} - } - + } + /** * Show an error dialog on the given exception. * @@ -1456,12 +1456,12 @@ public class LaunchConfigurationTabGroupViewer { */ protected void errorDialog(CoreException exception) { ErrorDialog.openError(getShell(), null, null, exception.getStatus()); - } + } /** * Sets the displayed tab to the given tab. Has no effect if the specified * tab is not one of the tabs being displayed in the dialog currently. - * + * * @param tab the tab to display/activate */ public void setActiveTab(ILaunchConfigurationTab tab) { @@ -1475,12 +1475,12 @@ public class LaunchConfigurationTabGroupViewer { } } } - + /** * Sets the displayed tab to the tab with the given index. Has no effect if * the specified index is not within the limits of the tabs returned by * <code>getTabs()</code>. - * + * * @param index the index of the tab to display */ public void setActiveTab(int index) { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java index 1d65b3e4f..36917839b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java @@ -4,7 +4,7 @@ * 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 * Doug <doug.satchwell@btinternet.com> - Bug 243053 @@ -31,14 +31,14 @@ import org.eclipse.debug.ui.ILaunchConfigurationTabGroup; /** * This class is used to wrap a contributed <code>ILaunchConfigurationTabGroup</code> with any contributed tabs * for that group (from a <code>launchConfigurationTabs</code> extension point). - * + * * @since 3.3 */ public class LaunchConfigurationTabGroupWrapper implements ILaunchConfigurationTabGroup { - + /** * Collects all tabs and contributed tabs in the correct ordering - * + * * @since 3.5 */ class TabCollector implements Iterator<ILaunchConfigurationTab> { @@ -46,16 +46,16 @@ public class LaunchConfigurationTabGroupWrapper implements ILaunchConfigurationT private HashSet<String> idSet = null; private ArrayList<ILaunchConfigurationTab> tabList = null; private ArrayList<LaunchConfigurationTabExtension> extList = null; - + public TabCollector(List<ILaunchConfigurationTab> tabs, List<LaunchConfigurationTabExtension> exts) { tabList = new ArrayList<ILaunchConfigurationTab>(tabs); extList = new ArrayList<LaunchConfigurationTabExtension>(exts); idSet = new HashSet<String>(tabList.size() + extList.size()); } - + /** * Get the tab for any extension that is 'relative' to any of the previously returned tabs - * + * * @return the next tab extension tab */ private ILaunchConfigurationTab nextExtensionTab() { @@ -69,7 +69,7 @@ public class LaunchConfigurationTabGroupWrapper implements ILaunchConfigurationT } return null; } - + /* (non-Javadoc) * @see java.util.Iterator#hasNext() */ @@ -85,7 +85,7 @@ public class LaunchConfigurationTabGroupWrapper implements ILaunchConfigurationT public ILaunchConfigurationTab next() { ILaunchConfigurationTab nextTab = nextExtensionTab(); if (nextTab == null) { - if (tabList.size() > 0) { + if (tabList.size() > 0) { nextTab = tabList.remove(0); } else { @@ -110,7 +110,7 @@ public class LaunchConfigurationTabGroupWrapper implements ILaunchConfigurationT throw new UnsupportedOperationException(); } } - + private ILaunchConfigurationTabGroup fGroup = null; private String fGroupId = null; /** @@ -119,7 +119,7 @@ public class LaunchConfigurationTabGroupWrapper implements ILaunchConfigurationT private List<ILaunchConfigurationTab> fTabs = null; private String fMode = null; private ILaunchConfiguration fConfig = null; - + /** * Constructor * @param group the existing group to wrapper @@ -161,7 +161,7 @@ public class LaunchConfigurationTabGroupWrapper implements ILaunchConfigurationT fTabs.clear(); } } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#getTabs() */ @@ -192,7 +192,7 @@ public class LaunchConfigurationTabGroupWrapper implements ILaunchConfigurationT } return fTabs.toArray(new ILaunchConfigurationTab[fTabs.size()]); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabImageDescriptor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabImageDescriptor.java index 77baf43bb..765c496a6 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabImageDescriptor.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabImageDescriptor.java @@ -4,7 +4,7 @@ * 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 *******************************************************************************/ @@ -23,26 +23,26 @@ import org.eclipse.swt.graphics.Point; * are computed according to flags set on creation of the descriptor. */ public class LaunchConfigurationTabImageDescriptor extends CompositeImageDescriptor { - + /** Flag to render the error adornment */ public final static int ERROR= 0x001; private Image fBaseImage; private int fFlags; private Point fSize; - + /** * Create a new JDIImageDescriptor. - * + * * @param baseImage an image descriptor used as the base image * @param flags flags indicating which adornments are to be rendered - * + * */ public LaunchConfigurationTabImageDescriptor(Image baseImage, int flags) { setBaseImage(baseImage); setFlags(flags); } - + /** * @see CompositeImageDescriptor#getSize() */ @@ -54,7 +54,7 @@ public class LaunchConfigurationTabImageDescriptor extends CompositeImageDescrip } return fSize; } - + /** * @see Object#equals(java.lang.Object) */ @@ -63,11 +63,11 @@ public class LaunchConfigurationTabImageDescriptor extends CompositeImageDescrip if (!(object instanceof LaunchConfigurationTabImageDescriptor)){ return false; } - + LaunchConfigurationTabImageDescriptor other= (LaunchConfigurationTabImageDescriptor)object; return (getBaseImage().equals(other.getBaseImage()) && getFlags() == other.getFlags()); } - + /** * @see Object#hashCode() */ @@ -75,7 +75,7 @@ public class LaunchConfigurationTabImageDescriptor extends CompositeImageDescrip public int hashCode() { return getBaseImage().hashCode() | getFlags(); } - + /** * @see CompositeImageDescriptor#drawCompositeImage(int, int) */ @@ -100,7 +100,7 @@ public class LaunchConfigurationTabImageDescriptor extends CompositeImageDescrip drawImage(data, 0, 0); } } - + protected Image getBaseImage() { return fBaseImage; } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java index 3eb95a87a..9285425c9 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java @@ -11,7 +11,7 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.launchConfigurations; - + import java.util.ArrayList; import java.util.List; @@ -28,7 +28,7 @@ import org.eclipse.ui.activities.WorkbenchActivityHelper; /** * Content provider for representing launch configuration types & launch configurations in a tree. - * + * * @since 2.1 */ public class LaunchConfigurationTreeContentProvider implements ITreeContentProvider { @@ -36,20 +36,20 @@ public class LaunchConfigurationTreeContentProvider implements ITreeContentProvi /** * Empty Object array */ - private static final Object[] EMPTY_ARRAY = new Object[0]; - + private static final Object[] EMPTY_ARRAY = new Object[0]; + /** - * The mode in which the tree is being shown, one of <code>RUN_MODE</code> + * The mode in which the tree is being shown, one of <code>RUN_MODE</code> * or <code>DEBUG_MODE</code> defined in <code>ILaunchManager</code>. * If this is <code>null</code>, then it means both modes are being shown. */ private String fMode; - + /** * The Shell context */ private Shell fShell; - + /** * Constructor * @param mode the mode @@ -62,14 +62,14 @@ public class LaunchConfigurationTreeContentProvider implements ITreeContentProvi /** * Actual launch configurations have no children. Launch configuration types have - * all configurations of that type as children, minus any configurations that are + * all configurations of that type as children, minus any configurations that are * marked as private. * <p> * In 2.1, the <code>category</code> attribute was added to launch config * types. The debug UI only displays those configs that do not specify a * category. * </p> - * + * * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object) */ @Override @@ -81,7 +81,7 @@ public class LaunchConfigurationTreeContentProvider implements ITreeContentProvi ILaunchConfigurationType type = (ILaunchConfigurationType)parentElement; return getLaunchManager().getLaunchConfigurations(type); } catch (CoreException e) { - DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Error_19, LaunchConfigurationsMessages.LaunchConfigurationDialog_An_exception_occurred_while_retrieving_launch_configurations_20, e); // + DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Error_19, LaunchConfigurationsMessages.LaunchConfigurationDialog_An_exception_occurred_while_retrieving_launch_configurations_20, e); // } } else { return getLaunchManager().getLaunchConfigurationTypes(); @@ -101,7 +101,7 @@ public class LaunchConfigurationTreeContentProvider implements ITreeContentProvi try { return ((ILaunchConfiguration)element).getType(); } catch (CoreException e) { - DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Error_19, LaunchConfigurationsMessages.LaunchConfigurationDialog_An_exception_occurred_while_retrieving_launch_configurations_20, e); // + DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Error_19, LaunchConfigurationsMessages.LaunchConfigurationDialog_An_exception_occurred_while_retrieving_launch_configurations_20, e); // } } else if (element instanceof ILaunchConfigurationType) { return ResourcesPlugin.getWorkspace().getRoot(); @@ -116,14 +116,14 @@ public class LaunchConfigurationTreeContentProvider implements ITreeContentProvi public boolean hasChildren(Object element) { if (element instanceof ILaunchConfiguration) { return false; - } + } return getChildren(element).length > 0; } /** * Return only the launch configuration types that support the current mode AND * are marked as 'public'. - * + * * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) */ @Override @@ -136,7 +136,7 @@ public class LaunchConfigurationTreeContentProvider implements ITreeContentProvi * Returns a list containing the given types minus any types that * should not be visible. A type should not be visible if it doesn't match * the current mode or if it matches a disabled activity. - * + * * @param allTypes the types * @return the given types minus any types that should not be visible. */ @@ -153,7 +153,7 @@ public class LaunchConfigurationTreeContentProvider implements ITreeContentProvi } return filteredTypes; } - + /** * Return <code>true</code> if the specified launch configuration type should * be visible in the specified mode, <code>false</code> otherwise. @@ -181,7 +181,7 @@ public class LaunchConfigurationTreeContentProvider implements ITreeContentProvi private void setMode(String mode) { fMode = mode; } - + /** * Read accessor for the mode value */ @@ -195,7 +195,7 @@ public class LaunchConfigurationTreeContentProvider implements ITreeContentProvi private void setShell(Shell shell) { fShell = shell; } - + /** * Read accessor for the shell value */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypeContribution.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypeContribution.java index 155d92e58..b9a346796 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypeContribution.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypeContribution.java @@ -4,7 +4,7 @@ * 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 *******************************************************************************/ @@ -19,18 +19,18 @@ import org.eclipse.ui.IPluginContribution; * activity support to filter elements from the UI. */ class LaunchConfigurationTypeContribution implements IPluginContribution { - + protected ILaunchConfigurationType type; - + /** * Creates a new plug-in contribution for the given type - * + * * @param type the launch configuration type */ public LaunchConfigurationTypeContribution(ILaunchConfigurationType type) { this.type= type; } - + /* (non-Javadoc) * @see org.eclipse.ui.IPluginContribution#getLocalId() */ @@ -46,5 +46,5 @@ class LaunchConfigurationTypeContribution implements IPluginContribution { public String getPluginId() { return type.getPluginIdentifier(); } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypeFilter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypeFilter.java index 0d804e5a9..1025014a0 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypeFilter.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypeFilter.java @@ -4,7 +4,7 @@ * 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 *******************************************************************************/ @@ -20,8 +20,8 @@ import org.eclipse.jface.viewers.ViewerFilter; /** * Provides the implementation of the filter for filtering the launch configuration viewer based on the preference - * <code>IInternalDebugUIConstants.PREF_FILTER_LAUNCH_TYPES</code> - * + * <code>IInternalDebugUIConstants.PREF_FILTER_LAUNCH_TYPES</code> + * * @since 3.2 */ public class LaunchConfigurationTypeFilter extends ViewerFilter { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java index ea1543346..808033ff1 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java @@ -51,26 +51,26 @@ import com.ibm.icu.text.MessageFormat; * A tree view of launch configurations */ public class LaunchConfigurationView extends AbstractDebugView implements ILaunchConfigurationListener { - + /** * the filtering tree viewer - * + * * @since 3.2 */ private LaunchConfigurationFilteredTree fTree; - + /** * a handle to the launch manager - * + * * @since 3.2 */ private ILaunchManager fLaunchManager = DebugPlugin.getDefault().getLaunchManager(); - + /** * The launch group to display */ private LaunchGroupExtension fLaunchGroup; - + /** * Actions */ @@ -78,31 +78,31 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc private DeleteLaunchConfigurationAction fDeleteAction; private DuplicateLaunchConfigurationAction fDuplicateAction; private CollapseAllLaunchConfigurationAction fCollapseAllAction; - + /** * Action for providing filtering to the Launch Configuration Dialog * @since 3.2 */ private FilterLaunchConfigurationAction fFilterAction; - + /** - * This label is used to notify users that items (possibly) have been filtered from the + * This label is used to notify users that items (possibly) have been filtered from the * launch configuration view * @since 3.3 */ private Label fFilteredNotice = null; - + /** * Whether to automatically select configs that are added */ private boolean fAutoSelect = true; - + /** * the group of additional filters to be added to the viewer * @since 3.2 */ private ViewerFilter[] fFilters = null; - + /** * Constructs a launch configuration view for the given launch group */ @@ -110,7 +110,7 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc super(); fLaunchGroup = launchGroup; } - + /** * Constructor * @param launchGroup @@ -121,10 +121,10 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc fLaunchGroup = launchGroup; fFilters = filters; } - + /** * Returns the launch group this view is displaying. - * + * * @return the launch group this view is displaying */ protected LaunchGroupExtension getLaunchGroup() { @@ -143,7 +143,7 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc viewer.setLaunchConfigurationView(this); return viewer; } - + /** * @see org.eclipse.debug.ui.AbstractDebugView#getAdapter(java.lang.Class) */ @@ -174,11 +174,11 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc } return super.getAdapter(key); } - + /** * Returns the filtering text control from the viewer or <code>null</code> * if the text control was not created. - * + * * @return the filtering text control or <code>null</code> * @since 3.2 */ @@ -193,20 +193,20 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc protected void createActions() { fCreateAction = new CreateLaunchConfigurationAction(getViewer(), getLaunchGroup().getMode()); setAction(CreateLaunchConfigurationAction.ID_CREATE_ACTION, fCreateAction); - + fDeleteAction = new DeleteLaunchConfigurationAction(getViewer(), getLaunchGroup().getMode()); setAction(DeleteLaunchConfigurationAction.ID_DELETE_ACTION, fDeleteAction); setAction(IDebugView.REMOVE_ACTION, fDeleteAction); - + fDuplicateAction = new DuplicateLaunchConfigurationAction(getViewer(), getLaunchGroup().getMode()); setAction(DuplicateLaunchConfigurationAction.ID_DUPLICATE_ACTION, fDuplicateAction); - + fCollapseAllAction = new CollapseAllLaunchConfigurationAction((TreeViewer)getViewer()); setAction(CollapseAllLaunchConfigurationAction.ID_COLLAPSEALL_ACTION, fCollapseAllAction); - + fFilterAction = new FilterLaunchConfigurationAction(); setAction(FilterLaunchConfigurationAction.ID_FILTER_ACTION, fFilterAction); - + } /** @@ -233,11 +233,11 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc */ @Override protected void configureToolBar(IToolBarManager tbm) {} - + /** * Returns this view's tree viewer - * - * @return this view's tree viewer + * + * @return this view's tree viewer */ protected TreeViewer getTreeViewer() { return fTree.getLaunchConfigurationViewer(); @@ -262,7 +262,7 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc @Override public void launchConfigurationAdded(final ILaunchConfiguration configuration) { if(isSupportedConfiguration(configuration)) { - //due to notification and async messages we need to collect the moved from config + //due to notification and async messages we need to collect the moved from config //now, else it is null'd out before the following async job runs //@see bug 211235 - making local config shared creates "non-existant dup" in LCD final ILaunchConfiguration from = getLaunchManager().getMovedFrom(configuration); @@ -297,7 +297,7 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc viewer.setSelection(new StructuredSelection(configuration), true); } updateFilterLabel(); - } + } catch (CoreException e) {} finally { viewer.getControl().setRedraw(true); @@ -315,14 +315,14 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc * </ul> * @param configuration the configuration * @return true if the configuration is supported by this instance of the view, false otherwise - * + * * @since 3.4 */ protected boolean isSupportedConfiguration(ILaunchConfiguration configuration) { try { ILaunchConfigurationType type = configuration.getType(); - return !configuration.getAttribute(IDebugUIConstants.ATTR_PRIVATE, false) && - type.supportsMode(getLaunchGroup().getMode()) && + return !configuration.getAttribute(IDebugUIConstants.ATTR_PRIVATE, false) && + type.supportsMode(getLaunchGroup().getMode()) && equalCategories(type.getCategory(), getLaunchGroup().getCategory()); } catch(CoreException ce) { @@ -330,14 +330,14 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc } return false; } - + /** * Returns whether the given categories are equal. - * + * * @param c1 category identifier or <code>null</code> * @param c2 category identifier or <code>null</code> * @return boolean - * + * * @since 3.4 */ private boolean equalCategories(String c1, String c2) { @@ -345,8 +345,8 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc return c1 == c2; } return c1.equals(c2); - } - + } + /** * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration) */ @@ -407,7 +407,7 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc fFilteredNotice = SWTFactory.createLabel(parent, IInternalDebugCoreConstants.EMPTY_STRING, 1); fFilteredNotice.setBackground(parent.getBackground()); } - + /** * @see org.eclipse.debug.ui.IDebugView#getViewer() */ @@ -415,7 +415,7 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc public Viewer getViewer() { return fTree.getLaunchConfigurationViewer(); } - + /** * Updates the filter notification label * @since 3.3 @@ -426,7 +426,7 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc Integer.toString(viewer.getNonFilteredChildCount()), Integer.toString(viewer.getTotalChildCount()) })); } - + /** * returns the launch manager * @return @@ -434,23 +434,23 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc protected ILaunchManager getLaunchManager() { return fLaunchManager; } - + /** * Sets whether to automatically select configs that are * added into the view (newly created). - * + * * @param select whether to automatically select configs that are * added into the view (newly created) */ public void setAutoSelect(boolean select) { fAutoSelect = select; } - + /** * Returns whether this view is currently configured to * automatically select newly created configs that are * added into the view. - * + * * @return whether this view is currently configured to * automatically select newly created configs */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java index 5b1d6f937..856fd6214 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java @@ -24,7 +24,7 @@ import org.eclipse.swt.widgets.TreeItem; import org.eclipse.swt.widgets.Widget; /** - * This class allow the notion of the viewer to be abstracted from the launch configuration view, as well as allowing the over-riding of + * This class allow the notion of the viewer to be abstracted from the launch configuration view, as well as allowing the over-riding of * selection preservation when filtering/deletion occurs * @since 3.3 */ @@ -32,7 +32,7 @@ public class LaunchConfigurationViewer extends TreeViewer { private int fTotalCount = 0; private LaunchConfigurationView fView = null; - + /** * Constructor * @param tree the tree to create the viewer on @@ -40,7 +40,7 @@ public class LaunchConfigurationViewer extends TreeViewer { public LaunchConfigurationViewer(Tree tree) { super(tree); } - + /** * Constructor * @param parent @@ -124,7 +124,7 @@ public class LaunchConfigurationViewer extends TreeViewer { } getTree().getHorizontalBar().setSelection(0); } - + /** * Covers the case of an outlier indice * @param count the count to compare the index to @@ -143,16 +143,16 @@ public class LaunchConfigurationViewer extends TreeViewer { } return -1; } - + /** - * Returns the total count of all of the children that <i>could</i> be visible at + * Returns the total count of all of the children that <i>could</i> be visible at * the time the input was set to the viewer * @return the total number of elements */ protected int getTotalChildCount() { return fTotalCount; } - + /** * @see org.eclipse.jface.viewers.AbstractTreeViewer#remove(java.lang.Object) */ @@ -199,7 +199,7 @@ public class LaunchConfigurationViewer extends TreeViewer { * returns the number of children that are remaining in the view. * Note that this method will force the loading of all children * @return the count of all children in the viewer - * + * * @since 3.3 */ protected int getNonFilteredChildCount() { @@ -219,7 +219,7 @@ public class LaunchConfigurationViewer extends TreeViewer { getTree().setRedraw(true); return count; } - + /** * Collects the indices of the child and parent items for the specified element * @param object the element to collect indices for @@ -230,7 +230,7 @@ public class LaunchConfigurationViewer extends TreeViewer { if(object != null) { TreeItem item = (TreeItem) findItem(object); if(item != null) { - TreePath path = getTreePathFromItem(item); + TreePath path = getTreePathFromItem(item); item = (TreeItem) findItem(path.getFirstSegment()); if(item != null) { indices[0] = getTree().indexOf(item); @@ -242,7 +242,7 @@ public class LaunchConfigurationViewer extends TreeViewer { } return indices; } - + /** * Finds the index of the specified object in the given array of tree items * @param items the items to search for the specified object @@ -267,7 +267,7 @@ public class LaunchConfigurationViewer extends TreeViewer { if (fView != null) { fView.updateFilterLabel(); } - + } /** diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java index 75da0d6e4..969382d89 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java @@ -4,7 +4,7 @@ * 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 * Sebastian Davids - Bug 137923 @@ -90,7 +90,7 @@ import org.eclipse.ui.PlatformUI; import org.eclipse.ui.progress.WorkbenchJob; import com.ibm.icu.text.MessageFormat; - + /** * The dialog used to edit and launch launch configurations. */ @@ -104,7 +104,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun * Id for 'Launch' button. */ protected static final int ID_LAUNCH_BUTTON = IDialogConstants.CLIENT_ID + 1; - + /** * Id for 'Close' button. */ @@ -113,13 +113,13 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun * Id for 'Cancel' button. */ protected static final int ID_CANCEL_BUTTON = IDialogConstants.CLIENT_ID + 3; - + /** * The id for the 'No' button on the discard changes message box * @since 3.3 */ protected static final int ID_DISCARD_BUTTON = IDialogConstants.CLIENT_ID + 4; - + /** * Constant specifying how wide this dialog is allowed to get (as a percentage of * total available screen width) as a result of tab labels in the edit area. @@ -164,7 +164,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun * 'LAUNCH_CONFIGURATION_DIALOG' constants defined in this class. */ private int fOpenMode = LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_LAST_LAUNCHED; - + private boolean fIsShift = false; /** @@ -173,7 +173,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun private static final String DIALOG_SASH_WEIGHTS_1 = IDebugUIConstants.PLUGIN_ID + ".DIALOG_SASH_WEIGHTS_1"; //$NON-NLS-1$ private static final String DIALOG_SASH_WEIGHTS_2 = IDebugUIConstants.PLUGIN_ID + ".DIALOG_SASH_WEIGHTS_2"; //$NON-NLS-1$ private static final String DIALOG_EXPANDED_NODES = IDebugUIConstants.PLUGIN_ID + ".EXPANDED_NODES"; //$NON-NLS-1$ - + /** * Returns the currently visible dialog * @return the currently visible launch dialog @@ -188,7 +188,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun public static void setCurrentlyVisibleLaunchConfigurationDialog(ILaunchConfigurationDialog dialog) { fgCurrentlyVisibleLaunchConfigurationDialog = dialog; } - + /** * widgets */ @@ -200,18 +200,18 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun private ProgressMonitorPart fProgressMonitorPart; private LaunchGroupExtension fGroup; private Image fBannerImage; - + /** * When this dialog is opened in <code>LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION</code> * mode, this specifies the selection that is initially shown in the dialog. */ private IStructuredSelection fInitialSelection; - + /** * The status to open the dialog on, or <code>null</code> if none. */ private IStatus fInitialStatus; - + /** * The number of 'long-running' operations currently taking place in this dialog */ @@ -221,7 +221,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun * Double-click action */ private IAction fDoubleClickAction; - + /** * Filters for the LCD * @since 3.2 @@ -230,27 +230,27 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun private DeletedProjectFilter fDeletedProjectFilter; private LaunchConfigurationTypeFilter fLCTFilter; private WorkingSetsFilter fWorkingSetsFilter; - + /** * set of reserved names that should not be considered when generating a new name for a launch configuration */ protected Set<String> fReservedNames = null; - + /** * Whether to set default values when opened * @since 3.6 */ private boolean fSetDefaultOnOpen = false; - + /** * Whether in the process of setting the input to the tab viewer */ private boolean fSettingInput = false; - + /** * Constructs a new launch configuration dialog on the given * parent shell. - * + * * @param shell the parent shell * @param group the group of launch configuration to display */ @@ -259,10 +259,10 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun setShellStyle(getShellStyle() | SWT.RESIZE); setLaunchGroup(group); } - + /** * Adds content to the dialog area - * + * * @param dialogComp */ protected void addContent(Composite dialogComp) { @@ -274,12 +274,12 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun topLayout.marginHeight = 5; topLayout.marginWidth = 5; topComp.setLayout(topLayout); - + // Set the things that TitleAreaDialog takes care of setTitle(LaunchConfigurationsMessages.LaunchConfigurationDialog_Create__manage__and_run_launch_configurations_8); setMessage(LaunchConfigurationsMessages.LaunchConfigurationDialog_Ready_to_launch_2); setModeLabelState(); - + // Create the SashForm that contains the selection area on the left, // and the edit area on the right gd = new GridData(GridData.FILL_BOTH); @@ -290,25 +290,25 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun sash.setFont(dialogComp.getFont()); sash.setVisible(true); fSashForm = sash; - + // Build the launch configuration selection area and put it into the composite. Control launchConfigSelectionArea = createLaunchConfigurationSelectionArea(fSashForm); gd = new GridData(GridData.FILL_VERTICAL); launchConfigSelectionArea.setLayoutData(gd); - + // Build the launch configuration edit area and put it into the composite. Composite editAreaComp = createLaunchConfigurationEditArea(fSashForm); gd = new GridData(GridData.FILL_BOTH); editAreaComp.setLayoutData(gd); - + dialogComp.layout(true); applyDialogFont(dialogComp); } - + /** * Handle the 'close' & 'launch' buttons here, all others are handled * in <code>Dialog</code> - * + * * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int) */ @Override @@ -327,7 +327,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun /** * Return whether the current configuration should be saved or discarded. This involves determining * if it is dirty, and if it is, asking the user what to do. - * + * * @return if we can discard the current config or not */ protected int shouldSaveCurrentConfig() { @@ -339,7 +339,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun } return IDialogConstants.NO_ID; } - + /* (non-Javadoc) * @see org.eclipse.jface.window.Window#close() */ @@ -360,10 +360,10 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun getBannerImage().dispose(); return result; } - + /** * Sets the title for the dialog, and establishes the help context. - * + * * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell); */ @Override @@ -371,7 +371,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun super.configureShell(shell); shell.setText(getShellTitle()); } - + /* (non-Javadoc) * @see org.eclipse.jface.window.Window#create() */ @@ -382,7 +382,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun fTabViewer.inputChanged(null); } } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#createButtonBar(org.eclipse.swt.widgets.Composite) */ @@ -427,7 +427,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun } /** - * + * * @param buttonId */ protected void launchButtonPressed(int buttonId) { @@ -440,13 +440,13 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun } } - + /** * A launch configuration dialog overrides this method * to create a custom set of buttons in the button bar. * This dialog has 'Launch' and 'Cancel' * buttons. - * + * * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite) */ @Override @@ -471,7 +471,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun }); createButton(parent, ID_CLOSE_BUTTON, LaunchConfigurationsMessages.LaunchConfigurationDialog_Close_1, false); } - + /* (non-Javadoc) * @see org.eclipse.jface.window.Window#createContents(org.eclipse.swt.widgets.Composite) */ @@ -482,7 +482,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun PlatformUI.getWorkbench().getHelpSystem().setHelp(getShell(), getHelpContextId()); return contents; } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite) */ @@ -495,20 +495,20 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun } return dialogComp; } - + /** * Creates the launch configuration edit area of the dialog. * This area displays the name of the launch configuration * currently being edited, as well as a tab folder of tabs * that are applicable to the launch configuration. - * + * * @return the composite used for launch configuration editing */ protected Composite createLaunchConfigurationEditArea(Composite parent) { setTabViewer(new LaunchConfigurationTabGroupViewer(parent, this)); return (Composite)fTabViewer.getControl(); } - + /** * Creates all of the actions for the toolbar * @param toolbar @@ -524,7 +524,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun tmanager.update(true); DebugUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this); } - + protected void setShift(boolean isShift) { fIsShift = isShift; } @@ -533,7 +533,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun * This area displays a tree of launch configurations that the user * may select, and allows users to create new configurations, and * delete and duplicate existing configurations. - * + * * @return the composite used for launch configuration selection area */ protected Control createLaunchConfigurationSelectionArea(Composite parent) { @@ -543,14 +543,14 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun gridLayout.marginWidth = 0; comp.setLayout(gridLayout); comp.setLayoutData(new GridData(GridData.FILL_BOTH)); - + ViewForm viewForm = new ViewForm(comp, SWT.FLAT | SWT.BORDER); ToolBarManager toolBarManager= new ToolBarManager(SWT.FLAT); ToolBar toolBar = toolBarManager.createControl(viewForm); toolBar.setBackground(parent.getBackground()); viewForm.setTopLeft(toolBar); viewForm.setLayoutData(new GridData(GridData.FILL_BOTH)); - + Composite viewFormContents = new Composite(viewForm, SWT.FLAT); gridLayout = new GridLayout(); gridLayout.marginHeight = 5; @@ -563,7 +563,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun if (filterText != null){ filterText.setFocus(); } - + //create toolbar actions, we reuse the actions from the view so we wait until after //the view is created to add them to the toolbar createToolbarActions(toolBarManager); @@ -593,7 +593,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun }; fLaunchConfigurationView.setAction(IDebugView.DOUBLE_CLICK_ACTION, fDoubleClickAction); Viewer viewer = fLaunchConfigurationView.getViewer(); - + Control control = viewer.getControl(); GridData gd = new GridData(GridData.FILL_BOTH); control.setLayoutData(gd); @@ -653,14 +653,14 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun } return filters.toArray(new ViewerFilter[filters.size()]); } - + /** * Set the initial selection in the tree. */ public void doInitialTreeSelection() { fLaunchConfigurationView.getViewer().setSelection(fInitialSelection); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#generateName(java.lang.String) */ @@ -671,7 +671,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun } return getLaunchManager().generateLaunchConfigurationName(name); } - + /** * Generates and returns a unique name using the specified name as a prefix in the event * the specified name already exists or is contained in the set of reserved names. @@ -679,7 +679,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun * @param reservednames a listing of names that should be considered as 'taken' and cannot be generated * by this method * @return a new name based on the specified name. - * + * * @since 3.3 */ public String generateName(String name, Set<String> reservednames) { @@ -688,7 +688,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun } return ((LaunchManager)getLaunchManager()).generateUniqueLaunchConfigurationNameFrom(name, reservednames); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#getActiveTab() */ @@ -696,7 +696,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun public ILaunchConfigurationTab getActiveTab() { return fTabViewer.getActiveTab(); } - + /** * Returns the banner image to display in the title area */ @@ -709,10 +709,10 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun } return fBannerImage; } - + /** * Gets the delete menu action - * + * * @return the delete menu action */ protected AbstractLaunchConfigurationAction getDeleteAction() { @@ -727,7 +727,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun protected IAction getFilterAction() { return fLaunchConfigurationView.getAction(FilterLaunchConfigurationAction.ID_FILTER_ACTION); } - + /** * Gets the collapse all action * @return the collapse all action @@ -736,7 +736,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun protected IAction getCollapseAllAction() { return fLaunchConfigurationView.getAction(CollapseAllLaunchConfigurationAction.ID_COLLAPSEALL_ACTION); } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings() * @since 3.2 @@ -745,7 +745,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun protected IDialogSettings getDialogBoundsSettings() { return getDialogSettings(); } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsStrategy() */ @@ -753,11 +753,11 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun protected int getDialogBoundsStrategy() { return DIALOG_PERSISTSIZE; } - + /** * Returns the dialog settings for this dialog. Subclasses should override * <code>getDialogSettingsSectionName()</code>. - * + * * @return IDialogSettings */ protected IDialogSettings getDialogSettings() { @@ -771,16 +771,16 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun /** * Returns the name of the section that this dialog stores its settings in - * + * * @return String */ protected String getDialogSettingsSectionName() { return IDebugUIConstants.PLUGIN_ID + ".LAUNCH_CONFIGURATIONS_DIALOG_SECTION"; //$NON-NLS-1$ } - + /** * Gets the current display - * + * * @return the display */ protected Display getDisplay() { @@ -790,37 +790,37 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun } return DebugUIPlugin.getStandardDisplay(); } - + /** * Gets the duplicate menu action - * + * * @return the duplicate menu action */ protected AbstractLaunchConfigurationAction getDuplicateAction() { return (AbstractLaunchConfigurationAction)fLaunchConfigurationView.getAction(DuplicateLaunchConfigurationAction.ID_DUPLICATE_ACTION); } - + /** * Gets the help context id - * + * * @return the help context id */ protected String getHelpContextId() { return IDebugHelpContextIds.LAUNCH_CONFIGURATION_DIALOG; } - + /** * Returns the status the dialog was opened on or <code>null</code> if none. - * + * * @return IStatus */ protected IStatus getInitialStatus() { return fInitialStatus; } - + /** * Return the last launched configuration in the workspace. - * + * * @return the last launched configuration */ protected ILaunchConfiguration getLastLaunchedWorkbenchConfiguration() { @@ -829,22 +829,22 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun /** * Returns the appropriate text for the launch button - run or debug. - * + * * @return the launch button text */ protected String getLaunchButtonText() { return DebugPlugin.getDefault().getLaunchManager().getLaunchMode(getMode()).getLabel(); } - + /** * Returns the launch group being displayed. - * + * * @return launch group */ public LaunchGroupExtension getLaunchGroup() { return fGroup; } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#getMode() */ @@ -852,42 +852,42 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun public String getMode() { return getLaunchGroup().getMode(); } - + /** * Gets the new menu action - * + * * @return the new menu action */ protected AbstractLaunchConfigurationAction getNewAction() { return (AbstractLaunchConfigurationAction)fLaunchConfigurationView.getAction(CreateLaunchConfigurationAction.ID_CREATE_ACTION); } - + /** * Returns the reserved name set (if there is one), <code>null</code> otherwise * @return the reserved name set or <code>null</code> * @since 3.3 - * + * */ public Set<String> getReservedNameSet() { return fReservedNames; } - + /** * returns the open mode - * + * * @return the open mode */ protected int getOpenMode() { return fOpenMode; } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.IPageChangeProvider#getSelectedPage() */ public Object getSelectedPage() { return getActiveTab(); } - + /** * Returns the title of the shell * @return the shell title @@ -905,7 +905,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun /** * Returns the current tab group - * + * * @return the current tab group, or <code>null</code> if none */ public ILaunchConfigurationTabGroup getTabGroup() { @@ -928,7 +928,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun /** * Returns the viewer used to display the tabs for a launch configuration. - * + * * @return LaunchConfigurationTabGroupViewer */ protected LaunchConfigurationTabGroupViewer getTabViewer() { @@ -954,14 +954,14 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun cancelPressed(); } } - + /** * Notification that selection has changed in the launch configuration tree. * <p> * If the currently displayed configuration is not saved, * prompt for saving before moving on to the new selection. * </p> - * + * * @param event selection changed event */ protected void handleLaunchConfigurationSelectionChanged(SelectionChangedEvent event) { @@ -1020,10 +1020,10 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun } } } - + /** * Notification the 'launch' button has been pressed. Save and launch. - * + * */ protected void handleLaunchPressed() { ILaunchConfiguration config = fTabViewer.getOriginal(); @@ -1040,7 +1040,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun /** * Consult a status handler for the given status, if any. The status handler * is passed this launch config dialog as an argument. - * + * * @param status the status to be handled */ public void handleStatus(IStatus status) { @@ -1094,7 +1094,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun } super.initializeBounds(); } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.TitleAreaDialog#getInitialSize() */ @@ -1130,7 +1130,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun DebugUIPlugin.log(e.getStatus()); } } - + /** * Performs initialization of the content by setting the initial tree selection */ @@ -1148,17 +1148,17 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun } } doInitialTreeSelection(); - + IStatus status = getInitialStatus(); if (status != null) { handleStatus(status); } restoreExpansion(); } - + /** * Compares two objects to determine their equality - * + * * @param o1 the first object * @param o2 the object to compare to object one * @return true if they are equal, false if object 1 is null, the result of o1.equals(o2) otherwise @@ -1175,18 +1175,18 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun /** * Returns whether the dialog can be closed - * + * * @return whether the dialog can be closed */ protected boolean isSafeToClose() { return fActiveRunningOperations == 0; } - + /** * Determine the initial configuration for this dialog. * Open the dialog in the mode set using #setOpenMode(int) and return one of * <code>Window. OK</code> or <code>Window.CANCEL</code>. - * + * * @see org.eclipse.jface.window.Window#open() * @return the int status of opening the dialog */ @@ -1202,7 +1202,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun } return super.open(); } - + /** * saves which of the nodes are expanded at the time the dialog is closed * @since 3.2 @@ -1240,7 +1240,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun settings.put(DIALOG_EXPANDED_NODES, value); } } - + /** * Restore the original expansion state of the nodes in the viewer * @since 3.2 @@ -1278,7 +1278,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun } } } - + /** * Save the current sash weights */ @@ -1290,7 +1290,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun settings.put(DIALOG_SASH_WEIGHTS_2, (sashWeights[1] < 10 ? DEFAULT_SASH_WEIGHTS[1] : sashWeights[1])); } } - + /** * Update buttons and message. */ @@ -1332,7 +1332,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun fProgressMonitorPart.attachToCancelComponent(null); fProgressMonitorPart.getParent().setVisible(true); fActiveRunningOperations++; - + //do work here collecting enabled states, otherwise to get these states we would need to //perform the validation of the dialog again, which is expensive and would cause flashing of widgets. Control[] children = ((Composite)fButtonComp.getChildren()[0]).getChildren(); @@ -1362,7 +1362,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun PlatformUI.getWorkbench().getProgressService().run(fork, cancelable, runnable); } } - + /** * Updates the enablement of the runnable controls to appear disabled as a job is running * @param enabled the desired enable status of the dialog area, revert//apply buttons, and @@ -1380,7 +1380,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun } getDialogArea().setEnabled(enabled); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#setActiveTab(org.eclipse.debug.ui.ILaunchConfigurationTab) */ @@ -1388,7 +1388,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun public void setActiveTab(ILaunchConfigurationTab tab) { fTabViewer.setActiveTab(tab); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#setActiveTab(int) */ @@ -1396,7 +1396,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun public void setActiveTab(int index) { fTabViewer.setActiveTab(index); } - + /** * Sets the initial selection for the dialog when opened in * <code>LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION</code> mode. @@ -1404,48 +1404,48 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun public void setInitialSelection(IStructuredSelection selection) { fInitialSelection = selection; } - + /** * Sets the status to open the dialog on. - * + * * @param status the initial status for the dialog */ public void setInitialStatus(IStatus status) { fInitialStatus = status; } - + /** * Sets whether the tab group should set default values in the launch configuration * when the dialog is opened. If this method is not called, default values are not * set. - * + * * @param setDefaults whether to set default values * @since 3.6 */ public void setDefaultsOnOpen(boolean setDefaults) { fSetDefaultOnOpen = setDefaults; } - + /** * Returns if the dialog is supposed to be setting the default values for * the initial configuration when it opens - * + * * @return <code>true</code> if the defaults should be set on open, <code>false</code> otherwise * @since 3.6 */ public boolean shouldSetDefaultsOnOpen() { return fSetDefaultOnOpen; } - + /** * Sets the launch group to display. - * + * * @param group launch group */ protected void setLaunchGroup(LaunchGroupExtension group) { fGroup = group; } - + /** * Set the title area image based on the mode this dialog was initialized with */ @@ -1460,7 +1460,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun public void setName(String name) { fTabViewer.setName(name); } - + /** * Returns the current launch manager * @return the current launch manager @@ -1468,7 +1468,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun protected ILaunchManager getLaunchManager() { return DebugPlugin.getDefault().getLaunchManager(); } - + /** * Set the flag indicating how this dialog behaves when the <code>open()</code> method is called. * Valid values are defined by the LAUNCH_CONFIGURATION_DIALOG... constants in this class. @@ -1476,7 +1476,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun public void setOpenMode(int mode) { fOpenMode = mode; } - + /** * Increase the size of this dialog's <code>Shell</code> by the specified amounts. * Do not increase the size of the Shell beyond the bounds of the Display. @@ -1488,7 +1488,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun /** * Sets the viewer used to display the tabs for a launch configuration. - * + * * @param viewer the new view to set */ protected void setTabViewer(LaunchConfigurationTabGroupViewer viewer) { @@ -1498,7 +1498,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun /** * Create and return a dialog that asks the user whether they want to discard * unsaved changes. - * + * * @return the return code based on the button selected. * The value will be one of <code>YES_ID</code> or <code>NO_ID</code> from * <code>IDialogConstants</code>. @@ -1535,7 +1535,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun /** * Create and return a dialog that asks the user whether they want to save * unsaved changes. - * + * * @return the return code based on the button selected. * The value will be one of <code>YES_ID</code>, <code>NO_ID</code>, or <code>CANCEL_ID</code>, from * <code>IDialogConstants</code>. @@ -1569,7 +1569,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun * can be saved or not. Return <code>true</code> if the user indicated that they wish to replace * the current config, either by saving changes or by discarding the, return <code>false</code> * otherwise. - * + * * @return returns the <code>showSaveChangesDialog</code> return value */ private int showUnsavedChangesDialog() { @@ -1610,7 +1610,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun } } } - + /** * Returns if there is a selection in the tree viewer or not * @return true if something in the tree is selected, false otherwise @@ -1619,7 +1619,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun public boolean isTreeSelectionEmpty() { return fLaunchConfigurationView.getTreeViewer().getSelection().isEmpty(); } - + /* (non-Javadoc) * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent) */ @@ -1648,7 +1648,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun fLaunchConfigurationView.updateFilterLabel(); } } - + return Status.OK_STATUS; } }; 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 2cee56329..e0fef6ca0 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 @@ -4,7 +4,7 @@ * 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 - Initial API and implementation *******************************************************************************/ @@ -196,7 +196,7 @@ public class LaunchConfigurationsMessages extends NLS { public static String LaunchConfigurationsDialog_4; public static String LaunchConfigurationsDialog_5; public static String FilterLaunchConfigurationAction_0; - + public static String LaunchConfigurationTabGroupViewer_8; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchDelegateContribution.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchDelegateContribution.java index 9e95ce18a..a784278ea 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchDelegateContribution.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchDelegateContribution.java @@ -4,7 +4,7 @@ * 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 *******************************************************************************/ @@ -20,7 +20,7 @@ import org.eclipse.ui.IPluginContribution; public class LaunchDelegateContribution implements IPluginContribution { private ILaunchDelegate fDelegate = null; - + /** * Constructor * @param delegate @@ -28,7 +28,7 @@ public class LaunchDelegateContribution implements IPluginContribution { public LaunchDelegateContribution(ILaunchDelegate delegate) { fDelegate = delegate; } - + /** * @see org.eclipse.ui.IPluginContribution#getLocalId() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchDelegateNotAvailableHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchDelegateNotAvailableHandler.java index 40beef2de..a8dc148c1 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchDelegateNotAvailableHandler.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchDelegateNotAvailableHandler.java @@ -4,7 +4,7 @@ * 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 *******************************************************************************/ @@ -23,7 +23,7 @@ import org.eclipse.swt.widgets.Shell; /** * This class provides a mechanism to prompt users in the UI thread from debug.core in the case where * a launch delegate has gone missing and a new choice needs to be made in the launch dialog. - * + * * @since 3.3 */ public class LaunchDelegateNotAvailableHandler implements IStatusHandler { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchGroupExtension.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchGroupExtension.java index 74431b081..504c589e1 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchGroupExtension.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchGroupExtension.java @@ -4,13 +4,13 @@ * 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 org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.debug.ui.ILaunchGroup; @@ -21,26 +21,26 @@ import org.eclipse.jface.resource.ImageDescriptor; * Proxy to a launch group extension */ public class LaunchGroupExtension implements ILaunchGroup { - + /** * The configuration element defining this launch group. */ private IConfigurationElement fConfig; - + /** * The image for this group */ private ImageDescriptor fImageDescriptor; - + /** * The banner image for this group */ private ImageDescriptor fBannerImageDescriptor; - + /** * Constructs a launch group extension based on the given configuration * element - * + * * @param element the configuration element defining the * attributes of this launch group extension * @return a new launch group extension @@ -48,31 +48,31 @@ public class LaunchGroupExtension implements ILaunchGroup { public LaunchGroupExtension(IConfigurationElement element) { setConfigurationElement(element); } - + /** * Sets the configuration element that defines the attributes * for this launch group extension. - * + * * @param element configuration element */ private void setConfigurationElement(IConfigurationElement element) { fConfig = element; } - + /** * Returns the configuration element that defines the attributes * for this launch group extension. - * + * * @param configuration element that defines the attributes * for this launch group extension */ protected IConfigurationElement getConfigurationElement() { return fConfig; } - + /** * Returns the image for this launch group, or <code>null</code> if none - * + * * @return the image for this launch group, or <code>null</code> if none */ @Override @@ -82,11 +82,11 @@ public class LaunchGroupExtension implements ILaunchGroup { } return fImageDescriptor; } - + /** * Returns the banner image for this launch group, or <code>null</code> if * none - * + * * @return the banner image for this launch group, or <code>null</code> if * none */ @@ -96,61 +96,61 @@ public class LaunchGroupExtension implements ILaunchGroup { fBannerImageDescriptor = createImageDescriptor("bannerImage"); //$NON-NLS-1$ } return fBannerImageDescriptor; - } - + } + /** * Returns the label for this launch group - * + * * @return the label for this launch group */ @Override public String getLabel() { return getConfigurationElement().getAttribute("label"); //$NON-NLS-1$ - } - + } + /** * Returns the id for this launch group - * + * * @return the id for this launch group */ @Override public String getIdentifier() { return getConfigurationElement().getAttribute("id"); //$NON-NLS-1$ - } - + } + /** * Returns the category for this launch group, possibly <code>null</code> - * + * * @return the category for this launch group, possibly <code>null</code> */ @Override public String getCategory() { return getConfigurationElement().getAttribute("category"); //$NON-NLS-1$ } - + /** * Returns the mode for this launch group - * + * * @return the mode for this launch group */ @Override public String getMode() { return getConfigurationElement().getAttribute("mode"); //$NON-NLS-1$ - } - + } + /** * Creates an image descriptor based on the given attribute name - * + * * @param attribute * @return ImageDescriptor */ protected ImageDescriptor createImageDescriptor(String attribute) { return DebugUIPlugin.getImageDescriptor(getConfigurationElement(), attribute); } - + /** * Returns whether this launch group is public - * + * * @return boolean */ @Override diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchGroupFilter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchGroupFilter.java index 0ca73482c..e25634d25 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchGroupFilter.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchGroupFilter.java @@ -24,9 +24,9 @@ import org.eclipse.ui.activities.WorkbenchActivityHelper; * Displays launch configurations for a specific launch group */ public class LaunchGroupFilter extends ViewerFilter { - + private ILaunchGroup fGroup; - + /** * Constructor * @param groupExtension @@ -53,7 +53,7 @@ public class LaunchGroupFilter extends ViewerFilter { config = (ILaunchConfiguration)element; try { type = config.getType(); - } + } catch (CoreException e) {} } boolean priv = false; @@ -68,10 +68,10 @@ public class LaunchGroupFilter extends ViewerFilter { } return false; } - + /** * Returns whether the given categories are equal. - * + * * @param c1 category identifier or <code>null</code> * @param c2 category identifier or <code>null</code> * @return boolean @@ -81,6 +81,6 @@ public class LaunchGroupFilter extends ViewerFilter { return c1 == c2; } return c1.equals(c2); - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java index 7ffb4b4a7..cd3978fd9 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java @@ -39,39 +39,39 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe * Listing of the complete launch history, which includes favorites in the launched ordering */ private Vector<ILaunchConfiguration> fCompleteHistory = new Vector<ILaunchConfiguration>(); - + /** * The launch group this history is provided for */ private ILaunchGroup fGroup; - + /** * Ordered listing of the favorites of this history */ private Vector<ILaunchConfiguration> fFavorites = new Vector<ILaunchConfiguration>(); - + /** * A new saved flag to prevent save participants from serializing unchanged launch histories. * @since 3.3.1 */ private boolean fSaved = true; - + /** - * List of instances of this launch history + * List of instances of this launch history */ private static List<LaunchHistory> fgLaunchHistoryInstances = new ArrayList<LaunchHistory>(); - + /** * Creates a new launch history for the given launch group */ public LaunchHistory(ILaunchGroup group) { fGroup = group; - ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager(); + ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager(); manager.addLaunchListener(this); manager.addLaunchConfigurationListener(this); fgLaunchHistoryInstances.add(this); } - + /** * Disposes this history */ @@ -92,7 +92,7 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe addHistory(configuration, true); } } - + /** * Returns if the current history contains the specified <code>ILaunchConfiguration</code> * @param config the configuration to look for @@ -102,10 +102,10 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe public synchronized boolean contains(ILaunchConfiguration configuration) { return fCompleteHistory.contains(configuration); } - + /** * Adds the given configuration to this history - * + * * @param configuration * @param prepend whether the configuration should be added to the beginning of * the history list @@ -138,14 +138,14 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe /** * Notifies all <code>ILaunchHistoryChangedListener</code>s that the launch history has been modified - * + * * @since 3.3 */ private void fireLaunchHistoryChanged() { DebugUIPlugin.getDefault().getLaunchConfigurationManager().fireLaunchHistoryChanged(); setSaved(false); } - + /** * Returns if the launch history requires saving or not * @return true if the history needs to be saved, false otherwise @@ -154,7 +154,7 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe public boolean needsSaving() { return !fSaved; } - + /** * Allows the dirty flag for this launch history to be set. * It is the clients of this class that must set the saved flag to true @@ -165,7 +165,7 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe public void setSaved(boolean saved) { fSaved = saved; } - + /** * @see org.eclipse.debug.core.ILaunchListener#launchChanged(org.eclipse.debug.core.ILaunch) */ @@ -181,9 +181,9 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe /** * Returns the most recently launched configuration in this history, or * <code>null</code> if none. - * + * * @return the most recently launched configuration in this history, or - * <code>null</code> if none + * <code>null</code> if none */ public synchronized ILaunchConfiguration getRecentLaunch() { ILaunchConfiguration[] history = getCompleteLaunchHistory(); @@ -192,19 +192,19 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe } return null; } - + /** * Returns the launch configurations in this history, in most recently * launched order, not including any entries from the favorites listing. - * + * * @return launch history */ public synchronized ILaunchConfiguration[] getHistory() { Vector<ILaunchConfiguration> history = new Vector<ILaunchConfiguration>(); try { for (ILaunchConfiguration config : fCompleteHistory) { - if(config.exists() && !fFavorites.contains(config) && - DebugUIPlugin.doLaunchConfigurationFiltering(config) && + if(config.exists() && !fFavorites.contains(config) && + DebugUIPlugin.doLaunchConfigurationFiltering(config) && !WorkbenchActivityHelper.filterItem(new LaunchConfigurationTypeContribution(config.getType()))) { history.add(config); } @@ -217,20 +217,20 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe catch(CoreException ce) {DebugUIPlugin.log(ce);} return history.toArray(new ILaunchConfiguration[history.size()]); } - + /** * Returns the complete launch history in the order they were last launched, this listing includes all * entries including those from the favorites listing, but not those that have been filtered via * launch configuration filtering or capabilities filtering * @return the list of last launched <code>ILaunchConfiguration</code>s - * + * * @since 3.3 */ public synchronized ILaunchConfiguration[] getCompleteLaunchHistory() { Vector<ILaunchConfiguration> history = new Vector<ILaunchConfiguration>(); try { for (ILaunchConfiguration config : fCompleteHistory) { - if(config.exists() && DebugUIPlugin.doLaunchConfigurationFiltering(config) && + if(config.exists() && DebugUIPlugin.doLaunchConfigurationFiltering(config) && !WorkbenchActivityHelper.filterItem(new LaunchConfigurationTypeContribution(config.getType()))) { history.add(config); } @@ -239,31 +239,31 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe catch (CoreException ce) {DebugUIPlugin.log(ce);} return history.toArray(new ILaunchConfiguration[history.size()]); } - + /** * Returns the favorite launch configurations in this history, in the order * they were created. - * + * * @return launch favorites */ public synchronized ILaunchConfiguration[] getFavorites() { return fFavorites.toArray(new ILaunchConfiguration[fFavorites.size()]); } - + /** * Sets this container's favorites. - * + * * @param favorites */ public synchronized void setFavorites(ILaunchConfiguration[] favorites) { fFavorites = new Vector<ILaunchConfiguration>(Arrays.asList(favorites)); setSaved(false); fireLaunchHistoryChanged(); - } - + } + /** * Adds the given configuration to the favorites list. - * + * * @param configuration */ public synchronized void addFavorite(ILaunchConfiguration configuration) { @@ -273,20 +273,20 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe fireLaunchHistoryChanged(); } } - + /** * Returns the launch group associated with this history - * + * * @return group */ public ILaunchGroup getLaunchGroup() { return fGroup; } - + /** * Returns whether the given configuration is included in the group * associated with this launch history. - * + * * @param launch * @return boolean */ @@ -308,8 +308,8 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe DebugUIPlugin.log(e); } return false; - } - + } + /** * Notifies all launch histories that the launch history size has changed. */ @@ -318,7 +318,7 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe history.resizeHistory(); } } - + /** * The max history size has changed - remove any histories if current * collection is too long. @@ -332,13 +332,13 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe /** * Returns the maximum number of entries allowed in this history - * + * * @return the maximum number of entries allowed in this history */ protected int getMaxHistorySize() { return DebugUIPlugin.getDefault().getPreferenceStore().getInt(IDebugUIConstants.PREF_MAX_HISTORY_SIZE); } - + /** * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration) */ @@ -350,15 +350,15 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe checkFavorites(configuration); } } - + /** * This method checks if the specified <code>ILaunchConfiguration</code> is a favorite in this * history's launch group. - * + * * @param configuration * @return true if the configuration is a favorite in this history's launch group, false otherwise * @throws CoreException - * + * * @since 3.4 */ protected boolean isFavorite(ILaunchConfiguration configuration) throws CoreException { @@ -370,18 +370,18 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe return configuration.getAttribute(IDebugUIConstants.ATTR_DEBUG_FAVORITE, false); } else if (groupId.equals(IDebugUIConstants.ID_RUN_LAUNCH_GROUP)) { return configuration.getAttribute(IDebugUIConstants.ATTR_RUN_FAVORITE, false); - } - } + } + } else if (favoriteGroups.contains(getLaunchGroup().getIdentifier())) { return true; } return false; } - + /** * Adds the given config to the favorites list if it is a favorite, and * returns whether the config was added to the favorites list. - * + * * @param configuration * @return whether added to the favorites list */ @@ -398,17 +398,17 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe removeFavorite(configuration); return false; } - } + } catch (CoreException e) { //in the event touching the config throws an error, remove it removeFavorite(configuration); - } + } return false; } - + /** * Removes the given config from the favorites list, if needed. - * + * * @param configuration */ protected synchronized void removeFavorite(ILaunchConfiguration configuration) { @@ -419,10 +419,10 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe /** * This method removes the specified <code>ILaunchConfiguration</code> from this launch history (if present) - * If the launch configuration does not exist in the history nothing is changed. If the configuration does exist + * If the launch configuration does not exist in the history nothing is changed. If the configuration does exist * in the history and was removed all history listeners are notified. * @param configuration the configuration to remove - * + * * @since 3.4 */ public synchronized void removeFromHistory(ILaunchConfiguration configuration) { @@ -438,7 +438,7 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe } catch(CoreException ce) {} } - + /** * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration) */ @@ -452,7 +452,7 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe */ @Override public void launchConfigurationRemoved(ILaunchConfiguration configuration) { - synchronized (this) { + synchronized (this) { ILaunchConfiguration newConfig = DebugPlugin.getDefault().getLaunchManager().getMovedTo(configuration); if (newConfig == null) { //deleted @@ -464,7 +464,7 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe if (index >= 0) { fCompleteHistory.remove(index); fCompleteHistory.add(index, newConfig); - } + } index = fFavorites.indexOf(configuration); if (index >= 0) { fFavorites.remove(index); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutExtension.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutExtension.java index c342dcbd0..011adc02a 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutExtension.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutExtension.java @@ -9,7 +9,7 @@ * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.debug.internal.ui.launchConfigurations; - + import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -50,7 +50,7 @@ import org.eclipse.ui.handlers.IHandlerService; * Proxy to a launch shortcut extension */ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContribution { - + private ImageDescriptor fImageDescriptor = null; private List<String> fPerspectives = null; private ILaunchShortcut fDelegate = null; @@ -60,7 +60,7 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib private IConfigurationElement fContextualLaunchConfigurationElement = null; private Expression fContextualLaunchExpr = null; private Expression fStandardLaunchExpr = null; - + /** * Command handler for launch shortcut key binding. */ @@ -68,10 +68,10 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib // the shortcut to invoke private LaunchShortcutExtension fShortcut; private String fMode; - + /** * Constructs a new command handler for the given shortcut - * + * * @param shortcut */ public LaunchCommandHandler(LaunchShortcutExtension shortcut, String mode) { @@ -93,17 +93,17 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib return null; } } - + /** * The configuration element defining this tab. */ private IConfigurationElement fConfig; private/* <Pair> */List<Pair> fContextLabels; - + /** * Constructs a launch configuration tab extension based * on the given configuration element - * + * * @param element the configuration element defining the * attributes of this launch configuration tab extension * @return a new launch configuration tab extension @@ -112,7 +112,7 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib setConfigurationElement(element); registerLaunchCommandHandlers(); } - + /** * Registers command handlers for launch shortcut key bindings */ @@ -125,39 +125,39 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib handlerService.activateHandler(id, handler); } } - } - + } + /** * Sets the configuration element that defines the attributes * for this extension. - * + * * @param element configuration element */ private void setConfigurationElement(IConfigurationElement element) { fConfig = element; } - + /** * Returns the configuration element that defines the attributes * for this extension. - * + * * @param configuration element that defines the attributes * for this launch configuration tab extension */ public IConfigurationElement getConfigurationElement() { return fConfig; } - + /** * Returns the label of this shortcut - * + * * @return the label of this shortcut, or <code>null</code> if not * specified */ public String getLabel() { return getConfigurationElement().getAttribute(IConfigurationElementConstants.LABEL); } - + /** * Returns the configuration element for the optional Contextual Launch * element of this Launch Configuration description. @@ -173,7 +173,7 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib } return fContextualLaunchConfigurationElement; } - + /** * Returns the contextual launch label of this shortcut for the named mode. * <pre> @@ -185,7 +185,7 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib * </contextualLaunch> * </launchShortcut> * </pre> - * + * * @return the contextual label of this shortcut, or <code>null</code> if * not specified */ @@ -211,10 +211,10 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib } return getLabel(); } - + /** * Returns the set of associated launch configuration type ids. - * + * * @return the set of associated launch configuration type ids * @since 3.3 */ @@ -232,13 +232,13 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib } return fAssociatedTypes; } - + /** * Returns the contributed description of the launch delegate or <code>null</code> * if one has not been provided * @param mode the mode to get the description for * @return the description of the shortcut for that specific mode or <code>null</code> if one was not provided - * + * * @since 3.3 */ public String getShortcutDescription(String mode) { @@ -264,13 +264,13 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib } return fDescriptions.get(mode); } - + /** * Evaluate the given expression within the given context and return * the result. Returns <code>true</code> iff result is either TRUE or NOT_LOADED. * This allows optimistic inclusion of shortcuts before plugins are loaded. * Returns <code>false</code> if exp is <code>null</code>. - * + * * @param exp the enablement expression to evaluate or <code>null</code> * @param context the context of the evaluation. Usually, the * user's selection. @@ -280,7 +280,7 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib public boolean evalEnablementExpression(IEvaluationContext context, Expression exp) throws CoreException { return (exp != null) ? ((exp.evaluate(context)) != EvaluationResult.FALSE) : false; } - + /** * Returns an expression that represents the enablement logic for the * contextual launch element of this launch shortcut description or @@ -300,7 +300,7 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib return null; } IConfigurationElement[] elements = contextualLaunchElement.getChildren(ExpressionTagNames.ENABLEMENT); - IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; + IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; if (enablement != null) { fContextualLaunchExpr= ExpressionConverter.getDefault().perform(enablement); @@ -308,7 +308,7 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib } return fContextualLaunchExpr; } - + /** * Returns an expression that represents the enablement logic for the * launch shortcut description or <code>null</code> if none. @@ -322,35 +322,35 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib // all of this stuff is optional, so...tedious testing is required if (fStandardLaunchExpr == null) { IConfigurationElement[] elements = getConfigurationElement().getChildren(ExpressionTagNames.ENABLEMENT); - IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; + IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; if (enablement != null) { fStandardLaunchExpr= ExpressionConverter.getDefault().perform(enablement); } } return fStandardLaunchExpr; - } - + } + /** * Returns the id of this shortcut - * + * * @return the id of this shortcut, or <code>null</code> if not specified */ public String getId() { return getConfigurationElement().getAttribute(IConfigurationElementConstants.ID); } - + /** * Returns the identifier of the help context associated with this launch * shortcut, or <code>null</code> if one was not specified. - * + * * @return the identifier of this launch shortcut's help context or * <code>null</code> * @since 2.1 - */ + */ public String getHelpContextId() { - return getConfigurationElement().getAttribute(IConfigurationElementConstants.HELP_CONTEXT_ID); + return getConfigurationElement().getAttribute(IConfigurationElementConstants.HELP_CONTEXT_ID); } - + /** * Returns the category of this shortcut * @@ -359,11 +359,11 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib */ public String getCategory() { return getConfigurationElement().getAttribute(IConfigurationElementConstants.CATEGORY); - } - + } + /** * Returns the image for this shortcut, or <code>null</code> if none - * + * * @return the image for this shortcut, or <code>null</code> if none */ public ImageDescriptor getImageDescriptor() { @@ -375,11 +375,11 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib } return fImageDescriptor; } - + /** * Returns the perspectives this shortcut is registered for. - * - * @return list of Strings representing perspective identifiers + * + * @return list of Strings representing perspective identifiers * @deprecated The use of the perspectives element has been deprecated since 3.1. */ @Deprecated @@ -388,15 +388,15 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib IConfigurationElement[] perspectives = getConfigurationElement().getChildren(IConfigurationElementConstants.PERSPECTIVE); fPerspectives = new ArrayList<String>(perspectives.length); for (int i = 0; i < perspectives.length; i++) { - fPerspectives.add(perspectives[i].getAttribute(IConfigurationElementConstants.ID)); + fPerspectives.add(perspectives[i].getAttribute(IConfigurationElementConstants.ID)); } } return fPerspectives; } - + /** * Returns this shortcut's delegate, or <code>null</code> if none - * + * * @return this shortcut's delegate, or <code>null</code> if none */ protected ILaunchShortcut getDelegate() { @@ -404,12 +404,12 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib try { fDelegate = (ILaunchShortcut)fConfig.createExecutableExtension(IConfigurationElementConstants.CLASS); } catch (CoreException e) { - DebugUIPlugin.log(e); + DebugUIPlugin.log(e); } } return fDelegate; } - + /** * @see ILaunchShortcut#launch(IEditorPart, String) */ @@ -435,7 +435,7 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib /** * Returns the set of modes this shortcut supports. - * + * * @return the set of modes this shortcut supports */ public Set<String> getModes() { @@ -452,17 +452,17 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib } return fModes; } - + /** * Returns the menu path attribute this shortcut, or <code>null</code> if none - * + * * @return the menu path attribute this shortcut, or <code>null</code> if none * @since 3.0.1 */ public String getMenuPath() { return getConfigurationElement().getAttribute(IConfigurationElementConstants.PATH); - } - + } + /* * Only for debugging * @see java.lang.Object#toString() @@ -535,11 +535,11 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib } return null; } - + /** * Returns if the underlying delegate is a <code>ILaunchShortcut2</code> * @return if the underlying delegate is a <code>ILaunchShortcut2</code> - * + * * @since 3.4 */ public boolean isParticipant() { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java index 47f78e24d..d528a2d8c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java @@ -4,7 +4,7 @@ * 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 *******************************************************************************/ @@ -37,15 +37,15 @@ import com.ibm.icu.text.MessageFormat; /** * Specialized dialog for showing/selecting a specific launch shortcut extension, and allowing it * to be marked to be set as the default - * + * * @see {@link org.eclipse.debug.internal.ui.actions.ContextLaunchingAction} - * + * * @since 3.3 */ public class LaunchShortcutSelectionDialog extends AbstractDebugListSelectionDialog { private static final String DIALOG_SETTINGS = IDebugUIConstants.PLUGIN_ID + ".SELECT_LAUNCH_SHORTCUT_DIALOG"; //$NON-NLS-1$; - + /** * The list of input for the dialog */ @@ -54,7 +54,7 @@ public class LaunchShortcutSelectionDialog extends AbstractDebugListSelectionDia private IResource fResource = null; private List<LaunchShortcutExtension> fShortcuts = null; private Text fDescriptionText = null; - + /** * Constructor * @param input @@ -74,7 +74,7 @@ public class LaunchShortcutSelectionDialog extends AbstractDebugListSelectionDia } setTitle(MessageFormat.format(LaunchConfigurationsMessages.LaunchShortcutSelectionDialog_0, new Object[] { fModeName })); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getHelpContextId() */ @@ -82,7 +82,7 @@ public class LaunchShortcutSelectionDialog extends AbstractDebugListSelectionDia protected String getHelpContextId() { return IDebugHelpContextIds.SELECT_LAUNCH_METHOD_DIALOG; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getDialogSettingsId() */ @@ -90,7 +90,7 @@ public class LaunchShortcutSelectionDialog extends AbstractDebugListSelectionDia protected String getDialogSettingsId() { return DIALOG_SETTINGS; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugListSelectionDialog#addViewerListeners(org.eclipse.jface.viewers.StructuredViewer) */ @@ -104,12 +104,12 @@ public class LaunchShortcutSelectionDialog extends AbstractDebugListSelectionDia if (!selection.isEmpty()) { LaunchShortcutExtension shortcutSource = (LaunchShortcutExtension) ((IStructuredSelection)selection).getFirstElement(); String description = shortcutSource.getShortcutDescription(fMode); - fDescriptionText.setText((description == null ? LaunchConfigurationsMessages.LaunchShortcutSelectionDialog_3 : description)); + fDescriptionText.setText((description == null ? LaunchConfigurationsMessages.LaunchShortcutSelectionDialog_3 : description)); } } }); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#addCustomFooterControls(org.eclipse.swt.widgets.Composite) */ @@ -144,7 +144,7 @@ public class LaunchShortcutSelectionDialog extends AbstractDebugListSelectionDia fModeName.toLowerCase(), fResource.getName() }); } } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugListSelectionDialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite) */ @@ -153,5 +153,5 @@ public class LaunchShortcutSelectionDialog extends AbstractDebugListSelectionDia super.createButtonsForButtonBar(parent); getButton(IDialogConstants.OK_ID).setEnabled(!getViewer().getSelection().isEmpty()); } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchTabContribution.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchTabContribution.java index 9104e38e1..a0cb4d3d3 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchTabContribution.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchTabContribution.java @@ -4,7 +4,7 @@ * 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 *******************************************************************************/ @@ -14,15 +14,15 @@ import org.eclipse.debug.internal.ui.LaunchConfigurationTabExtension; import org.eclipse.ui.IPluginContribution; /** - * This class provides a wrapper for a launch tab contribution so that it can be filtered from the UI + * This class provides a wrapper for a launch tab contribution so that it can be filtered from the UI * via the use of capabilities - * + * * @since 3.3 */ public class LaunchTabContribution implements IPluginContribution { LaunchConfigurationTabExtension fTab = null; - + public LaunchTabContribution(LaunchConfigurationTabExtension tab) { fTab = tab; } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/OrganizeFavoritesAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/OrganizeFavoritesAction.java index 1a15ac133..4d949ca18 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/OrganizeFavoritesAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/OrganizeFavoritesAction.java @@ -4,7 +4,7 @@ * 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 *******************************************************************************/ @@ -17,15 +17,15 @@ import org.eclipse.jface.action.Action; * OrganizeFavoritesAction */ public class OrganizeFavoritesAction extends Action { - + // launch group identifier - private String fGroupId; - + private String fGroupId; + /** * @param text */ public OrganizeFavoritesAction(String launchGroupId) { - super(LaunchConfigurationsMessages.OrganizeFavoritesAction_0); + super(LaunchConfigurationsMessages.OrganizeFavoritesAction_0); fGroupId = launchGroupId; } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java index a73e12a44..320225b9b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java @@ -69,15 +69,15 @@ import com.ibm.icu.text.MessageFormat; /** * The perspective manager manages the 'perspective' settings - * defined by launch configurations. Specifically it: + * defined by launch configurations. Specifically it: * <ul> * <li>changes perspectives as launches are registered</li> * <li>change perspective when a thread suspends</li> * </ul> - * + * * Since 3.3 the Perspectives Manager is an <code>ISaveParticipant</code>, allowing it to participate in * workspace persistence life-cycles. - * + * * @see IDebugUIContants.ATTR_RUN_PERSPECTIVE * @see IDebugUIContants.ATTR_DEBUG_PERSPECTIVE * @see ISaveParticipant @@ -91,15 +91,15 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe /** * Describes exactly one perspective context, which is composed of an <code>ILaunchCOnfigurationType</code>, and set of modes * and an <code>ILaunchDelegate</code>. Perspective ids are then cached for a context based on mode set. - * + * * @since 3.3 */ class PerspectiveContext { - + private ILaunchConfigurationType fType = null; private ILaunchDelegate fDelegate = null; private Map<Set<String>, String> fPerspectives = null; - + /** * Constructor * @param type @@ -112,7 +112,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe fPerspectives = new HashMap<Set<String>, String>(); fPerspectives.put(modes, null); } - + /** * We can specially compare two cases: * <ol> @@ -130,7 +130,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe ILaunch launch = (ILaunch) object; type = launch.getLaunchConfiguration().getType(); delegate = resolveLaunchDelegate(launch); - } + } catch (CoreException e) {return false;} } else if(object instanceof PerspectiveContext) { @@ -148,7 +148,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } return super.equals(object); } - + @Override public int hashCode() { if (fType != null) { @@ -167,11 +167,11 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe public Map<Set<String>, String> getPersepctiveMap() { return fPerspectives; } - + /** * Creates a new mapping of the specified perspective id to the specified mode set. * If a mapping for the modeset already exists it is over-written. - * @param modes the set of modes + * @param modes the set of modes * @param pid the id of the perspective */ public void setPerspective(Set<String> modes, String pid) { @@ -180,7 +180,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } fPerspectives.put(modes, pid); } - + /** * Returns the perspective id associated with the given mode set * @param modes the set of mode @@ -196,9 +196,9 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } /** - * Use a customized UI job so that nested jobs with a scheduling rule are + * Use a customized UI job so that nested jobs with a scheduling rule are * not prevented from running. - * See bug 377593 + * See bug 377593 */ private abstract class MyUIJob extends Job { public MyUIJob(String name) { @@ -207,7 +207,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe setPriority(Job.INTERACTIVE); setRule(AsynchronousSchedulingRuleFactory.getDefault().newSerialPerObjectRule(this)); } - + @Override protected IStatus run(final IProgressMonitor monitor) { if (monitor.isCanceled()) { @@ -244,21 +244,21 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe }); return Job.ASYNC_FINISH; } - + public abstract IStatus runInUIThread(IProgressMonitor monitor); } - + /** * A listing of <code>PerspectiveContext</code>s - * + * * @since 3.3 */ private Set<PerspectiveContext> fPerspectiveContexts = null; - + /** * id for the 'delegate' attribute - * + * * @since 3.3 */ public static final String ATTR_DELEGATE_ID = "delegate"; //$NON-NLS-1$ @@ -269,7 +269,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe * prompts at the same time. */ private boolean fPrompting; - + /** * Maps each launch to its perspective context activation. These * are disabled when a launch terminates. @@ -289,17 +289,17 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe /** * Called by the debug ui plug-in on shutdown. - * The perspective manager de-registers as a + * The perspective manager de-registers as a * launch listener. */ public void shutdown() { DebugUIPlugin.getDefault().removeSaveParticipant(this); DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this); } - + /** * If there are no launches, remove the Suspend Trigger Listener - * + * * @see ILaunchListener#launchRemoved(ILaunch) */ @Override @@ -322,19 +322,19 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe }; async(r); } - + /** * Do nothing. - * + * * @see ILaunchListener#launchChanged(ILaunch) */ @Override - public void launchChanged(ILaunch launch) {} + public void launchChanged(ILaunch launch) {} - /** + /** * Switch to the perspective specified by the * launch configuration. - * + * * @see ILaunchListener#launchAdded(ILaunch) */ @Override @@ -347,7 +347,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe // check event filters try { perspectiveId = getPerspectiveId(launch); - } + } catch (CoreException e) { String name = DebugUIPlugin.getModelPresentation().getText(launch); switchFailed(e, name); @@ -380,7 +380,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe /** * Switches to the specified perspective - * + * * @param id perspective identifier */ protected void switchToPerspective(IWorkbenchWindow window, String id) { @@ -393,12 +393,12 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } } catch (WorkbenchException e) { DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), - LaunchConfigurationsMessages.PerspectiveManager_Error_1, + LaunchConfigurationsMessages.PerspectiveManager_Error_1, MessageFormat.format(LaunchConfigurationsMessages.PerspectiveManager_Unable_to_switch_to_perspective___0__2, new Object[] { id }), e); } } - + /** * Utility method to submit an asynchronous runnable to the UI */ @@ -408,7 +408,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe d.asyncExec(r); } } - + /** * Utility method to submit a synchronous runnable to the UI */ @@ -417,11 +417,11 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe if (d != null && !d.isDisposed()) { d.syncExec(r); } - } + } /** * Reports failure to switch perspectives to the user - * + * * @param status exception status describing failure * @param launchName the name of the launch that the * failure is associated with @@ -430,27 +430,27 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe sync(new Runnable() { @Override public void run() { - DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), LaunchConfigurationsMessages.PerspectiveManager_Error_1, + DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), LaunchConfigurationsMessages.PerspectiveManager_Error_1, MessageFormat.format(LaunchConfigurationsMessages.PerspectiveManager_Unable_to_switch_perpsectives_as_specified_by_launch___0__4, new Object[] { launchName }), t); }}); } - + /** * A breakpoint has been hit. Carry out perspective switching - * as appropriate for the given debug event. - * + * as appropriate for the given debug event. + * * @param event the suspend event */ private void handleBreakpointHit(final ILaunch launch) { - + String perspectiveId = null; try { perspectiveId = getPerspectiveId(launch); - } + } catch (CoreException e) {DebugUIPlugin.log(e);} // if no perspective specified, always switch to debug - // perspective + // perspective // this has to be done in an async, such that the workbench // window can be accessed @@ -465,7 +465,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe if (window == null) { return Status.OK_STATUS; } - + // switch the perspective if user preference is set if (shouldSwitchPerspective(window, targetId, IInternalDebugUIConstants.PREF_SWITCH_PERSPECTIVE_ON_SUSPEND)) { switchToPerspective(window, targetId); @@ -474,7 +474,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe return Status.OK_STATUS; } } - + // make sure the shell is active Shell shell= window.getShell(); if (shell != null) { @@ -530,16 +530,16 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe return Status.OK_STATUS; } }; - + switchJob.setSystem(true); switchJob.setPriority(Job.INTERACTIVE); switchJob.setRule(AsynchronousSchedulingRuleFactory.getDefault().newSerialPerObjectRule(this)); switchJob.schedule(); } - + /** * Returns a modal dialog currently open on the given shell or <code>null</code> if none. - * + * * @param shell shell to check * @return a modal dialog currently open on the given shell or <code>null</code> if none */ @@ -550,15 +550,15 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe if ((dialog.getStyle() & (SWT.APPLICATION_MODAL | SWT.PRIMARY_MODAL | SWT.SYSTEM_MODAL)) > 0) { return dialog; } - } + } return null; } - + /** * Returns the workbench window in which the given perspective * should be shown. First, check the current window to see if it * is already showing the perspective. Then check any other windows. - * + * * @param perspectiveId the perspective identifier * @return which window the given perspective should be shown in * or <code>null</code> if there are no windows available @@ -584,7 +584,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } return null; } - + /** * Returns if the specified window is showing the perspective denoted by the specified id * @param window the window to query @@ -603,11 +603,11 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } return false; } - + /** * Returns whether or not the user wishes to switch to the specified * perspective when a launch occurs. - * + * * @param perspectiveName the name of the perspective that will be presented * to the user for confirmation if they've asked to be prompted about * perspective switching @@ -630,7 +630,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe if (perspectiveDesc != null) { args = new String[] { perspectiveName , perspectiveDesc }; } - else { + else { args = new String[] { perspectiveName }; } String switchPerspective = DebugUIPlugin.getDefault().getPreferenceStore().getString(preferenceKey); @@ -639,7 +639,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } else if (MessageDialogWithToggle.NEVER.equals(switchPerspective)) { return false; } - + Shell shell= window.getShell(); if (shell == null || fPrompting) { return false; @@ -675,7 +675,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe message = LaunchConfigurationsMessages.PerspectiveManager_15; } } - MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoQuestion(shell, LaunchConfigurationsMessages.PerspectiveManager_12, MessageFormat.format(message, args), null, false, DebugUIPlugin.getDefault().getPreferenceStore(), preferenceKey); + MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoQuestion(shell, LaunchConfigurationsMessages.PerspectiveManager_12, MessageFormat.format(message, args), null, false, DebugUIPlugin.getDefault().getPreferenceStore(), preferenceKey); boolean answer = (dialog.getReturnCode() == IDialogConstants.YES_ID); synchronized (this) { fPrompting= false; @@ -686,11 +686,11 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } return answer; } - + /** * Returns whether the given perspective identifier matches the * identifier of the current perspective. - * + * * @param perspectiveId the identifier * @return whether the given perspective identifier matches the * identifier of the current perspective @@ -708,14 +708,14 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } return isCurrent; } - + /** * Returns the label of the perspective with the given identifier or * <code>null</code> if no such perspective exists. - * + * * @param perspectiveId the identifier * @return the label of the perspective with the given identifier or - * <code>null</code> if no such perspective exists + * <code>null</code> if no such perspective exists */ protected String getPerspectiveLabel(String perspectiveId) { IPerspectiveDescriptor newPerspective = PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId(perspectiveId); @@ -725,14 +725,14 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe return newPerspective.getLabel(); } - + /** * Returns the label of the perspective with the given identifier or * <code>null</code> if no such perspective exists. - * + * * @param perspectiveId the identifier * @return the label of the perspective with the given identifier or - * <code>null</code> if no such perspective exists + * <code>null</code> if no such perspective exists */ protected String getPerspectiveDescription(String perspectiveId) { IPerspectiveDescriptor newPerspective = PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId(perspectiveId); @@ -741,11 +741,11 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } return newPerspective.getDescription(); } - - /** + + /** * Returns the perspective associated with the * given launch, or <code>null</code> if none. - * + * * @param launch a launch * @return the perspective associated with the launch, * or <code>null</code> @@ -768,15 +768,15 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } return perspectiveId; } - + /** - * Returns the id of the perspective associated with the given type and set of modes. Passing <code>null</code> for + * Returns the id of the perspective associated with the given type and set of modes. Passing <code>null</code> for * the launch delegate results in the default perspective id being returned (if there is one). * @param type the type we are launching * @param modes the set of modes the type was launched with * @param delegate the delegate performing the launch for this type and modeset * @return the id of the perspective for the given launch configuration type, modeset and launch delegate - * + * * @since 3.3 */ public String getLaunchPerspective(ILaunchConfigurationType type, Set<String> modes, ILaunchDelegate delegate) { @@ -795,7 +795,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } return id; } - + /** * Returns the perspective to switch to when a configuration of the given type * is launched in the given mode, or <code>null</code> if no switch should take @@ -814,7 +814,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe modes.add(mode); return getLaunchPerspective(type, modes, null); } - + /** * Sets the perspective to switch to when a configuration of the given type * is launched in the given mode. <code>PERSPECTIVE_NONE</code> indicates no @@ -822,7 +822,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe * a default perspective switch should take place, as defined by the associated * launch tab group extension. * <p> - * Calling this method is equivalent to calling <code>setLaunchPerspective(ILaunchConfigurationType type, Set modes, ILaunchDelegate delegate, String perspectiveid)</code>, + * Calling this method is equivalent to calling <code>setLaunchPerspective(ILaunchConfigurationType type, Set modes, ILaunchDelegate delegate, String perspectiveid)</code>, * with the parameter 'mode' used in the set modes, and null passed as the delegate * </p> * @param type launch configuration type @@ -836,18 +836,18 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe modes.add(mode); setLaunchPerspective(type, modes, null, perspective); } - + /** - * Sets the perspective that should be switched to when a configuration of the given type is launched with the + * Sets the perspective that should be switched to when a configuration of the given type is launched with the * specified modes set by the given launch delegate. * <p> * Passing <code>null</code> as a launch delegate will set the default perspective switch for that type and modeset, where * <code>PERSPECTIVE_NONE</code> indicates no perspective switch should take place. * </p> * @param type the type to set a perspective context for - * @param modes the set of modes + * @param modes the set of modes * @param delegate the delegate, or <code>null</code> if the default perspective should be used - * + * * @since 3.3 */ public void setLaunchPerspective(ILaunchConfigurationType type, Set<String> modes, ILaunchDelegate delegate, String perspectiveid) { @@ -871,12 +871,12 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } fPerspectiveContexts.add(item); } - + /** * Searches the listing of perspective contexts to see if the specified one already exists * @param context the context to compare * @return the matching <code>PerspectiveContext</code> or <code>null</code> if none - * + * * @since 3.3 */ private PerspectiveContext findContext(PerspectiveContext context) { @@ -887,10 +887,10 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } return null; } - + /** * Generates XML for the user specified perspective settings. - * + * * @return XML * @exception IOException if unable to generate the XML * @exception TransformerException if unable to generate the XML @@ -927,9 +927,9 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe root.appendChild(element); } } - + } - return DebugPlugin.serializeDocument(doc); + return DebugPlugin.serializeDocument(doc); } /** @@ -939,7 +939,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe * @param delegate the associated delegate, or <code>null</code> to specify that the default perspective id for that given type and mode set should be returned * @param modes the set of modes this applies to * @return the default perspective id for the given type, delegate and mode set combination, or <code>null</code> if none - * + * * @since 3.3 */ public String getDefaultLaunchPerspective(ILaunchConfigurationType type, ILaunchDelegate delegate, Set<String> modes) { @@ -954,13 +954,13 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe if (id == null) { if (modes.contains(ILaunchManager.DEBUG_MODE)) { id = IDebugUIConstants.ID_DEBUG_PERSPECTIVE; - } - } + } + } } } return id; } - + /** * Resolves the <code>ILaunchDelegate</code> from the given <code>ILaunch</code> * @param launch the launch @@ -984,7 +984,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } return delegate; } - + /** * Initialize the preference set with settings from user preferences */ @@ -1020,18 +1020,18 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } } } - } - } - catch (CoreException e) {DebugUIPlugin.log(e);} + } + } + catch (CoreException e) {DebugUIPlugin.log(e);} } } } - + /** * Parses a string argument into a set of modes * @param modes the string to parse * @return a set of modes parsed from the specified string of the empty set, never null - * + * * @since 3.3 */ private Set<String> parseModes(String modes) { @@ -1042,11 +1042,11 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } return modeset; } - + /** * Creates a standard comma separated list of the modes from the specified * set - * + * * @param modes the set to write to string * @return the mode set as a string */ @@ -1062,11 +1062,11 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe } return str; } - + /** * Schedules the given job after perspective switching is complete, or * immediately if a perspective switch is not in progress. - * + * * @param job job to run after perspective switching */ public void schedulePostSwitch(Job job) { @@ -1106,9 +1106,9 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe @Override public void saving(ISaveContext context) throws CoreException { try { - DebugUIPlugin.getDefault().getPreferenceStore().putValue(IInternalDebugUIConstants.PREF_LAUNCH_PERSPECTIVES, generatePerspectiveXML()); + DebugUIPlugin.getDefault().getPreferenceStore().putValue(IInternalDebugUIConstants.PREF_LAUNCH_PERSPECTIVES, generatePerspectiveXML()); } catch (ParserConfigurationException e) { throw new CoreException(DebugUIPlugin.newErrorStatus("Exception occurred while generating launch perspectives preference XML", e)); //$NON-NLS-1$ - } + } } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SaveScopeResourcesHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SaveScopeResourcesHandler.java index f3238546b..6a4644363 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SaveScopeResourcesHandler.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SaveScopeResourcesHandler.java @@ -56,7 +56,7 @@ import org.eclipse.ui.model.WorkbenchLabelProvider; * </p> * <p> * The 'breaking' occurs as the saving is moved from <code>DebugUIPlugin</code> to the launch configuration delegate, which will require - * implementors of <code>LaunchConfigurationDelegate</code> to incorporate the use of this status handler to perform any pre-launch saving. + * implementors of <code>LaunchConfigurationDelegate</code> to incorporate the use of this status handler to perform any pre-launch saving. * </p> * @since 3.2 */ @@ -73,7 +73,7 @@ public class SaveScopeResourcesHandler implements IStatusHandler { Object fInput; IStructuredContentProvider fContentProvider; ILabelProvider fLabelProvider; - + public ScopedResourcesSelectionDialog(Shell parentShell, Object input, IStructuredContentProvider contentProvider, ILabelProvider labelProvider) { super(parentShell); fInput = input; @@ -82,7 +82,7 @@ public class SaveScopeResourcesHandler implements IStatusHandler { setShellStyle(getShellStyle() | SWT.RESIZE); setShowSelectAllButtons(true); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getContentProvider() */ @@ -90,7 +90,7 @@ public class SaveScopeResourcesHandler implements IStatusHandler { protected IContentProvider getContentProvider() { return fContentProvider; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getLabelProvider() */ @@ -98,7 +98,7 @@ public class SaveScopeResourcesHandler implements IStatusHandler { protected IBaseLabelProvider getLabelProvider() { return fLabelProvider; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getDialogSettingsId() */ @@ -130,7 +130,7 @@ public class SaveScopeResourcesHandler implements IStatusHandler { protected String getViewerLabel() { return LaunchConfigurationsMessages.SaveScopeResourcesHandler_2; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugCheckboxSelectionDialog#addCustomFooterControls(org.eclipse.swt.widgets.Composite) */ @@ -146,7 +146,7 @@ public class SaveScopeResourcesHandler implements IStatusHandler { } }); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugCheckboxSelectionDialog#okPressed() */ @@ -157,7 +157,7 @@ public class SaveScopeResourcesHandler implements IStatusHandler { store.setValue(IInternalDebugUIConstants.PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH, val); super.okPressed(); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugCheckboxSelectionDialog#addViewerListeners(org.eclipse.jface.viewers.StructuredViewer) */ @@ -165,7 +165,7 @@ public class SaveScopeResourcesHandler implements IStatusHandler { protected void addViewerListeners(StructuredViewer viewer) { // Override to remove listener that affects the ok button } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.AbstractDebugCheckboxSelectionDialog#isValid() */ @@ -174,16 +174,16 @@ public class SaveScopeResourcesHandler implements IStatusHandler { return true; } } - + /** * The objects to save (if any) */ IResource[] fSaves = null; - + /* (non-Javadoc) - * + * * Source object is an array - a launch configuration and an array of projects to save resources for. - * + * * @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object) */ @Override @@ -202,7 +202,7 @@ public class SaveScopeResourcesHandler implements IStatusHandler { if (DebugUITools.isPrivate(config)) { return Boolean.TRUE; } - } + } if (projects != null && projects.length > 0) { IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore(); String save = store.getString(IInternalDebugUIConstants.PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH); @@ -212,18 +212,18 @@ public class SaveScopeResourcesHandler implements IStatusHandler { return Boolean.TRUE; } return Boolean.FALSE; - } + } else { @SuppressWarnings("deprecation") boolean cancel = DebugUIPlugin.preLaunchSave(); return Boolean.valueOf(cancel); } } - + /** - * + * * Builds the list of editors that apply to this build that need to be saved - * + * * @param projects the projects involved in this build, used to scope the searching process * @return the list of dirty editors for this launch to save, never null */ @@ -248,7 +248,7 @@ public class SaveScopeResourcesHandler implements IStatusHandler { } return dirtyres.toArray(new IResource[dirtyres.size()]); } - + /** * Performs the save of the editor parts returned by getScopedResources */ @@ -256,8 +256,8 @@ public class SaveScopeResourcesHandler implements IStatusHandler { if(fSaves != null) { IDE.saveAllEditors(fSaves, false); } - } - + } + /** * show the save dialog with a list of editors to save (if any) * The dialog is also not shown if the the preference for automatically saving dirty before launch is set to always 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 index b7e23a1a0..91f5917b7 100644 --- 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 @@ -4,7 +4,7 @@ * 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 *******************************************************************************/ @@ -31,14 +31,14 @@ 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 { @Override public Object[] getElements(Object inputElement) { @@ -66,11 +66,11 @@ public class SelectFavoritesDialog extends AbstractDebugCheckboxSelectionDialog public void dispose() {} @Override public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} - } - + } + private LaunchHistory fHistory; private List<ILaunchConfiguration> fCurrentFavoriteSet; - + /** * Constructor * @param parentShell @@ -87,13 +87,13 @@ public class SelectFavoritesDialog extends AbstractDebugCheckboxSelectionDialog /** * 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() */ @@ -125,7 +125,7 @@ public class SelectFavoritesDialog extends AbstractDebugCheckboxSelectionDialog protected String getHelpContextId() { return IDebugHelpContextIds.SELECT_FAVORITES_DIALOG; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerLabel() */ @@ -133,5 +133,5 @@ public class SelectFavoritesDialog extends AbstractDebugCheckboxSelectionDialog protected String getViewerLabel() { return LaunchConfigurationsMessages.FavoritesDialog_7; } - + } 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 6b26abbc1..446120abd 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 @@ -4,7 +4,7 @@ * 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 *******************************************************************************/ @@ -28,11 +28,11 @@ import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Shell; /** - * This class provides a dialog to present the user with a list of of viable launch options in the event + * This class provides a dialog to present the user with a list of of viable launch options in the event * the plug-in that provides either a launch option or a contributed launch delegate is no longer available. - * The user can select one of the launch mode/option configuration from this dialog and repair the option + * The user can select one of the launch mode/option configuration from this dialog and repair the option * configuration state of the the current launch configuration - * + * * @since 3.3 */ public class SelectLaunchModesDialog extends AbstractDebugListSelectionDialog{ @@ -62,15 +62,15 @@ public class SelectLaunchModesDialog extends AbstractDebugListSelectionDialog{ @Override public void removeListener(ILabelProviderListener listener) {} } - + private List<Set<String>> fValidModes = null; - + /** * Constructor * @param parentShell the parent shell * @param mode the current mode context * @param configuration the current launch configuration context - * + * * @throws CoreException */ public SelectLaunchModesDialog(Shell parentShell, String mode, ILaunchConfiguration configuration) throws CoreException { @@ -85,7 +85,7 @@ public class SelectLaunchModesDialog extends AbstractDebugListSelectionDialog{ } } } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getDialogSettingsId() */ @@ -101,7 +101,7 @@ public class SelectLaunchModesDialog extends AbstractDebugListSelectionDialog{ protected IBaseLabelProvider getLabelProvider() { return new OptionsLabelProvider(); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerInput() */ 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 8d4826c70..1b2fc499a 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 @@ -47,9 +47,9 @@ import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; /** - * This dialog is used to select a preferred launcher, and also provides access to the + * This dialog is used to select a preferred launcher, and also provides access to the * workspace defaults for preferred launchers - * + * * @since 3.3 */ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog { @@ -81,13 +81,13 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog { @Override public void removeListener(ILabelProviderListener listener) {} } - + Text description = null; Button configspecific = null; private ILaunchDelegate[] fDelegates = null; private ILaunchConfigurationWorkingCopy fConfiguration = null; private String fLaunchMode = null; - + /** * Constructor * @param parentShell @@ -121,7 +121,7 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog { } return new Point(450, 450); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getDialogSettingsId() */ @@ -153,7 +153,7 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog { protected Object getViewerInput() { return fDelegates; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#addCustomHeaderControls(org.eclipse.swt.widgets.Composite) */ @@ -161,9 +161,9 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog { protected void addCustomHeaderControls(Composite parent) { Composite comp = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0); SWTFactory.createWrapLabel(comp, LaunchConfigurationsMessages.SelectLaunchersDialog_2, 2); - + SWTFactory.createVerticalSpacer(comp, 1); - + this.configspecific = SWTFactory.createCheckButton(comp, LaunchConfigurationsMessages.SelectLaunchersDialog_1, null, true, 1); this.configspecific.setSelection(false); GridData gd = (GridData) this.configspecific.getLayoutData(); @@ -176,7 +176,7 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog { resetDelegate(); } }); - + Link link = new Link(comp, SWT.WRAP); link.setText(LaunchConfigurationsMessages.SelectLaunchersDialog_4); link.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false)); @@ -190,7 +190,7 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog { } }); } - + /** * Returns the currently checked launch delegate * @return the currently selected launch delegate or <code>null</code> if none are checked @@ -199,7 +199,7 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog { IStructuredSelection selection = (IStructuredSelection) getViewer().getSelection(); return (ILaunchDelegate) selection.getFirstElement(); } - + /** * @see org.eclipse.jface.dialogs.Dialog#okPressed() */ @@ -208,7 +208,7 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog { ILaunchDelegate delegate = null; Set<String> modes = getCurrentModeSet(); if(configspecific.getSelection()) { - delegate = getSelectedDelegate(); + delegate = getSelectedDelegate(); if(delegate != null) { fConfiguration.setPreferredLaunchDelegate(modes, delegate.getId()); } @@ -219,7 +219,7 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog { if(fConfiguration.isDirty()) { try { fConfiguration.doSave(); - } + } catch (CoreException e) {DebugUIPlugin.log(e);} } super.okPressed(); @@ -242,7 +242,7 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog { } catch (CoreException ce) {DebugUIPlugin.log(ce);} } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#addCustomFooterControls(org.eclipse.swt.widgets.Composite) */ @@ -265,7 +265,7 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog { catch (CoreException ce) {DebugUIPlugin.log(ce);} return modes; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.AbstractDebugCheckboxSelectionDialog#addViewerListeners(org.eclipse.jface.viewers.StructuredViewer) */ @@ -286,7 +286,7 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog { }); super.addViewerListeners(viewer); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#initializeControls() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/WorkingSetComparator.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/WorkingSetComparator.java index 2de39f6b4..4175898c8 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/WorkingSetComparator.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/WorkingSetComparator.java @@ -4,7 +4,7 @@ * 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 *******************************************************************************/ @@ -47,7 +47,7 @@ public class WorkingSetComparator implements Comparator<String> { return 0; } return -1; - } + } return one.compareTo(two); } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/WorkingSetsFilter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/WorkingSetsFilter.java index c63c28fa0..1daa57c66 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/WorkingSetsFilter.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/WorkingSetsFilter.java @@ -28,11 +28,11 @@ import org.eclipse.ui.IWorkingSet; /** * creates a filter for the current working sets in use on the workbench to be applied in the launch configuration * dialog and the launch history/last launched - * + * * @since 3.2 */ public class WorkingSetsFilter extends ViewerFilter { - + /* (non-Javadoc) * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) */ @@ -75,7 +75,7 @@ public class WorkingSetsFilter extends ViewerFilter { return true; } } - } + } catch (CoreException e) {} } return false; @@ -98,7 +98,7 @@ public class WorkingSetsFilter extends ViewerFilter { } } IResource lres = null; - for(int i = 0; i < wsets.length; i++) { + for(int i = 0; i < wsets.length; i++) { IAdaptable[] elements = wsets[i].getElements(); for(int j = 0; j < elements.length; j++) { lres = elements[j].getAdapter(IResource.class); @@ -111,5 +111,5 @@ public class WorkingSetsFilter extends ViewerFilter { } return false; } - + } |