diff options
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions')
107 files changed, 901 insertions, 901 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java index c91cc5698..a5d928e23 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java @@ -38,7 +38,7 @@ import org.eclipse.ui.IWorkbenchWindow; * @see IActionDelegate2 */ public abstract class AbstractDebugActionDelegate implements IViewActionDelegate, IActionDelegate2 { - + /** * The underlying action for this delegate */ @@ -48,17 +48,17 @@ public abstract class AbstractDebugActionDelegate implements IViewActionDelegate * if not installed in a view. */ private IViewPart fViewPart; - + /** * Cache of the most recent selection */ private IStructuredSelection fSelection = StructuredSelection.EMPTY; - + /** * Whether this delegate has been initialized */ private boolean fInitialized = false; - + /** * Whether this delegate was started with Shift pressed */ @@ -70,7 +70,7 @@ public abstract class AbstractDebugActionDelegate implements IViewActionDelegate * set in the plugin's plugin.xml file. */ public AbstractDebugActionDelegate() {} - + /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose() */ @@ -92,15 +92,15 @@ public abstract class AbstractDebugActionDelegate implements IViewActionDelegate runInForeground(selection, false); } } - + /** * Runs this action in the UI thread. * @param selection the current selection */ private void runInForeground(final IStructuredSelection selection, boolean isShift) { fIsShift = isShift; - final MultiStatus status= - new MultiStatus(DebugUIPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, getStatusMessage(), null); + final MultiStatus status= + new MultiStatus(DebugUIPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, getStatusMessage(), null); BusyIndicator.showWhile(Display.getCurrent(), new Runnable() { @Override public void run() { @@ -143,14 +143,14 @@ public abstract class AbstractDebugActionDelegate implements IViewActionDelegate */ @Override public void selectionChanged(IAction action, ISelection s) { - boolean wasInitialized= initialize(action, s); + boolean wasInitialized= initialize(action, s); if (!wasInitialized) { if (getView() != null) { update(action, s); } } } - + /** * Updates the specified selection based on the selection, as well as setting the selection * for this action @@ -167,7 +167,7 @@ public abstract class AbstractDebugActionDelegate implements IViewActionDelegate setSelection(StructuredSelection.EMPTY); } } - + /** * Returns a selection this operation should act on based on the given selection. * Provides an opportunity for actions to translate the selection/targets of the @@ -182,7 +182,7 @@ public abstract class AbstractDebugActionDelegate implements IViewActionDelegate protected IStructuredSelection getTargetSelection(IStructuredSelection s) { return s; } - + /** * Performs the specific action on this element. * @param element the element context to perform the action on @@ -218,11 +218,11 @@ public abstract class AbstractDebugActionDelegate implements IViewActionDelegate public void init(IViewPart view) { fViewPart = view; } - + /** * Returns this action's view part, or <code>null</code> * if not installed in a view. - * + * * @return view part or <code>null</code> */ protected IViewPart getView() { @@ -232,9 +232,9 @@ public abstract class AbstractDebugActionDelegate implements IViewActionDelegate /** * Initialize this delegate, updating this delegate's * presentation. - * As well, all of the flavors of AbstractDebugActionDelegates need to + * As well, all of the flavors of AbstractDebugActionDelegates need to * have the initial enabled state set with a call to update(IAction, ISelection). - * + * * @param action the presentation for this action * @param selection the current selection - workbench or text * @return whether the action was initialized @@ -251,22 +251,22 @@ public abstract class AbstractDebugActionDelegate implements IViewActionDelegate /** * Returns the most recent selection - * + * * @return structured selection - */ + */ protected IStructuredSelection getSelection() { return fSelection; } - + /** * Sets the most recent selection - * + * * @param selection structured selection - */ + */ private void setSelection(IStructuredSelection selection) { fSelection = selection; - } - + } + /** * Allows the underlying <code>IAction</code> to be set to the specified <code>IAction</code> * @param action the action to set @@ -282,7 +282,7 @@ public abstract class AbstractDebugActionDelegate implements IViewActionDelegate protected IAction getAction() { return fAction; } - + /** * Returns if this action has been initialized or not * @return if this action has been initialized or not @@ -298,7 +298,7 @@ public abstract class AbstractDebugActionDelegate implements IViewActionDelegate protected void setInitialized(boolean initialized) { fInitialized = initialized; } - + /** * Return whether the action should be enabled or not based on the given selection. * @param selection the selection @@ -315,7 +315,7 @@ public abstract class AbstractDebugActionDelegate implements IViewActionDelegate return false; } } - return true; + return true; } /** diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveAllActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveAllActionDelegate.java index c32ae9b09..054067d57 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveAllActionDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveAllActionDelegate.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.actions; - + import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; import org.eclipse.swt.widgets.Event; @@ -22,14 +22,14 @@ import org.eclipse.ui.IWorkbenchWindowActionDelegate; /** * This class is a base implementation of a 'remove all' debug action - * + * * This class is intended to be extended by clients * @see IViewActionDelegate * @see IActionDelegate2 * @see IWorkbenchWindowActionDelegate */ public abstract class AbstractRemoveAllActionDelegate implements IViewActionDelegate, IActionDelegate2, IWorkbenchWindowActionDelegate { - + /** * The underlying <code>IAction</code> */ @@ -39,7 +39,7 @@ public abstract class AbstractRemoveAllActionDelegate implements IViewActionDele * Needed for reflective creation */ public AbstractRemoveAllActionDelegate() {} - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate2#dispose() */ @@ -58,13 +58,13 @@ public abstract class AbstractRemoveAllActionDelegate implements IViewActionDele /** * Returns this delegate's action. - * + * * @return the underlying <code>IAction</code> */ protected IAction getAction() { return fAction; } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event) */ @@ -95,7 +95,7 @@ public abstract class AbstractRemoveAllActionDelegate implements IViewActionDele * Initializes any listeners, etc. */ protected abstract void initialize(); - + /** * Update enablement. */ @@ -105,14 +105,14 @@ public abstract class AbstractRemoveAllActionDelegate implements IViewActionDele action.setEnabled(isEnabled()); } } - + /** * Returns whether this action is enabled - * + * * @return true if this action is enabled, false otherwise */ protected abstract boolean isEnabled(); - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractSelectionActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractSelectionActionDelegate.java index 6d2078c39..c108869a5 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractSelectionActionDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractSelectionActionDelegate.java @@ -28,9 +28,9 @@ import org.eclipse.ui.progress.IWorkbenchSiteProgressService; /** * This class provides a base implementation of a selection action delegate, more specifically a delegate * that uses a selection context to update its underlying <code>IAction</code>. - * + * * This class is intended to be extended by clients - * + * * @see IViewActionDelegate * @see IActionDelegate2 * @@ -41,7 +41,7 @@ public abstract class AbstractSelectionActionDelegate implements IViewActionDele * The underlying action for this delegate */ private IAction fAction; - + /** * This action's view part, or <code>null</code> if not installed in a * view. @@ -57,7 +57,7 @@ public abstract class AbstractSelectionActionDelegate implements IViewActionDele * Used to schedule jobs, or <code>null</code> if none */ private IWorkbenchSiteProgressService fProgressService = null; - + /** * It's crucial that delegate actions have a zero-arg constructor so that * they can be reflected into existence when referenced in an action set in @@ -67,7 +67,7 @@ public abstract class AbstractSelectionActionDelegate implements IViewActionDele /* * (non-Javadoc) - * + * * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose() */ @Override @@ -94,7 +94,7 @@ public abstract class AbstractSelectionActionDelegate implements IViewActionDele * Returns the String to use as an error dialog message for a failed action. * This message appears as the "Message:" in the error dialog for this * action. Default is to return null. - * + * * @return the message for the error dialog */ protected String getErrorDialogMessage() { @@ -105,7 +105,7 @@ public abstract class AbstractSelectionActionDelegate implements IViewActionDele * Returns the String to use as a status message for a failed action. This * message appears as the "Reason:" in the error dialog for this action. * Default is to return the empty String. - * + * * @return the status message */ protected String getStatusMessage() { @@ -114,7 +114,7 @@ public abstract class AbstractSelectionActionDelegate implements IViewActionDele /* * (non-Javadoc) - * + * * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart) */ @Override @@ -126,7 +126,7 @@ public abstract class AbstractSelectionActionDelegate implements IViewActionDele /** * Returns this action's view part, or <code>null</code> if not installed * in a view. - * + * * @return the underlying <code>IViewPart</code> or <code>null</code> */ protected IViewPart getView() { @@ -135,7 +135,7 @@ public abstract class AbstractSelectionActionDelegate implements IViewActionDele /** * Returns the most recent selection - * + * * @return structured selection */ protected IStructuredSelection getSelection() { @@ -144,7 +144,7 @@ public abstract class AbstractSelectionActionDelegate implements IViewActionDele /** * Sets the most recent selection - * + * * @param context structured selection */ private void setSelection(IStructuredSelection context) { @@ -179,7 +179,7 @@ public abstract class AbstractSelectionActionDelegate implements IViewActionDele * Return whether the action should be enabled or not based on the given * selection. * @param selection the current selection - * + * * @return true if the action should be enabled for the specified selection context * false otherwise */ @@ -225,7 +225,7 @@ public abstract class AbstractSelectionActionDelegate implements IViewActionDele /** * Schedules the given job with this action's progress service - * + * * @param job the {@link Job} to schedule */ protected void schedule(Job job) { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java index 8032a01d5..fa785991b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.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 * Mike Morearty - Bug 271411 @@ -25,7 +25,7 @@ public class ActionMessages extends NLS { public static String AbstractLaunchHistoryAction_5; public static String AbstractLaunchHistoryAction_6; - + public static String AddToFavoritesAction_1; public static String AddToFavoritesAction_2; public static String AddToFavoritesAction_3; @@ -44,7 +44,7 @@ public class ActionMessages extends NLS { public static String ConfigureColumnsAction_0; public static String ConfigureColumnsAction_1; public static String ConfigureColumnsAction_2; - + public static String CopyToClipboardActionDelegate_Problem_Copying_to_Clipboard_1; public static String CopyToClipboardActionDelegate_There_was_a_problem_when_accessing_the_system_clipboard__Retry__2; @@ -91,7 +91,7 @@ public class ActionMessages extends NLS { public static String RelaunchLastAction_Cannot_relaunch___0___because_it_does_not_support__2__mode_2; public static String RelaunchLastAction_Error_relaunching_3; public static String RelaunchLastAction_Error_encountered_attempting_to_relaunch_4; - + public static String RemoveAllBreakpointsAction_0; public static String RemoveAllBreakpointsAction_1; public static String RemoveAllBreakpointsAction_2; @@ -108,7 +108,7 @@ public class ActionMessages extends NLS { public static String RemoveAllTriggerPointsAction_0; public static String RemoveAllTriggerPointsAction_1; - + public static String DeleteBreakpointOperationName; public static String DeleteBreakpointsOperationName; @@ -128,13 +128,13 @@ public class ActionMessages extends NLS { public static String SkipAllBreakpointsAction_0; public static String SkipAllBreakpointsAction_2; - + public static String TerminateAndRelaunchAction_0; public static String TerminateAndRelaunchAction_3; public static String TerminateAndRelaunchAction_4; public static String TerminateAndRemoveAction_0; public static String TerminateAndRemoveAction_3; - + public static String ToggleDetailPaneAction_0; public static String ToggleDetailPaneAction_1; @@ -163,7 +163,7 @@ public class ActionMessages extends NLS { public static String WatchExpressionDialogMenu_2; public static String WatchAction_0; public static String WatchAction_1; - + public static String RunToLineAction_0; public static String RunToLineAction_1; public static String RunToLineHandler_0; @@ -237,7 +237,7 @@ public class ActionMessages extends NLS { public static String VirtualFindAction_0; public static String VirtualFindAction_1; - + public static String ToggleBreakpointsTargetManager_defaultToggleTarget_name; - public static String ToggleBreakpointsTargetManager_defaultToggleTarget_description; + public static String ToggleBreakpointsTargetManager_defaultToggleTarget_description; }
\ No newline at end of file diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AddToFavoritesAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AddToFavoritesAction.java index aaa58be3c..5c896783e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AddToFavoritesAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AddToFavoritesAction.java @@ -39,7 +39,7 @@ import com.ibm.icu.text.MessageFormat; * Adds the selected launch configuration to the launch favorites. */ public class AddToFavoritesAction extends SelectionListenerAction { - + private ILaunchConfiguration fConfiguration = null; private String fMode =null; private ILaunchGroup fGroup = null; @@ -65,7 +65,7 @@ public class AddToFavoritesAction extends SelectionListenerAction { Object object = selection.getFirstElement(); ILaunch launch = null; if (object instanceof IAdaptable) { - launch = ((IAdaptable)object).getAdapter(ILaunch.class); + launch = ((IAdaptable)object).getAdapter(ILaunch.class); } if (launch == null) { if (object instanceof ILaunch) { @@ -85,21 +85,21 @@ public class AddToFavoritesAction extends SelectionListenerAction { } setGroup(group); setLaunchConfiguration(configuration); - setMode(launch.getLaunchMode()); + setMode(launch.getLaunchMode()); setText(MessageFormat.format(ActionMessages.AddToFavoritesAction_1, new Object[] { DebugUIPlugin.removeAccelerators(getGroup().getLabel()) })); } } } - + // Disable the action if the launch config is private ILaunchConfiguration config = getLaunchConfiguration(); if (config == null) { return false; - } + } if (DebugUITools.isPrivate(config)) { return false; } - + if (getGroup() != null) { try { List<String> groups = config.getAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, (List<String>) null); @@ -109,9 +109,9 @@ public class AddToFavoritesAction extends SelectionListenerAction { return true; } catch (CoreException e) { } - + } - + return false; } @@ -122,7 +122,7 @@ public class AddToFavoritesAction extends SelectionListenerAction { protected void setLaunchConfiguration(ILaunchConfiguration configuration) { fConfiguration = configuration; } - + /** * Returns the underlying <code>ILaunchConfiguration</code> * @return the underlying <code>ILaunchConfiguration</code> @@ -130,7 +130,7 @@ public class AddToFavoritesAction extends SelectionListenerAction { protected ILaunchConfiguration getLaunchConfiguration() { return fConfiguration; } - + /** * Sets the mode this action applies to * @param mode the modes to set @@ -138,7 +138,7 @@ public class AddToFavoritesAction extends SelectionListenerAction { protected void setMode(String mode) { fMode = mode; } - + /** * Returns the mode this action applies to * @return the {@link ILaunchMode} this action applies to @@ -146,7 +146,7 @@ public class AddToFavoritesAction extends SelectionListenerAction { protected String getMode() { return fMode; } - + /** * Sets the <code>ILaunchGroup</code> this action applies to * @param group the new <code>ILaunchGroup</code> @@ -154,7 +154,7 @@ public class AddToFavoritesAction extends SelectionListenerAction { protected void setGroup(ILaunchGroup group) { fGroup = group; } - + /** * Returns the underlying <code>ILaunchGroup</code> * @return the underlying <code>ILaunchGroup</code> @@ -162,7 +162,7 @@ public class AddToFavoritesAction extends SelectionListenerAction { protected ILaunchGroup getGroup() { return fGroup; } - + /** * @see org.eclipse.jface.action.IAction#run() */ @@ -188,7 +188,7 @@ public class AddToFavoritesAction extends SelectionListenerAction { } }); if (ex[0] != null) { - DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), ActionMessages.AddToFavoritesAction_2, ActionMessages.AddToFavoritesAction_3, ex[0].getStatus()); // + DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), ActionMessages.AddToFavoritesAction_2, ActionMessages.AddToFavoritesAction_3, ex[0].getStatus()); // } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CollapseAllAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CollapseAllAction.java index be528d019..99905322e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CollapseAllAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CollapseAllAction.java @@ -22,9 +22,9 @@ import org.eclipse.ui.texteditor.IUpdate; * CollapseAllAction */ public class CollapseAllAction extends Action implements IUpdate { - + private TreeModelViewer fViewer; - + public CollapseAllAction(TreeModelViewer viewer) { super(ActionMessages.CollapseAllAction_0, DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_COLLAPSE_ALL)); setToolTipText(ActionMessages.CollapseAllAction_0); @@ -33,7 +33,7 @@ public class CollapseAllAction extends Action implements IUpdate { setActionDefinitionId(CollapseAllHandler.COMMAND_ID); fViewer = viewer; } - + /* (non-Javadoc) * @see org.eclipse.jface.action.IAction#run() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConfigureColumnsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConfigureColumnsAction.java index d2721208b..3359d8888 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConfigureColumnsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConfigureColumnsAction.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 *******************************************************************************/ @@ -32,13 +32,13 @@ import org.eclipse.ui.texteditor.IUpdate; /** * Configures visible columns in an asynch tree viewer/ - * + * * @since 3.2 */ public class ConfigureColumnsAction extends Action implements IUpdate { - + private TreeModelViewer fViewer; - + class ColumnContentProvider implements IStructuredContentProvider { /* (non-Javadoc) @@ -60,13 +60,13 @@ public class ConfigureColumnsAction extends Action implements IUpdate { * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) */ @Override - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { } - + } - + class ColumnLabelProvider extends LabelProvider { - + private Map<ImageDescriptor, Image> fImages = new HashMap<ImageDescriptor, Image>(); @Override @@ -96,9 +96,9 @@ public class ConfigureColumnsAction extends Action implements IUpdate { } fImages.clear(); } - - - + + + } public ConfigureColumnsAction(TreeModelViewer viewer) { @@ -146,7 +146,7 @@ public class ConfigureColumnsAction extends Action implements IUpdate { fViewer.setVisibleColumns(ids); } } - + } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugAsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugAsAction.java index 9a870f6be..73289d1ce 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugAsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugAsAction.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 *******************************************************************************/ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugContextualLaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugContextualLaunchAction.java index d114aabbd..e0d7938ff 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugContextualLaunchAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugContextualLaunchAction.java @@ -15,11 +15,11 @@ import org.eclipse.debug.ui.actions.ContextualLaunchAction; /** * Specialization of <code>ContextualLaunchAction</code> for the debug mode - * + * * @see {@link ContextualLaunchAction} */ public class DebugContextualLaunchAction extends ContextualLaunchAction { - + /** * Constructor */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugHistoryMenuAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugHistoryMenuAction.java index 496a5e344..432b7ed8b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugHistoryMenuAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugHistoryMenuAction.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 *******************************************************************************/ @@ -16,11 +16,11 @@ import org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction; /** * Debug history menu in the top-level "Run" menu. - */ + */ public class DebugHistoryMenuAction extends AbstractLaunchHistoryAction { - + public DebugHistoryMenuAction() { super(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP); } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugLastAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugLastAction.java index 8a46b096f..f628c83cd 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugLastAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugLastAction.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,22 +19,22 @@ import org.eclipse.debug.ui.actions.RelaunchLastAction; /** * Re-launches the last debug-mode launch - * + * * This menu item appears in the main 'Run' menu - * + * * @see RelaunchLastAction * @see RunLastAction * @see ProfileLastAction */ public class DebugLastAction extends RelaunchLastAction { - + /* (non-Javadoc) * @see org.eclipse.debug.ui.actions.RelaunchLastAction#getMode() */ @Override public String getMode() { return ILaunchManager.DEBUG_MODE; - } + } /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getLaunchGroupId() @@ -71,8 +71,8 @@ public class DebugLastAction extends RelaunchLastAction { @Override protected String getCommandId() { return "org.eclipse.debug.ui.commands.DebugLast"; //$NON-NLS-1$ - } - + } + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getDescription() */ @@ -84,5 +84,5 @@ public class DebugLastAction extends RelaunchLastAction { else { return ActionMessages.DebugLastAction_3; } - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugToolbarAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugToolbarAction.java index 6e8152fc0..ebcf5c8ab 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugToolbarAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugToolbarAction.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 *******************************************************************************/ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/EditLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/EditLaunchConfigurationAction.java index 9131390b5..2ce898a26 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/EditLaunchConfigurationAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/EditLaunchConfigurationAction.java @@ -36,7 +36,7 @@ import com.ibm.icu.text.MessageFormat; * on the the launch associated with the selected element. */ public class EditLaunchConfigurationAction extends SelectionListenerAction { - + private ILaunchConfiguration fConfiguration = null; private String fMode = null; private boolean fTerminated = false; @@ -61,7 +61,7 @@ public class EditLaunchConfigurationAction extends SelectionListenerAction { Object object = selection.getFirstElement(); ILaunch launch = null; if (object instanceof IAdaptable) { - launch = ((IAdaptable)object).getAdapter(ILaunch.class); + launch = ((IAdaptable)object).getAdapter(ILaunch.class); } if (launch == null) { if (object instanceof ILaunch) { @@ -88,7 +88,7 @@ public class EditLaunchConfigurationAction extends SelectionListenerAction { } } } catch (CoreException e1) { - } + } setLaunchConfiguration(configuration); setMode(launch.getLaunchMode()); setIsTerminated(launch.isTerminated()); @@ -103,7 +103,7 @@ public class EditLaunchConfigurationAction extends SelectionListenerAction { } } } - + // Disable the action if the launch config is private ILaunchConfiguration config = getLaunchConfiguration(); if (config == null) { @@ -115,27 +115,27 @@ public class EditLaunchConfigurationAction extends SelectionListenerAction { protected void setLaunchConfiguration(ILaunchConfiguration configuration) { fConfiguration = configuration; } - + protected ILaunchConfiguration getLaunchConfiguration() { return fConfiguration; } - + protected void setMode(String mode) { fMode = mode; } - + protected String getMode() { return fMode; } - + protected boolean isTerminated() { return fTerminated; } - + protected void setIsTerminated(boolean terminated) { fTerminated = terminated; } - + /** * @see org.eclipse.jface.action.IAction#run() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ExecutionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ExecutionAction.java index d6659102c..8f3cbb16f 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ExecutionAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ExecutionAction.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 *******************************************************************************/ @@ -26,13 +26,13 @@ import org.eclipse.ui.IWorkbenchWindow; * This is the super class of the Run & Debug actions which appears in the desktop menu and toolbar. */ public abstract class ExecutionAction implements IActionDelegate2 { - + private String fLaunchGroupIdentifier; - + public ExecutionAction(String launchGroupIdentifier) { fLaunchGroupIdentifier = launchGroupIdentifier; } - + /** * @see IActionDelegate2#runWithEvent(IAction, Event) */ @@ -51,16 +51,16 @@ public abstract class ExecutionAction implements IActionDelegate2 { } DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUIPlugin.getShell(), new StructuredSelection(), fLaunchGroupIdentifier); } - + protected LaunchConfigurationManager getLaunchConfigurationManager() { return DebugUIPlugin.getDefault().getLaunchConfigurationManager(); } - + /** * Returns the mode of a launcher to use for this action */ protected abstract String getMode(); - + /** * @see org.eclipse.ui.IActionDelegate2#dispose() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchConfigurationAction.java index e554b3ed4..659393685 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchConfigurationAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchConfigurationAction.java @@ -26,14 +26,14 @@ import com.ibm.icu.text.MessageFormat; /** * This class provides an action wrapper for adding launch configuration actions to the context menu * of the Run->... menu item - * + * * @since 3.3 */ public class LaunchConfigurationAction extends Action { private ILaunchConfiguration fConfig; private String fMode; - + /** * Constructor * @param mode @@ -46,7 +46,7 @@ public class LaunchConfigurationAction extends Action { fConfig = config; fMode = mode; } - + /** * Allows access to the launch configuration associated with the action * @return the associated launch configuration @@ -62,7 +62,7 @@ public class LaunchConfigurationAction extends Action { public void run() { runInternal(false); } - + /* (non-Javadoc) * @see org.eclipse.jface.action.Action#runWithEvent(org.eclipse.swt.widgets.Event) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java index 41a264a3c..58c975542 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java @@ -42,9 +42,9 @@ import org.eclipse.ui.IEditorPart; * Launch shortcut action (proxy to a launch shortcut extension) */ public class LaunchShortcutAction extends Action { - + private String fMode; - private LaunchShortcutExtension fShortcut; + private LaunchShortcutExtension fShortcut; /** @@ -59,10 +59,10 @@ public class LaunchShortcutAction extends Action { fMode = mode; updateEnablement(); } - + /** * Runs with either the active editor or workbench selection. - * + * * @see IAction#run() */ @Override @@ -86,7 +86,7 @@ public class LaunchShortcutAction extends Action { DebugUITools.removeLaunchToggleTerminate(ss); } } - + /* (non-Javadoc) * @see org.eclipse.jface.action.Action#runWithEvent(org.eclipse.swt.widgets.Event) */ @@ -135,7 +135,7 @@ public class LaunchShortcutAction extends Action { runInternal(((event.stateMask & SWT.SHIFT) > 0) ? true : false); } } - + /** * Since these actions are re-created each time the run/debug as menu is * filled, the enablement of this action is static. diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchablePropertyTester.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchablePropertyTester.java index 842403363..7073c522c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchablePropertyTester.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchablePropertyTester.java @@ -53,10 +53,10 @@ public class LaunchablePropertyTester extends PropertyTester { protected LaunchConfigurationManager getLaunchConfigurationManager() { return DebugUIPlugin.getDefault().getLaunchConfigurationManager(); } - + /** * Returns the resource this property page is open on. - * + * * @return resource */ protected IResource getResource(Object element) { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenDebugConfigurations.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenDebugConfigurations.java index 4445eee01..fa0551df1 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenDebugConfigurations.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenDebugConfigurations.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 *******************************************************************************/ @@ -22,5 +22,5 @@ public class OpenDebugConfigurations extends OpenLaunchDialogAction { public OpenDebugConfigurations() { super(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP); } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenProfileConfigurations.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenProfileConfigurations.java index 51e62eefe..5157bb01b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenProfileConfigurations.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenProfileConfigurations.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 *******************************************************************************/ @@ -22,5 +22,5 @@ public class OpenProfileConfigurations extends OpenLaunchDialogAction { public OpenProfileConfigurations() { super(IDebugUIConstants.ID_PROFILE_LAUNCH_GROUP); } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenRunConfigurations.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenRunConfigurations.java index b84d91291..35cc0f962 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenRunConfigurations.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenRunConfigurations.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 *******************************************************************************/ @@ -22,5 +22,5 @@ public class OpenRunConfigurations extends OpenLaunchDialogAction { public OpenRunConfigurations() { super(IDebugUIConstants.ID_RUN_LAUNCH_GROUP); } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileAsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileAsAction.java index 321d03cfa..1e96455d4 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileAsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileAsAction.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 *******************************************************************************/ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileContextualLaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileContextualLaunchAction.java index 257eee5d1..ad470e021 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileContextualLaunchAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileContextualLaunchAction.java @@ -15,11 +15,11 @@ import org.eclipse.debug.ui.actions.ContextualLaunchAction; /** * Specialization of <code>ContextualLaunchAction</code> for the profile mode - * + * * @see {@link ContextualLaunchAction} */ public class ProfileContextualLaunchAction extends ContextualLaunchAction { - + /** * Constructor */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileHistoryMenuAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileHistoryMenuAction.java index 317ae7a64..8e7af674f 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileHistoryMenuAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileHistoryMenuAction.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 *******************************************************************************/ @@ -16,11 +16,11 @@ import org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction; /** * Profile history menu in the top-level "Run" menu. - */ + */ public class ProfileHistoryMenuAction extends AbstractLaunchHistoryAction { - + public ProfileHistoryMenuAction() { super(IDebugUIConstants.ID_PROFILE_LAUNCH_GROUP); } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileLastAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileLastAction.java index fcb010d7c..edd138713 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileLastAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileLastAction.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,13 +19,13 @@ import org.eclipse.debug.ui.actions.RelaunchLastAction; /** * Re-launches the last profile-mode launch - * + * * This menu item appears in the main 'Run' menu - * + * * @see RelaunchLastAction * @see RunLastAction * @see DebugLastAction - * + * */ public class ProfileLastAction extends RelaunchLastAction { @@ -35,8 +35,8 @@ public class ProfileLastAction extends RelaunchLastAction { @Override public String getMode() { return ILaunchManager.PROFILE_MODE; - } - + } + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getLaunchGroupId() */ @@ -65,15 +65,15 @@ public class ProfileLastAction extends RelaunchLastAction { protected String getTooltipText() { return IInternalDebugCoreConstants.EMPTY_STRING; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getCommandId() */ @Override protected String getCommandId() { return "org.eclipse.debug.ui.commands.ProfileLast"; //$NON-NLS-1$ - } - + } + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getDescription() */ @@ -85,5 +85,5 @@ public class ProfileLastAction extends RelaunchLastAction { else { return ActionMessages.ProfileLastAction_3; } - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileToolbarAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileToolbarAction.java index 469f8fdbc..dc3db87e0 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileToolbarAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileToolbarAction.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 *******************************************************************************/ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java index 49ea10867..7580f42c1 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.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 *******************************************************************************/ @@ -24,7 +24,7 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.StructuredSelection; public class RelaunchActionDelegate extends AbstractDebugActionDelegate { - + /** * @see AbstractDebugActionDelegate#doAction(Object) */ @@ -38,7 +38,7 @@ public class RelaunchActionDelegate extends AbstractDebugActionDelegate { /** * Re-launches the given configuration in the specified mode. - * + * */ public static void relaunch(ILaunchConfiguration config, String mode) { DebugUITools.launch(config, mode); @@ -47,7 +47,7 @@ public class RelaunchActionDelegate extends AbstractDebugActionDelegate { /** * Re-launches the given configuration in the specified mode after * terminating the previous if Preferred. - * + * * @param isShift is Shift pressed (use <code>false</code> if no support for * Shift) */ @@ -63,7 +63,7 @@ public class RelaunchActionDelegate extends AbstractDebugActionDelegate { ILaunch launch= DebugUIPlugin.getLaunch(element); return launch != null && launch.getLaunchConfiguration() != null && LaunchConfigurationManager.isVisible(launch.getLaunchConfiguration()); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate#getTargetSelection(org.eclipse.jface.viewers.IStructuredSelection) */ @@ -84,20 +84,20 @@ public class RelaunchActionDelegate extends AbstractDebugActionDelegate { } return new StructuredSelection(dups.toArray()); } - + /** * @see AbstractDebugActionDelegate#getErrorDialogMessage() */ @Override protected String getErrorDialogMessage() { - return ActionMessages.RelaunchActionDelegate_Launch_Failed_1; + return ActionMessages.RelaunchActionDelegate_Launch_Failed_1; } - + /** * @see AbstractDebugActionDelegate#getStatusMessage() */ @Override protected String getStatusMessage() { - return ActionMessages.RelaunchActionDelegate_An_exception_occurred_while_launching_2; + return ActionMessages.RelaunchActionDelegate_An_exception_occurred_while_launching_2; } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java index b89310db6..43e2ff5a9 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.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
* Wind River Systems - bug 227877
@@ -17,7 +17,7 @@ import org.eclipse.debug.internal.ui.contextlaunching.ContextRunner; /**
* Re-launches the last launch.
- *
+ *
* @see ContextRunner
* @see ILaunchConfiguration
* @see RunLastAction
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java index 7f542dbf3..67b35642f 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.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,7 +19,7 @@ import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchManager; import org.eclipse.debug.core.ILaunchesListener2; import org.eclipse.jface.action.IAction; - + /** * Removes all terminated/detached launches from the * active debug view. @@ -53,9 +53,9 @@ public class RemoveAllTerminatedAction extends AbstractRemoveAllActionDelegate i if (!removed.isEmpty()) { ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager(); manager.removeLaunches(removed.toArray(new ILaunch[removed.size()])); - } + } } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#initialize() */ @@ -63,7 +63,7 @@ public class RemoveAllTerminatedAction extends AbstractRemoveAllActionDelegate i protected void initialize() { DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#dispose() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetAction.java index a66d4f5a0..f58e5c5e4 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetAction.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 * Wind River Systems - added support for IToggleBreakpointsTargetFactory @@ -34,17 +34,17 @@ import org.eclipse.ui.IWorkbenchWindowActionDelegate; /** * Global retargettable debug action. - * + * * @since 3.0 */ public abstract class RetargetAction implements IWorkbenchWindowActionDelegate, IPartListener, IActionDelegate2 { - + protected IWorkbenchWindow fWindow = null; private IWorkbenchPart fActivePart = null; private Object fTargetAdapter = null; private IAction fAction = null; - private static final ISelection EMPTY_SELECTION = new EmptySelection(); - + private static final ISelection EMPTY_SELECTION = new EmptySelection(); + static class EmptySelection implements ISelection { /* (non-Javadoc) @@ -55,11 +55,11 @@ public abstract class RetargetAction implements IWorkbenchWindowActionDelegate, return true; } } - + /** * Returns the current selection in the active part, possibly * and empty selection, but never <code>null</code>. - * + * * @return the selection in the active part, possibly empty */ protected ISelection getTargetSelection() { @@ -71,11 +71,11 @@ public abstract class RetargetAction implements IWorkbenchWindowActionDelegate, } return EMPTY_SELECTION; } - + protected IWorkbenchPart getActivePart() { return fActivePart; } - + /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose() */ @@ -84,7 +84,7 @@ public abstract class RetargetAction implements IWorkbenchWindowActionDelegate, fWindow.getPartService().removePartListener(this); fActivePart = null; fTargetAdapter = null; - + } /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow) @@ -114,29 +114,29 @@ public abstract class RetargetAction implements IWorkbenchWindowActionDelegate, DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), DebugUIPlugin.removeAccelerators(action.getText()), message, status); } } catch (CoreException e) { - DebugUIPlugin.errorDialog(fWindow.getShell(), ActionMessages.RetargetAction_2, ActionMessages.RetargetAction_3, e.getStatus()); // + DebugUIPlugin.errorDialog(fWindow.getShell(), ActionMessages.RetargetAction_2, ActionMessages.RetargetAction_3, e.getStatus()); // } } } - + /** * Returns a message to display when we find that the operation is not enabled * when invoked in an editor (we check enabled state before running in this case, * rather than updating on each selection change - see bug 180441). - * + * * @return information message when unavailable */ protected abstract String getOperationUnavailableMessage(); - + /** * Performs the specific breakpoint toggling. - * - * @param selection selection in the active part + * + * @param selection selection in the active part * @param part active part * @throws CoreException if an exception occurs */ protected abstract void performAction(Object target, ISelection selection, IWorkbenchPart part) throws CoreException; - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) */ @@ -154,7 +154,7 @@ public abstract class RetargetAction implements IWorkbenchWindowActionDelegate, action.setEnabled(fTargetAdapter != null && isTargetEnabled()); } } - + /* (non-Javadoc) * @see org.eclipse.ui.IPartListener#partActivated(org.eclipse.ui.IWorkbenchPart) */ @@ -175,30 +175,30 @@ public abstract class RetargetAction implements IWorkbenchWindowActionDelegate, fAction.setEnabled(fTargetAdapter != null && isTargetEnabled()); } } - + protected Object getAdapter(IAdaptable adaptable) { Object adapter = adaptable.getAdapter(getAdapterClass()); if (adapter == null) { IAdapterManager adapterManager = Platform.getAdapterManager(); - if (adapterManager.hasAdapter(adaptable, getAdapterClass().getName())) { - adapter = adapterManager.loadAdapter(adaptable, getAdapterClass().getName()); + if (adapterManager.hasAdapter(adaptable, getAdapterClass().getName())) { + adapter = adapterManager.loadAdapter(adaptable, getAdapterClass().getName()); } } return adapter; } - + /** * Returns the type of adapter (target) this action works on. - * + * * @return the type of adapter this action works on */ protected abstract Class<?> getAdapterClass(); - + /* (non-Javadoc) * @see org.eclipse.ui.IPartListener#partBroughtToTop(org.eclipse.ui.IWorkbenchPart) */ @Override - public void partBroughtToTop(IWorkbenchPart part) { + public void partBroughtToTop(IWorkbenchPart part) { } /* (non-Javadoc) * @see org.eclipse.ui.IPartListener#partClosed(org.eclipse.ui.IWorkbenchPart) @@ -207,11 +207,11 @@ public abstract class RetargetAction implements IWorkbenchWindowActionDelegate, public void partClosed(IWorkbenchPart part) { clearPart(part); } - + /** * Clears reference to active part and adapter when a relevant part * is closed or no longer active. - * + * * @param part workbench part that has been closed or no longer active */ protected void clearPart(IWorkbenchPart part) { @@ -231,12 +231,12 @@ public abstract class RetargetAction implements IWorkbenchWindowActionDelegate, * @see org.eclipse.ui.IPartListener#partOpened(org.eclipse.ui.IWorkbenchPart) */ @Override - public void partOpened(IWorkbenchPart part) { + public void partOpened(IWorkbenchPart part) { } /** * Returns whether the target adapter is enabled - * + * * @return whether target adapter is enabled */ protected boolean isTargetEnabled() { @@ -247,17 +247,17 @@ public abstract class RetargetAction implements IWorkbenchWindowActionDelegate, } return false; } - + /** * Returns whether the specific operation is supported. - * - * @param target the target adapter + * + * @param target the target adapter * @param selection the selection to verify the operation on * @param part the part the operation has been requested on * @return whether the operation can be performed */ protected abstract boolean canPerformAction(Object target, ISelection selection, IWorkbenchPart part); - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction) */ @@ -276,7 +276,7 @@ public abstract class RetargetAction implements IWorkbenchWindowActionDelegate, /** * Returns the proxy to this action delegate or <code>null</code> - * + * * @return action proxy or <code>null</code> */ protected IAction getAction() { @@ -285,7 +285,7 @@ public abstract class RetargetAction implements IWorkbenchWindowActionDelegate, /** * Returns whether there is currently a target adapter for this action. - * + * * @return whether the action has a target adapter. */ protected boolean hasTargetAdapter() { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetRunToLineAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetRunToLineAction.java index 759d55e5d..cdbd7b2c1 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetRunToLineAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetRunToLineAction.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 * Wind River - Pawel Piech - Added use of adapters to support non-standard models (bug 213074) @@ -27,14 +27,14 @@ import org.eclipse.ui.IWorkbenchWindow; /** * Global retargettable run to line action. - * + * * @since 3.0 */ public class RetargetRunToLineAction extends RetargetAction { - + private DebugContextListener fContextListener = new DebugContextListener(); private ISuspendResume fTargetElement = null; - + class DebugContextListener implements IDebugContextListener { protected void contextActivated(ISelection selection) { @@ -56,10 +56,10 @@ public class RetargetRunToLineAction extends RetargetAction { public void debugContextChanged(DebugContextEvent event) { contextActivated(event.getContext()); } - - + + } - + /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose() */ @@ -79,13 +79,13 @@ public class RetargetRunToLineAction extends RetargetAction { ISelection activeContext = service.getActiveContext(); fContextListener.contextActivated(activeContext); } - + @Override public void init(IAction action) { super.init(action); action.setActionDefinitionId("org.eclipse.debug.ui.commands.RunToLine"); //$NON-NLS-1$ } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.RetargetAction#canPerformAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart) */ @@ -94,7 +94,7 @@ public class RetargetRunToLineAction extends RetargetAction { return fTargetElement != null && ((IRunToLineTarget)target).canRunToLine(part, selection, fTargetElement); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.RetargetAction#getAdapterClass() */ @@ -109,15 +109,15 @@ public class RetargetRunToLineAction extends RetargetAction { protected void performAction(Object target, ISelection selection, IWorkbenchPart part) throws CoreException { ((IRunToLineTarget)target).runToLine(part, selection, fTargetElement); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.RetargetAction#getOperationUnavailableMessage() */ @Override protected String getOperationUnavailableMessage() { return ActionMessages.RetargetRunToLineAction_0; - } - + } + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) */ @@ -128,5 +128,5 @@ public class RetargetRunToLineAction extends RetargetAction { } else { super.selectionChanged(action, selection); } - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunAsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunAsAction.java index efbd37503..30d13ea39 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunAsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunAsAction.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 *******************************************************************************/ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunContextualLaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunContextualLaunchAction.java index 25b996484..7deb1cb76 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunContextualLaunchAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunContextualLaunchAction.java @@ -15,11 +15,11 @@ import org.eclipse.debug.ui.actions.ContextualLaunchAction; /** * Specialization of <code>ContextualLaunchAction</code> for the run mode - * + * * @see {@link ContextualLaunchAction} */ public class RunContextualLaunchAction extends ContextualLaunchAction { - + /** * Constructor */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunHistoryMenuAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunHistoryMenuAction.java index fedfecc8e..1520e6fc9 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunHistoryMenuAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunHistoryMenuAction.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 *******************************************************************************/ @@ -16,11 +16,11 @@ import org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction; /** * Run history menu in the top-level "Run" menu. - */ + */ public class RunHistoryMenuAction extends AbstractLaunchHistoryAction { - + public RunHistoryMenuAction() { super(IDebugUIConstants.ID_RUN_LAUNCH_GROUP); } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunLastAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunLastAction.java index f3635497d..b90071941 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunLastAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunLastAction.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,9 +19,9 @@ import org.eclipse.debug.ui.actions.RelaunchLastAction; /** * Re-launches the last run-mode launch - * + * * This menu item appears in the main 'Run' menu - * + * * @see RelaunchLastAction * @see DebugLastAction * @see ProfileLastAction @@ -34,8 +34,8 @@ public class RunLastAction extends RelaunchLastAction { @Override public String getMode() { return ILaunchManager.RUN_MODE; - } - + } + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getLaunchGroupId() */ @@ -64,7 +64,7 @@ public class RunLastAction extends RelaunchLastAction { protected String getTooltipText() { return IInternalDebugCoreConstants.EMPTY_STRING; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getCommandId() */ @@ -72,7 +72,7 @@ public class RunLastAction extends RelaunchLastAction { protected String getCommandId() { return "org.eclipse.debug.ui.commands.RunLast"; //$NON-NLS-1$ } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getDescription() */ @@ -84,5 +84,5 @@ public class RunLastAction extends RelaunchLastAction { else { return ActionMessages.RunLastAction_3; } - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunToolbarAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunToolbarAction.java index 353cc1927..99dff4459 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunToolbarAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunToolbarAction.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 *******************************************************************************/ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SelectAllAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SelectAllAction.java index a920aa945..f1b6c19e7 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SelectAllAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SelectAllAction.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.ui.IActionDelegate; import org.eclipse.ui.IViewPart; public abstract class SelectAllAction extends AbstractRemoveAllActionDelegate { - + private IViewPart fView; /* (non-Javadoc) @@ -38,13 +38,13 @@ public abstract class SelectAllAction extends AbstractRemoveAllActionDelegate { } super.init(view); } - + protected IViewPart getView() { return fView; } - + protected abstract String getActionId(); - + private void collectExpandedAndVisible(TreeItem[] items, List<TreeItem> result) { for (int i= 0; i < items.length; i++) { TreeItem item= items[i]; @@ -73,5 +73,5 @@ public abstract class SelectAllAction extends AbstractRemoveAllActionDelegate { viewer.setSelection(viewer.getSelection()); } } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StatusInfo.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StatusInfo.java index 11aa17932..ca7a1818d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StatusInfo.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StatusInfo.java @@ -15,15 +15,15 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.debug.internal.ui.DebugUIPlugin; /** - * A settable IStatus. + * A settable IStatus. * Can be an error, warning, info or ok. For error, info and warning states, * a message describes the problem. */ public class StatusInfo implements IStatus { - + private String fStatusMessage; private int fSeverity; - + /** * Creates a status set to OK (no message) */ @@ -36,12 +36,12 @@ public class StatusInfo implements IStatus { * @param severity The status severity: ERROR, WARNING, INFO and OK. * @param message The message of the status. Applies only for ERROR, * WARNING and INFO. - */ + */ public StatusInfo(int severity, String message) { fStatusMessage= message; fSeverity= severity; - } - + } + /** * Returns if the status' severity is OK. */ @@ -52,25 +52,25 @@ public class StatusInfo implements IStatus { /** * Returns if the status' severity is WARNING. - */ + */ public boolean isWarning() { return fSeverity == IStatus.WARNING; } /** * Returns if the status' severity is INFO. - */ + */ public boolean isInfo() { return fSeverity == IStatus.INFO; - } + } /** * Returns if the status' severity is ERROR. - */ + */ public boolean isError() { return fSeverity == IStatus.ERROR; } - + /** * @see IStatus#getMessage */ @@ -78,11 +78,11 @@ public class StatusInfo implements IStatus { public String getMessage() { return fStatusMessage; } - + /** * Sets the status to ERROR. * @param The error message (can be empty, but not null) - */ + */ public void setError(String errorMessage) { Assert.isNotNull(errorMessage); fStatusMessage= errorMessage; @@ -92,7 +92,7 @@ public class StatusInfo implements IStatus { /** * Sets the status to WARNING. * @param The warning message (can be empty, but not null) - */ + */ public void setWarning(String warningMessage) { Assert.isNotNull(warningMessage); fStatusMessage= warningMessage; @@ -102,21 +102,21 @@ public class StatusInfo implements IStatus { /** * Sets the status to INFO. * @param The info message (can be empty, but not null) - */ + */ public void setInfo(String infoMessage) { Assert.isNotNull(infoMessage); fStatusMessage= infoMessage; fSeverity= IStatus.INFO; - } + } /** * Sets the status to OK. - */ + */ public void setOK() { fStatusMessage= null; fSeverity= IStatus.OK; } - + /* * @see IStatus#matches(int) */ @@ -175,6 +175,6 @@ public class StatusInfo implements IStatus { @Override public IStatus[] getChildren() { return new IStatus[0]; - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.java index 8531b8ea7..ec665cd6a 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.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 * Wind River Systems - adapted to use with IToggleBreakpiontsTargetFactory extension @@ -67,9 +67,9 @@ import org.eclipse.ui.texteditor.ITextEditor; import org.eclipse.ui.texteditor.SimpleMarkerAnnotation; /** - * The concrete implementation of the toggle breakpoints target manager - * interface. - * + * The concrete implementation of the toggle breakpoints target manager + * interface. + * * @since 3.5 */ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetManager { @@ -79,29 +79,29 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM * through the legacy adapter mechanism. */ public static String DEFAULT_TOGGLE_TARGET_ID = "default"; //$NON-NLS-1$ - + private static Set<String> DEFAULT_TOGGLE_TARGET_ID_SET = new TreeSet<String>(); static { DEFAULT_TOGGLE_TARGET_ID_SET.add(DEFAULT_TOGGLE_TARGET_ID); } - + /** - * Acts as a proxy between the toggle breakpoints target manager and the factories - * contributed to the extension point. Only loads information from the plug-in XML + * Acts as a proxy between the toggle breakpoints target manager and the factories + * contributed to the extension point. Only loads information from the plug-in XML * and only instantiates the specified factory if required (lazy loading). */ private static class ToggleTargetFactory implements IToggleBreakpointsTargetFactory { - + private IConfigurationElement fConfigElement; private IToggleBreakpointsTargetFactory fFactory; private Expression fEnablementExpression; - + public ToggleTargetFactory(IConfigurationElement configElement){ - fConfigElement = configElement; + fConfigElement = configElement; } /** - * @return Returns the instantiated factory specified by the class property. + * @return Returns the instantiated factory specified by the class property. */ private IToggleBreakpointsTargetFactory getFactory() { if (fFactory != null) { @@ -113,20 +113,20 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM fFactory = (IToggleBreakpointsTargetFactory)obj; } else { throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, "org.eclipse.debug.ui.toggleBreakpointsTargetFactories extension failed to load breakpoint toggle target because the specified class does not implement org.eclipse.debug.ui.actions.IToggleBreakpointsTargetFactory. Class specified was: " + obj, null)); //$NON-NLS-1$ - } + } } catch (CoreException e){ DebugUIPlugin.log(e.getStatus()); fFactory = null; } return fFactory; } - + /** * Checks if the enablement expression for the factory evaluates to true for the * given part and selection. * @param part The active part. * @param selection The current selection - * @return whether the delegated target factory is enabled for given + * @return whether the delegated target factory is enabled for given * part and selection. */ public boolean isEnabled(IWorkbenchPart part, ISelection selection) { @@ -139,10 +139,10 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM } return enabled; } - + /** * Returns the active debug context given the active part. It is used - * in creating the evaluation context for the factories' enablement expression. + * in creating the evaluation context for the factories' enablement expression. * @param part active part * @return current active debug context */ @@ -151,14 +151,14 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM getContextService(part.getSite().getWorkbenchWindow()).getActiveContext(); if (selection instanceof IStructuredSelection) { return (IStructuredSelection)selection; - } + } return StructuredSelection.EMPTY; } /** * Evaluate the given expression within the given context and return * the result. Returns <code>true</code> iff result is either TRUE. - * + * * @param part the {@link IWorkbenchPart} context * @param selection the current selection in the part * @param exp the current expression @@ -168,17 +168,17 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM if (exp != null){ IEvaluationContext context = DebugUIPlugin.createEvaluationContext(part); List<Object> debugContextList = getDebugContext(part).toList(); - context.addVariable(IConfigurationElementConstants.DEBUG_CONTEXT, debugContextList); + context.addVariable(IConfigurationElementConstants.DEBUG_CONTEXT, debugContextList); if (selection instanceof IStructuredSelection) { List<Object> selectionList = ((IStructuredSelection) selection).toList(); - context.addVariable(IConfigurationElementConstants.SELECTION, selectionList); + context.addVariable(IConfigurationElementConstants.SELECTION, selectionList); } if (part instanceof IEditorPart) { context.addVariable(IConfigurationElementConstants.EDITOR_INPUT, ((IEditorPart)part).getEditorInput()); } - + try{ EvaluationResult result = exp.evaluate(context); if (result == EvaluationResult.TRUE){ @@ -190,7 +190,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM } return false; } - + /** * @return Returns an expression that represents the enablement logic * for the breakpoint toggle target. @@ -199,7 +199,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM if (fEnablementExpression == null) { try{ IConfigurationElement[] elements = fConfigElement.getChildren(ExpressionTagNames.ENABLEMENT); - IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; + IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; if (enablement != null) { fEnablementExpression = ExpressionConverter.getDefault().perform(enablement); } @@ -211,10 +211,10 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM return fEnablementExpression; } - /** + /** * Instantiates the factory and asks it to produce the IToggleBreakpointsTarget * for the given ID - * @param targetID ID to create toggle target for + * @param targetID ID to create toggle target for * @return The created toggle target, or null. */ @Override @@ -222,16 +222,16 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM IToggleBreakpointsTargetFactory factory = getFactory(); if (factory != null) { return factory.createToggleTarget(targetID); - } + } return null; } - - /** + + /** * Instantiates the factory and asks it for the set of toggle target * IDs that the factory can produce for the given part and selection. * @param part The active part. * @param selection The current selection - * @return Set of <code>String</code> IDs for possible toggle breakpoint + * @return Set of <code>String</code> IDs for possible toggle breakpoint * targets, possibly empty */ @Override @@ -239,11 +239,11 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM IToggleBreakpointsTargetFactory factory = getFactory(); if (factory != null) { return factory.getToggleTargets(part, selection); - } + } return Collections.EMPTY_SET; } - /** + /** * Instantiates the factory and asks it to produce the name of the toggle target * for the given ID. * @param targetID toggle breakpoints target identifier @@ -254,12 +254,12 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM IToggleBreakpointsTargetFactory factory = getFactory(); if (factory != null) { return factory.getToggleTargetName(targetID); - } + } return null; } - /** - * Instantiates the factory and asks it to produce the description of the toggle + /** + * Instantiates the factory and asks it to produce the description of the toggle * target for the given ID. * @param targetID toggle breakpoints target identifier * @return toggle target name or <code>null</code> if none @@ -269,11 +269,11 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM IToggleBreakpointsTargetFactory factory = getFactory(); if (factory != null) { return factory.getToggleTargetDescription(targetID); - } + } return null; } - - /** + + /** * Instantiates the factory and asks it for the toggle tareget ID that * the factory considers the default for the given part and selection. * @param part The active part. @@ -281,19 +281,19 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM * @return a breakpoint toggle target identifier or <code>null</code> */ @Override - public String getDefaultToggleTarget(IWorkbenchPart part, ISelection selection) { + public String getDefaultToggleTarget(IWorkbenchPart part, ISelection selection) { IToggleBreakpointsTargetFactory factory = getFactory(); if (factory != null) { return factory.getDefaultToggleTarget(part, selection); - } + } return null; } } - + /** * Factory for toggle breakpoints targets contributed through the - * adapter mechanism. + * adapter mechanism. */ private static class ToggleBreakpointsTargetAdapterFactory implements IToggleBreakpointsTargetFactory { @@ -301,13 +301,13 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM if (selection instanceof IStructuredSelection) { IStructuredSelection ss = (IStructuredSelection)selection; return ss.getFirstElement(); - } + } return null; } - + /** - * Checks whether the given element is adaptable to the toggle breakpoints target. - * This method does not force loading of the adapter. + * Checks whether the given element is adaptable to the toggle breakpoints target. + * This method does not force loading of the adapter. * @param adaptable Element to adapt. * @return returns true if element can be adapted. */ @@ -316,7 +316,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM IToggleBreakpointsTarget adapter = null; if (adaptable instanceof IAdaptable) { adapter = ((IAdaptable)adaptable).getAdapter(IToggleBreakpointsTarget.class); - } + } if (adapter == null) { IAdapterManager adapterManager = Platform.getAdapterManager(); if (adapterManager.hasAdapter(adaptable, IToggleBreakpointsTarget.class.getName())) { @@ -328,10 +328,10 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM } return false; } - + /** - * Finds the toggle breakpoints target for the active part and selection. - * It first looks for the target using the factories registered using an + * Finds the toggle breakpoints target for the active part and selection. + * It first looks for the target using the factories registered using an * extension point. If not found it uses the <code>IAdaptable</code> * mechanism. * @param part The workbench part in which toggle target is to be used @@ -342,7 +342,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM IToggleBreakpointsTarget target = null; if (element != null) { target = (IToggleBreakpointsTarget) DebugPlugin.getAdapter(element, IToggleBreakpointsTarget.class); - } + } if (target == null) { target = (IToggleBreakpointsTarget) DebugPlugin.getAdapter(part, IToggleBreakpointsTarget.class); } @@ -350,17 +350,17 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM } /** - * Checks if there is an adaptable object for the given part and - * selection, and if there is, it checks whether an + * Checks if there is an adaptable object for the given part and + * selection, and if there is, it checks whether an * <code>IToggleBreakpointsTarget</code> can be obtained as an adapter. * @param part The workbench part in which toggle target is to be used * @param selection The active selection to use with toggle target - * @return Whether the adapter (default) toggle target is available. + * @return Whether the adapter (default) toggle target is available. */ public boolean isEnabled(IWorkbenchPart part, ISelection selection) { return canGetToggleBreakpointsTarget(getSelectionElement(selection)) || canGetToggleBreakpointsTarget(part); } - + /** * Not implemented use {@link #createDefaultToggleTarget(IWorkbenchPart, ISelection)} * instead. @@ -371,22 +371,22 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM public IToggleBreakpointsTarget createToggleTarget(String targetID) { return null; } - + /** * @param part The workbench part in which toggle target is to be used * @param selection The active selection to use with toggle target - * @return Returns a toggle target for the given part and selection, obtained - * through the adapter mechanism. + * @return Returns a toggle target for the given part and selection, obtained + * through the adapter mechanism. */ public IToggleBreakpointsTarget createDefaultToggleTarget(IWorkbenchPart part, ISelection selection) { return getToggleBreakpointsTarget(part, getSelectionElement(selection)); } - + @Override public Set<String> getToggleTargets(IWorkbenchPart part, ISelection selection) { if (isEnabled(part, selection)) { return DEFAULT_TOGGLE_TARGET_ID_SET; - } + } return Collections.EMPTY_SET; } @@ -399,14 +399,14 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM public String getToggleTargetDescription(String targetID) { return ActionMessages.ToggleBreakpointsTargetManager_defaultToggleTarget_description; } - + @Override public String getDefaultToggleTarget(IWorkbenchPart part, ISelection selection) { return DEFAULT_TOGGLE_TARGET_ID; } } - + /** * Preference key for storing the preferred targets map. * @see #storePreferredTargets() @@ -414,7 +414,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM */ public static final String PREF_TARGETS = "preferredTargets"; //$NON-NLS-1$ - + /** * There should only ever be once instance of this manager for the workbench. */ @@ -426,7 +426,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM } return fgSingleton; } - + /** * Maps the IDs of toggle breakpoint targets to their instances. The target * IDs must be unique. @@ -437,13 +437,13 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM * Maps a Set of target id's to the one target id that is preferred. */ private Map<Set<String>, String> fPreferredTargets; - + /** * Maps the IDs of toggle targets to the factory that can create them. * There can currently only be one factory for a given toggle target. */ private Map<String, IToggleBreakpointsTargetFactory> fFactoriesByTargetID = new HashMap<String, IToggleBreakpointsTargetFactory>(); - + /** * List of listeners to changes in the preferred toggle targets list. */ @@ -458,7 +458,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_TOGGLE_BREAKPOINTS_TARGET_FACTORIES); IConfigurationElement[] elements = ep.getConfigurationElements(); for (int i= 0; i < elements.length; i++) { - String id = elements[i].getAttribute(IConfigurationElementConstants.ID); + String id = elements[i].getAttribute(IConfigurationElementConstants.ID); if (id != null && id.length() != 0) { if (fKnownFactories.containsKey(id)) { DebugUIPlugin.log(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, "org.eclipse.debug.ui.toggleBreakpointsTargetFactory extension failed to load breakpoint toggle target because the specified id is already registered. Specified ID is: " + id, null)); //$NON-NLS-1$ @@ -468,24 +468,24 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM } else { DebugUIPlugin.log(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, "org.eclipse.debug.ui.toggleBreakpointsTargetFactory extension failed to load breakpoint toggle target because the specified id is empty.", null)); //$NON-NLS-1$ } - } - - // If there are any factories contributed through the extension point, + } + + // If there are any factories contributed through the extension point, // set a system property for use in enabling actions. - System.setProperty(IDebugUIConstants.SYS_PROP_BREAKPOINT_TOGGLE_FACTORIES_USED, + System.setProperty(IDebugUIConstants.SYS_PROP_BREAKPOINT_TOGGLE_FACTORIES_USED, fKnownFactories.size() > 1 ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ } /** * Returns the set of IToggleBreakpointsTargetFactory objects (they will be - * ToggleTargetFactory) that were contributed to the extension point and - * are enabled for the given part and selection (enabled if the factory - * does not have an enablement expression or if the enablement expression + * ToggleTargetFactory) that were contributed to the extension point and + * are enabled for the given part and selection (enabled if the factory + * does not have an enablement expression or if the enablement expression * evaluates to true). - * + * * @param part active part * @param selection active selection in part - * @return The factories enabled for the part and selection or an empty + * @return The factories enabled for the part and selection or an empty * collection. */ private Set<IToggleBreakpointsTargetFactory> getEnabledFactories(IWorkbenchPart part, ISelection selection) { @@ -495,13 +495,13 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM Set<IToggleBreakpointsTargetFactory> set = new HashSet<IToggleBreakpointsTargetFactory>(); for (Entry<String, IToggleBreakpointsTargetFactory> entry : fKnownFactories.entrySet()) { IToggleBreakpointsTargetFactory factory = entry.getValue(); - if (factory instanceof ToggleTargetFactory && + if (factory instanceof ToggleTargetFactory && ((ToggleTargetFactory)factory).isEnabled(part, selection)) { set.add(factory); - } else if (factory instanceof ToggleBreakpointsTargetAdapterFactory && + } else if (factory instanceof ToggleBreakpointsTargetAdapterFactory && ((ToggleBreakpointsTargetAdapterFactory)factory).isEnabled(part, selection)) { set.add(factory); - } + } } return set; } @@ -509,7 +509,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM /** * Produces the set of IDs for all possible toggle targets that can be used for * the given part and selection. - * + * * @param factoriesToQuery The collection of factories to check * @param part active part * @param selection active selection in part @@ -520,8 +520,8 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM for (IToggleBreakpointsTargetFactory factory : factoriesToQuery) { for(String targetID : factory.getToggleTargets(part, selection)) { fFactoriesByTargetID.put(targetID, factory); - idsForSelection.add(targetID); - } + idsForSelection.add(targetID); + } } return idsForSelection; } @@ -557,7 +557,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM } return null; } - + @Override public String getToggleBreakpointsTargetName(String id) { IToggleBreakpointsTargetFactory factory = fFactoriesByTargetID.get(id); @@ -566,7 +566,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM } return null; } - + @Override public String getToggleBreakpointsTargetDescription(String id) { IToggleBreakpointsTargetFactory factory = fFactoriesByTargetID.get(id); @@ -588,10 +588,10 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM /** * Stores the map of preferred target IDs to the preference store in the format: - * - * Key1A,Key1B:Value1|Key2A,Key2B,Key2C:Value2| - * - * Where the sub keys (Key1A, Key1B, etc.) are the elements of the set used at the + * + * Key1A,Key1B:Value1|Key2A,Key2B,Key2C:Value2| + * + * Where the sub keys (Key1A, Key1B, etc.) are the elements of the set used at the * key in the mapping and the values are the associated String value in the mapping. */ private void storePreferredTargets() { @@ -614,15 +614,15 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM /** * Loads the map of preferred target IDs from the preference store. - * + * * @see #storePreferredTargets() */ private void loadPreferredTargets() { fPreferredTargets = new HashMap<Set<String>, String>(); String preferenceValue = Platform.getPreferencesService().getString( - DebugUIPlugin.getUniqueIdentifier(), - PREF_TARGETS, - null, + DebugUIPlugin.getUniqueIdentifier(), + PREF_TARGETS, + null, null); if(preferenceValue == null) { return; @@ -643,7 +643,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM /** * Adds or updates the mapping to set which target ID is preferred for a certain * set of possible IDs. - * + * * @param possibleIDs The set of possible IDs * @param preferredID The preferred ID in the set. */ @@ -664,12 +664,12 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM fPreferredTargets.put(possibleIDs, preferredID); storePreferredTargets(); firePreferredTargetsChanged(); - } + } } - + /** * Returns the preferred toggle target ID from the given set if the mapping has been set. - * + * * @param possibleTargetIDs The set of possible toggle target IDs * @return The preferred ID or null */ @@ -684,19 +684,19 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM * Given a set of possible toggle target IDs, this method will determine which target is * preferred and should be used to toggle breakpoints. This method chooses a toggle target * by storing previous choices and can be set using a context menu. - * + * * @param possibleTargetIDs The set of possible toggle target IDs * @param part The workbench part in which toggle target is to be used - * @param selection The active selection to use with toggle target + * @param selection The active selection to use with toggle target * @return The preferred toggle target ID or null */ private String chooseToggleTargetIDInSet(Set<String> possibleTargetIDs, IWorkbenchPart part, ISelection selection) { if (possibleTargetIDs == null || possibleTargetIDs.isEmpty()){ return null; } - + String preferredID = getUserPreferredTarget(possibleTargetIDs); - + if (preferredID == null){ // If there is no preferred pane already set, check the factories to see there is a default target Iterator<String> possibleIDsIterator = possibleTargetIDs.iterator(); @@ -726,7 +726,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM iToggleBreakpointsTargetManagerListener.preferredTargetsChanged(); } } - + public IBreakpoint getBeakpointFromEditor(ITextEditor editor, IVerticalRulerInfo info) { IDocumentProvider provider = editor.getDocumentProvider(); if(provider == null) { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleFilterAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleFilterAction.java index 2257d2553..7ac218073 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleFilterAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleFilterAction.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 *******************************************************************************/ @@ -26,7 +26,7 @@ public abstract class ToggleFilterAction extends Action { * The viewer that this action works for */ private StructuredViewer fViewer; - + /** * The filter this action applies to the viewer */ @@ -61,7 +61,7 @@ public abstract class ToggleFilterAction extends Action { if (!alreadyAdded) { getViewer().addFilter(filter); } - + } else { getViewer().removeFilter(getViewerFilter()); } @@ -81,7 +81,7 @@ public abstract class ToggleFilterAction extends Action { protected void setViewerFilter(ViewerFilter filter) { fViewerFilter= filter; } - + protected StructuredViewer getViewer() { return fViewer; } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ViewManagementAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ViewManagementAction.java index 32233132e..06ebe7741 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ViewManagementAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ViewManagementAction.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.actions.ActionDelegate; * An action which opens the view management preference page. */ public class ViewManagementAction extends ActionDelegate implements IViewActionDelegate { - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/AbstractBreakpointsViewAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/AbstractBreakpointsViewAction.java index 10df93524..da9cfbc0b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/AbstractBreakpointsViewAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/AbstractBreakpointsViewAction.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 implementation *******************************************************************************/ @@ -22,7 +22,7 @@ import org.eclipse.ui.IViewPart; * Abstract implementation of an action contributed to the breakpoints view. */ public abstract class AbstractBreakpointsViewAction implements IViewActionDelegate, IActionDelegate2 { - + /** * The breakpoints view that this action has been contributed to. */ @@ -35,7 +35,7 @@ public abstract class AbstractBreakpointsViewAction implements IViewActionDelega public void init(IViewPart view) { fView= (BreakpointsView) view; } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) */ @@ -49,14 +49,14 @@ public abstract class AbstractBreakpointsViewAction implements IViewActionDelega @Override public void dispose() { } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction) */ @Override public void init(IAction action) { } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/AdvancedGroupBreakpointsByAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/AdvancedGroupBreakpointsByAction.java index f6fe350d6..16c556b7d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/AdvancedGroupBreakpointsByAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/AdvancedGroupBreakpointsByAction.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 *******************************************************************************/ @@ -22,14 +22,14 @@ import org.eclipse.jface.window.Window; * view. */ public class AdvancedGroupBreakpointsByAction extends Action { - + private BreakpointsView fView; - + public AdvancedGroupBreakpointsByAction(BreakpointsView view) { super(IInternalDebugCoreConstants.EMPTY_STRING, IAction.AS_RADIO_BUTTON); fView= view; } - + /* (non-Javadoc) * @see org.eclipse.jface.action.IAction#run() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointSelectionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointSelectionAction.java index a1c90fb6f..bc7ef2b23 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointSelectionAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointSelectionAction.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,12 +17,12 @@ import org.eclipse.ui.actions.SelectionListenerAction; * A selection listener action for the breakpoints view. */ public abstract class BreakpointSelectionAction extends SelectionListenerAction { - + private BreakpointsView fView; - + /** * Constructs an action for the breakpoints view. - * + * * @param text action name * @param view breakpoints view */ @@ -30,10 +30,10 @@ public abstract class BreakpointSelectionAction extends SelectionListenerAction super(text); fView = view; } - + /** * Returns the breakpoints view. - * + * * @return breakpoints view */ protected BreakpointsView getBreakpointsView() { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointWorkingSetAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointWorkingSetAction.java index 40fae5d62..383329599 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointWorkingSetAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointWorkingSetAction.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 implementation *******************************************************************************/ @@ -22,8 +22,8 @@ import org.eclipse.ui.IViewPart; * An action which clears (sets the null) the default breakpoint group. */ public abstract class BreakpointWorkingSetAction extends AbstractBreakpointsViewAction implements IPropertyChangeListener { - - protected IAction fAction; + + protected IAction fAction; /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) @@ -41,7 +41,7 @@ public abstract class BreakpointWorkingSetAction extends AbstractBreakpointsView super.init(view); DebugUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this); } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate2#dispose() */ @@ -59,7 +59,7 @@ public abstract class BreakpointWorkingSetAction extends AbstractBreakpointsView super.init(action); update(); } - + /* (non-Javadoc) * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ClearDefaultBreakpointGroupAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ClearDefaultBreakpointGroupAction.java index 3e3704a00..ae38fbfc7 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ClearDefaultBreakpointGroupAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ClearDefaultBreakpointGroupAction.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 implementation *******************************************************************************/ @@ -17,7 +17,7 @@ import org.eclipse.jface.action.IAction; * An action which clears (sets the null) the default breakpoint group. */ public class ClearDefaultBreakpointGroupAction extends BreakpointWorkingSetAction { - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsActionDelegate.java index 5f084105c..975c9880d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsActionDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsActionDelegate.java @@ -35,7 +35,7 @@ import org.eclipse.ui.IViewPart; * to the breakpoint paste action. */ public class CopyBreakpointsActionDelegate extends VirtualCopyToClipboardActionDelegate implements IBreakpointsListener { - + private long fStamp; /* (non-Javadoc) @@ -57,7 +57,7 @@ public class CopyBreakpointsActionDelegate extends VirtualCopyToClipboardActionD } } } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate#init(org.eclipse.ui.IViewPart) */ @@ -66,7 +66,7 @@ public class CopyBreakpointsActionDelegate extends VirtualCopyToClipboardActionD super.init(view); DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate#dispose() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/EditBreakpointGroupAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/EditBreakpointGroupAction.java index 8303511e3..c7d2827fe 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/EditBreakpointGroupAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/EditBreakpointGroupAction.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 implementation * Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956) @@ -27,12 +27,12 @@ import org.eclipse.ui.dialogs.IWorkingSetEditWizard; * An action to edit a breakpoint working set. */ public class EditBreakpointGroupAction extends AbstractBreakpointsViewAction { - + /** * The currently selected breakpoints */ private IWorkingSet fSet = null; - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ @@ -48,10 +48,10 @@ public class EditBreakpointGroupAction extends AbstractBreakpointsViewAction { */ @Override public void selectionChanged(IAction action, ISelection sel) { - fSet = null; + fSet = null; if (sel instanceof IStructuredSelection) { IStructuredSelection selection= (IStructuredSelection) sel; - + if (selection.size() == 1) { Object element = selection.getFirstElement(); if (element instanceof IBreakpointContainer) { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsAction.java index 647fc0276..fc0061e11 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsAction.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 implementation *******************************************************************************/ @@ -22,7 +22,7 @@ import org.eclipse.jface.action.IAction; * some criteria (as determined by the factory). */ public class GroupBreakpointsAction extends Action { - + private IBreakpointOrganizer fOrganzier; private BreakpointsView fView; @@ -52,10 +52,10 @@ public class GroupBreakpointsAction extends Action { } } } - + /** * Returns this action's organizer. - * + * * @return breakpoint organizer */ public IBreakpointOrganizer getOrganizer() { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java index 717ff3d54..681249d75 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java @@ -31,15 +31,15 @@ import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; /** - * + * */ public class GroupBreakpointsByAction extends AbstractBreakpointsViewAction implements IMenuCreator { private IAction fAction= null; - + public GroupBreakpointsByAction() { } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ @@ -79,7 +79,7 @@ public class GroupBreakpointsByAction extends AbstractBreakpointsViewAction impl } fillMenu(m); } - }); + }); return menu; } @@ -88,8 +88,8 @@ public class GroupBreakpointsByAction extends AbstractBreakpointsViewAction impl */ private void fillMenu(Menu menu) { // determine which item should be checked - IBreakpointOrganizer[] organizers = fView.getBreakpointOrganizers(); - + IBreakpointOrganizer[] organizers = fView.getBreakpointOrganizers(); + boolean none = false; boolean advanced = false; IBreakpointOrganizer organizer = null; @@ -100,11 +100,11 @@ public class GroupBreakpointsByAction extends AbstractBreakpointsViewAction impl } else { organizer = organizers[0]; } - + int accel = 1; // Add hard-coded action for flat breakpoints list IAction action = new GroupBreakpointsAction(null, fView); - addAccel(accel, action, BreakpointGroupMessages.GroupBreakpointsByAction_0); + addAccel(accel, action, BreakpointGroupMessages.GroupBreakpointsByAction_0); accel++; action.setImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_VIEW_BREAKPOINTS)); action.setChecked(none); @@ -121,16 +121,16 @@ public class GroupBreakpointsByAction extends AbstractBreakpointsViewAction impl item= new ActionContributionItem(bpAction); item.fill(menu, -1); } - + // advanced action AdvancedGroupBreakpointsByAction advancedAction = new AdvancedGroupBreakpointsByAction(fView); - addAccel(accel, advancedAction,BreakpointGroupMessages.GroupBreakpointsByAction_1); + addAccel(accel, advancedAction,BreakpointGroupMessages.GroupBreakpointsByAction_1); advancedAction.setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_HIERARCHICAL)); advancedAction.setChecked(advanced); item= new ActionContributionItem(advancedAction); item.fill(menu, -1); } - + public List<IAction> getActions(int accel) { List<IAction> actions = new ArrayList<IAction>(); IBreakpointOrganizer[] organizers = BreakpointOrganizerManager.getDefault().getOrganizers(); @@ -141,10 +141,10 @@ public class GroupBreakpointsByAction extends AbstractBreakpointsViewAction impl accel++; action.setImageDescriptor(organizer.getImageDescriptor()); actions.add(action); - } + } return actions; } - + private void addAccel(int accel, IAction action, String label) { StringBuffer actionLabel= new StringBuffer(); if (accel != 10) { @@ -159,9 +159,9 @@ public class GroupBreakpointsByAction extends AbstractBreakpointsViewAction impl accel++; actionLabel.append(' '); actionLabel.append(label); - action.setText(actionLabel.toString()); + action.setText(actionLabel.toString()); } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java index f29ae9992..acc4754b7 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java @@ -57,24 +57,24 @@ import org.eclipse.ui.PlatformUI; * to use and in what order they should be applied. */ public class GroupBreakpointsByDialog extends TrayDialog { - + private BreakpointsView fView; - + // Table viewer that presents available containers private TableViewer fAvailableViewer; private AvailableOrganizersProvider fAvailableOrganizersProvider= new AvailableOrganizersProvider(); - + // Tree viewer that presents selected containers private TreeViewer fSelectedViewer; private SelectedOrganizerProvider fSelectedOrganizersProvider= new SelectedOrganizerProvider(); - + private List<Object> fResult = new ArrayList<Object>(); private Button fAddButton; private Button fRemoveButton; private Button fMoveUpButton; private Button fMoveDownButton; - + /** * Selection listener that listens to selection from all buttons in this * dialog. @@ -107,7 +107,7 @@ public class GroupBreakpointsByDialog extends TrayDialog { @Override protected Control createDialogArea(Composite parent) { ILabelProvider labelProvider= new BreakpointOrganzierLabelProvider(); - + Composite parentComposite= (Composite) super.createDialogArea(parent); parentComposite.setFont(parent.getFont()); Composite composite= new Composite(parentComposite, SWT.NONE); @@ -118,13 +118,13 @@ public class GroupBreakpointsByDialog extends TrayDialog { data.heightHint= 400; composite.setLayoutData(data); composite.setFont(parent.getFont()); - + Label label= new Label(composite, SWT.WRAP); - label.setText(BreakpointGroupMessages.GroupBreakpointsByDialog_0); + label.setText(BreakpointGroupMessages.GroupBreakpointsByDialog_0); GridData gridData = new GridData(GridData.FILL_HORIZONTAL); gridData.horizontalSpan = 3; label.setLayoutData(gridData); - + createAvailableViewer(composite, labelProvider); createButtons(composite); createSelectedViewer(composite, labelProvider); @@ -134,7 +134,7 @@ public class GroupBreakpointsByDialog extends TrayDialog { Dialog.applyDialogFont(parentComposite); return parentComposite; } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#createContents(org.eclipse.swt.widgets.Composite) */ @@ -166,7 +166,7 @@ public class GroupBreakpointsByDialog extends TrayDialog { * Creates and configured the viewer that shows the available (not currently selected) * breakpoint container factories. */ - private void createAvailableViewer(Composite parent, ILabelProvider labelProvider) { + private void createAvailableViewer(Composite parent, ILabelProvider labelProvider) { Composite availableComposite= new Composite(parent, SWT.NONE); availableComposite.setFont(parent.getFont()); GridLayout layout = new GridLayout(); @@ -178,10 +178,10 @@ public class GroupBreakpointsByDialog extends TrayDialog { availableComposite.setLayoutData(gridData); Label label= new Label(availableComposite, SWT.WRAP); - label.setText(BreakpointGroupMessages.GroupBreakpointsByDialog_1); + label.setText(BreakpointGroupMessages.GroupBreakpointsByDialog_1); gridData = new GridData(GridData.FILL_HORIZONTAL); label.setLayoutData(gridData); - + fAvailableViewer= new TableViewer(availableComposite); fAvailableViewer.setContentProvider(fAvailableOrganizersProvider); fAvailableViewer.setLabelProvider(labelProvider); @@ -218,13 +218,13 @@ public class GroupBreakpointsByDialog extends TrayDialog { gridData.widthHint= 225; selectedComposite.setLayoutData(gridData); selectedComposite.setFont(parent.getFont()); - + Label label= new Label(selectedComposite, SWT.WRAP); - label.setText(BreakpointGroupMessages.GroupBreakpointsByDialog_3); + label.setText(BreakpointGroupMessages.GroupBreakpointsByDialog_3); gridData = new GridData(); gridData.horizontalSpan = 2; label.setLayoutData(gridData); - + fSelectedViewer= new TreeViewer(selectedComposite); fSelectedViewer.setContentProvider(fSelectedOrganizersProvider); fSelectedViewer.setLabelProvider(labelProvider); @@ -245,25 +245,25 @@ public class GroupBreakpointsByDialog extends TrayDialog { } }); } - + public void createButtons(Composite parent) { Composite buttonComposite= new Composite(parent, SWT.NONE); buttonComposite.setLayout(new GridLayout()); buttonComposite.setLayoutData(new GridData()); buttonComposite.setFont(parent.getFont()); - - fAddButton= SWTFactory.createPushButton(buttonComposite, BreakpointGroupMessages.GroupBreakpointsByDialog_2, null); + + fAddButton= SWTFactory.createPushButton(buttonComposite, BreakpointGroupMessages.GroupBreakpointsByDialog_2, null); fAddButton.addSelectionListener(fSelectionListener); - - fRemoveButton= SWTFactory.createPushButton(buttonComposite, BreakpointGroupMessages.GroupBreakpointsByDialog_4, null); + + fRemoveButton= SWTFactory.createPushButton(buttonComposite, BreakpointGroupMessages.GroupBreakpointsByDialog_4, null); fRemoveButton.addSelectionListener(fSelectionListener); - - fMoveUpButton= SWTFactory.createPushButton(buttonComposite, BreakpointGroupMessages.GroupBreakpointsByDialog_5, null); + + fMoveUpButton= SWTFactory.createPushButton(buttonComposite, BreakpointGroupMessages.GroupBreakpointsByDialog_5, null); fMoveUpButton.addSelectionListener(fSelectionListener); - - fMoveDownButton= SWTFactory.createPushButton(buttonComposite, BreakpointGroupMessages.GroupBreakpointsByDialog_6, null); + + fMoveDownButton= SWTFactory.createPushButton(buttonComposite, BreakpointGroupMessages.GroupBreakpointsByDialog_6, null); fMoveDownButton.addSelectionListener(fSelectionListener); - + } /** @@ -275,7 +275,7 @@ public class GroupBreakpointsByDialog extends TrayDialog { public IBreakpointOrganizer[] getOrganizers() { return fResult.toArray(new IBreakpointOrganizer[fResult.size()]); } - + /** * When the user presses OK, convert the tree selection into a list. */ @@ -289,7 +289,7 @@ public class GroupBreakpointsByDialog extends TrayDialog { } super.okPressed(); } - + /** * Moves the selected item from the list of "available" factories * to the tree of "selected" factories. @@ -305,7 +305,7 @@ public class GroupBreakpointsByDialog extends TrayDialog { } updateViewers(); } - + /** * Moves the selected item from the tree of "selected" factories * to the list of "available" factories. @@ -321,7 +321,7 @@ public class GroupBreakpointsByDialog extends TrayDialog { } updateViewers(); } - + /** * Moves each selected item up in the tree of selected containers */ @@ -333,7 +333,7 @@ public class GroupBreakpointsByDialog extends TrayDialog { } updateViewers(); } - + /** * Moves each selected item down in the tree of selected containers */ @@ -345,7 +345,7 @@ public class GroupBreakpointsByDialog extends TrayDialog { } updateViewers(); } - + /** * Fully refreshes and updates all viewers and buttons. */ @@ -356,7 +356,7 @@ public class GroupBreakpointsByDialog extends TrayDialog { updateAddButton(); updateSelectedButtons(); } - + /** * Updates all buttons associated with the tree of selected containers. */ @@ -365,17 +365,17 @@ public class GroupBreakpointsByDialog extends TrayDialog { updateMoveUpButton(); updateMoveDownButton(); } - + public void updateAddButton() { IStructuredSelection selection = (IStructuredSelection) fAvailableViewer.getSelection(); fAddButton.setEnabled(selection.size() > 0); } - + public void updateRemoveButton() { IStructuredSelection selection = (IStructuredSelection) fSelectedViewer.getSelection(); fRemoveButton.setEnabled(selection.size() > 0); } - + public void updateMoveUpButton() { boolean enabled= true; IStructuredSelection selection = (IStructuredSelection) fSelectedViewer.getSelection(); @@ -390,7 +390,7 @@ public class GroupBreakpointsByDialog extends TrayDialog { } fMoveUpButton.setEnabled(enabled); } - + public void updateMoveDownButton() { boolean enabled= true; IStructuredSelection selection = (IStructuredSelection) fSelectedViewer.getSelection(); @@ -405,24 +405,24 @@ public class GroupBreakpointsByDialog extends TrayDialog { } fMoveDownButton.setEnabled(enabled); } - + /** * Content provider that provides the list of breakpoint organaisers * that are available but not currently selected. */ private class AvailableOrganizersProvider implements IStructuredContentProvider { protected List<IBreakpointOrganizer> availableOrganziers = new ArrayList<IBreakpointOrganizer>(); - + public void addAvailable(IBreakpointOrganizer organizer) { availableOrganziers.add(organizer); fSelectedOrganizersProvider.selectedOrganizers.remove(organizer); } - + @Override public Object[] getElements(Object inputElement) { return availableOrganziers.toArray(); } - + @Override public void dispose() { } @@ -430,7 +430,7 @@ public class GroupBreakpointsByDialog extends TrayDialog { public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { } } - + /** * Content provider that returns the selected breakpoint organizers * as a tree. This tree shows the list of organzizers as they will @@ -438,12 +438,12 @@ public class GroupBreakpointsByDialog extends TrayDialog { */ private class SelectedOrganizerProvider implements ITreeContentProvider { protected List<Object> selectedOrganizers = new ArrayList<Object>(); - + public void addSelected(IBreakpointOrganizer organizer) { selectedOrganizers.add(organizer); fAvailableOrganizersProvider.availableOrganziers.remove(organizer); } - + public void moveUp(Object object) { int index = selectedOrganizers.indexOf(object); if (index > 0) { @@ -451,7 +451,7 @@ public class GroupBreakpointsByDialog extends TrayDialog { selectedOrganizers.add(index - 1, object); } } - + public void moveDown(Object object) { int index = selectedOrganizers.indexOf(object); if (index < selectedOrganizers.size() - 1) { @@ -496,13 +496,13 @@ public class GroupBreakpointsByDialog extends TrayDialog { return new Object[0]; } } - + /** * Label provider which provides text and images for breakpoint container factories */ private class BreakpointOrganzierLabelProvider extends LabelProvider { private HashMap<ImageDescriptor, Image> fImageCache = new HashMap<ImageDescriptor, Image>(); - + @Override public String getText(Object element) { if (element instanceof IBreakpointOrganizer) { @@ -535,15 +535,15 @@ public class GroupBreakpointsByDialog extends TrayDialog { super.dispose(); } } - + /* * (non-Javadoc) - * + * * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell) */ @Override protected void configureShell(Shell shell) { super.configureShell(shell); - shell.setText(BreakpointGroupMessages.GroupBreakpointsByDialog_7); + shell.setText(BreakpointGroupMessages.GroupBreakpointsByDialog_7); } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/PasteBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/PasteBreakpointsAction.java index be8b4a7ba..a6ea205da 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/PasteBreakpointsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/PasteBreakpointsAction.java @@ -25,18 +25,18 @@ import org.eclipse.ui.PlatformUI; * <p> * This class may be instantiated; it is not intended to be subclassed. * </p> - * + * * @since 2.0 */ public class PasteBreakpointsAction extends BreakpointSelectionAction { - + /** * Creates a new action. * * @param view the view of this action */ public PasteBreakpointsAction(BreakpointsView view) { - super(BreakpointGroupMessages.PasteBreakpointsAction_0, view); + super(BreakpointGroupMessages.PasteBreakpointsAction_0, view); setToolTipText(BreakpointGroupMessages.PasteBreakpointsAction_1); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.PASTE_BREAKPOINTS_ACTION); } @@ -44,7 +44,7 @@ public class PasteBreakpointsAction extends BreakpointSelectionAction { /** * Returns the actual target of the paste action. Returns null * if no valid target is selected. - * + * * @return the actual target of the paste action */ private Object getTarget() { @@ -70,7 +70,7 @@ public class PasteBreakpointsAction extends BreakpointSelectionAction { /** * Returns whether this action should be enabled based on the selection - * in the clipboard. Only updates when the breakpoints view has focus. + * in the clipboard. Only updates when the breakpoints view has focus. */ @Override protected boolean updateSelection(IStructuredSelection selection) { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java index d47318f68..6a3bfa55b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java @@ -6,7 +6,7 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * IBM Corporation - initial API and implementation + * IBM Corporation - initial API and implementation * Freescale Semiconductor - bug 287863 * Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956) *******************************************************************************/ @@ -28,19 +28,19 @@ import org.eclipse.jface.viewers.TreePath; * Removes a breakpoint from a breakpoint working set. */ public class RemoveFromWorkingSetAction extends BreakpointSelectionAction { - + private BreakpointSetElement[] fBreakpoints; /** * Constructs action to remove breakpoints from a category. - * + * * @param view */ public RemoveFromWorkingSetAction(BreakpointsView view) { - super(BreakpointGroupMessages.RemoveFromWorkingSetAction_0, view); + super(BreakpointGroupMessages.RemoveFromWorkingSetAction_0, view); } - + /* (non-Javadoc) * @see org.eclipse.jface.action.IAction#run() */ @@ -52,19 +52,19 @@ public class RemoveFromWorkingSetAction extends BreakpointSelectionAction { } } } - + protected static class BreakpointSetElement { - BreakpointSetElement(IBreakpoint b, IBreakpointContainer c) { breakpoint = b; container = c; } + BreakpointSetElement(IBreakpoint b, IBreakpointContainer c) { breakpoint = b; container = c; } IBreakpoint breakpoint; IBreakpointContainer container; } - + /** * Returns a array of breakpoint/container pairs for the selection - * + * * All the returned elements contain a breakpoint and a working set container the breakpoint is contained and the breakpoint * can be removed from. - * + * * @param selection * @return */ @@ -75,19 +75,19 @@ public class RemoveFromWorkingSetAction extends BreakpointSelectionAction { TreePath[] paths = tSel.getPaths(); for (int i = 0; i < paths.length; i++) { - TreePath path = paths[i]; - + TreePath path = paths[i]; + // We can remove Breakpoints from their working set if any of their parents is a non "Other" breakpoint working set - IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(path.getLastSegment(), IBreakpoint.class); + IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(path.getLastSegment(), IBreakpoint.class); if (breakpoint != null) { TreePath parents = path.getParentPath(); - + for (int j = 0; j < parents.getSegmentCount(); j++) { Object parent = parents.getSegment(j); - + if (parent instanceof IBreakpointContainer) { IBreakpointContainer container = (IBreakpointContainer)parent; - + // Test if this is a working set container. if (container.getCategory() instanceof WorkingSetCategory) { // Test if this container allows to remove this breakpoint. @@ -102,7 +102,7 @@ public class RemoveFromWorkingSetAction extends BreakpointSelectionAction { } return res.toArray(new BreakpointSetElement[res.size()]); } - + /* (non-Javadoc) * @see org.eclipse.jface.action.Action#isEnabled() */ @@ -113,7 +113,7 @@ public class RemoveFromWorkingSetAction extends BreakpointSelectionAction { } return false; } - + /* (non-Javadoc) * @see org.eclipse.ui.actions.BaseSelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SelectBreakpointWorkingsetDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SelectBreakpointWorkingsetDialog.java index 8f34d4dc9..6680193d7 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SelectBreakpointWorkingsetDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SelectBreakpointWorkingsetDialog.java @@ -28,14 +28,14 @@ import org.eclipse.ui.PlatformUI; /** * Dialog to allow the selection of working sets without all of the overhead of the * platform UI working set dialog - * + * * @since 3.3 */ public class SelectBreakpointWorkingsetDialog extends AbstractDebugCheckboxSelectionDialog { - + private static final String SETTINGS_ID = DebugUIPlugin.getUniqueIdentifier() + ".DELETE_ASSOCIATED_CONFIGS_DIALOG"; //$NON-NLS-1$ private IWorkingSet[] fWorkingSetList = null; - + /** * Constructor * @param parentShell the parent to open this dialog on @@ -44,7 +44,7 @@ public class SelectBreakpointWorkingsetDialog extends AbstractDebugCheckboxSelec super(parentShell); fWorkingSetList = getBreakpointWorkingSets(); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugCheckboxSelectionDialog#addViewerListeners(org.eclipse.jface.viewers.StructuredViewer) */ @@ -61,7 +61,7 @@ public class SelectBreakpointWorkingsetDialog extends AbstractDebugCheckboxSelec }); } } - + /** * Returns the current listing of breakpoint <code>IWorkingSet</code>s * @return an array of the current breakpoint <code>IWorkingSet</code>s @@ -76,7 +76,7 @@ public class SelectBreakpointWorkingsetDialog extends AbstractDebugCheckboxSelec } return list.toArray(new IWorkingSet[list.size()]); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerInput() */ @@ -84,7 +84,7 @@ public class SelectBreakpointWorkingsetDialog extends AbstractDebugCheckboxSelec protected Object getViewerInput() { return fWorkingSetList; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getDialogSettingsId() */ @@ -108,5 +108,5 @@ public class SelectBreakpointWorkingsetDialog extends AbstractDebugCheckboxSelec protected String getViewerLabel() { return BreakpointGroupMessages.SelectBreakpointWorkingsetDialog_0; } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SetDefaultBreakpointGroupAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SetDefaultBreakpointGroupAction.java index a1d7400eb..8b588fb98 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SetDefaultBreakpointGroupAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SetDefaultBreakpointGroupAction.java @@ -21,7 +21,7 @@ import org.eclipse.ui.IWorkingSet; * Action which prompts the user to set a default breakpoint group. */ public class SetDefaultBreakpointGroupAction extends AbstractBreakpointsViewAction { - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ToggleDefaultGroupAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ToggleDefaultGroupAction.java index ab11a7580..e7c599ed2 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ToggleDefaultGroupAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ToggleDefaultGroupAction.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 implementation *******************************************************************************/ @@ -23,9 +23,9 @@ import org.eclipse.ui.IWorkingSet; * Toggles the default breakpoint group based on selection. */ public class ToggleDefaultGroupAction extends AbstractBreakpointsViewAction { - + private IWorkingSet fSelectedSet; - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/WorkingSetsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/WorkingSetsAction.java index e9f1b2524..7682ce9aa 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/WorkingSetsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/WorkingSetsAction.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 implementation *******************************************************************************/ @@ -20,15 +20,15 @@ import org.eclipse.ui.dialogs.IWorkingSetSelectionDialog; * Allows the user to manage working sets. */ public class WorkingSetsAction extends AbstractBreakpointsViewAction { - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ @Override public void run(IAction action) { IWorkingSetSelectionDialog selectionDialog = PlatformUI.getWorkbench().getWorkingSetManager().createWorkingSetSelectionDialog( - DebugUIPlugin.getShell(), - false, + DebugUIPlugin.getShell(), + false, new String[] {IDebugUIConstants.BREAKPOINT_WORKINGSET_ID}); selectionDialog.open(); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointSortBy/SortBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointSortBy/SortBreakpointsAction.java index 1320f3291..e41d523fd 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointSortBy/SortBreakpointsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointSortBy/SortBreakpointsAction.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 implementation *******************************************************************************/ @@ -30,7 +30,7 @@ public class SortBreakpointsAction extends Action { /** * Creates a new action which will sort breakpoints in the given breakpoint * view using the given breakpoint container factory - * + * * @param factory the factory that will be applied to the given view when * this action is run * @param view the breakpoints view diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointSortBy/SortBreakpointsByAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointSortBy/SortBreakpointsByAction.java index 6e80676cb..c3628a179 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointSortBy/SortBreakpointsByAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointSortBy/SortBreakpointsByAction.java @@ -24,15 +24,15 @@ import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; /** - * + * */ public class SortBreakpointsByAction extends AbstractBreakpointsViewAction implements IMenuCreator { private IAction fAction= null; - + public SortBreakpointsByAction() { } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ @@ -72,7 +72,7 @@ public class SortBreakpointsByAction extends AbstractBreakpointsViewAction imple } fillMenu(m); } - }); + }); return menu; } @@ -80,7 +80,7 @@ public class SortBreakpointsByAction extends AbstractBreakpointsViewAction imple * Fill pull down menu with the "group by" options */ private void fillMenu(Menu menu) { - + // Add hard-coded sorting order by Name IAction action = new SortBreakpointsAction(fView, Messages.GroupBreakpointsSortByAction_Name, IInternalDebugUIConstants.BREAKPOINT_SORTING_ORDER_NAME); ActionContributionItem item = new ActionContributionItem(action); @@ -93,7 +93,7 @@ public class SortBreakpointsByAction extends AbstractBreakpointsViewAction imple } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/AccessWatchpointToggleAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/AccessWatchpointToggleAction.java index eaf4a3efc..402fe60f8 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/AccessWatchpointToggleAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/AccessWatchpointToggleAction.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 *******************************************************************************/ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsCollapseAllAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsCollapseAllAction.java index 557f84eff..e0849a7b9 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsCollapseAllAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsCollapseAllAction.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 * Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956) @@ -30,12 +30,12 @@ import org.eclipse.ui.IViewPart; import org.eclipse.ui.handlers.CollapseAllHandler; /** - * + * */ public class BreakpointsCollapseAllAction implements IViewActionDelegate, IActionDelegate2, IViewerUpdateListener, IModelChangedListener { - + private AbstractDebugView fView; - + private IAction fAction; /* (non-Javadoc) @@ -48,7 +48,7 @@ public class BreakpointsCollapseAllAction implements IViewActionDelegate, IActio if (viewer != null) { viewer.addViewerUpdateListener(this); viewer.addModelChangedListener(this); - } + } } /* (non-Javadoc) @@ -106,25 +106,25 @@ public class BreakpointsCollapseAllAction implements IViewActionDelegate, IActio @Override public void updateStarted(IViewerUpdate update) { } - + @Override public void updateComplete(IViewerUpdate update) { if (!update.isCanceled()) { if (TreePath.EMPTY.equals(update.getElementPath())) { update(); } - } + } } - + private void update() { IInternalTreeModelViewer viewer = (IInternalTreeModelViewer)fView.getViewer(); if (viewer != null && fAction != null) { fAction.setEnabled(viewer.getInput() != null && viewer.getChildCount(TreePath.EMPTY) > 0); } } - + @Override public void modelChanged(IModelDelta delta, IModelProxy proxy) { update(); - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsExpandAllAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsExpandAllAction.java index ed7834a04..9094d598b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsExpandAllAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsExpandAllAction.java @@ -30,8 +30,8 @@ import org.eclipse.ui.IViewPart; /** * Action which fully expands the tree in the breakpoints view. */ -public class BreakpointsExpandAllAction implements IViewActionDelegate, IActionDelegate2, IViewerUpdateListener, IModelChangedListener { - +public class BreakpointsExpandAllAction implements IViewActionDelegate, IActionDelegate2, IViewerUpdateListener, IModelChangedListener { + private IAction fAction; private BreakpointsView fView; @@ -55,7 +55,7 @@ public class BreakpointsExpandAllAction implements IViewActionDelegate, IActionD @Override public void runWithEvent(IAction action, Event event) { - run(action); + run(action); } /* (non-Javadoc) @@ -94,23 +94,23 @@ public class BreakpointsExpandAllAction implements IViewActionDelegate, IActionD @Override public void updateStarted(IViewerUpdate update) { } - + @Override public void updateComplete(IViewerUpdate update) { if (!update.isCanceled()) { if (TreePath.EMPTY.equals(update.getElementPath())) { update(); } - } + } } - + private void update() { IInternalTreeModelViewer viewer = (IInternalTreeModelViewer)fView.getViewer(); if (viewer != null && fAction != null) { fAction.setEnabled(viewer.getInput() != null && viewer.getChildCount(TreePath.EMPTY) > 0); } } - + @Override public void modelChanged(IModelDelta delta, IModelProxy proxy) { update(); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DeleteWorkingsetsMessageDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DeleteWorkingsetsMessageDialog.java index 8ba1149f9..2d1c5cef5 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DeleteWorkingsetsMessageDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DeleteWorkingsetsMessageDialog.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 *******************************************************************************/ @@ -33,32 +33,32 @@ import org.eclipse.swt.widgets.Shell; public class DeleteWorkingsetsMessageDialog extends MessageDialog { /** - * to determine if we should delete the working set as well + * to determine if we should delete the working set as well */ private boolean fDeleteWorkingsets = false; - + /** * to determine if we should delete all the breakpoints in the set. - * to maintain backward compatibility this is by default true + * to maintain backward compatibility this is by default true */ private boolean fDeleteBreakpoints = true; - + //widgets private Button fDeleteWS; private Button fDeleteBPS; - + // dialog settings private final static String DIALOG_SETTINGS = "DeleteBreakpointsDialogSettings"; //$NON-NLS-1$ private static final String DELETE_BREAKPOINTS = "DeleteBreakpoints"; //$NON-NLS-1$ private static final String DELETE_WORKINGSETS = "DeleteWorkingSets"; //$NON-NLS-1$ - + public DeleteWorkingsetsMessageDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage, int dialogImageType, String[] dialogButtonLabels, int defaultIndex) { super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex); IDialogSettings section = getDialogSettings(); fDeleteBreakpoints = section.getBoolean(DELETE_BREAKPOINTS); fDeleteWorkingsets = section.getBoolean(DELETE_WORKINGSETS); } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.MessageDialog#createCustomArea(org.eclipse.swt.widgets.Composite) */ @@ -78,7 +78,7 @@ public class DeleteWorkingsetsMessageDialog extends MessageDialog { getButton(0).setEnabled(fDeleteWS.getSelection() || fDeleteBPS.getSelection()); } }); - + fDeleteBPS = new Button(comp, SWT.CHECK); fDeleteBPS.setText(ActionMessages.DeleteWorkingsetsMessageDialog_1); fDeleteBPS.setFont(font); @@ -90,12 +90,12 @@ public class DeleteWorkingsetsMessageDialog extends MessageDialog { getButton(0).setEnabled(fDeleteWS.getSelection() || fDeleteBPS.getSelection()); } }); - + fDeleteWS.setSelection(fDeleteWorkingsets); fDeleteBPS.setSelection(fDeleteBreakpoints); return comp; } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.MessageDialog#buttonPressed(int) */ @@ -118,9 +118,9 @@ public class DeleteWorkingsetsMessageDialog extends MessageDialog { public boolean deleteWorkingset() { return fDeleteWorkingsets; } - + /** - * returns the checked state of the delete all breakpoints in working set check box + * returns the checked state of the delete all breakpoints in working set check box * @return the checked state of the delete all breakpoints... check box */ public boolean deleteAllBreakpoints() { @@ -129,7 +129,7 @@ public class DeleteWorkingsetsMessageDialog extends MessageDialog { /** * Returns the dialog settings for this dialog. - * + * * @return dialog settings */ protected IDialogSettings getDialogSettings() { @@ -143,7 +143,7 @@ public class DeleteWorkingsetsMessageDialog extends MessageDialog { } return section; } - - - + + + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DisableBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DisableBreakpointsAction.java index 9479fdd85..2082ded46 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DisableBreakpointsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DisableBreakpointsAction.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 *******************************************************************************/ @@ -12,7 +12,7 @@ package org.eclipse.debug.internal.ui.actions.breakpoints; public class DisableBreakpointsAction extends EnableBreakpointsAction { - + /** * If this action can enable breakpoints * @return always <code>false</code> diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/EnableBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/EnableBreakpointsAction.java index bcd689102..1fdb32f8c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/EnableBreakpointsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/EnableBreakpointsAction.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 *******************************************************************************/ @@ -38,13 +38,13 @@ import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.IWorkbenchWindow; public class EnableBreakpointsAction implements IViewActionDelegate, IPartListener, IBreakpointsListener { - + private IViewPart fView; private IAction fAction; - + public EnableBreakpointsAction() { } - + protected IViewPart getView() { return fView; } @@ -66,7 +66,7 @@ public class EnableBreakpointsAction implements IViewActionDelegate, IPartListen protected void update() { selectionChanged(getAction(), getView().getViewSite().getSelectionProvider().getSelection()); } - + /** * If this action can enable breakpoints * @return always <code>true</code> @@ -74,7 +74,7 @@ public class EnableBreakpointsAction implements IViewActionDelegate, IPartListen protected boolean isEnableAction() { return true; } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ @@ -85,9 +85,9 @@ public class EnableBreakpointsAction implements IViewActionDelegate, IPartListen if (size == 0) { return; } - + final Iterator<?> itr = selection.iterator(); - final MultiStatus ms= new MultiStatus(DebugUIPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, ActionMessages.EnableBreakpointAction_Enable_breakpoint_s__failed_2, null); + final MultiStatus ms= new MultiStatus(DebugUIPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, ActionMessages.EnableBreakpointAction_Enable_breakpoint_s__failed_2, null); IWorkspaceRunnable runnable = new IWorkspaceRunnable() { @Override public void run(IProgressMonitor monitor) { @@ -95,7 +95,7 @@ public class EnableBreakpointsAction implements IViewActionDelegate, IPartListen Object element= itr.next(); try { IBreakpoint[] breakpoints= null; - IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(element, IBreakpoint.class); + IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(element, IBreakpoint.class); if (breakpoint != null) { breakpoints= new IBreakpoint[] { breakpoint }; } else if (element instanceof IBreakpointContainer) { @@ -116,17 +116,17 @@ public class EnableBreakpointsAction implements IViewActionDelegate, IPartListen } } }; - + try { ResourcesPlugin.getWorkspace().run(runnable, null, 0, new NullProgressMonitor()); } catch (CoreException e) { // Exceptions are handled by runnable } - + if (!ms.isOK()) { IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow(); if (window != null) { - DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.EnableBreakpointAction_Enabling_breakpoints_3, ActionMessages.EnableBreakpointAction_Exceptions_occurred_enabling_the_breakpoint_s___4, ms); // + DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.EnableBreakpointAction_Enabling_breakpoints_3, ActionMessages.EnableBreakpointAction_Exceptions_occurred_enabling_the_breakpoint_s___4, ms); // } else { DebugUIPlugin.log(ms); } @@ -147,14 +147,14 @@ public class EnableBreakpointsAction implements IViewActionDelegate, IPartListen return; } IStructuredSelection sel= (IStructuredSelection)selection; - + Iterator<?> itr = sel.iterator(); boolean allEnabled= true; boolean allDisabled= true; while (itr.hasNext()) { Object selected= itr.next(); IBreakpoint bp = (IBreakpoint)DebugPlugin.getAdapter(selected, IBreakpoint.class); - + if (bp != null) { try { if (bp.isEnabled()) { @@ -165,7 +165,7 @@ public class EnableBreakpointsAction implements IViewActionDelegate, IPartListen } catch (CoreException ce) { handleException(ce); } - } + } else if (selected instanceof IBreakpointContainer) { IBreakpoint[] breakpoints = ((IBreakpointContainer) selected).getBreakpoints(); for (int i = 0; i < breakpoints.length; i++) { @@ -182,25 +182,25 @@ public class EnableBreakpointsAction implements IViewActionDelegate, IPartListen } else { return; } - + } - + if (isEnableAction()) { action.setEnabled(!allEnabled); } else { action.setEnabled(!allDisabled); } } - + private void handleException(CoreException ce) { IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow(); if (window != null) { - DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.EnableBreakpointAction_Enabling_breakpoints_3, ActionMessages.EnableBreakpointAction_Exceptions_occurred_enabling_the_breakpoint_s___4, ce); // + DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.EnableBreakpointAction_Enabling_breakpoints_3, ActionMessages.EnableBreakpointAction_Exceptions_occurred_enabling_the_breakpoint_s___4, ce); // } else { DebugUIPlugin.log(ce); } } - + /** * Removes this action as a breakpoint and part listener. @@ -209,22 +209,22 @@ public class EnableBreakpointsAction implements IViewActionDelegate, IPartListen DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this); getView().getViewSite().getPage().removePartListener(this); } - + /** * @see IBreakpointsListener#breakpointsAdded(IBreakpoint[]) */ @Override public void breakpointsAdded(IBreakpoint[] breakpoints) { } - + /** * @see IBreakpointsListener#breakpointsRemoved(IBreakpoint[], IMarkerDelta[]) */ @Override - public void breakpointsRemoved(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) { + public void breakpointsRemoved(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) { asynchUpdate(); } - + /** * @see IBreakpointsListener#breakpointsChanged(IBreakpoint[], IMarkerDelta[]) */ @@ -232,7 +232,7 @@ public class EnableBreakpointsAction implements IViewActionDelegate, IPartListen public void breakpointsChanged(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) { asynchUpdate(); } - + protected void asynchUpdate() { if (getAction() == null) { return; @@ -259,10 +259,10 @@ public class EnableBreakpointsAction implements IViewActionDelegate, IPartListen update(); } }; - + shell.getDisplay().asyncExec(r); } - + protected IAction getAction() { return fAction; } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/LinkBreakpointsWithDebugViewAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/LinkBreakpointsWithDebugViewAction.java index 70febda6b..0ab9af4bc 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/LinkBreakpointsWithDebugViewAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/LinkBreakpointsWithDebugViewAction.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 *******************************************************************************/ @@ -21,10 +21,10 @@ import org.eclipse.ui.IViewPart; * breakpoints view. */ public class LinkBreakpointsWithDebugViewAction implements IViewActionDelegate { - + private BreakpointsView fView; private IAction fAction= null; - + public LinkBreakpointsWithDebugViewAction() { } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/Messages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/Messages.java index aae625048..8f26be112 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/Messages.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/Messages.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 *******************************************************************************/ @@ -13,7 +13,7 @@ package org.eclipse.debug.internal.ui.actions.breakpoints; import org.eclipse.osgi.util.NLS; /** - * + * */ public class Messages extends NLS { private static final String BUNDLE_NAME = "org.eclipse.debug.internal.ui.actions.breakpoints.Messages"; //$NON-NLS-1$ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ModificationWatchpointToggleAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ModificationWatchpointToggleAction.java index 2f25ee1d7..c61d9e5aa 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ModificationWatchpointToggleAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ModificationWatchpointToggleAction.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 *******************************************************************************/ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ModifyWatchpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ModifyWatchpointAction.java index 0f146617b..123099dfa 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ModifyWatchpointAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ModifyWatchpointAction.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,7 +28,7 @@ import org.eclipse.ui.IWorkbenchPart; * Action that modifies a watchpoint's access/modification attributes */ public abstract class ModifyWatchpointAction implements IObjectActionDelegate, IActionDelegate2 { - + private IStructuredSelection fWatchpoints = null; /* (non-Javadoc) @@ -45,20 +45,20 @@ public abstract class ModifyWatchpointAction implements IObjectActionDelegate, I } } } catch (CoreException e) { - DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), ActionMessages.ModifyWatchpointAction_0, ActionMessages.ModifyWatchpointAction_1, e.getStatus()); // + DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), ActionMessages.ModifyWatchpointAction_0, ActionMessages.ModifyWatchpointAction_1, e.getStatus()); // } } - + /** * Toggles the watch point attribute to the given value. - * + * * @param watchpoint the watchpoint to toggle * @param b on or off * @throws CoreException if an exception occurs */ protected abstract void toggleWatchpoint(IWatchpoint watchpoint, boolean b) throws CoreException; - + /* (non-Javadoc) * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart) */ @@ -95,7 +95,7 @@ public abstract class ModifyWatchpointAction implements IObjectActionDelegate, I /** * Returns whether the action should be checke for the current selection - * + * * @param watchpoint selected watchpoint * @return whether the action should be checked for the current selection */ @@ -103,7 +103,7 @@ public abstract class ModifyWatchpointAction implements IObjectActionDelegate, I /** * Returns whether this action is enabled for the given watchpoint. - * + * * @param watchpoint the watchpoint to examine * @return whether this action is enabled for the given watchpoint */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java index 21130cca6..3e213a317 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java @@ -36,8 +36,8 @@ public class OpenBreakpointMarkerAction extends SelectionProviderAction { private IEditorInput input; public OpenBreakpointMarkerAction(ISelectionProvider selectionProvider) { - super(selectionProvider, ActionMessages.OpenBreakpointMarkerAction__Go_to_File_1); - setToolTipText(ActionMessages.OpenBreakpointMarkerAction_Go_to_File_for_Breakpoint_2); + super(selectionProvider, ActionMessages.OpenBreakpointMarkerAction__Go_to_File_1); + setToolTipText(ActionMessages.OpenBreakpointMarkerAction_Go_to_File_for_Breakpoint_2); setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.ui.ide", "icons/full/elcl16/gotoobj_tsk.png")); //$NON-NLS-1$ //$NON-NLS-2$ setDisabledImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.ui.ide", "icons/full/dlcl16/gotoobj_tsk.png")); //$NON-NLS-1$ //$NON-NLS-2$ PlatformUI.getWorkbench().getHelpSystem().setHelp( @@ -59,13 +59,13 @@ public class OpenBreakpointMarkerAction extends SelectionProviderAction { if (page == null) { return; } - + IStructuredSelection selection= getStructuredSelection(); if (selection.isEmpty()) { setEnabled(false); return; } - + IEditorPart part= null; if (input != null) { String editorId = fgPresentation.getEditorId(input, breakpoint); @@ -73,7 +73,7 @@ public class OpenBreakpointMarkerAction extends SelectionProviderAction { try { part= page.openEditor(input, editorId, true, IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID); } catch (PartInitException e) { - DebugUIPlugin.errorDialog(dwindow.getShell(), ActionMessages.OpenBreakpointMarkerAction_Go_to_Breakpoint_1, ActionMessages.OpenBreakpointMarkerAction_Exceptions_occurred_attempting_to_open_the_editor_for_the_breakpoint_resource_2, e); // + DebugUIPlugin.errorDialog(dwindow.getShell(), ActionMessages.OpenBreakpointMarkerAction_Go_to_Breakpoint_1, ActionMessages.OpenBreakpointMarkerAction_Exceptions_occurred_attempting_to_open_the_editor_for_the_breakpoint_resource_2, e); // } } } @@ -81,7 +81,7 @@ public class OpenBreakpointMarkerAction extends SelectionProviderAction { IDE.gotoMarker(part, breakpoint.getMarker()); } } - + /* (non-Javadoc) * @see org.eclipse.ui.actions.SelectionProviderAction#selectionChanged(org.eclipse.jface.viewers.IStructuredSelection) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllBreakpointsAction.java index ba21d1a6c..3aab6c525 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllBreakpointsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllBreakpointsAction.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.actions.breakpoints; - + import org.eclipse.swt.widgets.Shell; import org.eclipse.core.runtime.CoreException; @@ -54,8 +54,8 @@ public class RemoveAllBreakpointsAction extends AbstractRemoveAllActionDelegate @Override protected boolean isEnabled() { return DebugPlugin.getDefault().getBreakpointManager().hasBreakpoints(); - } - + } + /* (non-Javadoc) * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsAdded(org.eclipse.debug.core.model.IBreakpoint[]) */ @@ -80,7 +80,7 @@ public class RemoveAllBreakpointsAction extends AbstractRemoveAllActionDelegate update(); } } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#initialize() */ @@ -88,7 +88,7 @@ public class RemoveAllBreakpointsAction extends AbstractRemoveAllActionDelegate protected void initialize() { DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this); } - + /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose() */ @@ -116,7 +116,7 @@ public class RemoveAllBreakpointsAction extends AbstractRemoveAllActionDelegate boolean prompt = store.getBoolean(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_ALL_BREAKPOINTS); boolean proceed = true; if(prompt) { - MessageDialogWithToggle mdwt = MessageDialogWithToggle.openYesNoQuestion(window.getShell(), ActionMessages.RemoveAllBreakpointsAction_0, + MessageDialogWithToggle mdwt = MessageDialogWithToggle.openYesNoQuestion(window.getShell(), ActionMessages.RemoveAllBreakpointsAction_0, ActionMessages.RemoveAllBreakpointsAction_1, ActionMessages.RemoveAllBreakpointsAction_3, !prompt, null, null); if(mdwt.getReturnCode() != IDialogConstants.YES_ID){ proceed = false; @@ -124,7 +124,7 @@ public class RemoveAllBreakpointsAction extends AbstractRemoveAllActionDelegate else { store.setValue(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_ALL_BREAKPOINTS, !mdwt.getToggleState()); } - } + } if (proceed) { new Job(ActionMessages.RemoveAllBreakpointsAction_2) { @Override diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllTriggerPointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllTriggerPointsAction.java index 5b6ec2e67..af319aca6 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllTriggerPointsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllTriggerPointsAction.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.actions.breakpoints; - + import org.eclipse.core.resources.IMarkerDelta; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; @@ -42,8 +42,8 @@ public class RemoveAllTriggerPointsAction extends AbstractRemoveAllActionDelegat @Override protected boolean isEnabled() { return DebugPlugin.getDefault().getBreakpointManager().getTriggerPoints().length > 0; - } - + } + /* (non-Javadoc) * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsAdded(org.eclipse.debug.core.model.IBreakpoint[]) */ @@ -69,7 +69,7 @@ public class RemoveAllTriggerPointsAction extends AbstractRemoveAllActionDelegat update(); } } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#initialize() */ @@ -77,7 +77,7 @@ public class RemoveAllTriggerPointsAction extends AbstractRemoveAllActionDelegat protected void initialize() { DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this); } - + /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.java index ca66a268c..70b7fa67f 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.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 * Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956) @@ -45,7 +45,7 @@ import org.eclipse.ui.IWorkingSet; import org.eclipse.ui.PlatformUI; public class RemoveBreakpointAction extends AbstractSelectionActionDelegate { - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ @@ -65,7 +65,7 @@ public class RemoveBreakpointAction extends AbstractSelectionActionDelegate { boolean deleteAll = false; boolean deleteContainer = false; boolean prompted = false; - while (itr.hasNext()) { + while (itr.hasNext()) { Object next= itr.next(); IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(next, IBreakpoint.class); if (breakpoint != null) { @@ -99,7 +99,7 @@ public class RemoveBreakpointAction extends AbstractSelectionActionDelegate { IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore(); prompted = store.getBoolean(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_BREAKPOINTS_FROM_CONTAINER); if(prompted) { - MessageDialogWithToggle mdwt = MessageDialogWithToggle.openYesNoQuestion(getView().getSite().getShell(), ActionMessages.RemoveBreakpointAction_0, + MessageDialogWithToggle mdwt = MessageDialogWithToggle.openYesNoQuestion(getView().getSite().getShell(), ActionMessages.RemoveBreakpointAction_0, ActionMessages.RemoveBreakpointAction_1, ActionMessages.RemoveAllBreakpointsAction_3, !prompted, null, null); if(mdwt.getReturnCode() == IDialogConstants.NO_ID) { deleteAll = false; @@ -127,7 +127,7 @@ public class RemoveBreakpointAction extends AbstractSelectionActionDelegate { if(breakpoints.length > 0) { ((BreakpointsView)getView()).preserveSelection(getSelection()); } - new Job(ActionMessages.RemoveBreakpointAction_2) { + new Job(ActionMessages.RemoveBreakpointAction_2) { @Override protected IStatus run(IProgressMonitor pmonitor) { try { @@ -142,7 +142,7 @@ public class RemoveBreakpointAction extends AbstractSelectionActionDelegate { DebugUIPlugin.log(e); } return Status.CANCEL_STATUS; - } + } }.schedule(); } }; @@ -154,13 +154,13 @@ public class RemoveBreakpointAction extends AbstractSelectionActionDelegate { if (exception[0] != null) { IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow(); if (window != null) { - DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.RemoveBreakpointAction_Removing_a_breakpoint_4,ActionMessages.RemoveBreakpointAction_Exceptions_occurred_attempting_to_remove_a_breakpoint__5 , exception[0]); + DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.RemoveBreakpointAction_Removing_a_breakpoint_4,ActionMessages.RemoveBreakpointAction_Exceptions_occurred_attempting_to_remove_a_breakpoint__5 , exception[0]); } else { DebugUIPlugin.log(exception[0]); } } } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.AbstractSelectionActionDelegate#isEnabledFor(java.lang.Object) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetBreakpointAction.java index ef20e9e9d..cc0ff8655 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetBreakpointAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetBreakpointAction.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 * Wind River Systems - added support for IToggleBreakpointsTargetFactory @@ -26,13 +26,13 @@ import org.eclipse.ui.IWorkbenchWindow; /** * Retargettable breakpoint action. - * + * * @since 3.0 */ public abstract class RetargetBreakpointAction extends RetargetAction implements IToggleBreakpointsTargetManagerListener { - + private IAction fAction; - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.RetargetAction#getAdapterClass() */ @@ -40,7 +40,7 @@ public abstract class RetargetBreakpointAction extends RetargetAction implements protected Class<?> getAdapterClass() { return IToggleBreakpointsTarget.class; } - + @Override protected Object getAdapter(IAdaptable adaptable) { IToggleBreakpointsTargetManager manager = DebugUITools.getToggleBreakpointsTargetManager(); @@ -56,25 +56,25 @@ public abstract class RetargetBreakpointAction extends RetargetAction implements super.init(window); DebugUITools.getToggleBreakpointsTargetManager().addChangedListener(this); } - + @Override public void init(IAction action) { super.init(action); DebugUITools.getToggleBreakpointsTargetManager().addChangedListener(this); } - + @Override public void dispose() { DebugUITools.getToggleBreakpointsTargetManager().removeChangedListener(this); super.dispose(); } - + @Override public void selectionChanged(IAction action, ISelection selection) { fAction = action; super.selectionChanged(action, selection); } - + @Override public void preferredTargetsChanged() { if (fAction != null) { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetMethodBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetMethodBreakpointAction.java index c9a01b9e7..4b61fdc3d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetMethodBreakpointAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetMethodBreakpointAction.java @@ -18,11 +18,11 @@ import org.eclipse.ui.IWorkbenchPart; /** * Global retargettable toggle method breakpoint action. - * + * * @since 3.0 */ public class RetargetMethodBreakpointAction extends RetargetBreakpointAction { - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.RetargetBreakpointAction#performAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetToggleBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetToggleBreakpointAction.java index 22a018e26..72e706911 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetToggleBreakpointAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetToggleBreakpointAction.java @@ -19,11 +19,11 @@ import org.eclipse.ui.IWorkbenchPart; /** * Global retargettable toggle breakpoint action. - * + * * @since 3.3 */ public class RetargetToggleBreakpointAction extends RetargetBreakpointAction { - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.RetargetBreakpointAction#performAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart) */ @@ -54,5 +54,5 @@ public class RetargetToggleBreakpointAction extends RetargetBreakpointAction { @Override protected String getOperationUnavailableMessage() { return Messages.RetargetToggleBreakpointAction_0; - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetToggleLineBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetToggleLineBreakpointAction.java index 58d5ed5c0..df8e84132 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetToggleLineBreakpointAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetToggleLineBreakpointAction.java @@ -18,11 +18,11 @@ import org.eclipse.ui.IWorkbenchPart; /** * Global retargettable toggle line breakpoint action. - * + * * @since 3.0 */ public class RetargetToggleLineBreakpointAction extends RetargetBreakpointAction { - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.RetargetBreakpointAction#performAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart) */ @@ -43,5 +43,5 @@ public class RetargetToggleLineBreakpointAction extends RetargetBreakpointAction @Override protected String getOperationUnavailableMessage() { return Messages.RetargetToggleLineBreakpointAction_0; - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetWatchpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetWatchpointAction.java index 49fdb0a81..e19fdcade 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetWatchpointAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetWatchpointAction.java @@ -18,11 +18,11 @@ import org.eclipse.ui.IWorkbenchPart; /** * Global retargettable toggle watchpoint action. - * + * * @since 3.0 */ public class RetargetWatchpointAction extends RetargetBreakpointAction { - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.RetargetBreakpointAction#performAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart) */ @@ -43,5 +43,5 @@ public class RetargetWatchpointAction extends RetargetBreakpointAction { @Override protected String getOperationUnavailableMessage() { return Messages.RetargetWatchpointAction_0; - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RulerEnableDisableBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RulerEnableDisableBreakpointAction.java index 777f08a49..ad1e21a3c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RulerEnableDisableBreakpointAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RulerEnableDisableBreakpointAction.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,9 +25,9 @@ import org.eclipse.ui.texteditor.IUpdate; * */ public class RulerEnableDisableBreakpointAction extends RulerBreakpointAction implements IUpdate { - + private IBreakpoint fBreakpoint; - + public RulerEnableDisableBreakpointAction(ITextEditor editor, IVerticalRulerInfo info) { super(editor, info); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SelectAllBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SelectAllBreakpointsAction.java index 34f7b05c8..08963a02b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SelectAllBreakpointsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SelectAllBreakpointsAction.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 * Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956) @@ -33,13 +33,13 @@ public class SelectAllBreakpointsAction extends SelectAllAction implements IBrea } @Override - public void run(IAction action) { + public void run(IAction action) { Viewer viewer = ((AbstractDebugView) getView()).getViewer(); ((Tree) viewer.getControl()).selectAll(); // ensure that the selection change callback is fired viewer.setSelection(viewer.getSelection()); } - + /* (non-Javadoc) * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsAdded(org.eclipse.debug.core.model.IBreakpoint[]) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.java index 407beb12a..d4ba34a0e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.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 * Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956) @@ -45,27 +45,27 @@ import org.eclipse.ui.PlatformUI; * An view filter action that filters showing breakpoints based on whether * the IDebugTarget of the selected debug element in the launch view supports * the breakpoints. - * + * * @see org.eclipse.debug.core.model.IDebugTarget#supportsBreakpoint(IBreakpoint) - * + * */ -public class ShowSupportedBreakpointsAction extends ToggleFilterAction implements ISelectionListener { +public class ShowSupportedBreakpointsAction extends ToggleFilterAction implements ISelectionListener { /** * The view associated with this action */ private AbstractDebugView fView; - + /** * The list of identifiers for the current state */ private List<IDebugTarget> fDebugTargets= new ArrayList<IDebugTarget>(2); - + /** * A viewer filter that selects breakpoints that have * the same model identifier as the selected debug element */ class BreakpointFilter extends ViewerFilter { - + /** * @see ViewerFilter#select(Viewer, Object, Object) */ @@ -89,7 +89,7 @@ public class ShowSupportedBreakpointsAction extends ToggleFilterAction implement if (target.supportsBreakpoint(breakpoint)) { return true; } - + } return false; } @@ -98,29 +98,29 @@ public class ShowSupportedBreakpointsAction extends ToggleFilterAction implement public ShowSupportedBreakpointsAction(StructuredViewer viewer, IViewPart view) { super(); - setText(ActionMessages.ShowSupportedBreakpointsAction_Show_For_Selected); - setToolTipText(ActionMessages.ShowSupportedBreakpointsAction_tooltip); + setText(ActionMessages.ShowSupportedBreakpointsAction_Show_For_Selected); + setToolTipText(ActionMessages.ShowSupportedBreakpointsAction_tooltip); setViewerFilter(new BreakpointFilter()); setViewer(viewer); setImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET)); setChecked(false); setId(DebugUIPlugin.getUniqueIdentifier() + ".ShowSupportedBreakpointsAction"); //$NON-NLS-1$ - + setView(view); PlatformUI.getWorkbench().getHelpSystem().setHelp( this, IDebugHelpContextIds.SHOW_BREAKPOINTS_FOR_MODEL_ACTION); - + } - - + + public void dispose() { if (isChecked()) { getView().getSite().getPage().removeSelectionListener(IDebugUIConstants.ID_DEBUG_VIEW, this); } } - + /** * @see ISelectionListener#selectionChanged(IWorkbenchPart, ISelection) */ @@ -136,7 +136,7 @@ public class ShowSupportedBreakpointsAction extends ToggleFilterAction implement if (debugTargets.isEmpty()) { if(fDebugTargets.isEmpty()) { return; - } + } reapplyFilters(debugTargets); return; } @@ -144,7 +144,7 @@ public class ShowSupportedBreakpointsAction extends ToggleFilterAction implement reapplyFilters(debugTargets); return; } - + if (debugTargets.size() == fDebugTargets.size()) { List<IDebugTarget> copy= new ArrayList<IDebugTarget>(debugTargets.size()); for (IDebugTarget target : fDebugTargets) { @@ -162,29 +162,29 @@ public class ShowSupportedBreakpointsAction extends ToggleFilterAction implement return; } reapplyFilters(copy); - } + } } } - + /** * Selection has changed in the debug view * need to re-apply the filters. * @param debugTargets the new set of {@link IDebugTarget}s */ protected void reapplyFilters(List<IDebugTarget> debugTargets) { - fDebugTargets= debugTargets; + fDebugTargets= debugTargets; getViewer().refresh(); } - + protected IViewPart getView() { return fView; } - protected void setView(IViewPart view) { + protected void setView(IViewPart view) { fView = (AbstractDebugView) view; } - + protected List<IDebugTarget> getDebugTargets(IStructuredSelection ss) { List<IDebugTarget> debugTargets= new ArrayList<IDebugTarget>(2); Iterator<?> i= ss.iterator(); @@ -202,15 +202,15 @@ public class ShowSupportedBreakpointsAction extends ToggleFilterAction implement if (target != null) { debugTargets.add(target); } - } + } } return debugTargets; } - + /** * Adds or removes the viewer filter depending * on the value of the parameter. - * @param on flag to indicate if viewer filtering should be added or removed + * @param on flag to indicate if viewer filtering should be added or removed */ @Override protected void valueChanged(boolean on) { @@ -227,5 +227,5 @@ public class ShowSupportedBreakpointsAction extends ToggleFilterAction implement super.valueChanged(on); fView.getViewer().refresh(); } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowTargetBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowTargetBreakpointsAction.java index c043a359f..a9c0dce4f 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowTargetBreakpointsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowTargetBreakpointsAction.java @@ -21,7 +21,7 @@ import org.eclipse.ui.PlatformUI; /** * This class implements the show target breakpoint action. - * + * * @since 3.6 */ public class ShowTargetBreakpointsAction extends Action { @@ -29,24 +29,24 @@ public class ShowTargetBreakpointsAction extends Action { * Breakpoints view */ BreakpointsView fView; - + /** * Constructor. - * + * * @param view the breakpoints view */ public ShowTargetBreakpointsAction(BreakpointsView view) { super(); - + fView = view; - - setText(ActionMessages.ShowSupportedBreakpointsAction_Show_For_Selected); - setToolTipText(ActionMessages.ShowSupportedBreakpointsAction_tooltip); - + + setText(ActionMessages.ShowSupportedBreakpointsAction_Show_For_Selected); + setToolTipText(ActionMessages.ShowSupportedBreakpointsAction_tooltip); + setImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET)); setChecked(false); setId(DebugUIPlugin.getUniqueIdentifier() + ".ShowSupportedBreakpointsAction"); //$NON-NLS-1$ - + PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.SHOW_BREAKPOINTS_FOR_MODEL_ACTION); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SkipAllBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SkipAllBreakpointsAction.java index a5de1715f..dcf3c4cb7 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SkipAllBreakpointsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SkipAllBreakpointsAction.java @@ -37,35 +37,35 @@ import org.eclipse.ui.progress.IWorkbenchSiteProgressService; /** * An action which toggles the breakpoint manager's enablement. * This causes debug targets which honor the manager's enablement - * to skip (not suspend for) all breakpoints. - * + * to skip (not suspend for) all breakpoints. + * * This class also implements the window action delegate for the action presented as * part of the "Breakpoints" group for the "Run" menu. */ public class SkipAllBreakpointsAction extends Action implements IWorkbenchWindowActionDelegate, IActionDelegate2, IBreakpointManagerListener { - + public static final String ACTION_ID = "org.eclipse.debug.ui.actions.SkipAllBreakpoints"; //$NON-NLS-1$ public static final String ACTION_DEFINITION_ID = "org.eclipse.debug.ui.commands.SkipAllBreakpoints"; //$NON-NLS-1$ - + //The real action if this is an action delegate private IAction fAction; - + /** * Workbench part or <code>null</code> if not installed in a part */ private IWorkbenchPart fPart = null; - + public SkipAllBreakpointsAction() { - super(ActionMessages.SkipAllBreakpointsAction_0, AS_CHECK_BOX); - setToolTipText(ActionMessages.SkipAllBreakpointsAction_0); - setDescription(ActionMessages.SkipAllBreakpointsAction_2); + super(ActionMessages.SkipAllBreakpointsAction_0, AS_CHECK_BOX); + setToolTipText(ActionMessages.SkipAllBreakpointsAction_0); + setDescription(ActionMessages.SkipAllBreakpointsAction_2); setImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_SKIP_BREAKPOINTS)); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.SKIP_ALL_BREAKPOINT_ACTION); } - + /** * Constructs an action in the given part. - * + * * @param part the part this action is created for */ public SkipAllBreakpointsAction(IWorkbenchPart part) { @@ -74,7 +74,7 @@ public class SkipAllBreakpointsAction extends Action implements IWorkbenchWindow setId(ACTION_ID); // set action ID when created programmatically. updateActionCheckedState(); } - + /* (non-Javadoc) * @see org.eclipse.jface.action.IAction#run() */ @@ -102,7 +102,7 @@ public class SkipAllBreakpointsAction extends Action implements IWorkbenchWindow job.schedule(); } } - + /** * Updates the action's checked state to be opposite the enabled * state of the breakpoint manager. @@ -114,16 +114,16 @@ public class SkipAllBreakpointsAction extends Action implements IWorkbenchWindow setChecked(!getBreakpointManager().isEnabled()); } } - + /** * Returns the global breakpoint manager. - * + * * @return the global breakpoint manager */ public static IBreakpointManager getBreakpointManager() { return DebugPlugin.getDefault().getBreakpointManager(); } - + /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose() */ @@ -131,7 +131,7 @@ public class SkipAllBreakpointsAction extends Action implements IWorkbenchWindow public void dispose() { getBreakpointManager().removeBreakpointManagerListener(this); } - + /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow) */ @@ -140,20 +140,20 @@ public class SkipAllBreakpointsAction extends Action implements IWorkbenchWindow updateActionCheckedState(); getBreakpointManager().addBreakpointManagerListener(this); } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ @Override public void run(IAction action) { setChecked(action.isChecked()); - run(); + run(); // when run from the workbench window action, need to keep view action state in synch (in case view has been closed) String prefKey = IDebugUIConstants.ID_BREAKPOINT_VIEW + '+' + action.getId(); IPreferenceStore prefStore = DebugUIPlugin.getDefault().getPreferenceStore(); prefStore.setValue(prefKey, action.isChecked()); } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ToggleBreakpointObjectActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ToggleBreakpointObjectActionDelegate.java index 67c176de8..97170da0f 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ToggleBreakpointObjectActionDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ToggleBreakpointObjectActionDelegate.java @@ -26,16 +26,16 @@ import org.eclipse.ui.IWorkbenchPart; /** * A toggle breakpoint action that can be contributed to an object. The action * will perform a toggle breakpoint operation for a selected object. - * + * * <p>Clients may subclass this class.</p> - * + * * @since 3.0 */ public abstract class ToggleBreakpointObjectActionDelegate implements IObjectActionDelegate, IActionDelegate2 { - + private IWorkbenchPart fPart; private IStructuredSelection fSelection; - + /* (non-Javadoc) * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart) */ @@ -48,7 +48,7 @@ public abstract class ToggleBreakpointObjectActionDelegate implements IObjectAct */ @Override public void run(IAction action) { - IToggleBreakpointsTarget target = + IToggleBreakpointsTarget target = DebugUITools.getToggleBreakpointsTargetManager().getToggleBreakpointsTarget(fPart, fSelection); if (target != null) { try { @@ -61,14 +61,14 @@ public abstract class ToggleBreakpointObjectActionDelegate implements IObjectAct /** * Performs the operation specific to this action. - * + * * @param target adapter to toggle breakpoints * @param part the active part * @param selection the selection in the active part * @exception CoreException if an exception occurs */ protected abstract void performAction(IToggleBreakpointsTarget target, IWorkbenchPart part, ISelection selection) throws CoreException; - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) */ @@ -81,7 +81,7 @@ public abstract class ToggleBreakpointObjectActionDelegate implements IObjectAct // selectionChagned() can sometimes be called before setActivePart(). // Guard here against that possibility. if (fPart != null) { - IToggleBreakpointsTarget target = + IToggleBreakpointsTarget target = DebugUITools.getToggleBreakpointsTargetManager().getToggleBreakpointsTarget(fPart, fSelection); enabled = target != null; } @@ -94,7 +94,7 @@ public abstract class ToggleBreakpointObjectActionDelegate implements IObjectAct @Override public void init(IAction action) { } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate2#dispose() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/AddWatchExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/AddWatchExpressionAction.java index 4eb881fd3..2b879d49a 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/AddWatchExpressionAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/AddWatchExpressionAction.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 *******************************************************************************/ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ConvertToWatchExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ConvertToWatchExpressionAction.java index 7c72b9ff8..b09f85f88 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ConvertToWatchExpressionAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ConvertToWatchExpressionAction.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 *******************************************************************************/ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/DisableWatchExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/DisableWatchExpressionAction.java index 0f0a291ea..a7694a245 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/DisableWatchExpressionAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/DisableWatchExpressionAction.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 *******************************************************************************/ @@ -12,10 +12,10 @@ package org.eclipse.debug.internal.ui.actions.expressions; /** - * + * */ public class DisableWatchExpressionAction extends EnableWatchExpressionAction { - + public DisableWatchExpressionAction() { fEnable= false; } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EditWatchExpressinInPlaceAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EditWatchExpressinInPlaceAction.java index 084ac1384..2299e3b82 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EditWatchExpressinInPlaceAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EditWatchExpressinInPlaceAction.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: * Wind River Systems - initial API and implementation *******************************************************************************/ @@ -21,25 +21,25 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; /** - * This action activates the cell editor in the expressions view to edit the - * expression string. If no expression column found or for multi-line - * expressions, revert to the + * This action activates the cell editor in the expressions view to edit the + * expression string. If no expression column found or for multi-line + * expressions, revert to the */ public class EditWatchExpressinInPlaceAction extends Action implements ISelectionChangedListener { private ExpressionView fView; private TreeModelViewer fViewer; private EditWatchExpressionAction fEditActionDelegate = new EditWatchExpressionAction(); - + public EditWatchExpressinInPlaceAction(ExpressionView view) { fView = view; fViewer = (TreeModelViewer)view.getViewer(); fEditActionDelegate.init(view); - ISelectionProvider selectionProvider = fView.getSite().getSelectionProvider(); + ISelectionProvider selectionProvider = fView.getSite().getSelectionProvider(); selectionProvider.addSelectionChangedListener(this); fEditActionDelegate.selectionChanged(this, selectionProvider.getSelection()); } - + @Override public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection selection = fEditActionDelegate.getCurrentSelection(); @@ -49,16 +49,16 @@ public class EditWatchExpressinInPlaceAction extends Action implements ISelectio public void dispose() { fView.getSite().getSelectionProvider().removeSelectionChangedListener(this); } - + @Override public void run() { IStructuredSelection selelection = fEditActionDelegate.getCurrentSelection(); - + if (selelection.size() != 1) { return; } - // Always edit multi-line expressions in dialog. Otherwise try to find the expression + // Always edit multi-line expressions in dialog. Otherwise try to find the expression // column and activate cell editor there. int expressionColumn = getExpressionColumnIndex(); IWatchExpression[] expressions = fEditActionDelegate.getSelectedExpressions(); @@ -68,12 +68,12 @@ public class EditWatchExpressinInPlaceAction extends Action implements ISelectio fEditActionDelegate.run(this); } } - + private boolean isWatchExpressionWithNewLine(IWatchExpression[] expressions) { - return expressions.length == 1 && + return expressions.length == 1 && expressions[0].getExpressionText().indexOf('\n') != -1; } - + private int getExpressionColumnIndex() { Object[] columnProperties = fViewer.getColumnProperties(); for (int i = 0; columnProperties != null && i < columnProperties.length; i++) { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EditWatchExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EditWatchExpressionAction.java index fb21f03c3..758ddf952 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EditWatchExpressionAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EditWatchExpressionAction.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 * Wind River Systems - integration with non-standard debug models (Bug 209883) diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EnableWatchExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EnableWatchExpressionAction.java index 17f06b692..24e82d56f 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EnableWatchExpressionAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EnableWatchExpressionAction.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 * Wind River Systems - integration with non-standard debug models (Bug 209883) @@ -27,7 +27,7 @@ import org.eclipse.ui.IViewActionDelegate; import org.eclipse.ui.IViewPart; /** - * + * */ public class EnableWatchExpressionAction implements IViewActionDelegate, IActionDelegate2, IDebugEventSetListener { @@ -143,6 +143,6 @@ public class EnableWatchExpressionAction implements IViewActionDelegate, IAction } } } - + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/PasteWatchExpressionsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/PasteWatchExpressionsAction.java index a474de8dc..d2b7cece8 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/PasteWatchExpressionsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/PasteWatchExpressionsAction.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: * Adobe Systems, Inc. - initial API and implementation *******************************************************************************/ @@ -46,6 +46,6 @@ public class PasteWatchExpressionsAction extends SelectionListenerAction { return fExpressionView.canPaste(); } - - + + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ReevaluateWatchExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ReevaluateWatchExpressionAction.java index b20041e7e..8a9c51e4e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ReevaluateWatchExpressionAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ReevaluateWatchExpressionAction.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 * Wind River Systems - integration with non-standard debug models (Bug 209883) @@ -36,7 +36,7 @@ public class ReevaluateWatchExpressionAction implements IObjectActionDelegate { @Override public void setActivePart(IAction action, IWorkbenchPart targetPart) { } - + /** * Finds the currently selected context in the UI. * @return the current debug context @@ -78,7 +78,7 @@ public class ReevaluateWatchExpressionAction implements IObjectActionDelegate { } } } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveAllExpressionsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveAllExpressionsAction.java index 682411595..ea71b5a0a 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveAllExpressionsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveAllExpressionsAction.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.actions.expressions; - + import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.IExpressionManager; import org.eclipse.debug.core.IExpressionsListener; @@ -35,13 +35,13 @@ public class RemoveAllExpressionsAction extends AbstractRemoveAllActionDelegate */ @Override public void run(IAction action) { - IWorkbenchWindow window = DebugUIPlugin.getActiveWorkbenchWindow(); + IWorkbenchWindow window = DebugUIPlugin.getActiveWorkbenchWindow(); if (window != null) { IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore(); boolean prompt = store.getBoolean(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_ALL_EXPRESSIONS); boolean proceed = true; if (prompt) { - MessageDialogWithToggle mdwt = MessageDialogWithToggle.openYesNoQuestion(window.getShell(), ActionMessages.RemoveAllExpressionsAction_0, + MessageDialogWithToggle mdwt = MessageDialogWithToggle.openYesNoQuestion(window.getShell(), ActionMessages.RemoveAllExpressionsAction_0, ActionMessages.RemoveAllExpressionsAction_1, ActionMessages.RemoveAllBreakpointsAction_3, !prompt, null, null); if(mdwt.getReturnCode() != IDialogConstants.YES_ID){ proceed = false; @@ -57,7 +57,7 @@ public class RemoveAllExpressionsAction extends AbstractRemoveAllActionDelegate } } } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#isEnabled() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveExpressionAction.java index b3b1a03e8..25c40ec5c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveExpressionAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveExpressionAction.java @@ -29,7 +29,7 @@ import org.eclipse.jface.viewers.TreeSelection; import org.eclipse.ui.progress.WorkbenchJob; public class RemoveExpressionAction extends AbstractSelectionActionDelegate { - + protected IExpression[] getExpressions() { TreeSelection selection = (TreeSelection) getSelection(); TreePath[] paths = selection.getPaths(); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/SelectAllExpressionsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/SelectAllExpressionsAction.java index c777d0684..c238c5217 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/SelectAllExpressionsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/SelectAllExpressionsAction.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 *******************************************************************************/ @@ -33,7 +33,7 @@ public class SelectAllExpressionsAction extends SelectAllAction implements IExpr protected String getActionId() { return IDebugView.SELECT_ALL_ACTION + ".Variables"; //$NON-NLS-1$ } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.AbstractRemoveAllActionDelegate#initialize() */ @@ -62,9 +62,9 @@ public class SelectAllExpressionsAction extends SelectAllAction implements IExpr * @see org.eclipse.debug.core.IExpressionsListener#expressionsChanged(org.eclipse.debug.core.model.IExpression[]) */ @Override - public void expressionsChanged(IExpression[] expressions) { + public void expressionsChanged(IExpression[] expressions) { } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.actions.AbstractRemoveAllActionDelegate#dispose() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionAction.java index 237fd5aef..0f61d579a 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionAction.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 * Wind River Systems - integration with non-standard debug models (Bug 209883) @@ -38,8 +38,8 @@ import org.eclipse.ui.IWorkbenchPart; public abstract class WatchExpressionAction implements IViewActionDelegate { IWorkbenchPart fPart = null; - private static IWatchExpression[] EMPTY_EXPRESSION_ARRAY = new IWatchExpression[0]; - + private static IWatchExpression[] EMPTY_EXPRESSION_ARRAY = new IWatchExpression[0]; + @Override public void init(IViewPart view) { fPart = view; @@ -61,12 +61,12 @@ public abstract class WatchExpressionAction implements IViewActionDelegate { } protected IWatchExpression[] getSelectedExpressions() { - List<Object> list = new LinkedList<Object>(); + List<Object> list = new LinkedList<Object>(); IStructuredSelection currentSelection = getCurrentSelection(); if (currentSelection == null) { return EMPTY_EXPRESSION_ARRAY; } - + for (Iterator<?> iter= currentSelection.iterator(); iter.hasNext();) { Object element = iter.next(); if (element instanceof IWatchExpression) { @@ -82,10 +82,10 @@ public abstract class WatchExpressionAction implements IViewActionDelegate { return EMPTY_EXPRESSION_ARRAY; } } - + return list.toArray(new IWatchExpression[list.size()]); } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) */ @@ -106,7 +106,7 @@ public abstract class WatchExpressionAction implements IViewActionDelegate { /** * Displays the given error message in the status line. - * + * * @param message the message to display */ protected void showErrorMessage(String message) { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionDialog.java index e76d08056..b1ca7f0f1 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionDialog.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 * Mike Morearty - Bug 271411 @@ -58,7 +58,7 @@ public class WatchExpressionDialog extends StatusDialog { * The detail formatter to edit. */ private IWatchExpression fWatchExpression; - + // widgets private SourceViewer fSnippetViewer; private Button fCheckBox; @@ -70,10 +70,10 @@ public class WatchExpressionDialog extends StatusDialog { setShellStyle(getShellStyle() | SWT.MAX | SWT.RESIZE); String helpContextId = null; if (editDialog) { - setTitle(ActionMessages.WatchExpressionDialog_0); + setTitle(ActionMessages.WatchExpressionDialog_0); helpContextId = IDebugHelpContextIds.EDIT_WATCH_EXPRESSION_DIALOG; } else { - setTitle(ActionMessages.WatchExpressionDialog_1); + setTitle(ActionMessages.WatchExpressionDialog_1); helpContextId = IDebugHelpContextIds.ADD_WATCH_EXPRESSION_DIALOG; } PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, helpContextId); @@ -87,7 +87,7 @@ public class WatchExpressionDialog extends StatusDialog { @Override protected Control createDialogArea(Composite parent) { Font font = parent.getFont(); - + Composite container = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); container.setLayout(layout); @@ -96,14 +96,14 @@ public class WatchExpressionDialog extends StatusDialog { // snippet label Label label = new Label(container, SWT.NONE); - label.setText(ActionMessages.WatchExpressionDialog_2); + label.setText(ActionMessages.WatchExpressionDialog_2); gd= new GridData(GridData.BEGINNING); label.setLayoutData(gd); label.setFont(font); - + fSnippetViewer = new SourceViewer(container, null, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.LEFT_TO_RIGHT); fSnippetViewer.setInput(this); - + IDocument document = new Document(); fSnippetViewer.configure(new SourceViewerConfiguration()); fSnippetViewer.setEditable(true); @@ -159,7 +159,7 @@ public class WatchExpressionDialog extends StatusDialog { // enable checkbox fCheckBox= new Button(container, SWT.CHECK | SWT.LEFT); - fCheckBox.setText(ActionMessages.WatchExpressionDialog_3); + fCheckBox.setText(ActionMessages.WatchExpressionDialog_3); fCheckBox.setSelection(fWatchExpression.isEnabled()); fCheckBox.setFont(font); @@ -176,7 +176,7 @@ public class WatchExpressionDialog extends StatusDialog { /** * Returns a string representation of the "Ctrl+Return" key sequence. - * + * * @return a string representation of the "Ctrl+Return" key sequence. */ private String getCtrlReturnText() { @@ -197,14 +197,14 @@ public class WatchExpressionDialog extends StatusDialog { fWatchExpression.setExpressionText(fSnippetViewer.getDocument().get()); super.okPressed(); } - + /** * Check the field values and display a message in the status if needed. */ private void checkValues() { StatusInfo status= new StatusInfo(); if (fSnippetViewer.getDocument().get().trim().length() == 0) { - status.setError(ActionMessages.WatchExpressionDialog_4); + status.setError(ActionMessages.WatchExpressionDialog_4); } updateStatus(status); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionFactoryTester.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionFactoryTester.java index 167387bbb..1465aa577 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionFactoryTester.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionFactoryTester.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: * Wind River Systems - initial API and implementation *******************************************************************************/ @@ -18,9 +18,9 @@ import org.eclipse.debug.ui.actions.IWatchExpressionFactoryAdapter2; import org.eclipse.debug.ui.actions.IWatchExpressionFactoryAdapterExtension; /** - * This class is used to check whether a given element can be used to create - * a watch expression. A single property can be tested - * "canCreateWatchExpression". Test for this property ignores the value and + * This class is used to check whether a given element can be used to create + * a watch expression. A single property can be tested + * "canCreateWatchExpression". Test for this property ignores the value and * always returns a boolean. * * @since 3.4 @@ -28,7 +28,7 @@ import org.eclipse.debug.ui.actions.IWatchExpressionFactoryAdapterExtension; public class WatchExpressionFactoryTester extends PropertyTester { public static final String CAN_CREATE_WATCH_EXPRESSION_PROPERTY = "canCreateWatchExpression"; //$NON-NLS-1$ - + /* (non-Javadoc) * @see org.eclipse.core.expressions.PropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object) */ @@ -51,7 +51,7 @@ public class WatchExpressionFactoryTester extends PropertyTester { return factory2.canCreateWatchExpression(element); } } - } + } return false; } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java index c06864c84..9c312b43d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.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: * Wind River Systems - initial API and implementation *******************************************************************************/ @@ -37,7 +37,7 @@ import org.eclipse.ui.handlers.HandlerUtil; /** * Handler for creating a watch expression. - * + * * @since 3.4 */ public class WatchHandler extends AbstractHandler { @@ -93,10 +93,10 @@ public class WatchHandler extends AbstractHandler { } } } catch (CoreException e) { - DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), ActionMessages.WatchAction_0, ActionMessages.WatchAction_1, e); // + DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), ActionMessages.WatchAction_0, ActionMessages.WatchAction_1, e); // return; } - + IWatchExpression expression; expression = DebugPlugin.getDefault().getExpressionManager().newWatchExpression(expressionString); DebugPlugin.getDefault().getExpressionManager().addExpression(expression); @@ -114,17 +114,17 @@ public class WatchHandler extends AbstractHandler { /** * Returns the factory adapter for the given variable or <code>null</code> if none. - * + * * @param variable the variable to get the factory for * @return factory or <code>null</code> */ static IWatchExpressionFactoryAdapter getFactory(IVariable variable) { - return variable.getAdapter(IWatchExpressionFactoryAdapter.class); + return variable.getAdapter(IWatchExpressionFactoryAdapter.class); } /** * Returns the factory adapter for the given variable or <code>null</code> if none. - * + * * @param element the element to try and adapt * @return factory or <code>null</code> */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueAction.java index dd191c286..1a6bdb643 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueAction.java @@ -11,7 +11,7 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.actions.variables; - + import java.util.Iterator; import org.eclipse.debug.core.DebugException; @@ -42,19 +42,19 @@ import com.ibm.icu.text.MessageFormat; * variable value editor, if any is provided for the variable's debug model. */ public class ChangeVariableValueAction extends SelectionProviderAction { - + protected IVariable fVariable; private VariablesView fView; private boolean fEditing= false; private boolean isApplicable = false; - + /** * Creates a new ChangeVariableValueAction for the given variables view * @param view the variables view in which this action will appear */ public ChangeVariableValueAction(VariablesView view) { - super(view.getViewer(), ActionMessages.ChangeVariableValue_title); - setDescription(ActionMessages.ChangeVariableValue_toolTipText); + super(view.getViewer(), ActionMessages.ChangeVariableValue_title); + setDescription(ActionMessages.ChangeVariableValue_toolTipText); setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_CHANGE_VARIABLE_VALUE)); setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_CHANGE_VARIABLE_VALUE)); setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_CHANGE_VARIABLE_VALUE)); @@ -63,24 +63,24 @@ public class ChangeVariableValueAction extends SelectionProviderAction { IDebugHelpContextIds.CHANGE_VALUE_ACTION); fView= view; } - + /** * Indicates whether this action is applicable for the current selection. - * If the element selected in the viewer is not a standard debug model - * element this action is not applicable. + * If the element selected in the viewer is not a standard debug model + * element this action is not applicable. * @return if this action applies to the current selection */ public boolean isApplicable() { return isApplicable; } - + /** - * Edit the variable value with an in-line text editor. + * Edit the variable value with an in-line text editor. * @param variable run the action on the given variable */ protected void doActionPerformed(final IVariable variable) { Shell shell = fView.getViewSite().getShell(); - // If a previous edit is still in progress, don't start another + // If a previous edit is still in progress, don't start another if (fEditing) { return; } @@ -91,13 +91,13 @@ public class ChangeVariableValueAction extends SelectionProviderAction { } fEditing= false; } - + /** * Attempts to edit the variable by delegating to anyone who's * contributed a variable value editor via extension. Returns * <code>true</code> if a delegate handled the edit, <code>false</code> * if the variable still needs to be edited. - * + * * @param shell a shell for prompting the user * @return whether or not a delegate attempted to edit the variable */ @@ -121,7 +121,7 @@ public class ChangeVariableValueAction extends SelectionProviderAction { name= fVariable.getName(); value= fVariable.getValue().getValueString(); } catch (DebugException exception) { - DebugUIPlugin.errorDialog(shell, ActionMessages.ChangeVariableValue_errorDialogTitle,ActionMessages.ChangeVariableValue_errorDialogMessage, exception); // + DebugUIPlugin.errorDialog(shell, ActionMessages.ChangeVariableValue_errorDialogTitle,ActionMessages.ChangeVariableValue_errorDialogMessage, exception); // return; } ChangeVariableValueInputDialog inputDialog = new ChangeVariableValueInputDialog(shell, ActionMessages.ChangeVariableValue_1, MessageFormat.format(ActionMessages.ChangeVariableValue_2, new Object[] { name }), value, new IInputValidator() { // @@ -135,12 +135,12 @@ public class ChangeVariableValueAction extends SelectionProviderAction { return null; // null means valid } } catch (DebugException exception) { - return ActionMessages.ChangeVariableValue_3; + return ActionMessages.ChangeVariableValue_3; } - return ActionMessages.ChangeVariableValue_4; + return ActionMessages.ChangeVariableValue_4; } }); - + inputDialog.open(); String newValue= inputDialog.getValue(); if (newValue != null) { @@ -149,11 +149,11 @@ public class ChangeVariableValueAction extends SelectionProviderAction { fVariable.setValue(newValue); getSelectionProvider().setSelection(new StructuredSelection(fVariable)); } catch (DebugException de) { - DebugUIPlugin.errorDialog(shell, ActionMessages.ChangeVariableValue_errorDialogTitle,ActionMessages.ChangeVariableValue_errorDialogMessage, de); // + DebugUIPlugin.errorDialog(shell, ActionMessages.ChangeVariableValue_errorDialogTitle,ActionMessages.ChangeVariableValue_errorDialogMessage, de); // } } } - + /** * Updates the enabled state of this action based * on the selection @@ -186,7 +186,7 @@ public class ChangeVariableValueAction extends SelectionProviderAction { Iterator<Object> iterator = getStructuredSelection().iterator(); doActionPerformed((IVariable)iterator.next()); } - + /** * @see SelectionProviderAction#selectionChanged(org.eclipse.jface.viewers.IStructuredSelection) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueInputDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueInputDialog.java index 285405948..7e3bb7842 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueInputDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueInputDialog.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 *******************************************************************************/ @@ -33,43 +33,43 @@ import org.eclipse.swt.widgets.Text; * A simple input dialog for soliciting an input string * from the user. * <p> - * This concrete dialog class can be instantiated as is, + * This concrete dialog class can be instantiated as is, * or further subclassed as required. * </p> */ public class ChangeVariableValueInputDialog extends TrayDialog { - - + + /** * The title of the dialog. */ private String title; - + /** * The message to display, or <code>null</code> if none. */ private String message; - + /** * The input value; the empty string by default. */ private String value= IInternalDebugCoreConstants.EMPTY_STRING; - + /** * The input validator, or <code>null</code> if none. */ private IInputValidator validator; - + /** * Ok button widget. */ private Button okButton; - + /** * Input text widget. */ private Text text; - + /** * Error message label widget. */ @@ -98,7 +98,7 @@ public class ChangeVariableValueInputDialog extends TrayDialog { else value = initialValue; this.validator = validator; - + setShellStyle(getShellStyle() | SWT.RESIZE); } /* (non-Javadoc) @@ -130,7 +130,7 @@ public class ChangeVariableValueInputDialog extends TrayDialog { // create OK and Cancel buttons by default okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); - + //do this here because setting the text will set enablement on the ok button text.setFocus(); if (value != null) { @@ -146,7 +146,7 @@ public class ChangeVariableValueInputDialog extends TrayDialog { Font font = parent.getFont(); // create composite Composite composite = (Composite)super.createDialogArea(parent); - + // create message if (message != null) { Label label = new Label(composite, SWT.WRAP); @@ -159,9 +159,9 @@ public class ChangeVariableValueInputDialog extends TrayDialog { label.setLayoutData(data); label.setFont(font); } - + text= new Text(composite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL| SWT.H_SCROLL); - + GridData gridData= new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_VERTICAL | GridData.VERTICAL_ALIGN_FILL); gridData.heightHint = 50; gridData.widthHint = 100; @@ -174,13 +174,13 @@ public class ChangeVariableValueInputDialog extends TrayDialog { if (okButton.isEnabled()) { return; } - errorMessageLabel.setText(IInternalDebugCoreConstants.EMPTY_STRING); + errorMessageLabel.setText(IInternalDebugCoreConstants.EMPTY_STRING); errorMessageLabel.getParent().update(); okButton.setEnabled(true); } } ); - + errorMessageLabel = new Label(composite, SWT.NONE); errorMessageLabel.setLayoutData(new GridData( GridData.GRAB_HORIZONTAL | @@ -240,17 +240,17 @@ public class ChangeVariableValueInputDialog extends TrayDialog { * </p> */ protected void validateInput() { - + String errorMessage = null; - + if (validator != null) { errorMessage = validator.isValid(text.getText()); } - + // Bug 16256: important not to treat empty string (blank error) the same as null (no error) errorMessageLabel.setText(errorMessage == null ? IInternalDebugCoreConstants.EMPTY_STRING : errorMessage); okButton.setEnabled(errorMessage == null); - + errorMessageLabel.getParent().update(); } @Override @@ -260,16 +260,16 @@ public class ChangeVariableValueInputDialog extends TrayDialog { super.okPressed(); } } - + /** * Returns the name of the section that this dialog stores its settings in - * + * * @return String */ protected String getDialogSettingsSectionName() { return IDebugUIConstants.PLUGIN_ID + ".CHANGE_VARIABLE_VALUE_DIALOG_SECTION"; //$NON-NLS-1$ } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings() */ @@ -279,10 +279,10 @@ public class ChangeVariableValueInputDialog extends TrayDialog { IDialogSettings section = settings.getSection(getDialogSettingsSectionName()); if (section == null) { section = settings.addNewSection(getDialogSettingsSectionName()); - } + } return section; } - + /* (non-Javadoc) * @see org.eclipse.jface.window.Window#handleShellCloseEvent() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/SelectAllVariablesAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/SelectAllVariablesAction.java index 81dbcba7b..d76235796 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/SelectAllVariablesAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/SelectAllVariablesAction.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 *******************************************************************************/ @@ -15,7 +15,7 @@ import org.eclipse.debug.ui.IDebugView; public class SelectAllVariablesAction extends SelectAllAction { - + @Override protected String getActionId() { return IDebugView.SELECT_ALL_ACTION + ".Variables"; //$NON-NLS-1$ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ShowTypesAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ShowTypesAction.java index 23bcdded0..a30973340 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ShowTypesAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ShowTypesAction.java @@ -7,7 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation - * WindRiver - Bug 272367: "Show Type Names" attribute is not available in the IPresentationContext properties + * WindRiver - Bug 272367: "Show Type Names" attribute is not available in the IPresentationContext properties *******************************************************************************/ package org.eclipse.debug.internal.ui.actions.variables; @@ -38,9 +38,9 @@ public class ShowTypesAction extends Action { private IDebugView fView; public ShowTypesAction(IDebugView view) { - super(ActionMessages.ShowTypesAction_Show__Type_Names_1, IAction.AS_CHECK_BOX); + super(ActionMessages.ShowTypesAction_Show__Type_Names_1, IAction.AS_CHECK_BOX); setView(view); - setToolTipText(ActionMessages.ShowTypesAction_Show_Type_Names); + setToolTipText(ActionMessages.ShowTypesAction_Show_Type_Names); setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_TYPE_NAMES)); setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_TYPE_NAMES)); setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_TYPE_NAMES)); @@ -61,7 +61,7 @@ public class ShowTypesAction extends Action { if (viewer.getControl().isDisposed()) { return; } - + IDebugModelPresentation debugLabelProvider= getView().getAdapter(IDebugModelPresentation.class); if (debugLabelProvider != null) { Boolean typesStatus = on ? Boolean.TRUE : Boolean.FALSE; @@ -73,12 +73,12 @@ public class ShowTypesAction extends Action { BusyIndicator.showWhile(viewer.getControl().getDisplay(), new Runnable() { @Override public void run() { - viewer.refresh(); + viewer.refresh(); } }); } } - + protected IDebugView getView() { return fView; } @@ -99,8 +99,8 @@ public class ShowTypesAction extends Action { setToolTipText(ActionMessages.ShowTypesAction_0); } } - - + + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ToggleDetailPaneAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ToggleDetailPaneAction.java index 8f6adc86d..5fb07aec8 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ToggleDetailPaneAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ToggleDetailPaneAction.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 *******************************************************************************/ @@ -26,53 +26,53 @@ import org.eclipse.ui.PlatformUI; * as the VariablesView and the ExpressionsView. Instances of this class can be * created to show the detail pane underneath the main tree, to the right of the * main tree, or not shown at all. - * + * * @since 3.0 */ public class ToggleDetailPaneAction extends Action { private VariablesView fVariablesView; - + private String fOrientation; public ToggleDetailPaneAction(VariablesView view, String orientation, String hiddenLabel) { super(IInternalDebugCoreConstants.EMPTY_STRING, AS_RADIO_BUTTON); setVariablesView(view); setOrientation(orientation); - + if (orientation == IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_UNDERNEATH) { - setText(ActionMessages.ToggleDetailPaneAction_1); - setToolTipText(ActionMessages.ToggleDetailPaneAction_2); - setDescription(ActionMessages.ToggleDetailPaneAction_2); + setText(ActionMessages.ToggleDetailPaneAction_1); + setToolTipText(ActionMessages.ToggleDetailPaneAction_2); + setDescription(ActionMessages.ToggleDetailPaneAction_2); setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_UNDER)); setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_UNDER)); setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_DETAIL_PANE_UNDER)); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.VERTICAL_DETAIL_PANE_LAYOUT_ACTION); } else if (orientation == IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_RIGHT) { - setText(ActionMessages.ToggleDetailPaneAction_4); - setToolTipText(ActionMessages.ToggleDetailPaneAction_5); - setDescription(ActionMessages.ToggleDetailPaneAction_5); + setText(ActionMessages.ToggleDetailPaneAction_4); + setToolTipText(ActionMessages.ToggleDetailPaneAction_5); + setDescription(ActionMessages.ToggleDetailPaneAction_5); setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_RIGHT)); setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_RIGHT)); setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_DETAIL_PANE_RIGHT)); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.HORIZONTAL_DETAIL_PANE_LAYOUT_ACTION); } else if (orientation == IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_AUTO) { setText(ActionMessages.ToggleDetailPaneAction_0); - setToolTipText(ActionMessages.ToggleDetailPaneAction_3); - setDescription(ActionMessages.ToggleDetailPaneAction_3); + setToolTipText(ActionMessages.ToggleDetailPaneAction_3); + setDescription(ActionMessages.ToggleDetailPaneAction_3); setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_AUTO)); setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_AUTO)); setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_AUTO)); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.HORIZONTAL_DETAIL_PANE_LAYOUT_ACTION); } else { setText(hiddenLabel); - setToolTipText(ActionMessages.ToggleDetailPaneAction_8); - setDescription(ActionMessages.ToggleDetailPaneAction_8); + setToolTipText(ActionMessages.ToggleDetailPaneAction_8); + setDescription(ActionMessages.ToggleDetailPaneAction_8); setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_HIDE)); setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_HIDE)); setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_DETAIL_PANE_HIDE)); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.DETAIL_PANE_HIDDEN_LAYOUT_ACTION); - } + } } /* (non-Javadoc) @@ -80,9 +80,9 @@ public class ToggleDetailPaneAction extends Action { */ @Override public void run() { - getVariablesView().setDetailPaneOrientation(getOrientation()); + getVariablesView().setDetailPaneOrientation(getOrientation()); } - + private VariablesView getVariablesView() { return fVariablesView; } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneAssignValueAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneAssignValueAction.java index 5f3db1f3c..f242d5301 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneAssignValueAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneAssignValueAction.java @@ -47,18 +47,18 @@ public class DetailPaneAssignValueAction extends Action{ private IViewSite fViewSite; private ITextViewer fTextViewer; private IStructuredSelection fCurrentSelection; - + /** * Attempts to evaluate the given string expression and assign the resulting value to the * specified variable. Displays error dialogs to the user if a problem is encountered. - * + * * @see DetailPaneAssignValueAction * @see org.eclipse.debug.internal.ui.elements.adapters.DefaultVariableCellModifier - * + * * @param shell the shell to use to open dialogs * @param variable the variable that is getting a new value * @param newValueExpression the expression to evaluate and set as the new value - * @since 3.3.0 + * @since 3.3.0 */ public static void assignValue(Shell shell, IVariable variable, String newValueExpression){ String modelIdentifier = variable.getModelIdentifier(); @@ -70,7 +70,7 @@ public class DetailPaneAssignValueAction extends Action{ return; } } - + try { // If we failed to delegate to anyone, perform the default assignment. if (variable.verifyValue(newValueExpression)) { @@ -85,21 +85,21 @@ public class DetailPaneAssignValueAction extends Action{ MessageDialog.openError(shell, ActionMessages.DetailPaneAssignValueAction_0, e.getStatus().getMessage()); } } - + public DetailPaneAssignValueAction(ITextViewer textViewer, IViewSite viewSite) { super(ActionMessages.DetailPaneAssignValueAction_1); - + PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.DETAIL_PANE_ASSIGN_VALUE_ACTION); fTextViewer = textViewer; fViewSite = viewSite; - + setEnabled(false); IHandlerService service = fViewSite.getService(IHandlerService.class); ActionHandler handler = new ActionHandler(this); fHandlerActivation = service.activateHandler(getActionDefinitionId(), handler); } - + public void dispose() { IHandlerService service = fViewSite.getService(IHandlerService.class); service.deactivateHandler(fHandlerActivation); @@ -113,17 +113,17 @@ public class DetailPaneAssignValueAction extends Action{ fCurrentSelection = selection; enabled = true; } - } - setEnabled(enabled); - } - + } + setEnabled(enabled); + } + /* (non-Javadoc) * @see org.eclipse.jface.action.IAction#run() */ @Override public void run() { IVariable variable = (IVariable) fCurrentSelection.getFirstElement(); - + Point selection = fTextViewer.getSelectedRange(); String value = null; if (selection.y == 0) { @@ -139,15 +139,15 @@ public class DetailPaneAssignValueAction extends Action{ if (window != null) { activeShell= window.getShell(); } - + assignValue(activeShell, variable, value); } - + /* (non-Javadoc) * @see org.eclipse.jface.action.IAction#getActionDefinitionId() */ @Override - public String getActionDefinitionId() { + public String getActionDefinitionId() { return IWorkbenchCommandConstants.FILE_SAVE; } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneMaxLengthAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneMaxLengthAction.java index 112725210..23b75b2cd 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneMaxLengthAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneMaxLengthAction.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,22 +19,22 @@ import org.eclipse.ui.PlatformUI; /** * Opens a dialog so that the user can enter the maximum length in characters that * the detail pane should display. - * + * * @see DetailPaneMaxLengthDialog * @since 3.0 */ public class DetailPaneMaxLengthAction extends Action { - + private Shell fDialogShell; - + public DetailPaneMaxLengthAction(Shell dialogShell){ super(ActionMessages.DetailPaneMaxLengthAction_0); fDialogShell = dialogShell; - + PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.DETAIL_PANE_MAX_LENGTH_ACTION); - + } - + @Override public void run() { DetailPaneMaxLengthDialog dialog = new DetailPaneMaxLengthDialog(fDialogShell); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneMaxLengthDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneMaxLengthDialog.java index 237d26f36..c70ecbcae 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneMaxLengthDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneMaxLengthDialog.java @@ -32,22 +32,22 @@ import org.eclipse.ui.PlatformUI; /** * Provides a dialog for changing the maximum length allowed in the detail pane - * + * * @since 3.0 */ public class DetailPaneMaxLengthDialog extends TrayDialog { private static final String SETTINGS_ID = DebugUIPlugin.getUniqueIdentifier() + ".MAX_DETAILS_LENGTH_DIALOG"; //$NON-NLS-1$ - + private Text fTextWidget; private Text fErrorTextWidget; private String fErrorMessage; private String fValue; private IInputValidator fValidator; - + /** * Constructs a new dialog on the given shell. - * + * * @param parent shell */ public DetailPaneMaxLengthDialog(Shell parent) { @@ -67,7 +67,7 @@ public class DetailPaneMaxLengthDialog extends TrayDialog { } return null; } - + }; } @@ -80,10 +80,10 @@ public class DetailPaneMaxLengthDialog extends TrayDialog { IDialogSettings section = settings.getSection(SETTINGS_ID); if (section == null) { section = settings.addNewSection(SETTINGS_ID); - } + } return section; } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#createContents(org.eclipse.swt.widgets.Composite) */ @@ -134,23 +134,23 @@ public class DetailPaneMaxLengthDialog extends TrayDialog { String text = getValue(); try { DebugUIPlugin.getDefault().getPreferenceStore().setValue(IDebugUIConstants.PREF_MAX_DETAIL_LENGTH, Integer.parseInt(text)); - } + } catch (NumberFormatException e) { DebugUIPlugin.log(e); } super.okPressed(); } - + /** * Returns the string typed into this input dialog. - * + * * @return the input string * @since 3.3 */ public String getValue() { return fValue; } - + /** * Validates the current input * @since 3.3 @@ -162,7 +162,7 @@ public class DetailPaneMaxLengthDialog extends TrayDialog { } setErrorMessage(errorMessage); } - + /** * Sets the current error message or none if null * @param errorMessage the message to display @@ -180,5 +180,5 @@ public class DetailPaneMaxLengthDialog extends TrayDialog { button.setEnabled(errorMessage == null); } } - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneWordWrapAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneWordWrapAction.java index caa5bd816..b5608c867 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneWordWrapAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneWordWrapAction.java @@ -29,20 +29,20 @@ import org.osgi.service.prefs.BackingStoreException; public class DetailPaneWordWrapAction extends Action { ITextViewer fTextViewer; - + public DetailPaneWordWrapAction(ITextViewer textViewer) { super(ActionMessages.DetailPaneWordWrapAction_0,IAction.AS_CHECK_BOX); - + PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.DETAIL_PANE_WORD_WRAP_ACTION); - + fTextViewer = textViewer; setEnabled(true); - + boolean prefSetting = DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IDebugPreferenceConstants.PREF_DETAIL_PANE_WORD_WRAP); fTextViewer.getTextWidget().setWordWrap(prefSetting); setChecked(prefSetting); } - + /* (non-Javadoc) * @see org.eclipse.jface.action.IAction#run() */ |