diff options
author | Andrey Loskutov | 2017-01-09 13:12:58 +0000 |
---|---|---|
committer | Andrey Loskutov | 2017-01-13 20:56:39 +0000 |
commit | ebb2566c95427e5c7cffd5e27f1e910b0a187b17 (patch) | |
tree | f9b87db9c4ccf476dfb8c8d4b5fcfcfd3f871bbb /org.eclipse.debug.ui/ui/org/eclipse/debug/ui | |
parent | 1c1d17b82a223fb8fcc69b4883a71b8744899ccb (diff) | |
download | eclipse.platform.debug-ebb2566c95427e5c7cffd5e27f1e910b0a187b17.tar.gz eclipse.platform.debug-ebb2566c95427e5c7cffd5e27f1e910b0a187b17.tar.xz eclipse.platform.debug-ebb2566c95427e5c7cffd5e27f1e910b0a187b17.zip |
Bug 510100 - [cleanup] Get rid of trailing white space in platform.debugY20170119-1000I20170119-2000I20170119-1010I20170119-0345I20170118-2000I20170118-1215I20170117-2000I20170116-2000I20170115-2000I20170114-2000I20170113-2000
Also enabled "cleanup whitespace on save" actions for debug.ui and
debug.tests bundles.
Change-Id: I755b879ab1d49144a1bec3f4318dbb8b29521bb3
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/ui')
120 files changed, 3070 insertions, 3070 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractBreakpointOrganizerDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractBreakpointOrganizerDelegate.java index fd2e85931..38c6d391b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractBreakpointOrganizerDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractBreakpointOrganizerDelegate.java @@ -28,7 +28,7 @@ import org.eclipse.jface.util.PropertyChangeEvent; * @since 3.1 */ public abstract class AbstractBreakpointOrganizerDelegate implements IBreakpointOrganizerDelegate { - + // property change listeners private ListenerList<IPropertyChangeListener> fListeners = new ListenerList<>(); @@ -39,7 +39,7 @@ public abstract class AbstractBreakpointOrganizerDelegate implements IBreakpoint public void addBreakpoint(IBreakpoint breakpoint, IAdaptable category) { // do noting, not supported by default } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.IBreakpointOrganizerDelegate#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) */ @@ -47,31 +47,31 @@ public abstract class AbstractBreakpointOrganizerDelegate implements IBreakpoint public void addPropertyChangeListener(IPropertyChangeListener listener) { fListeners.add(listener); } - + /* (non-Javadoc) - * + * * Subclasses that override should return super.canAdd(...) when they are not able to add * the breakpoint. - * + * * @see org.eclipse.debug.ui.IBreakpointOrganizerDelegate#canAdd(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.runtime.IAdaptable) */ @Override public boolean canAdd(IBreakpoint breakpoint, IAdaptable category) { return category instanceof OtherBreakpointCategory; } - + /* (non-Javadoc) - * + * * Subclasses that override should return super.canRemove(...) when they are not able to remove * the breakpoint. - * + * * @see org.eclipse.debug.ui.IBreakpointOrganizerDelegate#canRemove(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.runtime.IAdaptable) */ @Override public boolean canRemove(IBreakpoint breakpoint, IAdaptable category) { return category instanceof OtherBreakpointCategory; } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.IBreakpointOrganizerDelegate#dispose() */ @@ -79,7 +79,7 @@ public abstract class AbstractBreakpointOrganizerDelegate implements IBreakpoint public void dispose() { fListeners = new ListenerList<>(); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.IBreakpointOrganizerDelegate#removeBreakpoint(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.runtime.IAdaptable) */ @@ -87,7 +87,7 @@ public abstract class AbstractBreakpointOrganizerDelegate implements IBreakpoint public void removeBreakpoint(IBreakpoint breakpoint, IAdaptable category) { // do nothing, not supported by default } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.IBreakpointOrganizerDelegate#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) */ @@ -95,10 +95,10 @@ public abstract class AbstractBreakpointOrganizerDelegate implements IBreakpoint public void removePropertyChangeListener(IPropertyChangeListener listener) { fListeners.remove(listener); } - + /** * Fires a property change notification for the given category. - * + * * @param category category that has changed */ protected void fireCategoryChanged(IAdaptable category) { @@ -121,7 +121,7 @@ public abstract class AbstractBreakpointOrganizerDelegate implements IBreakpoint SafeRunner.run(runnable); } } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.IBreakpointOrganizerDelegate#getCategories() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java index d6dcd56e8..c77bae7f9 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.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 *******************************************************************************/ @@ -68,7 +68,7 @@ import org.eclipse.debug.internal.ui.actions.breakpoints.SkipAllBreakpointsActio /** * Common function for views related to debugging. Clients implementing - * views for a debugger should subclass this class. Common function + * views for a debugger should subclass this class. Common function * includes: * <ul> * <li>Debug view adapter implementation - <code>IDebugView</code></li> @@ -80,10 +80,10 @@ import org.eclipse.debug.internal.ui.actions.breakpoints.SkipAllBreakpointsActio * underlying viewer and registers the menu with this * view's site, such that other plug-ins may contribute.</li> * <li>Hooks a key press listener, and invokes the - * <code>REMOVE_ACTION</code> when the delete key + * <code>REMOVE_ACTION</code> when the delete key * is pressed.</li> * <li>Hooks a double-click listener, and invokes the - * <code>DOUBLE_CLICK_ACTION</code> when the mouse + * <code>DOUBLE_CLICK_ACTION</code> when the mouse * is double-clicked.</li> * <li>Provides a mechanism for displaying an error message * in the view, via the <code>PageBookView</code> mechanism. @@ -102,60 +102,60 @@ import org.eclipse.debug.internal.ui.actions.breakpoints.SkipAllBreakpointsActio */ public abstract class AbstractDebugView extends PageBookView implements IDebugView, IDoubleClickListener { - + /** * Underlying viewer that displays the contents of * this view. */ private Viewer fViewer = null; - + /** * This view's message page. */ private MessagePage fMessagePage = null; - + /** * Map of actions. Keys are strings, values * are <code>IAction</code>. */ private Map<String, IAction> fActionMap = null; - + /** * Map of actions. Keys are strings, values * are <code>IAction</code>. */ private List<IUpdate> fUpdateables = null; - + /** * The collection of menu managers that are * relevant for this view. */ private List<IMenuManager> fContextMenuManagers; - + /** * The memento that was used to persist the state of this view. * May be <code>null</code>. */ private IMemento fMemento; - + /** * Whether this view is currently visible. */ private boolean fIsVisible = false; - + /** * The part listener for this view, used to notify this view when it * becomes visible and hidden. Set to <code>null</code> when this view isn't * currently listening to part changes. */ private DebugViewPartListener fPartListener= null; - + /** * A message was requested to be displayed before the view was fully * created. The message is cached until it can be properly displayed. */ private String fEarlyMessage= null; - + private static Set<String> fgGlobalActionIds; static { fgGlobalActionIds = new HashSet<String>(); @@ -175,7 +175,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi */ private class DebugViewPartListener implements IPartListener2 { /** - * + * * @see org.eclipse.ui.IPartListener2#partVisible(IWorkbenchPartReference) */ @Override @@ -231,7 +231,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi @Override public void partOpened(IWorkbenchPartReference ref) { } - + /** * @see org.eclipse.ui.IPartListener2#partInputChanged(IWorkbenchPartReference) */ @@ -239,8 +239,8 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi public void partInputChanged(IWorkbenchPartReference ref){ } - } - + } + /** * Constructs a new debug view. */ @@ -248,12 +248,12 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi fActionMap = new HashMap<String, IAction>(5); fUpdateables = new ArrayList<IUpdate>(3); } - + /** * Debug views implement the debug view adapter which * provides access to a view's underlying viewer and * debug model presentation for a specific debug model. - * + * * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class) * @see IDebugView */ @@ -274,7 +274,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi } return super.getAdapter(adapter); } - + /** * A page in this view's page book that contains this * view's viewer. @@ -286,7 +286,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi @Override public void createControl(Composite parent) { Viewer viewer = createViewer(parent); - setViewer(viewer); + setViewer(viewer); } /** @@ -312,7 +312,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi } } - + /** * Creates this view's underlying viewer and actions. * Hooks a pop-up menu to the underlying viewer's control, @@ -356,23 +356,23 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi } }); if (getViewer() instanceof StructuredViewer) { - ((StructuredViewer)getViewer()).addDoubleClickListener(this); + ((StructuredViewer)getViewer()).addDoubleClickListener(this); } } // create the message page setMessagePage(new MessagePage()); getMessagePage().createControl(getPageBook()); initPage(getMessagePage()); - + if (fEarlyMessage != null) { //bug 28127 showMessage(fEarlyMessage); fEarlyMessage= null; } - } - + } + /** * The default page for a debug view is its viewer. - * + * * @see PageBookView#createDefaultPage(PageBook) */ @Override @@ -381,34 +381,34 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi page.createControl(book); initPage(page); return page; - } + } /** * Creates and returns this view's underlying viewer. * The viewer's control will automatically be hooked * to display a pop-up menu that other plug-ins may * contribute to. Subclasses must override this method. - * + * * @param parent the parent control * @return the new {@link Viewer} */ protected abstract Viewer createViewer(Composite parent); - + /** * Creates this view's actions. Subclasses must * override this method, which is called after * <code>createViewer(Composite)</code> */ - protected abstract void createActions(); - + protected abstract void createActions(); + /** * Returns this view's help context id, which is hooked * to this view on creation. - * + * * @return help context id */ protected abstract String getHelpContextId(); - + /** * @see IWorkbenchPart#dispose() */ @@ -423,12 +423,12 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi fActionMap.clear(); super.dispose(); } - + /** * Saves the checked state for all actions contributed to the toolbar * manager that function as a toggle action. The states are saved in * the Debug UI plugin's preference store. - * + * * @since 2.1 */ protected void saveAllCheckedActionStates() { @@ -440,17 +440,17 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi ActionContributionItem item= (ActionContributionItem)iContributionItem; IAction action= item.getAction(); if (action.getStyle() == IAction.AS_CHECK_BOX && action.isEnabled()) { - saveCheckedActionState(action); + saveCheckedActionState(action); } - } - } + } + } } - + /** * Save the checked state of the specified action in the Debug UI plugin's * preference store. The specified action is expected to be enabled and * support the style <code>IAction.AS_CHECK_BOX</code>. - * + * * @param action the enabled, toggle action whose checked state will be * saved in preferences * @since 2.1 @@ -460,7 +460,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi IPreferenceStore prefStore = getPreferenceStore(); prefStore.setValue(prefKey, action.isChecked()); } - + /** * Generate a String that can be used as a key into a preference store based * on the specified action. The resulting String will be unique across @@ -471,20 +471,20 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi * @since 2.1 */ protected String generatePreferenceKey(IAction action) { - return getViewSite().getId() + '+' + action.getId(); + return getViewSite().getId() + '+' + action.getId(); } - + /** * Convenience method to return the preference store for the Debug UI * plug-in. - * + * * @return the preference store for the Debug UI plug-in * @since 2.1 */ protected IPreferenceStore getPreferenceStore() { return DebugUIPlugin.getDefault().getPreferenceStore(); } - + /** * @see IDebugView#getViewer() */ @@ -492,11 +492,11 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi public Viewer getViewer() { return fViewer; } - + /** * Returns this view's viewer as a structured viewer, * or <code>null</code> if none. - * + * * @return this view's viewer as a structured viewer * or <code>null</code> */ @@ -506,11 +506,11 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi } return null; } - + /** * Returns this view's viewer as a text viewer, * or <code>null</code> if none. - * + * * @return this view's viewer as a text viewer * or <code>null</code> */ @@ -519,8 +519,8 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi return (TextViewer)getViewer(); } return null; - } - + } + /** * @see IDebugView#getPresentation(String) */ @@ -539,7 +539,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi } return null; } - + /** * Creates a pop-up menu on the given control. The menu * is registered with this view's site, such that other @@ -549,7 +549,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi * Subclasses must implement the method * <code>#fillContextMenu(IMenuManager)</code> which will * be called each time the context menu is realized. - * + * * @param menuControl the control with which the pop-up * menu will be associated with. */ @@ -571,10 +571,10 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi } addContextMenuManager(menuMgr); } - + /** * @see IDebugView#getContextMenuManager() - * + * * @deprecated @see AbstractDebugView.getContextMenuManagers() */ @Deprecated @@ -585,25 +585,25 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi } return null; } - + /** * Returns the context menu managers relevant to this view. - * + * * @return the context menu managers relevant to this view * @since 2.1 */ public List<IMenuManager> getContextMenuManagers() { return fContextMenuManagers; } - + /** * Subclasses must override this method to fill the context * menu each time it is realized. - * + * * @param menu the context menu */ - protected abstract void fillContextMenu(IMenuManager menu); - + protected abstract void fillContextMenu(IMenuManager menu); + /** * Configures this view's toolbar. Subclasses implement * <code>#configureToolBar(IToolBarManager)</code> to @@ -621,7 +621,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi final IToolBarManager tbm= getViewSite().getActionBars().getToolBarManager(); configureToolBar(tbm); getViewSite().getActionBars().updateActionBars(); - + // This is done in a runnable to be run after this view's pane // is created Runnable r = new Runnable() { @@ -637,7 +637,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi IAction action = ((ActionContributionItem)items[i]).getAction(); if (!SkipAllBreakpointsAction.ACTION_ID.equals(action.getId())) { if (action.getStyle() == IAction.AS_CHECK_BOX) { - initActionState(action); + initActionState(action); if (action.isChecked()) { action.run(); } @@ -651,12 +651,12 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi }; asyncExec(r); } - + /** * Restores the persisted checked state of the specified action that was * stored in preferences. If the action is disabled, its persisted state * is not restored (because a disabled action cannot be run). - * + * * @param action the action whose checked state will be restored * @since 2.1 */ @@ -677,28 +677,28 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi super.init(site, memento); //store the memento to be used when this view is created. setMemento(memento); - } + } /** * Sets the viewer for this view. - * + * * @param viewer viewer * @since 3.1 */ protected void setViewer(Viewer viewer) { fViewer = viewer; } - + /** * Subclasses implement this menu to contribute actions - * to the toolbar. This method is called after + * to the toolbar. This method is called after * <code>createActions()</code>. - * + * * @param tbm the tool bar manager for this view's site * @see #createViewer(Composite) */ - protected abstract void configureToolBar(IToolBarManager tbm); - + protected abstract void configureToolBar(IToolBarManager tbm); + /** * @see IDebugView#setAction(String, IAction) */ @@ -714,11 +714,11 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi } } if (fgGlobalActionIds.contains(actionID)) { - IActionBars actionBars = getViewSite().getActionBars(); + IActionBars actionBars = getViewSite().getActionBars(); actionBars.setGlobalActionHandler(actionID, action); } - } - + } + /** * @see IDebugView#getAction(String) */ @@ -726,7 +726,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi public IAction getAction(String actionID) { return fActionMap.get(actionID); } - + /** * Updates all the registered updatables. */ @@ -735,10 +735,10 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi update.update(); } } - + /** * Handles key events in viewer. Invokes - * <ol> + * <ol> * <li><code>REMOVE_ACTION</code> when the delete * key is pressed</li> * @param event the {@link KeyEvent} @@ -750,12 +750,12 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi action.run(); } } - } - + } + /** * Delegate to the <code>DOUBLE_CLICK_ACTION</code>, * if any. - * + * * @see IDoubleClickListener#doubleClick(DoubleClickEvent) */ @Override @@ -764,13 +764,13 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi if (action != null && !event.getSelection().isEmpty() && action.isEnabled()) { action.run(); } - } - + } + /** * Registers the given runnable with the display * associated with this view's control, if any. * @param r the {@link Runnable} to run - * + * * @see org.eclipse.swt.widgets.Display#asyncExec(java.lang.Runnable) */ public void asyncExec(Runnable r) { @@ -778,17 +778,17 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi getControl().getDisplay().asyncExec(r); } } - + /** * Returns the control for this view, or <code>null</code> if none. - * + * * @return the control for this view, or <code>null</code> if none * @since 3.0 */ protected Control getControl() { return getViewer().getControl(); } - + /** * Registers the given runnable with the display * associated with this view's control, if any. @@ -800,8 +800,8 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi if (isAvailable()) { getControl().getDisplay().syncExec(r); } - } - + } + /** * Returns the memento that contains the persisted state of * the view. May be <code>null</code>. @@ -811,19 +811,19 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi return fMemento; } - /** - * Sets the memento that contains the persisted state of the + /** + * Sets the memento that contains the persisted state of the * view. * @param memento the new {@link IMemento} */ protected void setMemento(IMemento memento) { fMemento = memento; } - + /** * Returns the specified view in this view's page * or <code>null</code> if none. - * + * * @param id view identifier * @return view part */ @@ -833,9 +833,9 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi if (page != null) { view = page.findView(id); } - return view; + return view; } - + /** * @see PageBookView#isImportant(IWorkbenchPart) */ @@ -872,39 +872,39 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi * this view's viewer's control is returned. Subclasses * should override if required - for example, if this * view has its viewer nested inside other controls. - * + * * @return this view's default control. - */ + */ protected Control getDefaultControl() { Viewer viewer = getViewer(); if (viewer != null) { return viewer.getControl(); - } + } return null; } - + /** * Sets this view's message page - * + * * @param page message page */ private void setMessagePage(MessagePage page) { fMessagePage = page; } - + /** * Returns this view's message page - * + * * @return message page */ protected MessagePage getMessagePage() { return fMessagePage; - } - + } + /** * Shows the given message in this view's message' * page. Makes the message page the visible page. - * + * * @param message the message to display */ public void showMessage(String message) { @@ -919,7 +919,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi getMessagePage().setMessage(message); getPageBook().showPage(getMessagePage().getControl()); } - + /** * Shows this view's viewer page. */ @@ -929,17 +929,17 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi } getPageBook().showPage(getDefaultPage().getControl()); } - + /** * Returns whether this view's viewer is * currently available. - * + * * @return whether this view's viewer is * currently available */ public boolean isAvailable() { return !(getViewer() == null || getViewer().getControl() == null || getViewer().getControl().isDisposed()); - } + } /** * @see IDebugView#add(IUpdate) */ @@ -957,11 +957,11 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi public void remove(IUpdate updatable) { fUpdateables.remove(updatable); } - + /** * Adds a context menu manager that is relevant to this view. * @param contextMenuManager The contextMenuManager to add - * + * * @since 2.1 */ public void addContextMenuManager(IMenuManager contextMenuManager) { @@ -970,37 +970,37 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi } fContextMenuManagers.add(contextMenuManager); } - + /** * Notification this view is now visible. - * + * * @since 2.1 */ protected void becomesVisible() { } - + /** * Notification this view is now hidden. - * + * * @since 2.1 */ protected void becomesHidden() { } - + /** * Returns whether this view is currently visible. - * + * * @return whether this view is currently visible * @since 2.1 */ public boolean isVisible() { return fIsVisible; } - + /** * Creates and registers a part listener with this event handler's page, * if one does not already exist. - * + * * @since 2.1 */ protected void registerPartListener() { @@ -1012,7 +1012,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi /** * Unregisters and disposes this event handler's part listener. - * + * * @since 2.1 */ protected void deregisterPartListener() { @@ -1020,7 +1020,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi getSite().getPage().removePartListener(fPartListener); fPartListener = null; } - } + } /** * Returns a map of the current attribute settings in the model @@ -1039,6 +1039,6 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi } return Collections.EMPTY_MAP; } -} +} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java index e2dbb3a50..5503ed937 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java @@ -11,7 +11,7 @@ *******************************************************************************/ package org.eclipse.debug.ui; - + import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; @@ -41,7 +41,7 @@ import org.eclipse.ui.progress.WorkbenchJob; * @since 2.0 */ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigurationTab2 { - + /** * The control for this page, or <code>null</code> */ @@ -52,69 +52,69 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura * contained in. */ private ILaunchConfigurationDialog fLaunchConfigurationDialog; - + /** * Current error message, or <code>null</code> */ private String fErrorMessage; - + /** * Current warning message, or <code>null</code> */ private String fWarningMessage; - + /** * Current message, or <code>null</code> */ private String fMessage; - + /** * Whether this tab needs to apply changes. This attribute is initialized to * <code>true</code> to be backwards compatible. If clients want to take advantage * of such a feature, they should set the flag to false, and check it before * applying changes to the launch configuration working copy. - * + * * @since 2.1 */ - private boolean fDirty = true; - + private boolean fDirty = true; + /** * Job to update the tab after a delay. Used to delay updates while * the user is typing. */ - private Job fRereshJob; - + private Job fRereshJob; + /** * The set help context id - * + * * @since 3.7 */ private String fHelpContextId = null; - + /** * Returns the dialog this tab is contained in, or * <code>null</code> if not yet set. - * + * * @return launch configuration dialog, or <code>null</code> */ protected ILaunchConfigurationDialog getLaunchConfigurationDialog() { return fLaunchConfigurationDialog; - } - + } + /** * Updates the buttons and message in this page's launch * configuration dialog. */ protected void updateLaunchConfigurationDialog() { if (getLaunchConfigurationDialog() != null) { - //order is important here due to the call to + //order is important here due to the call to //refresh the tab viewer in updateButtons() //which ensures that the messages are up to date getLaunchConfigurationDialog().updateButtons(); getLaunchConfigurationDialog().updateMessage(); } } - + /** * @see ILaunchConfigurationTab#getControl() */ @@ -125,7 +125,7 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura /** * Sets the control to be displayed in this tab. - * + * * @param control the control for this tab */ protected void setControl(Control control) { @@ -159,7 +159,7 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura /** * By default, do nothing. - * + * * @see ILaunchConfigurationTab#launched(ILaunch) * @deprecated As of R3.0, this method is no longer called by the launch * framework. Since tabs do not exist when launching is performed elsewhere @@ -178,10 +178,10 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura public void setLaunchConfigurationDialog(ILaunchConfigurationDialog dialog) { fLaunchConfigurationDialog = dialog; } - + /** * Sets this page's error message, possibly <code>null</code>. - * + * * @param errorMessage the error message or <code>null</code> */ protected void setErrorMessage(String errorMessage) { @@ -190,7 +190,7 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura /** * Sets this page's warning message, possibly <code>null</code>. - * + * * @param warningMessage the warning message or <code>null</code> * @since 3.9 */ @@ -200,34 +200,34 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura /** * Sets this page's message, possibly <code>null</code>. - * + * * @param message the message or <code>null</code> */ protected void setMessage(String message) { fMessage = message; } - + /** * Convenience method to return the launch manager. - * + * * @return the launch manager */ protected ILaunchManager getLaunchManager() { return DebugPlugin.getDefault().getLaunchManager(); - } - + } + /** * By default, do nothing. - * + * * @see ILaunchConfigurationTab#dispose() */ @Override public void dispose() { } - + /** * Returns the shell this tab is contained in, or <code>null</code>. - * + * * @return the shell this tab is contained in, or <code>null</code> */ protected Shell getShell() { @@ -237,38 +237,38 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura } return null; } - + /** * Creates and returns a new push button with the given * label and/or image. - * + * * @param parent parent control * @param label button label or <code>null</code> * @param image image of <code>null</code> - * + * * @return a new push button */ protected Button createPushButton(Composite parent, String label, Image image) { - return SWTFactory.createPushButton(parent, label, image); + return SWTFactory.createPushButton(parent, label, image); } - + /** * Creates and returns a new radio button with the given * label and/or image. - * + * * @param parent parent control * @param label button label or <code>null</code> - * + * * @return a new radio button */ protected Button createRadioButton(Composite parent, String label) { - return SWTFactory.createRadioButton(parent, label); - } - + return SWTFactory.createRadioButton(parent, label); + } + /** * Creates and returns a new check button with the given * label. - * + * * @param parent the parent composite * @param label the button label * @return a new check button @@ -277,7 +277,7 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura protected Button createCheckButton(Composite parent, String label) { return SWTFactory.createCheckButton(parent, label, null, false, 1); } - + /** * @see ILaunchConfigurationTab#canSave() */ @@ -285,7 +285,7 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura public boolean canSave() { return true; } - + /** * @see ILaunchConfigurationTab#isValid(ILaunchConfiguration) */ @@ -301,11 +301,11 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura */ protected void createVerticalSpacer(Composite comp, int colSpan) { SWTFactory.createVerticalSpacer(comp, colSpan); - } - + } + /** * Create a horizontal separator. - * + * * @param comp parent widget * @param colSpan number of columns to span * @since 3.0 @@ -315,8 +315,8 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = colSpan; label.setLayoutData(gd); - } - + } + /** * @see ILaunchConfigurationTab#getImage() */ @@ -324,7 +324,7 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura public Image getImage() { return null; } - + /** * Returns this tab's unique identifier or <code>null</code> if none. * By default, <code>null</code> is returned. Subclasses should override @@ -339,12 +339,12 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura public String getId() { return null; } - + /** * Convenience method to set a boolean attribute of on a launch * configuration. If the value being set is the default, the attribute's * value is set to <code>null</code>. - * + * * @param attribute attribute identifier * @param configuration the configuration on which to set the attribute * @param value the value of the attribute @@ -363,10 +363,10 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura /** * Returns if this tab has pending changes that need to be saved. - * - * It is up to clients to set/reset and consult this attribute as required. + * + * It is up to clients to set/reset and consult this attribute as required. * By default, a tab is initialized to dirty for backwards compatibility. - * + * * @return whether this tab is dirty * @since 2.1 */ @@ -375,19 +375,19 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura } /** - * Sets the dirty state of the tab. Setting this flag allows clients to + * Sets the dirty state of the tab. Setting this flag allows clients to * explicitly say whether this tab has pending changes or not. - * - * It is up to clients to set/reset and consult this attribute as required. + * + * It is up to clients to set/reset and consult this attribute as required. * By default, a tab is initialized to dirty for backwards compatibility. - * + * * @param dirty what to set the dirty flag to * @since 2.1 */ protected void setDirty(boolean dirty) { fDirty = dirty; } - + /** * This method was added to the <code>ILaunchConfigurationTab</code> interface * in the 3.0 release to allow tabs to distinguish between a tab being activated @@ -400,9 +400,9 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura * communication by applying attributes from the active tab to the launch configuration * being edited, when a tab is exited, and by initializing a tab when activated. * The addition of the methods <code>activated</code> and <code>deactivated</code> - * allow tabs to determine the appropriate course of action. + * allow tabs to determine the appropriate course of action. * </p> - * + * * @see org.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) * @since 3.0 */ @@ -422,7 +422,7 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura * communication by applying attributes from the active tab to the launch configuration * being edited, when a tab is exited, and by initializing a tab when activated. * The addition of the methods <code>activated</code> and <code>deactivated</code> - * allow tabs to determine the appropriate course of action. + * allow tabs to determine the appropriate course of action. * </p> * @see org.eclipse.debug.ui.ILaunchConfigurationTab#deactivated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) * @since 3.0 @@ -431,10 +431,10 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura public void deactivated(ILaunchConfigurationWorkingCopy workingCopy) { performApply(workingCopy); } - + /** * Returns the job to update the launch configuration dialog. - * + * * @return update job */ private Job getUpdateJob() { @@ -444,10 +444,10 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura } return fRereshJob; } - + /** * Schedules the update job to run for this tab based on this tab's delay. - * + * * @since 3.6 */ protected void scheduleUpdateJob() { @@ -455,11 +455,11 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura job.cancel(); // cancel existing job job.schedule(getUpdateJobDelay()); } - + /** * Creates and returns a job used to update the launch configuration dialog * for this tab. Subclasses may override. - * + * * @return job to update the launch dialog for this tab * @since 3.6 */ @@ -478,20 +478,20 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura } }; } - + /** * Return the time delay that should be used when scheduling the * update job. Subclasses may override. - * + * * @return a time delay in milliseconds before the job should run * @since 3.6 */ protected long getUpdateJobDelay() { return 200; - } + } /** - * Sets the help context id for this tab. + * Sets the help context id for this tab. * <p> * Not all tabs honor this setting, but if this method is called prior * to {@link #createControl(Composite)}, a tab implementation may use this @@ -503,10 +503,10 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura public void setHelpContextId(String id) { fHelpContextId = id; } - + /** * Returns the help context id for this tab or <code>null</code>. - * + * * @return the help context for this tab or <code>null</code> if unknown. * @since 3.7 */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTabGroup.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTabGroup.java index 970ac29dc..d91181ef5 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTabGroup.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTabGroup.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -27,7 +27,7 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; * @since 2.0 */ public abstract class AbstractLaunchConfigurationTabGroup implements ILaunchConfigurationTabGroup { - + /** * The tabs in this tab group, or <code>null</code> if not yet instantiated. */ @@ -40,10 +40,10 @@ public abstract class AbstractLaunchConfigurationTabGroup implements ILaunchConf public ILaunchConfigurationTab[] getTabs() { return fTabs; } - + /** * Sets the tabs in this group - * + * * @param tabs the tabs in this group */ protected void setTabs(ILaunchConfigurationTab[] tabs) { @@ -52,7 +52,7 @@ public abstract class AbstractLaunchConfigurationTabGroup implements ILaunchConf /** * By default, dispose all the tabs in this group. - * + * * @see ILaunchConfigurationTabGroup#dispose() */ @Override @@ -67,7 +67,7 @@ public abstract class AbstractLaunchConfigurationTabGroup implements ILaunchConf /** * By default, delegate to all of the tabs in this group. - * + * * @see ILaunchConfigurationTabGroup#setDefaults(ILaunchConfigurationWorkingCopy) */ @Override @@ -75,12 +75,12 @@ public abstract class AbstractLaunchConfigurationTabGroup implements ILaunchConf ILaunchConfigurationTab[] tabs = getTabs(); for (int i = 0; i < tabs.length; i++) { tabs[i].setDefaults(configuration); - } + } } - /** + /** * By default, delegate to all of the tabs in this group. - * + * * @see ILaunchConfigurationTabGroup#initializeFrom(ILaunchConfiguration) */ @Override @@ -88,12 +88,12 @@ public abstract class AbstractLaunchConfigurationTabGroup implements ILaunchConf ILaunchConfigurationTab[] tabs = getTabs(); for (int i = 0; i < tabs.length; i++) { tabs[i].initializeFrom(configuration); - } + } } /** * By default, delegate to all of the tabs in this group. - * + * * @see ILaunchConfigurationTabGroup#performApply(ILaunchConfigurationWorkingCopy) */ @Override @@ -101,12 +101,12 @@ public abstract class AbstractLaunchConfigurationTabGroup implements ILaunchConf ILaunchConfigurationTab[] tabs = getTabs(); for (int i = 0; i < tabs.length; i++) { tabs[i].performApply(configuration); - } + } } /** * By default, delegate to all of the tabs in this group. - * + * * @see ILaunchConfigurationTabGroup#launched(ILaunch) * @deprecated As of R3.0, this method is no longer called by the launch * framework. Since tabs do not exist when launching is performed elsewhere @@ -119,7 +119,7 @@ public abstract class AbstractLaunchConfigurationTabGroup implements ILaunchConf ILaunchConfigurationTab[] tabs = getTabs(); for (int i = 0; i < tabs.length; i++) { tabs[i].launched(launch); - } + } } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/BreakpointTypeCategory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/BreakpointTypeCategory.java index 9fcb97e15..6c4f26ef1 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/BreakpointTypeCategory.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/BreakpointTypeCategory.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,20 +28,20 @@ public class BreakpointTypeCategory extends PlatformObject implements IBreakpoin private String fName; private ImageDescriptor fImageDescriptor = DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_OBJS_BREAKPOINT_TYPE); - + /** * Constructs a type category for the given type name. - * + * * @param name breakpoint type name */ public BreakpointTypeCategory(String name) { fName = name; } - + /** * Constructs a type category for the given type name with the given * image. - * + * * @param name breakpoint type name * @param descriptor image descriptor */ @@ -51,16 +51,16 @@ public class BreakpointTypeCategory extends PlatformObject implements IBreakpoin fImageDescriptor = descriptor; } } - + /** * Returns the name of this category's breakpoint type. - * + * * @return the name of this category's breakpoint type */ protected String getName() { return fName; } - + /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ @@ -72,7 +72,7 @@ public class BreakpointTypeCategory extends PlatformObject implements IBreakpoin } return false; } - + /* (non-Javadoc) * @see java.lang.Object#hashCode() */ @@ -112,7 +112,7 @@ public class BreakpointTypeCategory extends PlatformObject implements IBreakpoin public Object getParent(Object o) { return null; } - + @Override public String toString() { return fName; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java index c0316cad2..94a28248e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java @@ -11,7 +11,7 @@ *******************************************************************************/ package org.eclipse.debug.ui; - + import java.nio.charset.Charset; import java.nio.charset.IllegalCharsetNameException; import java.util.ArrayList; @@ -91,7 +91,7 @@ import com.ibm.icu.text.MessageFormat; * switching behavior for an associated launch. * <p> * Clients may call {@link #setHelpContextId(String)} on this tab prior to control - * creation to alter the default context help associated with this tab. + * creation to alter the default context help associated with this tab. * </p> * <p> * Clients may instantiate this class. @@ -100,16 +100,16 @@ import com.ibm.icu.text.MessageFormat; * @noextend This class is not intended to be subclassed by clients. */ public class CommonTab extends AbstractLaunchConfigurationTab { - + /** * Constant representing the id of the {@link IDialogSettings} location for the {@link ContainerSelectionDialog} used * on this tab - * + * * @since 3.6 */ private final String SHARED_LAUNCH_CONFIGURATON_DIALOG = IDebugUIConstants.PLUGIN_ID + ".SHARED_LAUNCH_CONFIGURATON_DIALOG"; //$NON-NLS-1$ private final String WORKSPACE_SELECTION_DIALOG = IDebugUIConstants.PLUGIN_ID + ".WORKSPACE_SELECTION_DIALOG"; //$NON-NLS-1$ - + /** * This attribute exists solely for the purpose of making sure that invalid shared locations * can be revertible. This attribute is not saveable and will never appear in a saved @@ -117,7 +117,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { * @since 3.3 */ private static final String BAD_CONTAINER = "bad_container_name"; //$NON-NLS-1$ - + // Local/shared UI widgets private Button fLocalRadioButton; private Button fSharedRadioButton; @@ -140,12 +140,12 @@ public class CommonTab extends AbstractLaunchConfigurationTab { private Button fInputFileBrowse; private Button fInputVariables; private Button fInputWorkspaceBrowse; - + /** * Check box list for specifying favorites */ private CheckboxTableViewer fFavoritesTable; - + /** * Modify listener that simply updates the owning launch configuration dialog. */ @@ -155,36 +155,36 @@ public class CommonTab extends AbstractLaunchConfigurationTab { scheduleUpdateJob(); } }; - + /** * Constructs a new tab with default context help. */ public CommonTab() { setHelpContextId(IDebugHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_COMMON_TAB); } - - + + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite) */ @Override - public void createControl(Composite parent) { + public void createControl(Composite parent) { Composite comp = new Composite(parent, SWT.NONE); setControl(comp); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), getHelpContextId()); comp.setLayout(new GridLayout(2, true)); comp.setFont(parent.getFont()); - + createSharedConfigComponent(comp); createFavoritesComponent(comp); createEncodingComponent(comp); createOutputCaptureComponent(comp); createLaunchInBackgroundComponent(comp); } - + /** * Returns the {@link IDialogSettings} for the given id - * + * * @param id the id of the dialog settings to get * @return the {@link IDialogSettings} to pass into the {@link ContainerSelectionDialog} * @since 3.6 @@ -194,10 +194,10 @@ public class CommonTab extends AbstractLaunchConfigurationTab { IDialogSettings section = settings.getSection(id); if (section == null) { section = settings.addNewSection(id); - } + } return section; } - + /** * Creates the favorites control * @param parent the parent composite to add this one to @@ -219,7 +219,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { } }); } - + /** * Creates the shared config component * @param parent the parent composite to add this component to @@ -247,18 +247,18 @@ public class CommonTab extends AbstractLaunchConfigurationTab { } }); fSharedLocationText.addModifyListener(fBasicModifyListener); - fSharedLocationButton = createPushButton(comp, LaunchConfigurationsMessages.CommonTab__Browse_6, null); + fSharedLocationButton = createPushButton(comp, LaunchConfigurationsMessages.CommonTab__Browse_6, null); fSharedLocationButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent evt) { handleSharedLocationButtonSelected(); } - }); + }); fLocalRadioButton.setSelection(true); - setSharedEnabled(false); + setSharedEnabled(false); } - + /** * Creates the component set for the capture output composite * @param parent the parent to add this component to @@ -284,19 +284,19 @@ public class CommonTab extends AbstractLaunchConfigurationTab { } }); fFileText.addModifyListener(fBasicModifyListener); - + Composite bcomp = SWTFactory.createComposite(comp, 3, 5, GridData.HORIZONTAL_ALIGN_END); GridLayout ld = (GridLayout)bcomp.getLayout(); ld.marginHeight = 1; ld.marginWidth = 0; - fWorkspaceBrowse = createPushButton(bcomp, LaunchConfigurationsMessages.CommonTab_12, null); + fWorkspaceBrowse = createPushButton(bcomp, LaunchConfigurationsMessages.CommonTab_12, null); fWorkspaceBrowse.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider()); - dialog.setTitle(LaunchConfigurationsMessages.CommonTab_13); - dialog.setMessage(LaunchConfigurationsMessages.CommonTab_14); - dialog.setInput(ResourcesPlugin.getWorkspace().getRoot()); + dialog.setTitle(LaunchConfigurationsMessages.CommonTab_13); + dialog.setMessage(LaunchConfigurationsMessages.CommonTab_14); + dialog.setInput(ResourcesPlugin.getWorkspace().getRoot()); dialog.setComparator(new ResourceComparator(ResourceComparator.NAME)); dialog.setDialogBoundsSettings(getDialogBoundsSettings(WORKSPACE_SELECTION_DIALOG), Dialog.DIALOG_PERSISTSIZE); if (dialog.open() == IDialogConstants.OK_ID) { @@ -321,7 +321,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { } } }); - fVariables = createPushButton(bcomp, LaunchConfigurationsMessages.CommonTab_9, null); + fVariables = createPushButton(bcomp, LaunchConfigurationsMessages.CommonTab_9, null); fVariables.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent e) { @@ -335,7 +335,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { @Override public void widgetDefaultSelected(SelectionEvent e) {} }); - fAppend = createCheckButton(comp, LaunchConfigurationsMessages.CommonTab_11); + fAppend = createCheckButton(comp, LaunchConfigurationsMessages.CommonTab_11); GridData gd = new GridData(SWT.LEFT, SWT.TOP, true, false); gd.horizontalSpan = 4; @@ -345,7 +345,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { public void widgetSelected(SelectionEvent e) { updateLaunchConfigurationDialog(); } - }); + }); } private void createInputCaptureComponent(Composite parent){ @@ -462,12 +462,12 @@ public class CommonTab extends AbstractLaunchConfigurationTab { fVariables.setEnabled(enable); fAppend.setEnabled(enable); } - + /** * Returns the default encoding for the specified config * @param config the configuration to get the encoding for * @return the default encoding - * + * * @since 3.4 */ private String getDefaultEncoding(ILaunchConfiguration config) { @@ -478,7 +478,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { if(res instanceof IFile) { return ((IFile)res).getCharset(); } - else if(res instanceof IContainer) { + else if(res instanceof IContainer) { return ((IContainer)res).getDefaultCharset(); } } @@ -488,22 +488,22 @@ public class CommonTab extends AbstractLaunchConfigurationTab { } return ResourcesPlugin.getEncoding(); } - + /** * Creates the encoding component * @param parent the parent to add this composite to */ private void createEncodingComponent(Composite parent) { Group group = SWTFactory.createGroup(parent, LaunchConfigurationsMessages.CommonTab_1, 2, 1, GridData.FILL_BOTH); - - fDefaultEncodingButton = createRadioButton(group, IInternalDebugCoreConstants.EMPTY_STRING); + + fDefaultEncodingButton = createRadioButton(group, IInternalDebugCoreConstants.EMPTY_STRING); GridData gd = new GridData(SWT.BEGINNING, SWT.NORMAL, true, false); gd.horizontalSpan = 2; fDefaultEncodingButton.setLayoutData(gd); - - fAltEncodingButton = createRadioButton(group, LaunchConfigurationsMessages.CommonTab_3); + + fAltEncodingButton = createRadioButton(group, LaunchConfigurationsMessages.CommonTab_3); fAltEncodingButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); - + fEncodingCombo = new Combo(group, SWT.NONE); fEncodingCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fEncodingCombo.setFont(parent.getFont()); @@ -511,7 +511,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { String[] encodingArray = allEncodings.toArray(new String[0]); fEncodingCombo.setItems(encodingArray); if (encodingArray.length > 0) { - fEncodingCombo.select(0); + fEncodingCombo.select(0); } fEncodingCombo.getAccessible().addAccessibleListener(new AccessibleAdapter() { @Override @@ -540,7 +540,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { fEncodingCombo.addKeyListener(new KeyAdapter() { /* * (non-Javadoc) - * + * * @see org.eclipse.swt.events.KeyListener#keyReleased(org.eclipse.swt.events.KeyEvent) */ @Override @@ -549,10 +549,10 @@ public class CommonTab extends AbstractLaunchConfigurationTab { } }); } - + /** * Returns whether or not the given encoding is valid. - * + * * @param enc * the encoding to validate * @return <code>true</code> if the encoding is valid, <code>false</code> @@ -574,7 +574,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { * @param parent the composite to create the controls in */ protected void createLaunchInBackgroundComponent(Composite parent) { - fLaunchInBackgroundButton = createCheckButton(parent, LaunchConfigurationsMessages.CommonTab_10); + fLaunchInBackgroundButton = createCheckButton(parent, LaunchConfigurationsMessages.CommonTab_10); GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL); data.horizontalSpan = 2; fLaunchInBackgroundButton.setLayoutData(data); @@ -594,7 +594,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { setSharedEnabled(isShared()); updateLaunchConfigurationDialog(); } - + /** * handles the input file being selected */ @@ -605,13 +605,13 @@ public class CommonTab extends AbstractLaunchConfigurationTab { /** * Sets the widgets for specifying that a launch configuration is to be shared to the enable value - * @param enable the enabled value for + * @param enable the enabled value for */ private void setSharedEnabled(boolean enable) { fSharedLocationText.setEnabled(enable); fSharedLocationButton.setEnabled(enable); } - + private void setInputFileEnabled(boolean enable) { fInputFileLocationText.setEnabled(enable); fInputFileBrowse.setEnabled(enable); @@ -632,11 +632,11 @@ public class CommonTab extends AbstractLaunchConfigurationTab { } } } - } + } catch (CoreException e) {DebugUIPlugin.log(e);} return path; } - + /** * if the shared radio button is selected, indicating that the launch configuration is to be shared * @return true if the radio button is selected, false otherwise @@ -644,11 +644,11 @@ public class CommonTab extends AbstractLaunchConfigurationTab { private boolean isShared() { return fSharedRadioButton.getSelection(); } - + /** * if the input file button is selected, indicating that the launch will * take input file as stdin - * + * * @return true if the check button is selected, false otherwise */ private boolean isInputFile() { @@ -658,7 +658,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { /** * Handles the shared location button being selected */ - private void handleSharedLocationButtonSelected() { + private void handleSharedLocationButtonSelected() { String currentContainerString = fSharedLocationText.getText(); IContainer currentContainer = getContainer(currentContainerString); ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), @@ -668,14 +668,14 @@ public class CommonTab extends AbstractLaunchConfigurationTab { dialog.showClosedProjects(false); dialog.setDialogBoundsSettings(getDialogBoundsSettings(SHARED_LAUNCH_CONFIGURATON_DIALOG), Dialog.DIALOG_PERSISTSIZE); dialog.open(); - Object[] results = dialog.getResult(); + Object[] results = dialog.getResult(); if ((results != null) && (results.length > 0) && (results[0] instanceof IPath)) { IPath path = (IPath)results[0]; String containerName = path.toOSString(); fSharedLocationText.setText(containerName); - } + } } - + /** * gets the container form the specified path * @param path the path to get the container from @@ -685,7 +685,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { Path containerPath = new Path(path); return (IContainer) getWorkspaceRoot().findMember(containerPath); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration) */ @@ -712,7 +712,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { updateEncoding(configuration); updateConsoleOutput(configuration); } - + /** * Updates the console output form the local configuration * @param configuration the local configuration @@ -722,7 +722,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { String stdinFromFile = null; String outputFile = null; boolean append = false; - + try { outputToConsole = configuration.getAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE, true); stdinFromFile = configuration.getAttribute(IDebugUIConstants.ATTR_CAPTURE_STDIN_FILE, (String) null); @@ -731,7 +731,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { append = configuration.getAttribute(IDebugUIConstants.ATTR_APPEND_TO_FILE, false); } catch (CoreException e) { } - + fConsoleOutput.setSelection(outputToConsole); fAppend.setSelection(append); boolean haveOutputFile= outputFile != null; @@ -753,10 +753,10 @@ public class CommonTab extends AbstractLaunchConfigurationTab { * Updates the launch on background check button * @param configuration the local launch configuration */ - protected void updateLaunchInBackground(ILaunchConfiguration configuration) { + protected void updateLaunchInBackground(ILaunchConfiguration configuration) { fLaunchInBackgroundButton.setSelection(isLaunchInBackground(configuration)); } - + /** * Updates the encoding * @param configuration the local configuration @@ -781,10 +781,10 @@ public class CommonTab extends AbstractLaunchConfigurationTab { fEncodingCombo.setEnabled(false); } } - + /** * Returns whether the given configuration should be launched in the background. - * + * * @param configuration the configuration * @return whether the configuration is configured to launch in the background */ @@ -851,7 +851,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { config.setContainer(null); } } - + /** * Convenience accessor * @return the singleton {@link LaunchConfigurationManager} @@ -859,10 +859,10 @@ public class CommonTab extends AbstractLaunchConfigurationTab { protected LaunchConfigurationManager getLaunchConfigurationManager() { return DebugUIPlugin.getDefault().getLaunchConfigurationManager(); } - + /** * Update the favorite settings. - * + * * NOTE: set to <code>null</code> instead of <code>false</code> for backwards compatibility * when comparing if content is equal, since 'false' is default * and will be missing for older configurations. @@ -899,7 +899,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { return; } } - } + } config.setAttribute(IDebugUIConstants.ATTR_DEBUG_FAVORITE, (String)null); config.setAttribute(IDebugUIConstants.ATTR_RUN_FAVORITE, (String)null); List<String> groups = null; @@ -913,9 +913,9 @@ public class CommonTab extends AbstractLaunchConfigurationTab { config.setAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, groups); } catch (CoreException e) { DebugUIPlugin.log(e); - } - } - + } + } + /** * Convenience method for getting the workspace root. * @return the singleton {@link IWorkspaceRoot} @@ -923,7 +923,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { private IWorkspaceRoot getWorkspaceRoot() { return ResourcesPlugin.getWorkspace().getRoot(); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration) */ @@ -931,10 +931,10 @@ public class CommonTab extends AbstractLaunchConfigurationTab { public boolean isValid(ILaunchConfiguration config) { setMessage(null); setErrorMessage(null); - + return validateLocalShared() && validateRedirectFile() && validateEncoding() && validateStdinFile(); } - + /** * validates the encoding selection * @return true if the validate encoding is allowable, false otherwise @@ -959,7 +959,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { if(fFileOutput.getSelection()) { int len = fFileText.getText().trim().length(); if (len == 0) { - setErrorMessage(LaunchConfigurationsMessages.CommonTab_8); + setErrorMessage(LaunchConfigurationsMessages.CommonTab_8); return false; } } @@ -975,19 +975,19 @@ public class CommonTab extends AbstractLaunchConfigurationTab { String path = fSharedLocationText.getText().trim(); IContainer container = getContainer(path); if (container == null || container.equals(ResourcesPlugin.getWorkspace().getRoot())) { - setErrorMessage(LaunchConfigurationsMessages.CommonTab_Invalid_shared_configuration_location_14); + setErrorMessage(LaunchConfigurationsMessages.CommonTab_Invalid_shared_configuration_location_14); return false; } else if (!container.getProject().isOpen()) { - setErrorMessage(LaunchConfigurationsMessages.CommonTab_Cannot_save_launch_configuration_in_a_closed_project__1); - return false; + setErrorMessage(LaunchConfigurationsMessages.CommonTab_Cannot_save_launch_configuration_in_a_closed_project__1); + return false; } } - return true; + return true; } /** * validates the stdin file location - * + * * @return true if the stdin file exists, false otherwise */ private boolean validateStdinFile() { @@ -1047,7 +1047,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { } else { configuration.setAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_FILE, (String)null); } - + if (!captureOutput) { configuration.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, false); } else { @@ -1060,19 +1060,19 @@ public class CommonTab extends AbstractLaunchConfigurationTab { */ @Override public String getName() { - return LaunchConfigurationsMessages.CommonTab__Common_15; + return LaunchConfigurationsMessages.CommonTab__Common_15; } - + /** * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getId() - * + * * @since 3.3 */ @Override public String getId() { return "org.eclipse.debug.ui.commonTab"; //$NON-NLS-1$ } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#canSave() */ @@ -1088,7 +1088,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { public Image getImage() { return DebugUITools.getImage(IInternalDebugUIConstants.IMG_OBJS_COMMON_TAB); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) */ @@ -1116,7 +1116,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { LaunchHistory history = getLaunchConfigurationManager().getLaunchHistory(extension.getIdentifier()); if (history != null && history.accepts(configuration)) { possibleGroups.add(extension); - } + } } return possibleGroups.toArray(); } @@ -1128,13 +1128,13 @@ public class CommonTab extends AbstractLaunchConfigurationTab { public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} } - + /** * Provides the labels for the favorites table * */ class FavoritesLabelProvider implements ITableLabelProvider { - + private Map<Object, Image> fImages = new HashMap<Object, Image>(); @Override @@ -1170,7 +1170,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab { public boolean isLabelProperty(Object element, String property) {return false;} @Override - public void removeListener(ILabelProviderListener listener) {} + public void removeListener(ILabelProviderListener listener) {} } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugElementWorkbenchAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugElementWorkbenchAdapter.java index 6de7015f5..9f11ea0fb 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugElementWorkbenchAdapter.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugElementWorkbenchAdapter.java @@ -33,7 +33,7 @@ import org.eclipse.ui.model.IWorkbenchAdapter2; */ @Deprecated public abstract class DebugElementWorkbenchAdapter implements IWorkbenchAdapter, IWorkbenchAdapter2 { - + /* (non-Javadoc) * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugPopup.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugPopup.java index 33b81d5d2..93eafda46 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugPopup.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugPopup.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 *******************************************************************************/ @@ -50,7 +50,7 @@ public abstract class DebugPopup extends PopupDialog { private IHandlerService fHandlerService; private String fCommandId; - + private boolean fPersisted = false; /** @@ -58,7 +58,7 @@ public abstract class DebugPopup extends PopupDialog { * @param parent The parent shell * @param anchor point at which to anchor the popup dialog in Display coordinate space. * Since 3.3, <code>null</code> can be specified to use a default anchor point - * @param commandId The command id to be used for persistence of + * @param commandId The command id to be used for persistence of * the dialog, or <code>null</code> */ public DebugPopup(Shell parent, Point anchor, String commandId) { @@ -68,7 +68,7 @@ public abstract class DebugPopup extends PopupDialog { } /** - * Returns the text to be shown in the popups's information area. + * Returns the text to be shown in the popups's information area. * May return <code>null</code>. * <p> * By default, if this dialog has a persistence command associated with it, @@ -82,7 +82,7 @@ public abstract class DebugPopup extends PopupDialog { IWorkbench workbench = PlatformUI.getWorkbench(); IBindingService bindingService = workbench.getAdapter(IBindingService.class); String formattedBinding = bindingService.getBestActiveBindingFormattedFor(getCommandId()); - + String infoText = null; if (formattedBinding != null) { infoText = MessageFormat.format(DebugUIViewsMessages.InspectPopupDialog_1, new Object[] { @@ -92,7 +92,7 @@ public abstract class DebugPopup extends PopupDialog { } return null; } - + /** * Returns the text to be shown as the action performed when this dialog's * persist command is invoked, or <code>null</code>. @@ -108,9 +108,9 @@ public abstract class DebugPopup extends PopupDialog { /** * Returns the command id to be used for persisting the contents of the - * dialog. If the contents should not be persisted, this method should - * return null. - * + * dialog. If the contents should not be persisted, this method should + * return null. + * * @return The command id to be used for persisting the contents of the * dialog or <code>null</code> */ @@ -125,10 +125,10 @@ public abstract class DebugPopup extends PopupDialog { protected void persist() { fPersisted = true; } - + /** * Returns whether the command handler was invoked to persist this popup's result. - * + * * @return whether the command handler was invoked to persist this popup's result */ protected boolean wasPersisted() { @@ -144,11 +144,11 @@ public abstract class DebugPopup extends PopupDialog { /** - * Returns the initial location to use for the shell based upon the - * current selection in the viewer. Bottom is preferred to top, and + * Returns the initial location to use for the shell based upon the + * current selection in the viewer. Bottom is preferred to top, and * right is preferred to left, therefore if possible the popup will * be located below and to the right of the selection. - * + * * @param initialSize * the initial size of the shell, as returned by * <code>getInitialSize</code>. @@ -180,7 +180,7 @@ public abstract class DebugPopup extends PopupDialog { return settings; } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.PopupDialog#open() */ @@ -206,7 +206,7 @@ public abstract class DebugPopup extends PopupDialog { if (infoText != null) { setInfoText(infoText); } - + return super.open(); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java index 6b804853b..a861e4758 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java @@ -109,17 +109,17 @@ import org.eclipse.ui.ide.undo.WorkspaceUndoUtil; * The images will be disposed when this plug-in is shutdown. * </p> * <p> - * Note: all methods in this class are expected to be called + * Note: all methods in this class are expected to be called * on the Display thread unless otherwise noted. * </p> * @noinstantiate This class is not intended to be instantiated by clients. * @noextend This class is not intended to be subclassed by clients. */ public class DebugUITools { - + /** * The undo context for breakpoints. - * + * * @since 3.7 */ private static ObjectUndoContext fgBreakpointsUndoContext; @@ -141,7 +141,7 @@ public class DebugUITools { public static Image getImage(String key) { return DebugPluginImages.getImage(key); } - + /** * Returns the shared image descriptor managed under the given key, or * <code>null</code> if none. @@ -156,10 +156,10 @@ public class DebugUITools { public static ImageDescriptor getImageDescriptor(String key) { return DebugPluginImages.getImageDescriptor(key); } - + /** * Returns the default image descriptor for the given element. - * + * * @param element the element * @return the image descriptor or <code>null</code> if none */ @@ -170,11 +170,11 @@ public class DebugUITools { } return DebugPluginImages.getImageDescriptor(imageKey); } - + private static String getDefaultImageKey(Object element) { return ((DefaultLabelProvider)DebugUIPlugin.getDefaultLabelProvider()).getImageKey(element); } - + /** * Returns the preference store for the debug UI plug-in. * @@ -183,14 +183,14 @@ public class DebugUITools { public static IPreferenceStore getPreferenceStore() { return DebugUIPlugin.getDefault().getPreferenceStore(); } - + /** * Returns a new debug model presentation that delegates to * appropriate debug models. * <p> * It is the client's responsibility dispose the presentation. * </p> - * + * * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose() * @return a debug model presentation * @since 2.0 @@ -198,7 +198,7 @@ public class DebugUITools { public static IDebugModelPresentation newDebugModelPresentation() { return new DelegatingModelPresentation(); } - + /** * Returns a new debug model presentation for specified * debug model, or <code>null</code> if a presentation does @@ -206,7 +206,7 @@ public class DebugUITools { * <p> * It is the client's responsibility dispose the presentation. * </p> - * + * * @param identifier debug model identifier * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose() * @return a debug model presentation, or <code>null</code> @@ -229,11 +229,11 @@ public class DebugUITools { } } return null; - } - + } + /** - * Returns the element of the currently selected context in the - * active workbench window. Returns <code>null</code> if there is no + * Returns the element of the currently selected context in the + * active workbench window. Returns <code>null</code> if there is no * current debug context. * <p> * This method used to return <code>null</code> when called from a non-UI thread, @@ -252,11 +252,11 @@ public class DebugUITools { } /** - * Returns the currently selected context in the given part or part's - * workbench window. Returns <code>null</code> if there is no current + * Returns the currently selected context in the given part or part's + * workbench window. Returns <code>null</code> if there is no current * debug context. * @param part workbench part where the active context is to be evaluated - * @return the currently selected debug context in the given workbench part, + * @return the currently selected debug context in the given workbench part, * or <code>null</code> * @since 3.8 * @see IDebugContextService#getActiveContext(String) @@ -275,10 +275,10 @@ public class DebugUITools { } return null; } - + /** * Return the undo context that should be used for operations involving breakpoints. - * + * * @return the undo context for breakpoints * @since 3.7 */ @@ -292,7 +292,7 @@ public class DebugUITools { /** * Deletes the given breakpoints using the operation history, which allows to undo the deletion. - * + * * @param breakpoints the breakpoints to delete * @param shell the shell used for potential user interactions, or <code>null</code> if unknown * @param progressMonitor the progress monitor @@ -353,7 +353,7 @@ public class DebugUITools { /** * Returns the currently active context for the given workbench part. Returns <code>null</code> * if there is no current debug context.</p> - * + * * @param site the part's site where to look up the active context * @return the currently active debug context in the given part, or <code>null</code> * @since 3.7 @@ -366,7 +366,7 @@ public class DebugUITools { if (site instanceof IViewSite) { secondaryId = ((IViewSite)site).getSecondaryId(); } - ISelection activeContext = service.getActiveContext(id, secondaryId); + ISelection activeContext = service.getActiveContext(id, secondaryId); return getDebugContextElementForSelection(activeContext); } @@ -378,10 +378,10 @@ public class DebugUITools { * {@link IDebugContextService#addDebugContextListener(IDebugContextListener, String, String)} * using the part id parameters extracted from the given part parameter. * </p> - * + * * @param site the part's site to get the part ID and part secondary ID from * @param listener Debug context listener to add - * + * * @see IDebugContextService#addDebugContextListener(IDebugContextListener, String, String) * @see IDebugContextManager#addDebugContextListener(IDebugContextListener) * @since 3.7 @@ -404,10 +404,10 @@ public class DebugUITools { * {@link IDebugContextService#removeDebugContextListener(IDebugContextListener, String, String)} * using the part id parameters extracted from the given part parameter. * </p> - * + * * @param site the part's site to get the part ID and part secondary ID from * @param listener Debug context listener to remove - * + * * @see IDebugContextService#removeDebugContextListener(IDebugContextListener, String, String) * @see IDebugContextManager#removeDebugContextListener(IDebugContextListener) * @since 3.7 @@ -421,10 +421,10 @@ public class DebugUITools { } service.removeDebugContextListener(listener, id, secondaryId); } - + /** * Extracts the first element from the given selection and casts it to IAdaptable. - * + * * @param activeContext the selection * @return an adaptable */ @@ -440,25 +440,25 @@ public class DebugUITools { } return null; } - + /** * Returns the currently selected resource in the active workbench window, * or <code>null</code> if none. If an editor is active, the resource adapter * associated with the editor is returned, if any. - * + * * @return selected resource or <code>null</code> * @since 3.0 */ public static IResource getSelectedResource() { return SelectedResourceManager.getDefault().getSelectedResource(); } - + /** * Returns the process associated with the current debug context. * If there is no debug context currently, the most recently * launched process is returned. If there is no current process * <code>null</code> is returned. - * + * * @return the current process, or <code>null</code> * @since 2.0 */ @@ -470,15 +470,15 @@ public class DebugUITools { context = launches[launches.length - 1]; } } - + if (context instanceof IDebugElement) { return ((IDebugElement)context).getDebugTarget().getProcess(); } - + if (context instanceof IProcess) { return (IProcess)context; } - + if (context instanceof ILaunch) { ILaunch launch= (ILaunch)context; IDebugTarget target= launch.getDebugTarget(); @@ -493,17 +493,17 @@ public class DebugUITools { return ps[ps.length - 1]; } } - + if (context != null) { return context.getAdapter(IProcess.class); } - + return null; } /** * Open the launch configuration dialog with the specified initial selection. - * The selection may be <code>null</code>, or contain any mix of + * The selection may be <code>null</code>, or contain any mix of * <code>ILaunchConfiguration</code> or <code>ILaunchConfigurationType</code> * elements. * <p> @@ -515,7 +515,7 @@ public class DebugUITools { * Note that if an existing dialog is reused, the <code>mode</code> argument is ignored * and the existing dialog keeps its original mode. * </p> - * + * * @param shell the parent shell for the launch configuration dialog * @param selection the initial selection for the dialog * @param mode the mode (run or debug) in which to open the launch configuration dialog. @@ -527,7 +527,7 @@ public class DebugUITools { * @since 2.0 * @deprecated use openLaunchConfigurationDialogOnGroup(Shell, IStructuredSelection, String) * to specify the launch group that the dialog should be opened on. This method will open - * on the launch group with the specified mode and a <code>null</code> category + * on the launch group with the specified mode and a <code>null</code> category */ @Deprecated public static int openLaunchConfigurationDialog(Shell shell, IStructuredSelection selection, String mode) { @@ -540,10 +540,10 @@ public class DebugUITools { } return Window.CANCEL; } - + /** * Open the launch configuration dialog with the specified initial selection. - * The selection may be <code>null</code>, or contain any mix of + * The selection may be <code>null</code>, or contain any mix of * <code>ILaunchConfiguration</code> or <code>ILaunchConfigurationType</code> * elements. * <p> @@ -555,7 +555,7 @@ public class DebugUITools { * Note that if an existing dialog is reused, the <code>mode</code> argument is ignored * and the existing dialog keeps its original mode. * </p> - * + * * @param shell the parent shell for the launch configuration dialog * @param selection the initial selection for the dialog * @param groupIdentifier the identifier of the launch group to display (corresponds to @@ -569,10 +569,10 @@ public class DebugUITools { public static int openLaunchConfigurationDialogOnGroup(Shell shell, IStructuredSelection selection, String groupIdentifier) { return openLaunchConfigurationDialogOnGroup(shell, selection, groupIdentifier, null); } - + /** * Open the launch configuration dialog with the specified initial selection. - * The selection may be <code>null</code>, or contain any mix of + * The selection may be <code>null</code>, or contain any mix of * <code>ILaunchConfiguration</code> or <code>ILaunchConfigurationType</code> * elements. * <p> @@ -616,7 +616,7 @@ public class DebugUITools { dialog.setInitialSelection(selection); dialog.doInitialTreeSelection(); if (status != null) { - dialog.handleStatus(status); + dialog.handleStatus(status); } result[0] = Window.OK; } else { @@ -637,7 +637,7 @@ public class DebugUITools { BusyIndicator.showWhile(DebugUIPlugin.getStandardDisplay(), r); return result[0]; } - + /** * Open the launch configuration properties dialog on the specified launch * configuration. @@ -655,7 +655,7 @@ public class DebugUITools { public static int openLaunchConfigurationPropertiesDialog(Shell shell, ILaunchConfiguration configuration, String groupIdentifier) { return openLaunchConfigurationPropertiesDialog(shell, configuration, groupIdentifier, null); } - + /** * Open the launch configuration properties dialog on the specified launch * configuration. @@ -677,11 +677,11 @@ public class DebugUITools { LaunchConfigurationPropertiesDialog dialog = new LaunchConfigurationPropertiesDialog(shell, configuration, group); dialog.setInitialStatus(status); return dialog.open(); - } - + } + return Window.CANCEL; } - + /** * Open the launch configuration dialog on the specified launch * configuration. The dialog displays the tabs for a single configuration @@ -697,11 +697,11 @@ public class DebugUITools { * @param configuration the configuration to display * @param groupIdentifier group identifier of the launch group the launch configuration * belongs to - * @param status the status to display, or <code>null</code> if none + * @param status the status to display, or <code>null</code> if none * @return the return code from opening the launch configuration dialog - * one of <code>Window.OK</code> or <code>Window.CANCEL</code>. <code>Window.CANCEL</code> * is returned if an invalid launch group identifier is provided. - * @see ILaunchGroup + * @see ILaunchGroup * @since 2.1 */ public static int openLaunchConfigurationDialog(Shell shell, ILaunchConfiguration configuration, String groupIdentifier, IStatus status) { @@ -710,11 +710,11 @@ public class DebugUITools { LaunchConfigurationDialog dialog = new LaunchConfigurationDialog(shell, configuration, group); dialog.setInitialStatus(status); return dialog.open(); - } - + } + return Window.CANCEL; } - + /** * Saves all dirty editors and builds the workspace according to current * preference settings, and returns whether a launch should proceed. @@ -730,7 +730,7 @@ public class DebugUITools { * <li>PREF_BUILD_BEFORE_LAUNCH</li> * </ul> * </p> - * + * * @return whether a launch should proceed * @since 2.0 * @deprecated Saving has been moved to the launch delegate <code>LaunchConfigurationDelegate</code> to allow for scoped saving @@ -740,7 +740,7 @@ public class DebugUITools { public static boolean saveAndBuildBeforeLaunch() { return DebugUIPlugin.saveAndBuild(); } - + /** * Saves all dirty editors according to current * preference settings, and returns whether a launch should proceed. @@ -752,7 +752,7 @@ public class DebugUITools { * <li>PREF_AUTOSAVE_DIRTY_EDITORS_BEFORE_LAUNCH</li> * </ul> * </p> - * + * * @return whether a launch should proceed * @since 2.1 * @deprecated Saving has been moved to the launch delegate <code>LaunchConfigurationDelegate</code> to allow for scoped saving @@ -761,8 +761,8 @@ public class DebugUITools { @Deprecated public static boolean saveBeforeLaunch() { return DebugUIPlugin.preLaunchSave(); - } - + } + /** * Saves and builds the workspace according to current preference settings, * and launches the given launch configuration in the specified mode. It @@ -771,7 +771,7 @@ public class DebugUITools { * <p> * This method must be called in the UI thread. * </p> - * + * * @param configuration the configuration to launch * @param mode launch mode - run or debug * @since 2.1 @@ -785,7 +785,7 @@ public class DebugUITools { /** * Stores the toggle data for launch in a Map to be used while launching to * decide if previous launch for same configuration can be terminated. - * + * * @param data the editor or selected tree node * @param isShift is Shift pressed (use <code>false</code> if no support for * Shift) @@ -800,7 +800,7 @@ public class DebugUITools { /** * Stores the toggle data for launch in a Map to be used while launching to * decide if previous launch for same configuration can be terminated. - * + * * @param data the editor or selected tree node * @since 3.12 */ @@ -901,14 +901,14 @@ public class DebugUITools { return false; } - + /** * Saves and builds the workspace according to current preference settings, * and launches the given launch configuration in the specified mode. * <p> * This method must be called in the UI thread. * </p> - * + * * @param configuration the configuration to launch * @param mode launch mode - run or debug * @since 3.12 @@ -937,7 +937,7 @@ public class DebugUITools { * <p> * This method must be called in the UI thread. * </p> - * + * * @param configuration the configuration to launch * @param mode launch mode - run or debug * @param isShift is Shift pressed (use <code>false</code> if no support for @@ -1002,7 +1002,7 @@ public class DebugUITools { } }; - + /** * Builds the workspace according to current preference settings, and launches * the given configuration in the specified mode, returning the resulting launch @@ -1013,7 +1013,7 @@ public class DebugUITools { * <li>PREF_BUILD_BEFORE_LAUNCH</li> * </ul> * </p> - * + * * @param configuration the configuration to launch * @param mode the mode to launch in * @param monitor progress monitor @@ -1024,15 +1024,15 @@ public class DebugUITools { public static ILaunch buildAndLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException { return DebugUIPlugin.buildAndLaunch(configuration, mode, monitor); } - + /** * Returns the perspective to switch to when a configuration of the given type * is launched in the given mode, or <code>null</code> if no switch should take * place. - * + * * In 3.3 this method is equivalent to calling <code>getLaunchPerspective(ILaunchConfigurationType type, Set modes, ILaunchDelegate delegate)</code>, * with the 'mode' parameter comprising a single element set and passing <code>null</code> as the launch delegate. - * + * * @param type launch configuration type * @param mode launch mode identifier * @return perspective identifier or <code>null</code> @@ -1041,7 +1041,7 @@ public class DebugUITools { public static String getLaunchPerspective(ILaunchConfigurationType type, String mode) { return DebugUIPlugin.getDefault().getPerspectiveManager().getLaunchPerspective(type, mode); } - + /** * Returns the perspective id to switch to when a configuration of the given type launched with the specified delegate * is launched in the given mode set, or <code>null</code> if no switch should occurr. @@ -1049,23 +1049,23 @@ public class DebugUITools { * @param delegate the launch delegate * @param modes the set of modes * @return the perspective id or <code>null</code> if no switch should occur - * + * * @since 3.3 */ public static String getLaunchPerspective(ILaunchConfigurationType type, ILaunchDelegate delegate, Set<String> modes) { return DebugUIPlugin.getDefault().getPerspectiveManager().getLaunchPerspective(type, modes, delegate); } - + /** * Sets the perspective to switch to when a configuration of the given type * is launched in the given mode. <code>PERSPECTIVE_NONE</code> indicates no * perspective switch should take place. <code>PERSPECTIVE_DEFAULT</code> indicates * a default perspective switch should take place, as defined by the associated * launch tab group extension. - * - * In 3.3 this method is equivalent to calling <code>setLaunchPerspective(ILaunchConfigurationType type, Set modes, ILaunchDelegate delegate, String perspectiveid)</code>, + * + * In 3.3 this method is equivalent to calling <code>setLaunchPerspective(ILaunchConfigurationType type, Set modes, ILaunchDelegate delegate, String perspectiveid)</code>, * with the parameter 'mode' used in the set modes, and null passed as the delegate - * + * * @param type launch configuration type * @param mode launch mode identifier * @param perspective identifier, <code>PERSPECTIVE_NONE</code>, or @@ -1074,32 +1074,32 @@ public class DebugUITools { */ public static void setLaunchPerspective(ILaunchConfigurationType type, String mode, String perspective) { DebugUIPlugin.getDefault().getPerspectiveManager().setLaunchPerspective(type, mode, perspective); - } - + } + /** - * Sets the perspective to switch to when a configuration of the specified type and launched using the + * Sets the perspective to switch to when a configuration of the specified type and launched using the * specified launch delegate is launched in the specified modeset. <code>PERSPECTIVE_NONE</code> indicates no * perspective switch should take place. - * - * Passing <code>null</code> for the launch delegate is quivalent to using the default perspective for the specified + * + * Passing <code>null</code> for the launch delegate is quivalent to using the default perspective for the specified * type. * @param type the configuration type * @param delegate the launch delegate * @param modes the set of modes * @param perspectiveid identifier or <code>PERSPECTIVE_NONE</code> - * + * * @since 3.3 */ public static void setLaunchPerspective(ILaunchConfigurationType type, ILaunchDelegate delegate, Set<String> modes, String perspectiveid) { DebugUIPlugin.getDefault().getPerspectiveManager().setLaunchPerspective(type, modes, delegate, perspectiveid); } - + /** * Returns whether the given launch configuration is private. Generally, * private launch configurations should not be displayed to the user. The * private status of a launch configuration is determined by the * <code>IDebugUIConstants.ATTR_PRIVATE</code> attribute. - * + * * @param configuration launch configuration * @return whether the given launch configuration is private * @since 3.0 @@ -1110,7 +1110,7 @@ public class DebugUITools { /** * Sets whether step filters should be applied to step commands. This - * setting is a global option applied to all registered debug targets. + * setting is a global option applied to all registered debug targets. * <p> * Since 3.3, this is equivalent to calling <code>DebugPlugin.setUseStepFilters(boolean)</code>. * </p> @@ -1122,7 +1122,7 @@ public class DebugUITools { public static void setUseStepFilters(boolean useStepFilters) { DebugPlugin.setUseStepFilters(useStepFilters); } - + /** * Returns whether step filters are applied to step commands. * <p> @@ -1135,26 +1135,26 @@ public class DebugUITools { public static boolean isUseStepFilters() { return DebugPlugin.isUseStepFilters(); } - + /** - * Returns the console associated with the given process, or + * Returns the console associated with the given process, or * <code>null</code> if none. - * + * * @param process a process - * @return console associated with the given process, or + * @return console associated with the given process, or * <code>null</code> if none * @since 3.0 */ public static IConsole getConsole(IProcess process) { return DebugUIPlugin.getDefault().getProcessConsoleManager().getConsole(process); } - + /** - * Returns the console associated with the given debug element, or + * Returns the console associated with the given debug element, or * <code>null</code> if none. - * + * * @param element a debug model element - * @return console associated with the given element, or + * @return console associated with the given element, or * <code>null</code> if none * @since 3.0 */ @@ -1164,23 +1164,23 @@ public class DebugUITools { return getConsole(process); } return null; - } - + } + /** * Returns all registered launch group extensions. - * + * * @return all registered launch group extensions * @since 3.0 */ public static ILaunchGroup[] getLaunchGroups() { return DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroups(); } - + /** * Returns the last configuration that was launched for specified launch group or * <code>null</code>, if there is not one. This method does not provide any form of * filtering on the returned launch configurations. - * + * * @param groupId the unique identifier of a launch group * @return the last launched configuration for the specified group or <code>null</code>. * @see DebugUITools#getLaunchGroups() @@ -1189,11 +1189,11 @@ public class DebugUITools { public static ILaunchConfiguration getLastLaunch(String groupId) { return DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLastLaunch(groupId); } - + /** * Returns the launch group that the given launch configuration belongs to, for the specified * mode, or <code>null</code> if none. - * + * * @param configuration the launch configuration * @param mode the mode * @return the launch group the given launch configuration belongs to, for the specified mode, @@ -1208,29 +1208,29 @@ public class DebugUITools { return null; } } - + /** * Performs source lookup on the given artifact and returns the result. * Optionally, a source locator may be specified. - * + * * @param artifact object for which source is to be resolved * @param locator the source locator to use, or <code>null</code>. When <code>null</code> * a source locator is determined from the artifact, if possible. If the artifact - * is a debug element, the source locator from its associated launch is used. + * is a debug element, the source locator from its associated launch is used. * @return a source lookup result * @since 3.1 */ - public static ISourceLookupResult lookupSource(Object artifact, ISourceLocator locator) { + public static ISourceLookupResult lookupSource(Object artifact, ISourceLocator locator) { return SourceLookupFacility.getDefault().lookup(artifact, locator, false); } - + /** * Displays the given source lookup result in an editor in the given workbench * page. Has no effect if the result has an unknown editor id or editor input. * The editor is opened, positioned, and annotated. * <p> * Honors user preference for editors re-use. - * </p> + * </p> * @param result source lookup result to display * @param page the page to display the result in * @since 3.1 @@ -1238,21 +1238,21 @@ public class DebugUITools { public static void displaySource(ISourceLookupResult result, IWorkbenchPage page) { SourceLookupFacility.getDefault().display(result, page); } - + /** * Returns the memory rendering manager. - * + * * @return the memory rendering manager * @since 3.1 */ public static IMemoryRenderingManager getMemoryRenderingManager() { return MemoryRenderingManager.getDefault(); } - + /** * Returns the image associated with the specified type of source container * or <code>null</code> if none. - * + * * @param id unique identifier for a source container type * @return image associated with the specified type of source container * or <code>null</code> if none @@ -1262,11 +1262,11 @@ public class DebugUITools { public static Image getSourceContainerImage(String id){ return SourceLookupUIUtils.getSourceContainerImage(id); } - + /** * Returns a new source container browser for the specified type of source container * or <code>null</code> if a browser has not been registered. - * + * * @param id unique identifier for a source container type * @return source container browser or <code>null</code> if none * @since 3.2 @@ -1275,11 +1275,11 @@ public class DebugUITools { public static ISourceContainerBrowser getSourceContainerBrowser(String id) { return SourceLookupUIUtils.getSourceContainerBrowser(id); } - + /** - * Returns the color associated with the specified preference identifier or + * Returns the color associated with the specified preference identifier or * <code>null</code> if none. - * + * * @param id preference identifier of the color * @return the color associated with the specified preference identifier * or <code>null</code> if none @@ -1289,10 +1289,10 @@ public class DebugUITools { public static Color getPreferenceColor(String id) { return DebugUIPlugin.getPreferenceColor(id); } - + /** * Returns the debug context manager. - * + * * @return debug context manager * @since 3.3 */ @@ -1302,10 +1302,10 @@ public class DebugUITools { /** * Return the debug context for the given executionEvent or <code>null</code> if none. - * + * * @param event The execution event that contains the application context * @return the current debug context, or <code>null</code>. - * + * * @since 3.5 */ public static ISelection getDebugContextForEvent(ExecutionEvent event) { @@ -1318,11 +1318,11 @@ public class DebugUITools { /** * Return the debug context for the given executionEvent. - * + * * @param event The execution event that contains the application context * @return the debug context. Will not return <code>null</code>. * @throws ExecutionException If the current selection variable is not found. - * + * * @since 3.5 */ public static ISelection getDebugContextForEventChecked(ExecutionEvent event) @@ -1341,9 +1341,9 @@ public class DebugUITools { /** * Returns the global instance of toggle breakpoints target manager. - * + * * @return toggle breakpoints target manager - * + * * @since 3.8 */ public static IToggleBreakpointsTargetManager getToggleBreakpointsTargetManager() { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DeferredDebugElementWorkbenchAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DeferredDebugElementWorkbenchAdapter.java index 393cdfab6..6ffd542ed 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DeferredDebugElementWorkbenchAdapter.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DeferredDebugElementWorkbenchAdapter.java @@ -17,7 +17,7 @@ import org.eclipse.ui.progress.IElementCollector; /** - * Common function for a deferred workbench adapter for a debug element. + * Common function for a deferred workbench adapter for a debug element. * <p> * Clients may subclass this class to provide custom adapters for elements in a debug * model. The debug platform provides <code>IDeferredWorkbenchAdapters</code> for the standard debug @@ -32,7 +32,7 @@ import org.eclipse.ui.progress.IElementCollector; */ @Deprecated public abstract class DeferredDebugElementWorkbenchAdapter extends DebugElementWorkbenchAdapter implements IDeferredWorkbenchAdapter { - + /** * An empty collection of children */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java index 382d08324..e5618cd0c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2000, 2013 Keith Seitz and others. - * All rights reserved. This program and the accompanying materials + * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * Keith Seitz (keiths@redhat.com) - initial implementation * IBM Corporation - integration and code cleanup @@ -76,11 +76,11 @@ import com.ibm.icu.text.MessageFormat; * into Runtime.exec(...) when a config is launched. * <p> * Clients may call {@link #setHelpContextId(String)} on this tab prior to control - * creation to alter the default context help associated with this tab. + * creation to alter the default context help associated with this tab. * </p> * <p> * This class may be instantiated. - * </p> + * </p> * @since 3.0 * @noextend This class is not intended to be sub-classed by clients. */ @@ -88,11 +88,11 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { protected TableViewer environmentTable; protected String[] envTableColumnHeaders = { - LaunchConfigurationsMessages.EnvironmentTab_Variable_1, - LaunchConfigurationsMessages.EnvironmentTab_Value_2, + LaunchConfigurationsMessages.EnvironmentTab_Variable_1, + LaunchConfigurationsMessages.EnvironmentTab_Value_2, }; - private static final String NAME_LABEL= LaunchConfigurationsMessages.EnvironmentTab_8; - private static final String VALUE_LABEL= LaunchConfigurationsMessages.EnvironmentTab_9; + private static final String NAME_LABEL= LaunchConfigurationsMessages.EnvironmentTab_8; + private static final String VALUE_LABEL= LaunchConfigurationsMessages.EnvironmentTab_9; protected static final String P_VARIABLE = "variable"; //$NON-NLS-1$ protected static final String P_VALUE = "value"; //$NON-NLS-1$ protected Button envAddButton; @@ -101,7 +101,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { protected Button appendEnvironment; protected Button replaceEnvironment; protected Button envSelectButton; - + /** * Content provider for the environment table */ @@ -155,7 +155,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { } } } - + /** * Label provider for the environment table */ @@ -193,7 +193,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { public EnvironmentTab() { setHelpContextId(IDebugHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_ENVIRONMENT_TAB); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite) */ @@ -203,11 +203,11 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { Composite mainComposite = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_HORIZONTAL); setControl(mainComposite); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), getHelpContextId()); - + createEnvironmentTable(mainComposite); createTableButtons(mainComposite); createAppendReplace(mainComposite); - + Dialog.applyDialogFont(mainComposite); } @@ -219,16 +219,16 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { */ protected void createAppendReplace(Composite parent) { Composite comp = SWTFactory.createComposite(parent, 1, 2, GridData.FILL_HORIZONTAL); - appendEnvironment= createRadioButton(comp, LaunchConfigurationsMessages.EnvironmentTab_16); + appendEnvironment= createRadioButton(comp, LaunchConfigurationsMessages.EnvironmentTab_16); appendEnvironment.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { updateLaunchConfigurationDialog(); } }); - replaceEnvironment= createRadioButton(comp, LaunchConfigurationsMessages.EnvironmentTab_17); + replaceEnvironment= createRadioButton(comp, LaunchConfigurationsMessages.EnvironmentTab_17); } - + /** * Updates the enablement of the append/replace widgets. The * widgets should disable when there are no environment variables specified. @@ -238,7 +238,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { appendEnvironment.setEnabled(enable); replaceEnvironment.setEnabled(enable); } - + /** * Creates and configures the table that displayed the key/value * pairs that comprise the environment. @@ -286,7 +286,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { tableColumnLayout.setColumnData(tc2, new ColumnWeightData(2, pixelConverter.convertWidthInCharsToPixels(20))); tableComposite.setLayout(tableColumnLayout); } - + /** * Responds to a selection changed event in the environment table * @param event the selection change event @@ -296,7 +296,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { envEditButton.setEnabled(size == 1); envRemoveButton.setEnabled(size > 0); } - + /** * Creates the add/edit/remove buttons for the environment table * @param parent the composite in which the buttons should be created @@ -306,21 +306,21 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { Composite buttonComposite = SWTFactory.createComposite(parent, parent.getFont(), 1, 1, GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_END, 0, 0); // Create buttons - envAddButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.EnvironmentTab_New_4, null); + envAddButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.EnvironmentTab_New_4, null); envAddButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { handleEnvAddButtonSelected(); } }); - envSelectButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.EnvironmentTab_18, null); + envSelectButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.EnvironmentTab_18, null); envSelectButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { handleEnvSelectButtonSelected(); } }); - envEditButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.EnvironmentTab_Edit_5, null); + envEditButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.EnvironmentTab_Edit_5, null); envEditButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { @@ -328,7 +328,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { } }); envEditButton.setEnabled(false); - envRemoveButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.EnvironmentTab_Remove_6, null); + envRemoveButton = createPushButton(buttonComposite, LaunchConfigurationsMessages.EnvironmentTab_Remove_6, null); envRemoveButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { @@ -337,28 +337,28 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { }); envRemoveButton.setEnabled(false); } - + /** * Adds a new environment variable to the table. */ protected void handleEnvAddButtonSelected() { - MultipleInputDialog dialog = new MultipleInputDialog(getShell(), LaunchConfigurationsMessages.EnvironmentTab_22); + MultipleInputDialog dialog = new MultipleInputDialog(getShell(), LaunchConfigurationsMessages.EnvironmentTab_22); dialog.addTextField(NAME_LABEL, null, false); dialog.addVariablesField(VALUE_LABEL, null, true); - + if (dialog.open() != Window.OK) { return; } - + String name = dialog.getStringValue(NAME_LABEL); String value = dialog.getStringValue(VALUE_LABEL); - + if (name != null && value != null && name.length() > 0 && value.length() >0) { addVariable(new EnvironmentVariable(name.trim(), value.trim())); updateAppendReplace(); } } - + /** * Attempts to add the given variable. Returns whether the variable * was added or not (as when the user answers not to overwrite an @@ -384,33 +384,33 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { updateLaunchConfigurationDialog(); return true; } - + /** - * Displays a dialog that allows user to select native environment variables + * Displays a dialog that allows user to select native environment variables * to add to the table. */ private void handleEnvSelectButtonSelected() { //get Environment Variables from the OS Map<String, EnvironmentVariable> envVariables = getNativeEnvironment(); - + //get Environment Variables from the table TableItem[] items = environmentTable.getTable().getItems(); for (int i = 0; i < items.length; i++) { EnvironmentVariable var = (EnvironmentVariable) items[i].getData(); envVariables.remove(var.getName()); } - - NativeEnvironmentSelectionDialog dialog = new NativeEnvironmentSelectionDialog(getShell(), envVariables); - dialog.setTitle(LaunchConfigurationsMessages.EnvironmentTab_20); - + + NativeEnvironmentSelectionDialog dialog = new NativeEnvironmentSelectionDialog(getShell(), envVariables); + dialog.setTitle(LaunchConfigurationsMessages.EnvironmentTab_20); + int button = dialog.open(); if (button == Window.OK) { - Object[] selected = dialog.getResult(); + Object[] selected = dialog.getResult(); for (int i = 0; i < selected.length; i++) { - environmentTable.add(selected[i]); + environmentTable.add(selected[i]); } } - + updateAppendReplace(); updateLaunchConfigurationDialog(); } @@ -439,7 +439,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { } String originalName= var.getName(); String value= var.getValue(); - MultipleInputDialog dialog= new MultipleInputDialog(getShell(), LaunchConfigurationsMessages.EnvironmentTab_11); + MultipleInputDialog dialog= new MultipleInputDialog(getShell(), LaunchConfigurationsMessages.EnvironmentTab_11); dialog.addTextField(NAME_LABEL, originalName, false); if(value != null && value.indexOf(System.getProperty("line.separator")) > -1) { //$NON-NLS-1$ dialog.addMultilinedVariablesField(VALUE_LABEL, value, true); @@ -447,7 +447,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { else { dialog.addVariablesField(VALUE_LABEL, value, true); } - + if (dialog.open() != Window.OK) { return; } @@ -519,13 +519,13 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { updateEnvironment(configuration); updateAppendReplace(); } - + /** * Stores the environment in the given configuration * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) */ @Override - public void performApply(ILaunchConfigurationWorkingCopy configuration) { + public void performApply(ILaunchConfigurationWorkingCopy configuration) { // Convert the table's items into a Map so that this can be saved in the // configuration's attributes. TableItem[] items = environmentTable.getTable().getItems(); @@ -533,13 +533,13 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { for (int i = 0; i < items.length; i++) { EnvironmentVariable var = (EnvironmentVariable) items[i].getData(); map.put(var.getName(), var.getValue()); - } + } if (map.size() == 0) { configuration.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, (Map<String, String>) null); } else { configuration.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, map); } - + if(appendEnvironment.getSelection()) { ILaunchConfiguration orig = configuration.getOriginal(); boolean hasTrueValue = false; @@ -566,19 +566,19 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { */ @Override public String getName() { - return LaunchConfigurationsMessages.EnvironmentTab_Environment_7; + return LaunchConfigurationsMessages.EnvironmentTab_Environment_7; } - + /** * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getId() - * + * * @since 3.3 */ @Override public String getId() { return "org.eclipse.debug.ui.environmentTab"; //$NON-NLS-1$ } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage() */ @@ -602,21 +602,21 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { public void deactivated(ILaunchConfigurationWorkingCopy workingCopy) { // do nothing when deactivated } - + /** * This dialog allows users to select one or more known native environment variables from a list. */ private class NativeEnvironmentSelectionDialog extends AbstractDebugCheckboxSelectionDialog { - + private Object fInput; - + public NativeEnvironmentSelectionDialog(Shell parentShell, Object input) { super(parentShell); fInput = input; setShellStyle(getShellStyle() | SWT.RESIZE); setShowSelectAllButtons(true); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getDialogSettingsId() */ @@ -648,7 +648,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { protected String getViewerLabel() { return LaunchConfigurationsMessages.EnvironmentTab_19; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getLabelProvider() */ @@ -677,10 +677,10 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { } @Override public void removeListener(ILabelProviderListener listener) { - } + } }; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getContentProvider() */ @@ -711,7 +711,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab { return elements; } @Override - public void dispose() { + public void dispose() { } @Override public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointOrganizerDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointOrganizerDelegate.java index d1eb080b3..8a38e262d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointOrganizerDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointOrganizerDelegate.java @@ -22,7 +22,7 @@ import org.eclipse.jface.util.IPropertyChangeListener; * categorize breakpoints. Images and labels for categories are generated * via workbench adapters. * <p> - * Organizers may optionally support breakpoint recategorization. + * Organizers may optionally support breakpoint recategorization. * </p> * <p> * Following is example plug-in XML for contributing a breakpoint organizer. @@ -53,7 +53,7 @@ import org.eclipse.jface.util.IPropertyChangeListener; * @since 3.1 */ public interface IBreakpointOrganizerDelegate { - + /** * Change event id when a category's breakpoints have changed. * The <code>oldValue</code> of the <code>PropertyChangeEvent</code> will be the @@ -71,84 +71,84 @@ public interface IBreakpointOrganizerDelegate { * the breakpoint. Categories must return <code>true</code> when sent * the message <code>equals(Object)</code> with an equivalent category * as an argument. - * + * * @param breakpoint breakpoint to classify * @return categories of the given breakpoint or <code>null</code> */ public IAdaptable[] getCategories(IBreakpoint breakpoint); - + /** * Adds the specified listener. Has no effect if an identical listener is * already registered. - * + * * @param listener listener to add */ public void addPropertyChangeListener(IPropertyChangeListener listener); - + /** * Removes the specified listener. Has no effect if an identical listener * is not already registered. - * + * * @param listener listener to remove */ public void removePropertyChangeListener(IPropertyChangeListener listener); - + /** * Adds the specified breakpoint to the given category. Only called * if <code>canAdd(...)</code> returns <code>true</code> for the given * breakpoint and category. - * + * * @param breakpoint breakpoint to recategorize * @param category the breakpoint's new category */ public void addBreakpoint(IBreakpoint breakpoint, IAdaptable category); - + /** * Removes the specified breakpoint from the given category. Only * called if <code>canRemove(...)</code> returns <code>true</code> for * the given breakpoint and category. - * + * * @param breakpoint breakpoint to recategorize * @param category the category the breakpoint is remove from */ public void removeBreakpoint(IBreakpoint breakpoint, IAdaptable category); - + /** * Returns whether the given breakpoint can be categorized in the * specified category. - * + * * @param breakpoint breakpoint to recatogorize * @param category the category to add the breakpoint to * @return whether the given breakpoint can be categorized in the * specified category */ public boolean canAdd(IBreakpoint breakpoint, IAdaptable category); - + /** * Returns whether the given breakpoint can be removed from the given * category. - * + * * @param breakpoint breakpoint to recategorize * @param category the category to remove the breakpoint from * @return whether the given breakpoint can be removed from the given * category */ public boolean canRemove(IBreakpoint breakpoint, IAdaptable category); - + /** * Returns all categories managed by this organizer, or <code>null</code>. * When <code>null</code> is returned, the breakpoints view only displays * categories that contain breakpoints. When a collection of categories * is returned the breakpoints will display all of the categories, some of * which may be empty. - * + * * @return all categories managed by this organizer, or <code>null</code> */ public IAdaptable[] getCategories(); - + /** * Disposes this breakpoint organizer. */ public void dispose(); - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointOrganizerDelegateExtension.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointOrganizerDelegateExtension.java index 9bff24a27..2b8fabb5c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointOrganizerDelegateExtension.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointOrganizerDelegateExtension.java @@ -23,26 +23,26 @@ import org.eclipse.debug.core.model.IBreakpoint; * @since 3.3 */ public interface IBreakpointOrganizerDelegateExtension extends IBreakpointOrganizerDelegate { - + /** * Adds the specified breakpoints to the given category. Only called * if <code>canAdd(...)</code> returns <code>true</code> for the given * breakpoints and category. - * + * * @param breakpoints breakpoints add * @param category the breakpoints' new category */ public void addBreakpoints(IBreakpoint[] breakpoints, IAdaptable category); - + /** * Removes the specified breakpoints from the given category. Only * called if <code>canRemove(...)</code> returns <code>true</code> for * the given breakpoints and category. - * + * * @param breakpoints breakpoints to remove * @param category the category the breakpoint is remove from */ public void removeBreakpoints(IBreakpoint[] breakpoints, IAdaptable category); - - + + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointTypeCategory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointTypeCategory.java index ddb1ea8a3..45dfe7a75 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointTypeCategory.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointTypeCategory.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/ui/IDebugEditorPresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugEditorPresentation.java index cb243713e..857e126c6 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugEditorPresentation.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugEditorPresentation.java @@ -18,7 +18,7 @@ import org.eclipse.ui.IEditorPart; * A debug model presentation may implement this interface to override * standard editor positioning and annotations associated with * source code display for stack frames. - * + * * @since 3.0 */ public interface IDebugEditorPresentation { @@ -30,25 +30,25 @@ public interface IDebugEditorPresentation { * <code>false</code> is returned, the debugger will position and add * standard annotations to the editor, and a corresponding call to remove * annotations will not be made. This method is called when the debugger is - * has opened an editor to display source for the given stack frame. - * + * has opened an editor to display source for the given stack frame. + * * @param editorPart the editor the debugger has opened * @param frame the stack frame for which the debugger is displaying * source * @return <code>true</code> if annotations were added to the given editor part <code>false</code> otherwise */ public boolean addAnnotations(IEditorPart editorPart, IStackFrame frame); - + /** * Removes any debug related annotations from the given editor. * This method is called when the debugger clears the source selection * in an editor opened by the debugger. For example, when a debug * session is resumed or terminated. - * + * * @param editorPart an editor that annotations were added to for * a stack frame * @param thread the thread for which stack frame annotations were * added to the editor */ - public void removeAnnotations(IEditorPart editorPart, IThread thread); + public void removeAnnotations(IEditorPart editorPart, IThread thread); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugModelPresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugModelPresentation.java index 3477185c4..cb1ed1ff9 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugModelPresentation.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugModelPresentation.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.swt.graphics.Image; * Following is an example definition of a debug model presentation extension. * <pre> * <extension point="org.eclipse.debug.ui.debugModelPresentations"> - * <debugModelPresentation + * <debugModelPresentation * id="com.example.debugModelIdentifier" * class="com.example.ExamplePresentation" * detailsViewerConfiguration="com.example.ExampleSourceViewerConfiguration"> @@ -55,7 +55,7 @@ import org.eclipse.swt.graphics.Image; * a <code>setAttribute</code> method. The debug UI plug-in defines * one presentation attribute: * <ul> - * <li><code>DISPLAY_VARIABLE_TYPE_NAMES</code> - This is a boolean attribute + * <li><code>DISPLAY_VARIABLE_TYPE_NAMES</code> - This is a boolean attribute * indicating whether variable elements should be rendered with the declared * type of a variable. For example, a Java debug model presentation would render * an integer as <code>"int x = 3"</code> when true, and <code>"x = 3"</code> @@ -72,7 +72,7 @@ import org.eclipse.swt.graphics.Image; * </p> * <p> * Since 3.1, debug model presentations may optionally implement <code>IColorProvider</code> - * and <code>IFontProvider</code> to override default fonts and colors for debug elements. + * and <code>IFontProvider</code> to override default fonts and colors for debug elements. * </p> * <p> * Clients may implement this interface. @@ -83,11 +83,11 @@ import org.eclipse.swt.graphics.Image; */ public interface IDebugModelPresentation extends ILabelProvider, ISourcePresentation { - /** + /** * Variable type names presentation property (value <code>"org.eclipse.debug.ui.displayVariableTypeNames"</code>). * When <code>DISPLAY_VARIABLE_TYPE_NAMES</code> is set to <code>true</code>, * this label provider should include the reference type of a variable when rendering - * variables. When set to <code>false</code>, this label provider + * variables. When set to <code>false</code>, this label provider * should not include the reference type of a variable when rendering * variables. * @see #setAttribute(String, Object) @@ -124,7 +124,7 @@ public interface IDebugModelPresentation extends ILabelProvider, ISourcePresenta */ @Override public String getText(Object element); - + /** * Computes a detailed description of the given value, reporting * the result to the specified listener. This allows a presentation @@ -133,13 +133,13 @@ public interface IDebugModelPresentation extends ILabelProvider, ISourcePresenta * the details are reported back to the specified listener asynchronously. * If <code>null</code> is reported, the value's value string is displayed * (<code>IValue.getValueString()</code>). - * + * * @param value the value for which a detailed description * is required * @param listener the listener to report the details to * asynchronously * @since 2.0 */ - void computeDetail(IValue value, IValueDetailListener listener); + void computeDetail(IValue value, IValueDetailListener listener); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugModelPresentationExtension.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugModelPresentationExtension.java index 144dad097..06d625c4f 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugModelPresentationExtension.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugModelPresentationExtension.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -14,11 +14,11 @@ package org.eclipse.debug.ui; * Optional extension for an {@link IDebugModelPresentation}. Dynamically controls * whether labels are computed in a UI thread. The debug platform calls debug model * presentation label related methods that do not implement this interface in a - * <b>non-UI</b> thread. + * <b>non-UI</b> thread. * <p> * For example, some models may require at least one access in a UI thread to initialize * an image registry at which point they may be able to provide labels in a non-UI - * thread. + * thread. * </p> * <p> * Clients implementing a debug model presentation should also implement @@ -33,7 +33,7 @@ public interface IDebugModelPresentationExtension extends IDebugModelPresentatio * foreground, background, etc.), for the specified element. When <code>true</code> is * returned, label related methods will be called in the UI thread, otherwise methods * may be called in a non-UI thread. - * + * * @param element the element a label is to be retrieved for * @return whether label related methods should be called on the UI thread */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java index 48431b7a9..04659d962 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.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 * QNX Software Systems - Mikhail Khodjaiants - Registers View (Bug 53640) @@ -16,7 +16,7 @@ package org.eclipse.debug.ui; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.ILaunchManager; import org.eclipse.ui.ISharedImages; - + /** * Constant definitions for debug UI plug-in. * <p> @@ -37,7 +37,7 @@ import org.eclipse.ui.ISharedImages; * <li>Step into action</li> * <li>Step over group</li> * <li>Step over action</li> - * <li>Step return group</li> + * <li>Step return group</li> * <li>Step return action</li> * <li>Empty thread group</li> * <li>Thread group</li> @@ -79,7 +79,7 @@ import org.eclipse.ui.ISharedImages; * <li>Open action</li> * <li>Empty Breakpoint group</li> * <li>Breakpoint group</li> - * <li>Enable action</li> + * <li>Enable action</li> * <li>Disable action</li> * <li>Remove action</li> * <li>Remove all action</li> @@ -93,7 +93,7 @@ import org.eclipse.ui.ISharedImages; * <li>Empty Expression group</li> * <li>Expression group</li> * <li>Select all action</li> - * <li>Copy to clipboard action</li> + * <li>Copy to clipboard action</li> * <li>Remove action</li> * <li>Remove all action</li> * <li>Find action</li> @@ -113,29 +113,29 @@ import org.eclipse.ui.ISharedImages; */ public interface IDebugUIConstants { - + /** * Debug UI plug-in identifier (value <code>"org.eclipse.debug.ui"</code>). */ public static final String PLUGIN_ID = "org.eclipse.debug.ui"; //$NON-NLS-1$; - + /** * Debug perspective identifier (value <code>"org.eclipse.debug.ui.DebugPerspective"</code>). */ public static final String ID_DEBUG_PERSPECTIVE = PLUGIN_ID + ".DebugPerspective"; //$NON-NLS-1$ - + /** * Console type identifier (value <code>"org.eclipse.debug.ui.ProcessConsoleType"</code>). - * + * * @since 3.1 */ public static final String ID_PROCESS_CONSOLE_TYPE = PLUGIN_ID + ".ProcessConsoleType"; //$NON-NLS-1$ - + /** * Constant for referring to no perspective. */ public static final String PERSPECTIVE_NONE = "perspective_none"; //$NON-NLS-1$ - + /** * Constant for referring to a default perspective. */ @@ -144,19 +144,19 @@ public interface IDebugUIConstants { // Preferences /** - * String preference that identifies the default 'switch to perspective id' when running a + * String preference that identifies the default 'switch to perspective id' when running a * launch configuration. This default is used if a particular launch configuration does not * override the 'switch to perspective when in run mode' attribute with something else. */ public static final String PREF_SHOW_RUN_PERSPECTIVE_DEFAULT= PLUGIN_ID + ".show_run_perspective_default"; //$NON-NLS-1$ - + /** - * String preference that identifies the default 'switch to perspective id' when debugging a + * String preference that identifies the default 'switch to perspective id' when debugging a * launch configuration. This default is used if a particular launch configuration does not * override the 'switch to perspective when in debug mode' attribute with something else. */ public static final String PREF_SHOW_DEBUG_PERSPECTIVE_DEFAULT= PLUGIN_ID + ".show_debug_perspective_default"; //$NON-NLS-1$ - + /** * Boolean preference controlling whether a build is done before * launching a program (if one is needed). @@ -174,106 +174,106 @@ public interface IDebugUIConstants { * that it opens when displaying source. When <code>true</code> the debugger * re-uses the same editor when showing source for a selected stack frame (unless * the editor is dirty). - * + * * @since 2.0 */ public static final String PREF_REUSE_EDITOR = PLUGIN_ID + ".reuse_editor"; //$NON-NLS-1$ - + /** * Integer preference that specifies the length of the Run & Debug launch history lists. - * + * * @since 2.0 */ public static final String PREF_MAX_HISTORY_SIZE = PLUGIN_ID + ".max_history_size"; //$NON-NLS-1$ - + /** * Boolean preference controlling whether the debugger shows types names * in its variable view. When <code>true</code> the debugger * will display type names in new variable views. - * + * * @since 2.0 * @deprecated no longer used */ @Deprecated - public static final String PREF_SHOW_TYPE_NAMES = PLUGIN_ID + ".show_type_names"; //$NON-NLS-1$ - + public static final String PREF_SHOW_TYPE_NAMES = PLUGIN_ID + ".show_type_names"; //$NON-NLS-1$ + /** * Boolean preference controlling whether the debugger shows the detail pane * in its variable view. When <code>true</code> the debugger * will show the detail panes in new variable views. - * + * * @since 2.0 * @deprecated no longer used */ @Deprecated public static final String PREF_SHOW_DETAIL_PANE = PLUGIN_ID + ".show_detail_pane"; //$NON-NLS-1$ - + /** * Boolean preference controlling whether the debugger will force activate the active * shell/window of the Eclipse workbench when a breakpoint is hit. - * + * * @since 2.1 */ public static final String PREF_ACTIVATE_WORKBENCH= PLUGIN_ID + ".activate_workbench"; //$NON-NLS-1$ - + /** * Boolean preference controlling whether breakpoints are * automatically skipped during a Run To Line operation. * If true, breakpoints will be skipped automatically * during Run To Line. If false, they will be hit. - * + * * @since 3.0 */ public static final String PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE= PLUGIN_ID + ".skip_breakpoints_during_run_to_line"; //$NON-NLS-1$ - + /** * String preference controlling in which perspectives view management will - * occur. This preference, if set, overrides the perspectives enabled - * through the <code>contextViewBindings</code> extension point. The value + * occur. This preference, if set, overrides the perspectives enabled + * through the <code>contextViewBindings</code> extension point. The value * is a comma-separated list of perspective IDs, an empty string (no perspectives), * or the value of <code>PREF_MANAGE_VIEW_PERSPECTIVES_DEFAULT</code> ("<code>DEFAULT</code>"). - * + * * @since 3.0 */ public static final String PREF_MANAGE_VIEW_PERSPECTIVES= PLUGIN_ID + ".manage_view_perspectives"; //$NON-NLS-1$ /** - * The default value of the {@link IDebugUIConstants#PREF_MANAGE_VIEW_PERSPECTIVES} preference. - * + * The default value of the {@link IDebugUIConstants#PREF_MANAGE_VIEW_PERSPECTIVES} preference. + * * @see IDebugUIConstants#PREF_MANAGE_VIEW_PERSPECTIVES - * + * * @since 3.5 */ public static final String PREF_MANAGE_VIEW_PERSPECTIVES_DEFAULT= "DEFAULT"; //$NON-NLS-1$ /** * Font preference setting for the process console. - * + * * @since 3.3 */ public static final String PREF_CONSOLE_FONT= "org.eclipse.debug.ui.consoleFont"; //$NON-NLS-1$ - + /** * Debug view identifier (value <code>"org.eclipse.debug.ui.DebugView"</code>). */ public static final String ID_DEBUG_VIEW= "org.eclipse.debug.ui.DebugView"; //$NON-NLS-1$ - + /** * Breakpoint view identifier (value <code>"org.eclipse.debug.ui.BreakpointView"</code>). */ public static final String ID_BREAKPOINT_VIEW= "org.eclipse.debug.ui.BreakpointView"; //$NON-NLS-1$ - + /** * Variable view identifier (value <code>"org.eclipse.debug.ui.VariableView"</code>). */ public static final String ID_VARIABLE_VIEW= "org.eclipse.debug.ui.VariableView"; //$NON-NLS-1$ - + /** * Expression view identifier (value <code>"org.eclipse.debug.ui.ExpressionView"</code>). * @since 2.0 */ public static final String ID_EXPRESSION_VIEW= "org.eclipse.debug.ui.ExpressionView"; //$NON-NLS-1$ - + /** * Register view identifier (value <code>"org.eclipse.debug.ui.RegisterView"</code>). * @since 3.0 @@ -288,40 +288,40 @@ public interface IDebugUIConstants { /** * Console view identifier (value <code>"org.eclipse.debug.ui.ConsoleView"</code>). - * @deprecated Use org.eclipse.ui.console.IConsoleConstants.ID_CONSOLE_VIEW + * @deprecated Use org.eclipse.ui.console.IConsoleConstants.ID_CONSOLE_VIEW * @since 3.0 */ @Deprecated public static final String ID_CONSOLE_VIEW= "org.eclipse.debug.ui.ConsoleView"; //$NON-NLS-1$ - + // Console stream identifiers - + /** * Identifier for the standard out stream. - * + * * @see org.eclipse.debug.ui.console.IConsoleColorProvider#getColor(String) * @since 2.1 */ public static final String ID_STANDARD_OUTPUT_STREAM = IDebugUIConstants.PLUGIN_ID + ".ID_STANDARD_OUTPUT_STREAM"; //$NON-NLS-1$ - + /** * Identifier for the standard error stream. * * @see org.eclipse.debug.ui.console.IConsoleColorProvider#getColor(String) * @since 2.1 - */ + */ public static final String ID_STANDARD_ERROR_STREAM = IDebugUIConstants.PLUGIN_ID + ".ID_STANDARD_ERROR_STREAM"; //$NON-NLS-1$ - + /** * Identifier for the standard input stream. * * @see org.eclipse.debug.ui.console.IConsoleColorProvider#getColor(String) * @since 2.1 - */ + */ public static final String ID_STANDARD_INPUT_STREAM = IDebugUIConstants.PLUGIN_ID + ".ID_STANDARD_INPUT_STREAM"; //$NON-NLS-1$ - + // Debug Action images - + /** * Debug action image identifier. */ @@ -331,177 +331,177 @@ public interface IDebugUIConstants { * Run action image identifier. */ public static final String IMG_ACT_RUN= "IMG_ACT_RUN"; //$NON-NLS-1$ - + /** "Link with View" action image identifier. */ public static final String IMG_ACT_SYNCED= "IMG_ACT_SYNCED"; //$NON-NLS-1$ - + /** "Skip Breakpoints" action image identifier */ public static final String IMG_SKIP_BREAKPOINTS= "IMG_SKIP_BREAKPOINTS"; //$NON-NLS-1$ - - /** Clear action image identifier. + + /** Clear action image identifier. * @deprecated use the platform shared image for clear - {@link ISharedImages#IMG_ETOOL_CLEAR}*/ @Deprecated public static final String IMG_LCL_CLEAR= "IMG_LCL_CLEAR"; //$NON-NLS-1$ - + /** Display variable type names action image identifier. */ public static final String IMG_LCL_TYPE_NAMES= "IMG_LCL_TYPE_NAMES"; //$NON-NLS-1$ - + /** Toggle detail pane action image identifier.*/ public static final String IMG_LCL_DETAIL_PANE= "IMG_LCL_DETAIL_PANE"; //$NON-NLS-1$ - + /** Change variable value action image identifier.*/ public static final String IMG_LCL_CHANGE_VARIABLE_VALUE= "IMG_LCL_CHANGE_VARIABLE_VALUE"; //$NON-NLS-1$ - + /** * Disconnect action image identifier - * + * * @since 2.0 */ public static final String IMG_LCL_DISCONNECT= "IMG_LCL_DISCONNECT"; //$NON-NLS-1$ - + /** * Scroll lock action image identifier - * + * * @since 2.1 */ - public static final String IMG_LCL_LOCK = "IMG_LCL_LOCK"; //$NON-NLS-1$ - + public static final String IMG_LCL_LOCK = "IMG_LCL_LOCK"; //$NON-NLS-1$ + /** * Add action image identifier. - * + * * @since 3.8 */ public static final String IMG_LCL_ADD = "IMG_LCL_MONITOR_EXPRESSION"; //$NON-NLS-1$ /** * Remove all action image identifier - * + * * @since 2.1 */ - public static final String IMG_LCL_REMOVE_ALL = "IMG_LCL_REMOVE_ALL"; //$NON-NLS-1$ - + public static final String IMG_LCL_REMOVE_ALL = "IMG_LCL_REMOVE_ALL"; //$NON-NLS-1$ + /** * Remove action image identifier - * + * * @since 3.2 */ public static final String IMG_LCL_REMOVE = "IMG_LCL_REMOVE"; //$NON-NLS-1$ - + /** * Content assist action image identifier. */ public static final String IMG_LCL_CONTENT_ASSIST= "IMG_LCL_CONTENT_ASSIST"; //$NON-NLS-1$ - + /** * Content assist action image identifier (enabled). */ public static final String IMG_ELCL_CONTENT_ASSIST= "IMG_ELCL_CONTENT_ASSIST"; //$NON-NLS-1$ - + /** * Content assist action image identifier (disabled). */ public static final String IMG_DLCL_CONTENT_ASSIST= "IMG_DLCL_CONTENT_ASSIST"; //$NON-NLS-1$ - + /** * Content assist action image identifier. */ public static final String IMG_LCL_DETAIL_PANE_UNDER= "IMG_LCL_DETAIL_PANE_UNDER"; //$NON-NLS-1$ - + /** * Content assist action image identifier. */ public static final String IMG_LCL_DETAIL_PANE_RIGHT= "IMG_LCL_DETAIL_PANE_RIGHT"; //$NON-NLS-1$ - + /** * Content assist action image identifier. */ public static final String IMG_LCL_DETAIL_PANE_HIDE= "IMG_LCL_DETAIL_PANE_HIDE"; //$NON-NLS-1$ - + // Debug element images - + /** Debug mode launch image identifier. */ public static final String IMG_OBJS_LAUNCH_DEBUG= "IMG_OBJS_LAUNCH_DEBUG"; //$NON-NLS-1$ - + /** Run mode launch image identifier. */ public static final String IMG_OBJS_LAUNCH_RUN= "IMG_OBJS_LAUNCH_RUN"; //$NON-NLS-1$ - + /** Terminated run mode launch image identifier. */ public static final String IMG_OBJS_LAUNCH_RUN_TERMINATED= "IMG_OBJS_LAUNCH_RUN_TERMINATED"; //$NON-NLS-1$ - + /** Running debug target image identifier. */ public static final String IMG_OBJS_DEBUG_TARGET= "IMG_OBJS_DEBUG_TARGET"; //$NON-NLS-1$ - + /** Suspended debug target image identifier. */ public static final String IMG_OBJS_DEBUG_TARGET_SUSPENDED= "IMG_OBJS_DEBUG_TARGET_SUSPENDED"; //$NON-NLS-1$ - + /** Terminated debug target image identifier. */ public static final String IMG_OBJS_DEBUG_TARGET_TERMINATED= "IMG_OBJS_DEBUG_TARGET_TERMINATED"; //$NON-NLS-1$ - + /** Running thread image identifier. */ public static final String IMG_OBJS_THREAD_RUNNING= "IMG_OBJS_THREAD_RUNNING"; //$NON-NLS-1$ - + /** Suspended thread image identifier. */ public static final String IMG_OBJS_THREAD_SUSPENDED= "IMG_OBJS_THREAD_SUSPENDED"; //$NON-NLS-1$ - + /** Terminated thread image identifier. */ public static final String IMG_OBJS_THREAD_TERMINATED= "IMG_OBJS_THREAD_TERMINATED"; //$NON-NLS-1$ - + /** Stack frame (suspended) image identifier. */ public static final String IMG_OBJS_STACKFRAME= "IMG_OBJS_STACKFRAME"; //$NON-NLS-1$ - + /** Stack frame (running) image identifier. */ public static final String IMG_OBJS_STACKFRAME_RUNNING= "IMG_OBJS_STACKFRAME_RUNNING"; //$NON-NLS-1$ - + /** Enabled breakpoint image identifier. */ public static final String IMG_OBJS_BREAKPOINT= "IMG_OBJS_BREAKPOINT"; //$NON-NLS-1$ - + /** Disabled breakpoint image identifier. */ public static final String IMG_OBJS_BREAKPOINT_DISABLED= "IMG_OBJS_BREAKPOINT_DISABLED"; //$NON-NLS-1$ - + /** * Breakpoint group image identifier. - * + * * @since 3.1 */ public static final String IMG_OBJS_BREAKPOINT_GROUP = "IMG_OBJS_BREAKPOINT_GROUP"; //$NON-NLS-1$ - + /** * Disabled breakpoint group image identifier. - * + * * @since 3.1 */ public static final String IMG_OBJS_BREAKPOINT_GROUP_DISABLED = "IMG_OBJS_BREAKPOINT_GROUP_DISABLED"; //$NON-NLS-1$ - + /** * Enabled watchpoint image identifier (access & modification). * @since 3.0 */ public static final String IMG_OBJS_WATCHPOINT= "IMG_OBJS_WATCHPOINT"; //$NON-NLS-1$ - + /** * Disabled watchpoint image identifier (access & modification). * @since 3.0 */ public static final String IMG_OBJS_WATCHPOINT_DISABLED= "IMG_OBJS_WATCHPOINT_DISABLED"; //$NON-NLS-1$ - + /** * Enabled access watchpoint image identifier. * @since 3.1 */ public static final String IMG_OBJS_ACCESS_WATCHPOINT= "IMG_OBJS_ACCESS_WATCHPOINT"; //$NON-NLS-1$ - + /** * Disabled access watchpoint image identifier. * @since 3.1 */ public static final String IMG_OBJS_ACCESS_WATCHPOINT_DISABLED= "IMG_OBJS_ACCESS_WATCHPOINT_DISABLED"; //$NON-NLS-1$ - + /** * Enabled modification watchpoint image identifier. * @since 3.1 */ public static final String IMG_OBJS_MODIFICATION_WATCHPOINT= "IMG_OBJS_MODIFICATION_WATCHPOINT"; //$NON-NLS-1$ - + /** * Disabled modification watchpoint image identifier. * @since 3.1 @@ -510,104 +510,104 @@ public interface IDebugUIConstants { /** Running system process image identifier. */ public static final String IMG_OBJS_OS_PROCESS= "IMG_OBJS_OS_PROCESS"; //$NON-NLS-1$ - + /** Terminated system process image identifier. */ public static final String IMG_OBJS_OS_PROCESS_TERMINATED= "IMG_OBJS_OS_PROCESS_TERMINATED"; //$NON-NLS-1$ - + /** * Expression image identifier. - * + * * @since 2.0 */ public static final String IMG_OBJS_EXPRESSION= "IMG_OBJS_EXPRESSION"; //$NON-NLS-1$ - + /** * Generic variable image identifier. - * + * * @since 2.0 */ public static final String IMG_OBJS_VARIABLE= "IMG_OBJS_VARIABLE"; //$NON-NLS-1$ /** * Generic identifier of register group image. - * + * * @since 3.0 */ public static final String IMG_OBJS_REGISTER_GROUP= "IMG_OBJS_REGISTER_GROUP"; //$NON-NLS-1$ /** * Generic register image identifier. - * + * * @since 3.0 */ public static final String IMG_OBJS_REGISTER= "IMG_OBJS_REGISTER"; //$NON-NLS-1$ /** * Environment image identifier. - * + * * @since 3.0 */ public static final String IMG_OBJS_ENVIRONMENT = "IMG_OBJS_ENVIRONMENT"; //$NON-NLS-1$ - + /** * Environment variable image identifier. - * + * * @since 3.0 */ - public static final String IMG_OBJS_ENV_VAR = "IMG_OBJS_ENV_VAR"; //$NON-NLS-1$ - + public static final String IMG_OBJS_ENV_VAR = "IMG_OBJS_ENV_VAR"; //$NON-NLS-1$ + // views - - /** + + /** * Launches view image identifier - * + * * @since 2.0 */ public static final String IMG_VIEW_LAUNCHES= "IMG_VIEW_LAUNCHES"; //$NON-NLS-1$ - - /** + + /** * Breakpoints view image identifier - * + * * @since 2.0 */ - public static final String IMG_VIEW_BREAKPOINTS= "IMG_VIEW_BREAKPOINTS"; //$NON-NLS-1$ + public static final String IMG_VIEW_BREAKPOINTS= "IMG_VIEW_BREAKPOINTS"; //$NON-NLS-1$ - /** + /** * Variables view image identifier - * + * * @since 2.0 */ public static final String IMG_VIEW_VARIABLES= "IMG_VIEW_VARIABLES"; //$NON-NLS-1$ - - /** + + /** * Expressions view image identifier - * + * * @since 2.0 */ - public static final String IMG_VIEW_EXPRESSIONS= "IMG_VIEW_EXPRESSIONS"; //$NON-NLS-1$ + public static final String IMG_VIEW_EXPRESSIONS= "IMG_VIEW_EXPRESSIONS"; //$NON-NLS-1$ - /** + /** * Console view image identifier - * + * * @since 2.0 */ public static final String IMG_VIEW_CONSOLE= "IMG_VIEW_CONSOLE"; //$NON-NLS-1$ - + // perspective - /** + /** * Debug perspective image identifier - * + * * @since 2.0 */ - public static final String IMG_PERSPECTIVE_DEBUG= "IMG_PERSPECTIVE_DEBUG"; //$NON-NLS-1$ - + public static final String IMG_PERSPECTIVE_DEBUG= "IMG_PERSPECTIVE_DEBUG"; //$NON-NLS-1$ + // wizard banners /** Debug wizard banner image identifier. */ public static final String IMG_WIZBAN_DEBUG= "IMG_WIZBAN_DEBUG"; //$NON-NLS-1$ - + /** Run wizard banner image identifier. */ public static final String IMG_WIZBAN_RUN= "IMG_WIZBAN_RUN"; //$NON-NLS-1$ - + // overlays /** Error overlay image identifier. */ public static final String IMG_OVR_ERROR = "IMG_OVR_ERROR"; //$NON-NLS-1$ @@ -617,7 +617,7 @@ public interface IDebugUIConstants { * @since 3.1 */ public static final String IMG_OVR_SKIP_BREAKPOINT = "IMG_OVR_SKIP_BREAKPOINT"; //$NON-NLS-1$ - + /** * Debug action set identifier (value <code>"org.eclipse.debug.ui.debugActionSet"</code>). */ @@ -625,200 +625,200 @@ public interface IDebugUIConstants { /** * Debug Toolbar action set identifier (value <code>"org.eclipse.debug.ui.debugToolbarActionSet"</code>). - * + * * @since 3.8 */ public static final String DEBUG_TOOLBAR_ACTION_SET= PLUGIN_ID + ".debugToolbarActionSet"; //$NON-NLS-1$ /** - * System property which indicates whether the common debugging actions - * should be shown in the Debug view, as opposed to the top level + * System property which indicates whether the common debugging actions + * should be shown in the Debug view, as opposed to the top level * toolbar. Actions contributing to the debug view can use this property * to control their visibility. - * + * * @since 3.8 */ public static final String DEBUG_VIEW_TOOBAR_VISIBLE = PLUGIN_ID + ".debugViewToolbarVisible"; //$NON-NLS-1$ - + /** * Launch action set identifier (value <code>"org.eclipse.debug.ui.launchActionSet"</code>). */ public static final String LAUNCH_ACTION_SET= PLUGIN_ID + ".launchActionSet"; //$NON-NLS-1$ - + // extensions /** * Identifier for the standard 'debug' launch group. - * @since 2.1 + * @since 2.1 */ public static final String ID_DEBUG_LAUNCH_GROUP = PLUGIN_ID + ".launchGroup.debug"; //$NON-NLS-1$ - + /** * Identifier for the standard 'run' launch group. - * @since 2.1 + * @since 2.1 */ - public static final String ID_RUN_LAUNCH_GROUP = PLUGIN_ID + ".launchGroup.run"; //$NON-NLS-1$ - + public static final String ID_RUN_LAUNCH_GROUP = PLUGIN_ID + ".launchGroup.run"; //$NON-NLS-1$ + /** * Identifier for the standard 'profile' launch group. - * @since 3.0 + * @since 3.0 */ - public static final String ID_PROFILE_LAUNCH_GROUP = PLUGIN_ID + ".launchGroup.profile"; //$NON-NLS-1$ - - // menus - - /** + public static final String ID_PROFILE_LAUNCH_GROUP = PLUGIN_ID + ".launchGroup.profile"; //$NON-NLS-1$ + + // menus + + /** * Identifier for an empty group preceding an * edit group in a menu (value <code>"emptyEditGroup"</code>). */ public static final String EMPTY_EDIT_GROUP = "emptyEditGroup"; //$NON-NLS-1$ - + /** * Identifier for an edit group in a menu (value <code>"editGroup"</code>). */ public static final String EDIT_GROUP = "editGroup"; //$NON-NLS-1$ - - /** + + /** * Identifier for an empty group preceding a * step group in a menu (value <code>"emptyStepGroup"</code>). */ public static final String EMPTY_STEP_GROUP = "emptyStepGroup"; //$NON-NLS-1$ - + /** * Identifier for a step group in a menu or toolbar (value <code>"stepGroup"</code>). */ public static final String STEP_GROUP = "stepGroup"; //$NON-NLS-1$ - + /** * Identifier for a step into group in a menu or toolbar (value <code>"stepIntoGroup"</code>). */ public static final String STEP_INTO_GROUP = "stepIntoGroup"; //$NON-NLS-1$ - + /** * Identifier for a step over group in a menu or toolbar (value <code>"stepOverGroup"</code>). */ public static final String STEP_OVER_GROUP = "stepOverGroup"; //$NON-NLS-1$ - + /** * Identifier for a step return group in a menu or toolbar (value <code>"stepReturnGroup"</code>). */ public static final String STEP_RETURN_GROUP = "stepReturnGroup"; //$NON-NLS-1$ - - /** + + /** * Identifier for an empty group preceding a * thread group in a menu (value <code>"emptyThreadGroup"</code>). */ public static final String EMPTY_THREAD_GROUP = "emptyThreadGroup"; //$NON-NLS-1$ - + /** * Identifier for a thread group in a menu or toolbar(value <code>"threadGroup"</code>). */ public static final String THREAD_GROUP = "threadGroup"; //$NON-NLS-1$ - - /** + + /** * Identifier for an empty group preceding a * launch group in a menu (value <code>"emptyLaunchGroup"</code>). */ public static final String EMPTY_LAUNCH_GROUP = "emptyLaunchGroup"; //$NON-NLS-1$ - + /** * Identifier for a launch group in a menu (value <code>"launchGroup"</code>). */ public static final String LAUNCH_GROUP = "launchGroup"; //$NON-NLS-1$ - + /** * Identifier for an output group in a menu (value * <code>"outputGroup"</code>). */ - public static final String OUTPUT_GROUP = "outputGroup"; //$NON-NLS-1$ - - /** + public static final String OUTPUT_GROUP = "outputGroup"; //$NON-NLS-1$ + + /** * Identifier for an empty group preceding a * variable group in a menu (value <code>"emptyVariableGroup"</code>). */ public static final String EMPTY_VARIABLE_GROUP = "emptyVariableGroup"; //$NON-NLS-1$ - + /** * Identifier for a variable group in a menu (value <code>"variableGroup"</code>). */ public static final String VARIABLE_GROUP = "variableGroup"; //$NON-NLS-1$ - - /** + + /** * Identifier for an empty group preceding a * navigation group in a menu (value <code>"emptyNavigationGroup"</code>). */ public static final String EMPTY_NAVIGATION_GROUP = "emptyNavigationGroup"; //$NON-NLS-1$ - + /** * Identifier for a navigation group in a menu (value <code>"navigationGroup"</code>). */ public static final String NAVIGATION_GROUP = "navigationGroup"; //$NON-NLS-1$ - - /** + + /** * Identifier for an empty group preceding a * breakpoint group in a menu (value <code>"emptyBreakpointGroup"</code>). */ public static final String EMPTY_BREAKPOINT_GROUP = "emptyBreakpointGroup"; //$NON-NLS-1$ - + /** * Identifier for a breakpoint group in a menu (value <code>"breakpointGroup"</code>). */ public static final String BREAKPOINT_GROUP = "breakpointGroup"; //$NON-NLS-1$ - + /** * Identifier for a "breakpoint group" group in a menu (value <code>"breakpointGroupGroup"</code>). - * + * * @since 3.1 */ public static final String BREAKPOINT_GROUP_GROUP = "breakpointGroupGroup"; //$NON-NLS-1$ - - /** + + /** * Identifier for an empty group preceding an * expression group in a menu (value <code>"emptyExpressionGroup"</code>). - * + * * @since 2.0 */ public static final String EMPTY_EXPRESSION_GROUP = "emptyExpressionGroup"; //$NON-NLS-1$ - + /** * Identifier for an expression group in a menu (value <code>"expressionGroup"</code>). - * + * * @since 2.0 */ public static final String EXPRESSION_GROUP = "expressionGroup"; //$NON-NLS-1$ - /** + /** * Identifier for an empty group preceding a * render group in a menu (value <code>"emptyRenderGroup"</code>). */ public static final String EMPTY_RENDER_GROUP = "emptyRenderGroup"; //$NON-NLS-1$ - + /** * Identifier for a render group in a menu or toolbar(value <code>"renderGroup"</code>). */ public static final String RENDER_GROUP = "renderGroup"; //$NON-NLS-1$ - + /** * Identifier for a property group in a menu (value <code>"propertyGroup"</code>). */ public static final String PROPERTY_GROUP = "propertyGroup"; //$NON-NLS-1$ - - /** + + /** * Identifier for an empty group preceding a * register group in a menu (value <code>"emptyRegisterGroup"</code>). */ public static final String EMPTY_REGISTER_GROUP = "emptyRegisterGroup"; //$NON-NLS-1$ - + /** * Identifier for a register group in a menu (value <code>"registerGroup"</code>). */ public static final String REGISTER_GROUP = "registerGroup"; //$NON-NLS-1$ - /** + /** * Identifier for an empty group preceding a * modules group in a menu (value <code>"emptyModulesGroup"</code>). * @since 3.4 */ public static final String EMPTY_MODULES_GROUP = "emptyModulesGroup"; //$NON-NLS-1$ - + /** * Identifier for a modules group in a menu (value <code>"modulesGroup"</code>). * @since 3.4 @@ -829,23 +829,23 @@ public interface IDebugUIConstants { * Id for the popup menu associated with the variables (tree viewer) part of the VariableView */ public static final String VARIABLE_VIEW_VARIABLE_ID = "org.eclipse.debug.ui.VariableView.variables"; //$NON-NLS-1$ - + /** * Id for the popup menu associated with the detail (text viewer) part of the VariableView */ public static final String VARIABLE_VIEW_DETAIL_ID = "org.eclipse.debug.ui.VariableView.detail"; //$NON-NLS-1$ - + // status codes /** * Status indicating an invalid extension definition. */ public static final int STATUS_INVALID_EXTENSION_DEFINITION = 100; - + /** * Status code indicating an unexpected internal error. */ - public static final int INTERNAL_ERROR = 120; - + public static final int INTERNAL_ERROR = 120; + // launch configuration attribute keys /** * Launch configuration attribute - the perspective to @@ -853,118 +853,118 @@ public interface IDebugUIConstants { * run mode (value <code>org.eclipse.debug.ui.target_run_perspective</code>). * Value is a string corresponding to a perspective identifier, * or <code>null</code> indicating no perspective change. - * + * * @since 2.0 * @deprecated Since 3.0, this launch configuration attribute is no longer supported. * Use <code>DebugUITools.setLaunchPerspective(ILaunchConfigurationType type, String mode, String perspective)</code>. */ @Deprecated public static final String ATTR_TARGET_RUN_PERSPECTIVE = PLUGIN_ID + ".target_run_perspective"; //$NON-NLS-1$ - + /** * Launch configuration attribute - the perspective to * switch to when a launch configuration is launched in * debug mode (value <code>org.eclipse.debug.ui.target_debug_perspective</code>). * Value is a string corresponding to a perspective identifier, * or <code>null</code> indicating no perspective change. - * + * * @since 2.0 * @deprecated Since 3.0, this launch configuration attribute is no longer supported. * Use <code>DebugUITools.setLaunchPerspective(ILaunchConfigurationType type, String mode, String perspective)</code>. */ @Deprecated public static final String ATTR_TARGET_DEBUG_PERSPECTIVE = PLUGIN_ID + ".target_debug_perspective"; //$NON-NLS-1$ - + /** * Launch configuration attribute - the container where the configuration file * is stored. The container is set via the 'setContainer()' call on ILaunchConfigurationWorkingCopy. * This constant is only needed for persisting and reading the default value of the * container value for individual resources. - * + * * @since 2.0 */ public static final String ATTR_CONTAINER = PLUGIN_ID + ".container"; //$NON-NLS-1$ - + /** * Launch configuration attribute - a boolean value that indicates if the launch configuration * is 'private'. A private configuration is one that does not appear to the user in the launch * history or the launch configuration dialog. - * + * * @since 2.0 */ public static final String ATTR_PRIVATE = ILaunchManager.ATTR_PRIVATE; - + /** * Launch configuration attribute - a boolean value that indicates if the launch configuration * is displayed in the debug favorites menu. Default value is * <code>false</code> if absent. - * + * * @since 2.0 * @deprecated use <code>ATTR_FAVORITE_GROUPS</code> instead */ @Deprecated - public static final String ATTR_DEBUG_FAVORITE = PLUGIN_ID + ".debugFavorite"; //$NON-NLS-1$ - + public static final String ATTR_DEBUG_FAVORITE = PLUGIN_ID + ".debugFavorite"; //$NON-NLS-1$ + /** * Launch configuration attribute - a boolean value that indicates if the launch configuration * is displayed in the run favorites menu.Default value is * <code>false</code> if absent. - * + * * @since 2.0 * @deprecated use <code>ATTR_FAVORITE_GROUPS</code> instead */ @Deprecated - public static final String ATTR_RUN_FAVORITE = PLUGIN_ID + ".runFavorite"; //$NON-NLS-1$ - + public static final String ATTR_RUN_FAVORITE = PLUGIN_ID + ".runFavorite"; //$NON-NLS-1$ + /** * Launch configuration attribute - a list of launch group identifiers * representing the favorite histories a launch configuration should appear * in. When <code>null</code>, the configuration does not appear in any * favorite lists. - * + * * @since 2.1 */ public static final String ATTR_FAVORITE_GROUPS = PLUGIN_ID + ".favoriteGroups"; //$NON-NLS-1$ - + /** * Launch configuration attribute - a boolean value indicating whether a * configuration should be launched in the background. Default value is <code>true</code>. - * + * * @since 3.0 */ public static final String ATTR_LAUNCH_IN_BACKGROUND = PLUGIN_ID + ".ATTR_LAUNCH_IN_BACKGROUND"; //$NON-NLS-1$ - + /** * ProcessConsole attribute - references the process that was launched. - * - * @since 3.1 + * + * @since 3.1 */ public static final String ATTR_CONSOLE_PROCESS = PLUGIN_ID + ".ATTR_CONSOLE_PROCESS"; //$NON-NLS-1$ - + /** * Launch configuration attribute specifying the encoding that the console should use. - * When unspecified, the default encoding is used. Encoding names are available + * When unspecified, the default encoding is used. Encoding names are available * from {@link org.eclipse.ui.WorkbenchEncoding}. - * + * * @since 3.1 * @deprecated in 3.3 Please use DebugPlugin.ATTR_CONSOLE_ENCODING instead. */ @Deprecated public static final String ATTR_CONSOLE_ENCODING = DebugPlugin.ATTR_CONSOLE_ENCODING; - + /** * Launch configuration boolean attribute specifying whether output from the launched process will * be captured and written to the console. Default value is <code>true</code>. - * + * * @since 3.1 */ public static final String ATTR_CAPTURE_IN_CONSOLE = PLUGIN_ID + ".ATTR_CONSOLE_OUTPUT_ON"; //$NON-NLS-1$ - + /** * Launch configuration boolean attribute specifying whether input for the * launched process will be captured from file. Default value is * <code>null</code>. - * + * * @since 3.11 */ public static final String ATTR_CAPTURE_STDIN_FILE = PLUGIN_ID + ".ATTR_CAPTURE_STDIN_FILE"; //$NON-NLS-1$ @@ -976,93 +976,93 @@ public interface IDebugUIConstants { * will be written to the file. The file name attribute may contain * variables which will be resolved by the * {@link org.eclipse.core.variables.IStringVariableManager}. - * + * * @since 3.1 */ public static final String ATTR_CAPTURE_IN_FILE = PLUGIN_ID + ".ATTR_CAPTURE_IN_FILE"; //$NON-NLS-1$ - + /** * Launch configuration attribute specifying whether process output will be appended to the * file specified by the <code>ATTR_CAPTURE_IN_FILE</code> attribute instead of overwriting * the file. Default value is <code>false</code>. - * + * * @since 3.1 */ public static final String ATTR_APPEND_TO_FILE = PLUGIN_ID + ".ATTR_APPEND_TO_FILE"; //$NON-NLS-1$ - + // Extension points - + /** * Debug model presentation simple extension point identifier (value <code>"debugModelPresentations"</code>). */ public static final String ID_DEBUG_MODEL_PRESENTATION= "debugModelPresentations"; //$NON-NLS-1$ - + /** * Debug action groups extension point identifier * (value <code>"debugActionGroups"</code>). - * + * * @since 2.0 * @deprecated The Debug Action Groups extension point no longer exists. Product - * vendors should use Activities instead. + * vendors should use Activities instead. */ @Deprecated public static final String EXTENSION_POINT_DEBUG_ACTION_GROUPS= "debugActionGroups"; //$NON-NLS-1$ - + /** * Launch configuration tab groups extension point identifier * (value <code>"launchConfigurationTabGroups"</code>). - * + * * @since 2.0 */ - public static final String EXTENSION_POINT_LAUNCH_CONFIGURATION_TAB_GROUPS= "launchConfigurationTabGroups"; //$NON-NLS-1$ + public static final String EXTENSION_POINT_LAUNCH_CONFIGURATION_TAB_GROUPS= "launchConfigurationTabGroups"; //$NON-NLS-1$ /** * Contributed Launch Configuration Tab extension point identifier * (value <code>"launchConfigurationTabs"</code>). - * + * * @since 3.3 */ public static final String EXTENSION_POINT_LAUNCH_TABS = "launchConfigurationTabs"; //$NON-NLS-1$ - + /** * Launch shortcuts extension point identifier * (value <code>"launchShortcuts"</code>). - * + * * @since 2.0 */ public static final String EXTENSION_POINT_LAUNCH_SHORTCUTS= "launchShortcuts"; //$NON-NLS-1$ - + /** * Extension point for launch configuration type images. - * + * * @since 2.0 */ - public static final String EXTENSION_POINT_LAUNCH_CONFIGURATION_TYPE_IMAGES = "launchConfigurationTypeImages"; //$NON-NLS-1$ - + public static final String EXTENSION_POINT_LAUNCH_CONFIGURATION_TYPE_IMAGES = "launchConfigurationTypeImages"; //$NON-NLS-1$ + /** * Console document color provider extension point identifier * (value <code>"consoleColorProviders"</code>). - * + * * @since 2.1 */ public static final String EXTENSION_POINT_CONSOLE_COLOR_PROVIDERS = "consoleColorProviders"; //$NON-NLS-1$ - + /** * Launch groups extension point identifier (value * <code>"launchGroups"</code>). - * + * * @since 2.1 */ public static final String EXTENSION_POINT_LAUNCH_GROUPS = "launchGroups"; //$NON-NLS-1$ - + /** * Console line trackers extension point identifier (value * <code>"consoleLineTrackers"</code>). * * @since 2.1 */ - public static final String EXTENSION_POINT_CONSOLE_LINE_TRACKERS = "consoleLineTrackers"; //$NON-NLS-1$ - + public static final String EXTENSION_POINT_CONSOLE_LINE_TRACKERS = "consoleLineTrackers"; //$NON-NLS-1$ + /** * Variables content providers extension point identifier (value * <code>"variablesContentProviders"</code>). @@ -1070,7 +1070,7 @@ public interface IDebugUIConstants { * @since 3.0 */ public static final String EXTENSION_POINT_OBJECT_BROWSERS = "objectBrowsers"; //$NON-NLS-1$ - + /** * Launch variable components extension point identifier (value * <code>"launchVariableComponents"</code>). The launch variable @@ -1078,45 +1078,45 @@ public interface IDebugUIConstants { * for an <code>IContextLaunchVariable</code>. */ public static final String EXTENSION_POINT_LAUNCH_VARIABLE_COMPONENTS = "launchVariableComponents"; //$NON-NLS-1$ - + /** * Variable value editors extension point identifier (value * <code>"variableValueEditors"</code> - * + * * @since 3.1 */ public static final String EXTENSION_POINT_VARIABLE_VALUE_EDITORS = "variableValueEditors"; //$NON-NLS-1$ - + /** * Memory renderings extension point identifier (value * <code>"memoryRenderings"</code> - * + * * @since 3.1 * @deprecated As of release 3.4, replaced by {@link #EXTENSION_POINT_MEMORY_RENDERINGS} */ @Deprecated public static final String EXTENSION_POINT_MEMORY_RENDERIGNS = "memoryRenderings"; //$NON-NLS-1$ - + /** * Memory renderings extension point identifier (value * <code>"memoryRenderings"</code> - * + * * @since 3.4 */ public static final String EXTENSION_POINT_MEMORY_RENDERINGS = "memoryRenderings"; //$NON-NLS-1$ - + /** * Breakpoint organizers extension point identifier (value * <code>"breakpointOrganizers"</code> - * + * * @since 3.1 */ - public static final String EXTENSION_POINT_BREAKPOINT_ORGANIZERS = "breakpointOrganizers"; //$NON-NLS-1$ - + public static final String EXTENSION_POINT_BREAKPOINT_ORGANIZERS = "breakpointOrganizers"; //$NON-NLS-1$ + /** * Simple identifier constant (value <code>"detailPaneFactories"</code>) for the * detail pane factories extension point. - * + * * @since 3.3 */ public static final String EXTENSION_POINT_DETAIL_FACTORIES = "detailPaneFactories"; //$NON-NLS-1$ @@ -1124,7 +1124,7 @@ public interface IDebugUIConstants { /** * Simple identifier constant (value <code>"toggleBreakpointsTargetFactories"</code>) for the * toggle breakpoint targets extension point. - * + * * @since 3.5 */ public static final String EXTENSION_POINT_TOGGLE_BREAKPOINTS_TARGET_FACTORIES = "toggleBreakpointsTargetFactories"; //$NON-NLS-1$ @@ -1132,13 +1132,13 @@ public interface IDebugUIConstants { /** * Update policies extension point identifier (value * <code>"updatePolicies"</code> - * + * * @since 3.2 */ - public static final String EXTENSION_POINT_UPDATE_POLICIES = "updatePolicies"; //$NON-NLS-1$ + public static final String EXTENSION_POINT_UPDATE_POLICIES = "updatePolicies"; //$NON-NLS-1$ /** - * Padded string preference for renderings. Padded string is the string to be used in place of + * Padded string preference for renderings. Padded string is the string to be used in place of * of a memory byte if a rendering cannot render the data properly. * @since 3.1 */ @@ -1159,23 +1159,23 @@ public interface IDebugUIConstants { /** * Maximum number of characters to display in the details area of the variables * view, or 0 if unlimited. - * + * * @since 3.2 */ public static final String PREF_MAX_DETAIL_LENGTH = PLUGIN_ID + ".max_detail_length"; //$NON-NLS-1$ - + /** * Identifier for breakpoint working set type. * <br> - * Value is: <code>org.eclipse.debug.ui.breakpointWorkingSet</code> - * + * Value is: <code>org.eclipse.debug.ui.breakpointWorkingSet</code> + * * @since 3.2 */ - public static final String BREAKPOINT_WORKINGSET_ID = "org.eclipse.debug.ui.breakpointWorkingSet"; //$NON-NLS-1$ + public static final String BREAKPOINT_WORKINGSET_ID = "org.eclipse.debug.ui.breakpointWorkingSet"; //$NON-NLS-1$ /** * Memory view identifier (value <code>"org.eclipse.debug.ui.MemoryView"</code>). - * + * * @since 3.2 */ public static String ID_MEMORY_VIEW = "org.eclipse.debug.ui.MemoryView"; //$NON-NLS-1$ @@ -1183,7 +1183,7 @@ public interface IDebugUIConstants { /** * Memory view's rendering view pane identifier for the rendering view pane * on the left. (value <code>"org.eclipse.debug.ui.MemoryView.RenderingViewPane.1"</code>). - * + * * @since 3.2 */ public static String ID_RENDERING_VIEW_PANE_1 = "org.eclipse.debug.ui.MemoryView.RenderingViewPane.1"; //$NON-NLS-1$ @@ -1191,15 +1191,15 @@ public interface IDebugUIConstants { /** * Memory view's rendering view pane identifier for the rendering view pane * on the right. (value <code>"org.eclipse.debug.ui.MemoryView.RenderingViewPane.2"</code>). - * - * @since 3.2 + * + * @since 3.2 */ public static String ID_RENDERING_VIEW_PANE_2 = "org.eclipse.debug.ui.MemoryView.RenderingViewPane.2"; //$NON-NLS-1$ /** * Preference color to indicate that a <code>MemoryByte</code> does not have history. * (value <code> org.eclipse.debug.ui.MemoryHistoryUnknownColor </code>) - * + * * @since 3.2 */ public static final String PREF_MEMORY_HISTORY_UNKNOWN_COLOR = PLUGIN_ID + ".MemoryHistoryUnknownColor"; //$NON-NLS-1$ @@ -1207,35 +1207,35 @@ public interface IDebugUIConstants { /** * Preference color to indicate that a <code>MemoryByte</code> has history. * (value <code> org.eclipse.debug.ui.MemoryHistoryKnownColor </code>) - * + * * @since 3.2 */ public static final String PREF_MEMORY_HISTORY_KNOWN_COLOR = PLUGIN_ID + ".MemoryHistoryKnownColor"; //$NON-NLS-1$ - + /** * Annotation type identifier for default annotation of the current instruction * pointer (top stack frame in a thread). Value is <code>org.eclipse.debug.ui.currentIP</code>, * identifying a <code>org.eclipse.ui.editors.markerAnnotationSpecification</code> * extension. - * + * * @since 3.2 */ public static final String ANNOTATION_TYPE_INSTRUCTION_POINTER_CURRENT = "org.eclipse.debug.ui.currentIP"; //$NON-NLS-1$ - + /** * Annotation type identifier for default annotation of secondary instruction pointers * (non top stack frames). Value is <code>org.eclipse.debug.ui.secondaryIP</code>, * identifying a <code>org.eclipse.ui.editors.markerAnnotationSpecification</code> * extension. - * + * * @since 3.2 */ - public static final String ANNOTATION_TYPE_INSTRUCTION_POINTER_SECONDARY = "org.eclipse.debug.ui.secondaryIP"; //$NON-NLS-1$ + public static final String ANNOTATION_TYPE_INSTRUCTION_POINTER_SECONDARY = "org.eclipse.debug.ui.secondaryIP"; //$NON-NLS-1$ /** * Editor Identifier for the "Common Source Not Found" editor. * Value is <code>org.eclipse.debug.ui.sourcelookup.CommonSourceNotFoundEditor</code> - * + * * @since 3.2 */ public static final String ID_COMMON_SOURCE_NOT_FOUND_EDITOR="org.eclipse.debug.ui.sourcelookup.CommonSourceNotFoundEditor"; //$NON-NLS-1$ @@ -1245,7 +1245,7 @@ public interface IDebugUIConstants { * (value <code>org.eclipse.debug.ui.changedDebugElement</code>). * For example, when a variable value changes, variables are rendered in this * color. - * + * * @since 3.2 * @see DebugUITools */ @@ -1254,7 +1254,7 @@ public interface IDebugUIConstants { /** * Preference for background color in tree columns when a value changes color. - * + * * @since 3.5 * @see DebugUITools */ @@ -1264,84 +1264,84 @@ public interface IDebugUIConstants { /** * The name of the font to use for the variable text in the variables, registers and expression views. * This font is managed via the workbench font preference page. - * + * * @since 3.5 - */ - public static final String PREF_VARIABLE_TEXT_FONT= "org.eclipse.debug.ui.VariableTextFont"; //$NON-NLS-1$ + */ + public static final String PREF_VARIABLE_TEXT_FONT= "org.eclipse.debug.ui.VariableTextFont"; //$NON-NLS-1$ /** * The name of the font to use for detail panes. This font is managed via * the workbench font preference page. - * + * * @since 3.5 - */ - public static final String PREF_DETAIL_PANE_FONT= "org.eclipse.debug.ui.DetailPaneFont"; //$NON-NLS-1$ + */ + public static final String PREF_DETAIL_PANE_FONT= "org.eclipse.debug.ui.DetailPaneFont"; //$NON-NLS-1$ /** * Instruction pointer image for editor ruler for the currently executing * instruction in the top stack frame. - * + * * @since 3.2 */ public static final String IMG_OBJS_INSTRUCTION_POINTER_TOP = "IMG_OBJS_INSTRUCTION_POINTER_TOP"; //$NON-NLS-1$ /** * Instruction pointer image for editor ruler for secondary (non-top) stack frames. - * + * * @since 3.2 */ public static final String IMG_OBJS_INSTRUCTION_POINTER = "IMG_OBJS_INSTRUCTION_POINTER"; //$NON-NLS-1$ /** - * A key for a system property that indicates whether there are toggle + * A key for a system property that indicates whether there are toggle * breakpoint factories registered in this installation. This can be used * to trigger the UI to include menus related to breakpoint types. - * + * * @since 3.5 */ public static final String SYS_PROP_BREAKPOINT_TOGGLE_FACTORIES_USED = "org.eclipse.debug.ui.breakpoints.toggleFactoriesUsed"; //$NON-NLS-1$ - + /** * Name of the debug context variable which can be used in standard * expressions and command handlers to access the active debug context. - * + * * @since 3.5 */ public static final String DEBUG_CONTEXT_SOURCE_NAME = "debugContext"; //$NON-NLS-1$ - + /** - * ID for the default column layout for the variables, expressions + * ID for the default column layout for the variables, expressions * and registers views. - * + * * @since 3.8 */ public final static String COLUMN_PRESENTATION_ID_VARIABLE = IDebugUIConstants.PLUGIN_ID + ".VARIALBE_COLUMN_PRESENTATION"; //$NON-NLS-1$ - + /** * Default ID for the "Name" column in the Variables views. - * + * * @since 3.8 */ public final static String COLUMN_ID_VARIABLE_NAME = COLUMN_PRESENTATION_ID_VARIABLE + ".COL_VAR_NAME"; //$NON-NLS-1$ - + /** * Default ID for the "Declared Type" column in the Variables views. - * + * * @since 3.8 */ public final static String COLUMN_ID_VARIABLE_TYPE = COLUMN_PRESENTATION_ID_VARIABLE + ".COL_VAR_TYPE"; //$NON-NLS-1$ - + /** * Default ID for the "Value" column in the Variables views. - * + * * @since 3.8 */ public final static String COLUMN_ID_VARIABLE_VALUE = COLUMN_PRESENTATION_ID_VARIABLE + ".COL_VAR_VALUE"; //$NON-NLS-1$ - + /** * Default ID for the "Actual Type" column in the Variables views. - * + * * @since 3.8 */ public final static String COLUMN_ID_VARIABLE_VALUE_TYPE = COLUMN_PRESENTATION_ID_VARIABLE + ".COL_VALUE_TYPE"; //$NON-NLS-1$ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugView.java index d6e6b6b45..3958fec2b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugView.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugView.java @@ -34,13 +34,13 @@ import org.eclipse.ui.texteditor.IUpdate; */ public interface IDebugView extends IViewPart { - + /** * Action id for a view's copy action. Any view * with a copy action that should be invoked when * CTRL+C is pressed should store their * copy action with this key. - * + * * @see #setAction(String, IAction) */ public static final String COPY_ACTION = ActionFactory.COPY.getId(); @@ -50,7 +50,7 @@ public interface IDebugView extends IViewPart { * with a cut action that should be invoked when * CTRL+X is pressed should store their * cut action with this key. - * + * * @see #setAction(String, IAction) */ public static final String CUT_ACTION = ActionFactory.CUT.getId(); @@ -60,7 +60,7 @@ public interface IDebugView extends IViewPart { * with an action that should be invoked when * the mouse is double-clicked should store their * double-click action with this key. - * + * * @see #setAction(String, IAction) */ public static final String DOUBLE_CLICK_ACTION = "Double_Click_ActionId"; //$NON-NLS-1$ @@ -70,7 +70,7 @@ public interface IDebugView extends IViewPart { * with a find action that should be invoked when * CTRL+F is pressed should store their * find action with this key. - * + * * @see #setAction(String, IAction) */ public static final String FIND_ACTION = ActionFactory.FIND.getId(); @@ -80,7 +80,7 @@ public interface IDebugView extends IViewPart { * with a paste action that should be invoked when * CTRL+V is pressed should store their * paste action with this key. - * + * * @see #setAction(String, IAction) */ public static final String PASTE_ACTION = ActionFactory.PASTE.getId(); @@ -90,7 +90,7 @@ public interface IDebugView extends IViewPart { * with a remove action that should be invoked when * the delete key is pressed should store their * remove action with this key. - * + * * @see #setAction(String, IAction) */ public static final String REMOVE_ACTION = "Remove_ActionId"; //$NON-NLS-1$ @@ -100,18 +100,18 @@ public interface IDebugView extends IViewPart { * with a select all action that should be invoked when * CTRL+A is pressed should store their * select all action with this key. - * + * * @see #setAction(String, IAction) */ public static final String SELECT_ALL_ACTION = ActionFactory.SELECT_ALL.getId(); - + /** * Returns the viewer contained in this debug view. * * @return viewer */ public Viewer getViewer(); - + /** * Returns the debug model presentation for this view specified * by the debug model identifier. @@ -122,42 +122,42 @@ public interface IDebugView extends IViewPart { * presentation is registered for the specified id */ public IDebugModelPresentation getPresentation(String id); - + /** * Installs the given action under the given action id. * * If the action has an id that maps to one of the global - * action ids defined by this interface, the action is registered + * action ids defined by this interface, the action is registered * as a global action handler. * * If the action is an instance of <code>IUpdate</code> it is added/remove * from the collection of updateables associated with this view. - * + * * @param actionID the action id * @param action the action, or <code>null</code> to clear it * @see #getAction */ public void setAction(String actionID, IAction action); - + /** * Adds the given IUpdate to this view's collection of updatable * objects. Allows the view to periodically update these registered - * objects. + * objects. * Has no effect if an identical IUpdate is already registered. - * + * * @param updatable The IUpdate instance to be added */ public void add(IUpdate updatable); - + /** * Removes the given IUpdate from this view's collection of updatable * objects. * Has no effect if an identical IUpdate was not already registered. - * + * * @param updatable The IUpdate instance to be removed */ public void remove(IUpdate updatable); - + /** * Returns the action installed under the given action id. * @@ -166,7 +166,7 @@ public interface IDebugView extends IViewPart { * @see #setAction */ public IAction getAction(String actionID); - + /** * Returns the context menu manager for this view. * diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane.java index 9dc2c84c9..7e0381fc1 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane.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 - Anton Leherbauer - Fix selection provider (Bug 254442) @@ -26,7 +26,7 @@ import org.eclipse.ui.IWorkbenchPartSite; * </p> * @see IDetailPaneFactory * @see IDetailPane2 - * @since 3.3 + * @since 3.3 */ public interface IDetailPane { @@ -34,64 +34,64 @@ public interface IDetailPane { * Initializes this detail pane for the given workbench part site. This is the first method * invoked on a detail pane after instantiation. If this detail pane is being added to a * non-view component such as a dialog, the passed workbench part site will be <code>null</code>. - * + * * @param partSite The workbench part site that this detail pane has been created in or <code>null</code> */ public void init(IWorkbenchPartSite partSite); - + /** * Creates and returns the main control for this detail pane using the given composite as a * parent. - * + * * @param parent The parent composite that UI components should be added to * @return The main control for this detail pane */ public Control createControl(Composite parent); - + /** * Disposes this detail pane. This is the last method invoked on a detail pane and should * dispose of all UI components including the main composite returned in <code>createControl()</code>. */ public void dispose(); - + /** * Displays details for the given selection, possible <code>null</code>. An empty selection * or <code>null</code> should clear this detail pane. - * + * * @param selection The selection to be displayed, possibly empty or <code>null</code> */ public void display(IStructuredSelection selection); - + /** * Allows this detail pane to give focus to an appropriate control, and returns whether * the detail pane accepted focus. If this detail pane does not want focus, it should * return <code>false</code>, allowing the containing view to choose another target * for focus. - * + * * @return whether focus was taken */ public boolean setFocus(); - + /** * Returns a unique identifier for this detail pane. - * + * * @return A unique identifier for this detail pane */ public String getID(); - + /** * The human readable name of this detail pane. This is a short description of the type * of details this pane displays that appears in the context menu. - * + * * @return name of this detail pane */ public String getName(); - + /** * A brief description of this detail pane, or <code>null</code> if none - * + * * @return a description of this detail pane, or <code>null</code> if none */ public String getDescription(); - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane2.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane2.java index 1a6fb5109..036de50fe 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane2.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane2.java @@ -19,7 +19,7 @@ import org.eclipse.jface.viewers.ISelectionProvider; * <p> * Clients may implement this interface. * </p> - * + * * @since 3.5 */ public interface IDetailPane2 extends IDetailPane { @@ -31,7 +31,7 @@ public interface IDetailPane2 extends IDetailPane { * returned by {@link #createControl(org.eclipse.swt.widgets.Composite) * createControl(Composite)}. * </p> - * + * * @return the selection provider of this detail pane or <code>null</code> */ public ISelectionProvider getSelectionProvider(); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane3.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane3.java index ae16374da..fd53bf40b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane3.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane3.java @@ -20,7 +20,7 @@ import org.eclipse.ui.IWorkbenchPartConstants; * <p> * Clients may implement this interface. * </p> - * + * * @since 3.6 */ public interface IDetailPane3 extends IDetailPane, ISaveablePart { @@ -35,12 +35,12 @@ public interface IDetailPane3 extends IDetailPane, ISaveablePart { * @param listener a property listener */ public void addPropertyListener(IPropertyListener listener); - + /** * Removes the given property listener from this workbench part. * Has no effect if an identical listener is not registered. * * @param listener a property listener */ - public void removePropertyListener(IPropertyListener listener); + public void removePropertyListener(IPropertyListener listener); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPaneFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPaneFactory.java index c92e41e32..60955e482 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPaneFactory.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPaneFactory.java @@ -15,7 +15,7 @@ import java.util.Set; import org.eclipse.jface.viewers.IStructuredSelection; /** - * A detail pane factory creates one or more types of detail panes. + * A detail pane factory creates one or more types of detail panes. * <p> * Detail pane factories are contributed via the <code>org.eclipse.debug.ui.detailPaneFactories</code> * extension point. Following is an example of a detail pane factory extension: @@ -31,7 +31,7 @@ import org.eclipse.jface.viewers.IStructuredSelection; * <p> * <p> * Clients contributing a detail pane factory are intended to implement this interface. - * @see IDetailPane + * @see IDetailPane * @since 3.3 * */ @@ -41,50 +41,50 @@ public interface IDetailPaneFactory { * Returns all possible types detail panes that this factory can * create for the given selection, possibly empty. Detail panes are returned * as a set of detail pane identifiers. - * + * * @param selection The current selection * @return Set of String IDs for possible detail pane types, possibly empty */ public Set<String> getDetailPaneTypes(IStructuredSelection selection); - + /** - * Returns the identifier of the default detail pane type to use for the given - * selection, or <code>null</code> if this factory has no preference. + * Returns the identifier of the default detail pane type to use for the given + * selection, or <code>null</code> if this factory has no preference. * A factory can override the platform's default detail pane by returning - * a non-<code>null</code> value. - * + * a non-<code>null</code> value. + * * @param selection The current selection * @return a detail pane type identifier or <code>null</code> */ public String getDefaultDetailPane(IStructuredSelection selection); - + /** * Creates and returns a detail pane corresponding to the given detail pane - * type identifier that this factory can produce (according to + * type identifier that this factory can produce (according to * <code>getDetailPaneTypes(IStructuredSelection selection)</code>). - * + * * @param paneID The id of the detain pane type to be created * @return detail pane or <code>null</code> if one could not be created */ public IDetailPane createDetailPane(String paneID); - + /** * Returns a name for the detail pane type associated with the given ID * or <code>null</code> if none. Used to * populate the context menu with meaningful names of the pane types. - * + * * @param paneID detail pane type identifier * @return detail pane name or <code>null</code> if none */ public String getDetailPaneName(String paneID); - + /** * Returns a description for the detail pane type associated with the given ID * or <code>null</code> if none. - * + * * @param paneID detail pane type identifier * @return detail pane description or <code>null</code> if none */ public String getDetailPaneDescription(String paneID); - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IInstructionPointerPresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IInstructionPointerPresentation.java index 3b90b387c..154504c3e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IInstructionPointerPresentation.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IInstructionPointerPresentation.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 @@ import org.eclipse.ui.IEditorPart; * <li>Specify the annotation object to use. This is done by returning a non-<code>null</code> * value from <code>getInstructionPointerAnnotation(..)</code>.</li> * <li>Specify an <code>annotationType</code> extension to use. - * This is done by returning a non-<code>null</code> value from + * This is done by returning a non-<code>null</code> value from * <code>getInstructionPointerAnnotationType(..)</code>. When specified, the annotation * type controls the image displayed via its associated * <code>markerAnnotationSpecification</code>.</li> @@ -58,26 +58,26 @@ public interface IInstructionPointerPresentation extends IDebugModelPresentation /** * Returns an annotation used for the specified stack frame in the specified * editor, or <code>null</code> if a default annotation should be used. - * + * * @param editorPart the editor the debugger has opened * @param frame the stack frame for which the debugger is displaying * source * @return annotation or <code>null</code> */ public Annotation getInstructionPointerAnnotation(IEditorPart editorPart, IStackFrame frame); - + /** * Returns an identifier of a <code>org.eclipse.ui.editors.annotationTypes</code> extension used for * the specified stack frame in the specified editor, or <code>null</code> if a default annotation * should be used. - * + * * @param editorPart the editor the debugger has opened * @param frame the stack frame for which the debugger is displaying * source * @return annotation type identifier or <code>null</code> - */ + */ public String getInstructionPointerAnnotationType(IEditorPart editorPart, IStackFrame frame); - + /** * Returns the instruction pointer image used for the specified stack frame in the specified * editor, or <code>null</code> if a default image should be used. @@ -89,9 +89,9 @@ public interface IInstructionPointerPresentation extends IDebugModelPresentation * @param frame the stack frame for which the debugger is displaying * source * @return image or <code>null</code> - */ + */ public Image getInstructionPointerImage(IEditorPart editorPart, IStackFrame frame); - + /** * Returns the text to associate with the instruction pointer annotation used for the * specified stack frame in the specified editor, or <code>null</code> if a default @@ -104,6 +104,6 @@ public interface IInstructionPointerPresentation extends IDebugModelPresentation * @param frame the stack frame for which the debugger is displaying * source * @return message or <code>null</code> - */ + */ public String getInstructionPointerText(IEditorPart editorPart, IStackFrame frame); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationDialog.java index 8505b0344..e3615ec89 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationDialog.java @@ -12,7 +12,7 @@ package org.eclipse.debug.ui; import org.eclipse.jface.operation.IRunnableContext; - + /** * A launch configuration dialog is used to edit and launch * launch configurations. It contains a launch configuration @@ -25,19 +25,19 @@ import org.eclipse.jface.operation.IRunnableContext; */ public interface ILaunchConfigurationDialog extends IRunnableContext { - + /** * Return value from <code>open()</code> method of a * launch configuration dialog when a launch completed * successfully with a single click (without opening a * launch configuration dialog). - * + * * @deprecated the launch dialog no longer supports launching without * opening - this constant will never be returned by the dialog */ @Deprecated public static final int LAUNCHED_BEFORE_OPENING = 2; - + /** * Adjusts the enable state of this dialog's buttons * to reflect the state of the active tab group. @@ -47,76 +47,76 @@ public interface ILaunchConfigurationDialog extends IRunnableContext { * </p> */ public void updateButtons(); - + /** - * Updates the message (or error message) shown in the message line to + * Updates the message (or error message) shown in the message line to * reflect the state of the currently active tab in this launch * configuration dialog. * <p> - * This method may be called to force a message + * This method may be called to force a message * update. * </p> */ public void updateMessage(); - + /** * Sets the contents of the name field to the given name. - * + * * @param name new name value - */ + */ public void setName(String name); - + /** * Returns a unique launch configuration name, using the given name * as a seed. - * + * * @param name seed from which to generate a new unique name * @return the new unique launch configuration name - */ + */ public String generateName(String name); - + /** * Returns the tabs currently being displayed, or * <code>null</code> if none. - * + * * @return currently displayed tabs, or <code>null</code> */ public ILaunchConfigurationTab[] getTabs(); - + /** * Returns the currently active <code>ILaunchConfigurationTab</code> * being displayed, or <code>null</code> if there is none. - * + * * @return currently active <code>ILaunchConfigurationTab</code>, or <code>null</code>. */ public ILaunchConfigurationTab getActiveTab(); - + /** * Returns the mode in which this dialog was opened - * run or debug. - * + * * @return one of <code>RUN_MODE</code> or <code>DEBUG_MODE</code> defined in <code>ILaunchManager</code> * @see org.eclipse.debug.core.ILaunchManager */ - public String getMode(); - + public String getMode(); + /** * Sets the displayed tab to the given tab. Has no effect if the specified * tab is not one of the tabs being displayed in the dialog currently. - * + * * @param tab the tab to display/activate * @since 2.1 */ public void setActiveTab(ILaunchConfigurationTab tab); - + /** * Sets the displayed tab to the tab with the given index. Has no effect if * the specified index is not within the limits of the tabs returned by * <code>getTabs()</code>. - * + * * @param index the index of the tab to display * @since 2.1 */ - public void setActiveTab(int index); - + public void setActiveTab(int index); + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationTab.java index e13d55995..3a8551d88 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationTab.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationTab.java @@ -17,19 +17,19 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; - + /** * A launch configuration tab is used to edit/view attributes * of a specific type of launch configuration. Launch * configurations are presented in a dialog, with a tab folder. * Each tab manipulates one ore more attributes of a launch - * configuration. + * configuration. * <p> * A tab has the following lifecycle methods: * <ul> - * <li><code>setLaunchConfigurationDialog(ILaunchConfigurationDialog)</code> - + * <li><code>setLaunchConfigurationDialog(ILaunchConfigurationDialog)</code> - * this is the first method called on a tab after it is instantiated.</li> - * <li><code>initializeFrom(ILaunchConfiguration)</code> - called when a + * <li><code>initializeFrom(ILaunchConfiguration)</code> - called when a * launch configuration is selected to be displayed.</li> * <li><code>activated(ILaunchConfigurationWorkingCopy)</code> - called when * a tab is entered.</li> @@ -75,7 +75,7 @@ public interface ILaunchConfigurationTab { * @param parent the parent composite */ public void createControl(Composite parent); - + /** * Returns the top level control for this tab. * <p> @@ -85,8 +85,8 @@ public interface ILaunchConfigurationTab { * * @return the top level control or <code>null</code> */ - public Control getControl(); - + public Control getControl(); + /** * Initializes the given launch configuration with * default values for this tab. This method @@ -94,36 +94,36 @@ public interface ILaunchConfigurationTab { * such that the configuration can be initialized with * meaningful values. This method may be called before this * tab's control is created. - * + * * @param configuration launch configuration */ - public void setDefaults(ILaunchConfigurationWorkingCopy configuration); - + public void setDefaults(ILaunchConfigurationWorkingCopy configuration); + /** * Initializes this tab's controls with values from the given * launch configuration. This method is called when * a configuration is selected to view or edit, after this * tab's control has been created. - * + * * @param configuration launch configuration */ - public void initializeFrom(ILaunchConfiguration configuration); - + public void initializeFrom(ILaunchConfiguration configuration); + /** * Notifies this launch configuration tab that it has * been disposed. Marks the end of this tab's lifecycle, * allowing this tab to perform any cleanup required. */ public void dispose(); - + /** - * Copies values from this tab into the given + * Copies values from this tab into the given * launch configuration. - * + * * @param configuration launch configuration */ public void performApply(ILaunchConfigurationWorkingCopy configuration); - + /** * Returns the current error message for this tab. * May be <code>null</code> to indicate no error message. @@ -132,23 +132,23 @@ public interface ILaunchConfigurationTab { * as opposed to a message which may simply provide instruction * or information to the user. * </p> - * + * * @return the error message, or <code>null</code> if none */ public String getErrorMessage(); - + /** * Returns the current message for this tab. * <p> - * A message provides instruction or information to the - * user, as opposed to an error message which should + * A message provides instruction or information to the + * user, as opposed to an error message which should * describe some error state. * </p> - * + * * @return the message, or <code>null</code> if none */ - public String getMessage(); - + public String getMessage(); + /** * Returns whether this tab is in a valid state in the context of the specified launch configuration. * <p> @@ -162,38 +162,38 @@ public interface ILaunchConfigurationTab { * @return whether this tab is in a valid state */ public boolean isValid(ILaunchConfiguration launchConfig); - + /** * Returns whether this tab is in a state that allows the launch configuration whose values * this tab is showing to be saved. This differs from <code>isValid()</code> in that <code>canSave()</code> * determines if this tab prevents the current launch configuration from being saved, whereas * <code>isValid()</code> determines if this tab prevents the current launch configuration from * being launched. - * + * * <p> * This information is typically used by the launch configuration * dialog to decide when it is okay to save a launch configuration. * </p> - * + * * @return whether this tab is in a state that allows the current launch configuration to be saved */ public boolean canSave(); - + /** * Sets the launch configuration dialog that hosts this tab. * This is the first method called on a launch configuration * tab, and marks the beginning of this tab's lifecycle. - * + * * @param dialog launch configuration dialog */ public void setLaunchConfigurationDialog(ILaunchConfigurationDialog dialog); - + /** * Notifies this tab that the specified configuration has been * launched, resulting in the given launch. This method can be * called when a tab's control does not exist, to support single-click * launching. - * + * * @param launch the result of launching the current * launch configuration * @deprecated As of R3.0, this method is no longer called by the launch @@ -203,34 +203,34 @@ public interface ILaunchConfigurationTab { */ @Deprecated public void launched(ILaunch launch); - + /** * Returns the name of this tab. - * + * * @return the name of this tab */ public String getName(); - + /** * Returns the image for this tab, or <code>null</code> if none - * + * * @return the image for this tab, or <code>null</code> if none */ - public Image getImage(); - + public Image getImage(); + /** * Notification that this tab has become the active tab in the launch * configuration dialog. - * + * * @param workingCopy the launch configuration being edited * @since 3.0 */ public void activated(ILaunchConfigurationWorkingCopy workingCopy); - + /** * Notification that this tab is no longer the active tab in the launch * configuration dialog. - * + * * @param workingCopy the launch configuration being edited * @since 3.0 */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationTab2.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationTab2.java index b019f87fb..3aa2a0838 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationTab2.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationTab2.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: * Mohamed Hussein (Mentor Graphics) - initial API and implementation (Bug 386673) *******************************************************************************/ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationTabGroup.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationTabGroup.java index 340629abe..fd0235f6c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationTabGroup.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationTabGroup.java @@ -14,7 +14,7 @@ package org.eclipse.debug.ui; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; - + /** * A launch configuration tab group is used to edit/view attributes * of a specific type of launch configuration. Launch @@ -27,9 +27,9 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; * <p> * A tab group has the following lifecycle methods: * <ul> - * <li><code>createTabs(ILaunchConfigurationDialog, String)</code> - + * <li><code>createTabs(ILaunchConfigurationDialog, String)</code> - * this is the first method called on a tab group after it is instantiated.</li> - * <li><code>initializeFrom(ILaunchConfiguration)</code> - called when a + * <li><code>initializeFrom(ILaunchConfiguration)</code> - called when a * launch configuration is selected to be displayed.</li> * <li><code>performApply(ILaunchConfigurationWorkingCopy)</code> - called when * a tab group's values are to be written to a launch configuration.</li> @@ -56,7 +56,7 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; * group extension. * <pre> * <extension point="org.eclipse.debug.ui.launchConfigurationTabGroups"> - * <launchConfigurationTabGroup + * <launchConfigurationTabGroup * id="com.example.ExampleTabGroup" * type="com.example.ExampleLaunchConfigurationTypeIdentifier" * class="com.example.ExampleLaunchConfigurationTabGroupClass"> @@ -88,17 +88,17 @@ public interface ILaunchConfigurationTabGroup { * Creates the tabs contained in this tab group for the specified * launch mode. The tabs control's are not created. This is the * fist method called in the lifecycle of a tab group. - * + * * @param dialog the launch configuration dialog this tab group * is contained in * @param mode the mode the launch configuration dialog was * opened in */ public void createTabs(ILaunchConfigurationDialog dialog, String mode); - + /** * Returns the tabs contained in this tab group. - * + * * @return the tabs contained in this tab group */ public ILaunchConfigurationTab[] getTabs(); @@ -110,7 +110,7 @@ public interface ILaunchConfigurationTabGroup { * perform any cleanup required. */ public void dispose(); - + /** * Initializes the given launch configuration with * default values for this tab group. This method @@ -118,34 +118,34 @@ public interface ILaunchConfigurationTabGroup { * such that the configuration can be initialized with * meaningful values. This method may be called before * tab controls are created. - * + * * @param configuration launch configuration */ - public void setDefaults(ILaunchConfigurationWorkingCopy configuration); - + public void setDefaults(ILaunchConfigurationWorkingCopy configuration); + /** * Initializes this group's tab controls with values from the given * launch configuration. This method is called when * a configuration is selected to view or edit. - * + * * @param configuration launch configuration */ - public void initializeFrom(ILaunchConfiguration configuration); - + public void initializeFrom(ILaunchConfiguration configuration); + /** - * Copies values from this group's tabs into the given + * Copies values from this group's tabs into the given * launch configuration. - * + * * @param configuration launch configuration */ public void performApply(ILaunchConfigurationWorkingCopy configuration); - + /** * Notifies this tab that a configuration has been * launched, resulting in the given launch. This method can be * called when a tab's control does not exist, to support single-click * launching. - * + * * @param launch the result of launching the current * launch configuration * @deprecated As of R3.0, this method is no longer called by the launch diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchGroup.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchGroup.java index 73d66a098..25ad8ce05 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchGroup.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchGroup.java @@ -9,7 +9,7 @@ * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.debug.ui; - + import org.eclipse.jface.resource.ImageDescriptor; /** @@ -18,7 +18,7 @@ import org.eclipse.jface.resource.ImageDescriptor; * a launch group, and a launch history is maintained for each group. * A launch group is defined in plug-in XML via the <code>launchGroups</code> * extension point. - * <p> + * <p> * Following is an example of a launch group contribution: * <pre> * <extension point="org.eclipse.debug.ui.launchGroups"> @@ -45,58 +45,58 @@ import org.eclipse.jface.resource.ImageDescriptor; * @noextend This interface is not intended to be extended by clients. */ public interface ILaunchGroup { - + /** * Returns the image for this launch group, or <code>null</code> * if none. - * + * * @return the image for this launch group, or <code>null</code> if none */ public ImageDescriptor getImageDescriptor(); - + /** * Returns the banner image for this launch group, or <code>null</code> if * none - * + * * @return the banner image for this launch group, or <code>null</code> if * none */ public ImageDescriptor getBannerImageDescriptor(); - + /** * Returns the label for this launch group - * + * * @return the label for this launch group */ public String getLabel(); - + /** * Returns the id for this launch group - * + * * @return the id for this launch group */ public String getIdentifier(); - + /** * Returns the category for this launch group, possibly <code>null</code> - * + * * @return the category for this launch group, possibly <code>null</code> */ public String getCategory(); - + /** * Returns the mode for this launch group - * + * * @return the mode for this launch group */ public String getMode(); - + /** * Returns whether this launch group is public - * + * * @return boolean */ public boolean isPublic(); - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchShortcut.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchShortcut.java index 205799bda..819eabe48 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchShortcut.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchShortcut.java @@ -87,29 +87,29 @@ import org.eclipse.ui.IEditorPart; * <li><code>label</code> specifies a label used to render this shortcut.</li> * <li><code>icon</code> specifies a plug-in relative path to an icon used to * render this shortcut.</li> - * <li><code>category</code> specifies the launch configuration type category this shortcut is applicable for. + * <li><code>category</code> specifies the launch configuration type category this shortcut is applicable for. * When unspecified, the category is <code>null</code> (default).</li> - * <li><code>path</code> an optional menu path used to group launch shortcuts in menus. - * Launch shortcuts are grouped alphabetically based on the <code>path</code> attribute, - * and then sorted alphabetically within groups based on the <code>label</code> attribute. + * <li><code>path</code> an optional menu path used to group launch shortcuts in menus. + * Launch shortcuts are grouped alphabetically based on the <code>path</code> attribute, + * and then sorted alphabetically within groups based on the <code>label</code> attribute. * When unspecified, a shortcut appears in the last group. This attribute was added in the 3.0.1 release.</li> * <li><code>helpContextId</code> optional attribute specifying the help context * identifier to associate with the launch shortcut action in a menu.</li> - * <li><code>description</code> Provides a human readable description of what the shortcut does (or will do) - * if the user selects it. A Description provided in this field will apply as the default description for all + * <li><code>description</code> Provides a human readable description of what the shortcut does (or will do) + * if the user selects it. A Description provided in this field will apply as the default description for all * of the modes listed in the modes attribute.</li> - * <li><code>perspective</code> has been <b>deprecated</b> in the 3.1 release. - * The top level Run/Debug/Profile cascade menus now support contextual (selection sensitive) + * <li><code>perspective</code> has been <b>deprecated</b> in the 3.1 release. + * The top level Run/Debug/Profile cascade menus now support contextual (selection sensitive) * launching, and clients should provide a <code>contextualLaunch</code> element instead.</li> - * <li><code>contextualLaunch</code> holds all descriptions for adding shortcuts to the selection sensitive - * Run/Debug/Profile cascade menus. Only objects that provide an <code>org.eclipse.debug.ui.actions.ILaunchable</code> - * adapter are considered for the cascade menus. The <code>org.eclipse.debug.ui.actions.ILaunchable</code> + * <li><code>contextualLaunch</code> holds all descriptions for adding shortcuts to the selection sensitive + * Run/Debug/Profile cascade menus. Only objects that provide an <code>org.eclipse.debug.ui.actions.ILaunchable</code> + * adapter are considered for the cascade menus. The <code>org.eclipse.debug.ui.actions.ILaunchable</code> * interface is simply used to tag objects that support contextual launching.</li> * <li><code>contextLabel</code> zero or more context menu labels. For * shortcuts that pass their filter tests, the specified label will appear * in the "Run ->" context menu and be bound to a launch action of the * specified mode (e.g. run,debug,profile).</li> - * <li><code>configurationType</code> allows more that one associated launch configuration type to be + * <li><code>configurationType</code> allows more that one associated launch configuration type to be * specified for this launch shortcut. That way consumers of launch shortcut information can know what kinds * of launch configurations your short is associated with/creates</li> * <li><code>description</code> allows a mode specific description(s) to be provided for this launch shortcut.</li> @@ -129,21 +129,21 @@ public interface ILaunchShortcut { * shortcut is responsible for progress reporting as well * as error handling, in the event that a launchable entity cannot * be found, or launching fails. - * + * * @param selection workbench selection - * @param mode one of the launch modes defined by the + * @param mode one of the launch modes defined by the * launch manager * @see org.eclipse.debug.core.ILaunchManager */ public void launch(ISelection selection, String mode); - + /** * Locates a launchable entity in the given active editor, and launches * an application in the specified mode. This launch configuration * shortcut is responsible for progress reporting as well as error * handling, in the event that a launchable entity cannot be found, * or launching fails. - * + * * @param editor the active editor in the workbench * @param mode one of the launch modes defined by the launch * manager diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchShortcut2.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchShortcut2.java index 7e5249035..dbcb25255 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchShortcut2.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchShortcut2.java @@ -18,13 +18,13 @@ import org.eclipse.ui.IEditorPart; /** * <p> - * An extension to a standard launch shortcut ({@link ILaunchShortcut}) allowing + * An extension to a standard launch shortcut ({@link ILaunchShortcut}) allowing * launch shortcuts to specify how selections and editors should be launched. * </p> * <p> * To launch a selection (or active editor), the debug platform derives a resource associated * with the selection (or active editor), and then resolves the most recently launched configuration - * associated with that resource. This interface allows a launch shortcut to override the + * associated with that resource. This interface allows a launch shortcut to override the * framework's resource and launch configuration resolution for selections (and active editors). * </p> * <p> @@ -43,48 +43,48 @@ public interface ILaunchShortcut2 extends ILaunchShortcut { * Returns an array of <code>ILaunchConfiguration</code>s that apply to the specified * selection, an empty collection if one could be created but does not exist, or * <code>null</code> if default resource mappings should be used to derive associated - * configurations. - * + * configurations. + * * @param selection the current selection - * @return an array of existing <code>ILaunchConfiguration</code>s that could be + * @return an array of existing <code>ILaunchConfiguration</code>s that could be * used to launch the given selection, an empty array if one could be created * but does not exist, or <code>null</code> if default resource mappings should * be used to derive associated configurations */ public ILaunchConfiguration[] getLaunchConfigurations(ISelection selection); - + /** - * Returns an array of existing <code>ILaunchConfiguration</code>s that could be - * used to launch the given editor part, an empty array if one + * Returns an array of existing <code>ILaunchConfiguration</code>s that could be + * used to launch the given editor part, an empty array if one * could be created but does not exist, or <code>null</code> if default resource - * mappings should be used to derive associated configurations - * + * mappings should be used to derive associated configurations + * * @param editorpart the current selection - * @return an array of existing <code>ILaunchConfiguration</code>s that could be - * used to launch the given editor part/editor input, an empty array if one + * @return an array of existing <code>ILaunchConfiguration</code>s that could be + * used to launch the given editor part/editor input, an empty array if one * could be created but does not exist, or <code>null</code> if default resource * mappings should be used to derive associated configurations */ public ILaunchConfiguration[] getLaunchConfigurations(IEditorPart editorpart); - + /** * Returns an <code>IResource</code> that maps to the given selection for launch * purposes, or <code>null</code> if none. The resource is used to resolve a configuration * to launch if this shortcut does not provide specific launch configurations to launch - * for the selection (via {@link #getLaunchConfigurations(ISelection)}. - * + * for the selection (via {@link #getLaunchConfigurations(ISelection)}. + * * @param selection the current selection * @return an <code>IResource</code> that maps to the given selection for launch * purposes or <code>null</code> if none */ public IResource getLaunchableResource(ISelection selection); - + /** * Returns an <code>IResource</code> that maps to given editor part for launch * purposes, or <code>null</code> if none. The resource is used to resolve a configuration * to launch if this shortcut does not provide specific launch configurations to launch * for the editor (via {@link #getLaunchConfigurations(IEditorPart)}. - * + * * @param editorpart the current editor part * @return an <code>IResource</code> that maps to given editor part for launch * purposes, or <code>null</code> if none diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ISourcePresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ISourcePresentation.java index 329ce6bd4..b2096e90f 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ISourcePresentation.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ISourcePresentation.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.ui; import org.eclipse.ui.IEditorInput; - + /** * A source presentation is used to resolve an editor in * which to display a debug model element, breakpoint, or @@ -20,7 +20,7 @@ import org.eclipse.ui.IEditorInput; * (which implements this interface) is used to resolve * editors when performing source lookup. However, a source * locator may override default editor resolution by implementing - * this interface. + * this interface. * <p> * Source lookup consists of the following steps:<ol> * <li>Locating a source element - the source locator associated @@ -43,7 +43,7 @@ import org.eclipse.ui.IEditorInput; * extension to an {@link org.eclipse.debug.core.model.ISourceLocator}. * </p> * @since 2.0 - */ + */ public interface ISourcePresentation { /** @@ -57,7 +57,7 @@ public interface ISourcePresentation { * @return an editor input, or <code>null</code> if none */ public IEditorInput getEditorInput(Object element); - + /** * Returns the id of the editor to use to display the * given editor input and object, or <code>null</code> if diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IValueDetailListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IValueDetailListener.java index 05bcc4860..cdcb33e5d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IValueDetailListener.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IValueDetailListener.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 interface IValueDetailListener { /** * Notifies this listener that the details for the given * value have been computed as the specified result. - * + * * @param value the value for which the detail is provided * @param result the detailed description of the given value */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java index 0531e322f..a31300078 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java @@ -55,15 +55,15 @@ import org.eclipse.ui.PartInitException; import org.osgi.service.prefs.BackingStoreException; /** - * A <code>DebugPopup</code> that can be used to inspect an + * A <code>DebugPopup</code> that can be used to inspect an * <code>IExpression</code> object. * @since 3.2 * @noextend This class is not intended to be subclassed by clients. */ public class InspectPopupDialog extends DebugPopup { - + private static final String PREF_INSPECT_POPUP_SASH_WEIGHTS = DebugUIPlugin.getUniqueIdentifier() + "inspectPopupSashWeights"; //$NON-NLS-1$ - + private static final int[] DEFAULT_SASH_WEIGHTS = new int[] { 75, 25 }; private static final int MIN_WIDTH = 300; private static final int MIN_HEIGHT = 250; @@ -75,14 +75,14 @@ public class InspectPopupDialog extends DebugPopup { private DetailPaneProxy fDetailPane; private Tree fTree; private IExpression fExpression; - + /** * Creates a new inspect popup. - * + * * @param shell The parent shell * @param anchor point at which to anchor the popup in Display coordinates. Since * 3.3 <code>null</code> indicates a default location should be used. - * @param commandId The command id to be used for persistence of + * @param commandId The command id to be used for persistence of * the dialog (possibly <code>null</code>) * @param expression The expression being inspected */ @@ -120,10 +120,10 @@ public class InspectPopupDialog extends DebugPopup { fViewer.setAutoExpandLevel(1); fDetailPaneComposite = SWTFactory.createComposite(fSashForm, 1, 1, GridData.FILL_BOTH); - + fDetailPane = new DetailPaneProxy(new DetailPaneContainer()); fDetailPane.display(null); // Bring up the default pane so the user doesn't see an empty composite - + fTree = fViewer.getTree(); fTree.addSelectionListener(new SelectionListener() { @Override @@ -135,7 +135,7 @@ public class InspectPopupDialog extends DebugPopup { }); initSashWeights(); - + fViewer.getContentProvider(); if (view != null) { StructuredViewer structuredViewer = (StructuredViewer) view.getViewer(); @@ -146,13 +146,13 @@ public class InspectPopupDialog extends DebugPopup { } } } - + TreeRoot treeRoot = new TreeRoot(); // add update listener to auto-select and display details of root expression fViewer.addViewerUpdateListener(new IViewerUpdateListener() { @Override public void viewerUpdatesComplete() { - } + } @Override public void viewerUpdatesBegin() { } @@ -168,14 +168,14 @@ public class InspectPopupDialog extends DebugPopup { fViewer.removeViewerUpdateListener(this); } } - }); + }); fViewer.setInput(treeRoot); return fTree; } - + /** - * Initializes the sash form weights from the preference store (using default values if + * Initializes the sash form weights from the preference store (using default values if * no sash weights were stored previously). */ protected void initSashWeights(){ @@ -189,12 +189,12 @@ public class InspectPopupDialog extends DebugPopup { intWeights[1] = Integer.parseInt(weights[1]); fSashForm.setWeights(intWeights); return; - } catch (NumberFormatException e){} + } catch (NumberFormatException e){} } } fSashForm.setWeights(DEFAULT_SASH_WEIGHTS); } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.PopupDialog#saveDialogBounds(org.eclipse.swt.widgets.Shell) */ @@ -217,7 +217,7 @@ public class InspectPopupDialog extends DebugPopup { } } } - + /** * Creates the content for the root element of the tree viewer in the inspect * popup dialog. Always has one child, the expression this popup is displaying. @@ -238,7 +238,7 @@ public class InspectPopupDialog extends DebugPopup { protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException { return new Object[] { fExpression }; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#supportsContextId(java.lang.String) */ @@ -247,7 +247,7 @@ public class InspectPopupDialog extends DebugPopup { return true; } } - + /** * Attempts to find an appropriate view to emulate, this will either be the * variables view or the expressions view. @@ -268,7 +268,7 @@ public class InspectPopupDialog extends DebugPopup { } return variablesView; } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.DebugPopup#close() */ @@ -337,7 +337,7 @@ public class InspectPopupDialog extends DebugPopup { * pane and provides limited access to the detail pane proxy. */ private class DetailPaneContainer implements IDetailPaneContainer{ - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getCurrentPaneID() */ @@ -345,7 +345,7 @@ public class InspectPopupDialog extends DebugPopup { public String getCurrentPaneID() { return fDetailPane.getCurrentPaneID(); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getCurrentSelection() */ @@ -353,15 +353,15 @@ public class InspectPopupDialog extends DebugPopup { public IStructuredSelection getCurrentSelection() { return (IStructuredSelection)fViewer.getSelection(); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#refreshDetailPaneContents() */ @Override - public void refreshDetailPaneContents() { + public void refreshDetailPaneContents() { fDetailPane.display(getCurrentSelection()); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getParentComposite() */ @@ -369,7 +369,7 @@ public class InspectPopupDialog extends DebugPopup { public Composite getParentComposite() { return fDetailPaneComposite; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getWorkbenchPartSite() */ @@ -377,7 +377,7 @@ public class InspectPopupDialog extends DebugPopup { public IWorkbenchPartSite getWorkbenchPartSite() { return null; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#paneChanged(java.lang.String) */ @@ -390,7 +390,7 @@ public class InspectPopupDialog extends DebugPopup { applyForegroundColor(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND), paneControl); } } - + } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/RefreshTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/RefreshTab.java index 328285370..5879c06a4 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/RefreshTab.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/RefreshTab.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 *******************************************************************************/ @@ -46,7 +46,7 @@ import org.eclipse.ui.dialogs.IWorkingSetEditWizard; * terminates. * <p> * Clients may call {@link #setHelpContextId(String)} on this tab prior to control - * creation to alter the default context help associated with this tab. + * creation to alter the default context help associated with this tab. * </p> * <p> * This class may be instantiate. @@ -68,34 +68,34 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { * variable or the default value, <code>null</code>, indicating no refresh. */ public static final String ATTR_REFRESH_SCOPE = RefreshUtil.ATTR_REFRESH_SCOPE; - + // Check Buttons private Button fRefreshButton; private Button fRecursiveButton; - + // Group box private Group fGroup; - + // Radio Buttons private Button fContainerButton; private Button fProjectButton; private Button fResourceButton; private Button fWorkingSetButton; private Button fWorkspaceButton; - + // Push Button private Button fSelectButton; - + // Working set private IWorkingSet fWorkingSet; - + /** * Constructor */ public RefreshTab() { setHelpContextId(IDebugHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_REFRESH_TAB); } - + /** * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite) */ @@ -104,14 +104,14 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { Composite mainComposite = new Composite(parent, SWT.NONE); setControl(mainComposite); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), getHelpContextId()); - + GridLayout layout = new GridLayout(); GridData gd = new GridData(GridData.FILL_HORIZONTAL); mainComposite.setLayout(layout); mainComposite.setLayoutData(gd); mainComposite.setFont(parent.getFont()); - - fRefreshButton = createCheckButton(mainComposite, StringSubstitutionMessages.RefreshTab_31); + + fRefreshButton = createCheckButton(mainComposite, StringSubstitutionMessages.RefreshTab_31); fRefreshButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { @@ -119,7 +119,7 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { updateLaunchConfigurationDialog(); } }); - + fGroup = new Group(mainComposite, SWT.NONE); fGroup.setFont(mainComposite.getFont()); layout = new GridLayout(); @@ -139,38 +139,38 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { } } }; - - fWorkspaceButton = createRadioButton(fGroup, StringSubstitutionMessages.RefreshTab_32); + + fWorkspaceButton = createRadioButton(fGroup, StringSubstitutionMessages.RefreshTab_32); gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 2; fWorkspaceButton.setLayoutData(gd); fWorkspaceButton.addSelectionListener(adapter); - fResourceButton = createRadioButton(fGroup, StringSubstitutionMessages.RefreshTab_33); + fResourceButton = createRadioButton(fGroup, StringSubstitutionMessages.RefreshTab_33); gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 2; fResourceButton.setLayoutData(gd); fResourceButton.addSelectionListener(adapter); - fProjectButton = createRadioButton(fGroup, StringSubstitutionMessages.RefreshTab_34); + fProjectButton = createRadioButton(fGroup, StringSubstitutionMessages.RefreshTab_34); gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 2; - fProjectButton.setLayoutData(gd); + fProjectButton.setLayoutData(gd); fProjectButton.addSelectionListener(adapter); - fContainerButton = createRadioButton(fGroup, StringSubstitutionMessages.RefreshTab_35); + fContainerButton = createRadioButton(fGroup, StringSubstitutionMessages.RefreshTab_35); gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 2; fContainerButton.setLayoutData(gd); fContainerButton.addSelectionListener(adapter); - - fWorkingSetButton = createRadioButton(fGroup, StringSubstitutionMessages.RefreshTab_36); + + fWorkingSetButton = createRadioButton(fGroup, StringSubstitutionMessages.RefreshTab_36); gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 1; fWorkingSetButton.setLayoutData(gd); - fWorkingSetButton.addSelectionListener(adapter); - - fSelectButton = createPushButton(fGroup, StringSubstitutionMessages.RefreshTab_37, null); + fWorkingSetButton.addSelectionListener(adapter); + + fSelectButton = createPushButton(fGroup, StringSubstitutionMessages.RefreshTab_37, null); gd = (GridData)fSelectButton.getLayoutData(); gd.horizontalAlignment = GridData.HORIZONTAL_ALIGN_END; fSelectButton.addSelectionListener(new SelectionAdapter() { @@ -179,7 +179,7 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { selectResources(); } }); - + createVerticalSpacer(fGroup, 2); createRecursiveComponent(fGroup); } @@ -189,29 +189,29 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { */ private void selectResources() { IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager(); - + if (fWorkingSet == null){ - fWorkingSet = workingSetManager.createWorkingSet(StringSubstitutionMessages.RefreshTab_40, new IAdaptable[0]); + fWorkingSet = workingSetManager.createWorkingSet(StringSubstitutionMessages.RefreshTab_40, new IAdaptable[0]); } IWorkingSetEditWizard wizard = workingSetManager.createWorkingSetEditWizard(fWorkingSet); WizardDialog dialog = new WizardDialog(((LaunchConfigurationsDialog)LaunchConfigurationsDialog.getCurrentlyVisibleLaunchConfigurationDialog()).getShell(), wizard); - dialog.create(); - + dialog.create(); + if (dialog.open() == Window.CANCEL) { return; } fWorkingSet = wizard.getSelection(); updateLaunchConfigurationDialog(); } - + /** * Creates the controls needed to edit the refresh recursive * attribute of a launch configuration - * + * * @param parent the composite to create the controls in */ private void createRecursiveComponent(Composite parent) { - fRecursiveButton = createCheckButton(parent, StringSubstitutionMessages.RefreshTab_0); + fRecursiveButton = createCheckButton(parent, StringSubstitutionMessages.RefreshTab_0); GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL); data.horizontalSpan = 2; fRecursiveButton.setLayoutData(data); @@ -238,9 +238,9 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { updateRefresh(configuration); updateRecursive(configuration); updateScope(configuration); - updateEnabledState(); + updateEnabledState(); } - + /** * Updates the tab to display the refresh scope specified by the launch config * @param configuration the configuration to update scope information on @@ -263,18 +263,18 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { } else { if (scope.equals(RefreshUtil.MEMENTO_WORKSPACE)) { fWorkspaceButton.setSelection(true); - } else if (scope.equals(RefreshUtil.MEMENTO_SELECTED_RESOURCE)) { + } else if (scope.equals(RefreshUtil.MEMENTO_SELECTED_RESOURCE)) { fResourceButton.setSelection(true); - } else if (scope.equals(RefreshUtil.MEMENTO_SELECTED_CONTAINER)) { + } else if (scope.equals(RefreshUtil.MEMENTO_SELECTED_CONTAINER)) { fContainerButton.setSelection(true); - } else if (scope.equals(RefreshUtil.MEMENTO_SELECTED_PROJECT)) { + } else if (scope.equals(RefreshUtil.MEMENTO_SELECTED_PROJECT)) { fProjectButton.setSelection(true); } else if (scope.startsWith("${resource:")) { //$NON-NLS-1$ fWorkingSetButton.setSelection(true); try { IResource[] resources = getRefreshResources(scope); IWorkingSetManager workingSetManager= PlatformUI.getWorkbench().getWorkingSetManager(); - fWorkingSet = workingSetManager.createWorkingSet(StringSubstitutionMessages.RefreshTab_40, resources); + fWorkingSet = workingSetManager.createWorkingSet(StringSubstitutionMessages.RefreshTab_40, resources); } catch (CoreException e) { fWorkingSet = null; } @@ -330,7 +330,7 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { /** * Generates a memento for the refresh scope. This is based on old refresh * variables. - * + * * @return a memento */ private String generateScopeMemento() { @@ -357,9 +357,9 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { */ @Override public String getName() { - return StringSubstitutionMessages.RefreshTab_6; + return StringSubstitutionMessages.RefreshTab_6; } - + /** * Updates the enablement state of the fields. */ @@ -377,7 +377,7 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { super.setErrorMessage(null); } } - + /** * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage() */ @@ -391,15 +391,15 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { setErrorMessage(null); setMessage(null); if (fRefreshButton.getSelection() && (fWorkingSetButton.getSelection() && (fWorkingSet == null || fWorkingSet.getElements().length == 0))) { - setErrorMessage(StringSubstitutionMessages.RefreshTab_42); + setErrorMessage(StringSubstitutionMessages.RefreshTab_42); return false; } return true; } - + /** * Refreshes the resources as specified by the given launch configuration. - * + * * @param configuration launch configuration * @param monitor progress monitor which may be <code>null</code> * @throws CoreException if an exception occurs while refreshing resources @@ -410,7 +410,7 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { /** * Returns a collection of resources referred to by a refresh scope attribute. - * + * * @param scope refresh scope attribute (<code>ATTR_REFRESH_SCOPE</code>) * @return collection of resources referred to by the refresh scope attribute * @throws CoreException if unable to resolve a set of resources @@ -418,11 +418,11 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { public static IResource[] getRefreshResources(String scope) throws CoreException { return RefreshUtil.toResources(scope); } - + /** * Returns the refresh scope attribute specified by the given launch configuration * or <code>null</code> if none. - * + * * @param configuration launch configuration * @return refresh scope attribute (<code>ATTR_REFRESH_SCOPE</code>) * @throws CoreException if unable to access the associated attribute @@ -434,19 +434,19 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { /** * Returns whether the refresh scope specified by the given launch * configuration is recursive. - * + * * @param configuration the configuration to check for recursive refresh being set * @return whether the refresh scope is recursive * @throws CoreException if unable to access the associated attribute */ public static boolean isRefreshRecursive(ILaunchConfiguration configuration) throws CoreException { return configuration.getAttribute(ATTR_REFRESH_RECURSIVE, true); - } - + } + /** * Creates and returns a memento for the given working set, to be used as a * refresh attribute. - * + * * @param workingSet a working set, or <code>null</code> * @return an equivalent refresh attribute */ @@ -462,12 +462,12 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { return RefreshUtil.toMemento(resources); } } - + /** * Creates and returns a working set from the given refresh attribute created by * the method <code>getRefreshAttribute(IWorkingSet)</code>, or <code>null</code> * if none. - * + * * @param refreshAttribute a refresh attribute that represents a working set * @return equivalent working set, or <code>null</code> */ @@ -484,7 +484,7 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { } return null; } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) */ @@ -500,10 +500,10 @@ public class RefreshTab extends AbstractLaunchConfigurationTab { public void deactivated(ILaunchConfigurationWorkingCopy workingCopy) { // do nothing on deactivation } - + /** * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getId() - * + * * @since 3.5 */ @Override diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java index 6cb8e7aab..c02930c71 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java @@ -57,7 +57,7 @@ import org.eclipse.ui.dialogs.ElementListSelectionDialog; * @noextend This class is not intended to be subclassed by clients. */ public class StringVariableSelectionDialog extends ElementListSelectionDialog { - + // button to configure variable's argument private Button fArgumentButton; // variable description @@ -68,16 +68,16 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog { private Button fShowAllButton; private Label fShowAllDescription; - /** + /** * Base class for custom variable filters. Clients may extend this class - * to filter specific dynamic variables from the selection dialog. - * + * to filter specific dynamic variables from the selection dialog. + * * @since 3.6 */ public static class VariableFilter { /** * Returns whether the given variable should be filtered. - * + * * @param var variable to be consider * @return <code>true</code> to filter the variable, otherwise <code>false</code> */ @@ -93,22 +93,22 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog { /** * Constructs a new string substitution variable selection dialog. - * + * * @param parent parent shell */ public StringVariableSelectionDialog(Shell parent) { super(parent, new StringVariableLabelProvider()); setShellStyle(getShellStyle() | SWT.RESIZE); - setTitle(StringSubstitutionMessages.StringVariableSelectionDialog_2); - setMessage(StringSubstitutionMessages.StringVariableSelectionDialog_3); + setTitle(StringSubstitutionMessages.StringVariableSelectionDialog_2); + setMessage(StringSubstitutionMessages.StringVariableSelectionDialog_3); setMultipleSelection(false); setElements(VariablesPlugin.getDefault().getStringVariableManager().getVariables()); } - + /** * Returns the variable expression the user generated from this * dialog, or <code>null</code> if none. - * + * * @return variable expression the user generated from this * dialog, or <code>null</code> if none */ @@ -129,10 +129,10 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog { return null; } - /** + /** * Add the given variable filter. Has no effect if the given filter has * already been added. Must be called before the dialog is opened. - * + * * @param filter the filter to add * @since 3.6 */ @@ -145,7 +145,7 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog { /** * Sets the filters, replacing any previous filters. * Must be called before the dialog is opened. - * + * * @param filters * an array of variable filters, use empty Array or <code>null</code> to reset all Filters. * @since 3.6 @@ -170,9 +170,9 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog { } }); } - }); + }); } - + private void updateDescription() { if((fShowAllDescription != null) && !fShowAllDescription.isDisposed()) { if(fShowAllSelected) { @@ -213,7 +213,7 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog { PlatformUI.getWorkbench().getHelpSystem().setHelp(ctrl, IDebugHelpContextIds.VARIABLE_SELECTION_DIALOG); return ctrl; } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite) */ @@ -227,12 +227,12 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog { /** * Creates an area to display a description of the selected variable * and a button to configure the variable's argument. - * + * * @param parent parent widget */ private void createArgumentArea(Composite parent) { Composite container = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0); - + Composite btnContainer = SWTFactory.createComposite(container, parent.getFont(), 3, 2, GridData.FILL_HORIZONTAL, 0, 0); boolean bNeedShowAll = false; if(!fFilters.isEmpty()) { @@ -265,23 +265,23 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog { } else { SWTFactory.createHorizontalSpacer(btnContainer, 2); } - + Button editButton = SWTFactory.createPushButton(btnContainer, StringSubstitutionMessages.StringVariableSelectionDialog_0, null, GridData.HORIZONTAL_ALIGN_END); editButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { editVariables(); } - }); - + }); + SWTFactory.createWrapLabel(container, StringSubstitutionMessages.StringVariableSelectionDialog_6, 2); - + Composite args = SWTFactory.createComposite(container, container.getFont(), 2, 2, GridData.FILL_HORIZONTAL, 0, 0); fArgumentText = new Text(args, SWT.BORDER); fArgumentText.setFont(container.getFont()); - fArgumentText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - + fArgumentText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + fArgumentButton = SWTFactory.createPushButton(args, StringSubstitutionMessages.StringVariableSelectionDialog_7, null); fArgumentButton.addSelectionListener(new SelectionAdapter() { @Override @@ -291,7 +291,7 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog { }); SWTFactory.createWrapLabel(container, StringSubstitutionMessages.StringVariableSelectionDialog_8, 2); - + fDescriptionText = new Text(container, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL); fDescriptionText.setFont(container.getFont()); fDescriptionText.setEditable(false); @@ -321,12 +321,12 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog { }); } } - }); + }); } - + /** * Shows the string variables preference page and returns <code>true</code> if OK was pressed. - * + * * @return whether OK was pressed */ private boolean showVariablesPage() { @@ -344,9 +344,9 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog { dialog.setMessage(targetNode.getLabelText()); result[0]= (dialog.open() == Window.OK); } - }); + }); return result[0]; - } + } /** * Configures the argument for the selected variable. @@ -363,7 +363,7 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog { /** * Update variable description and argument button enablement. - * + * * @see org.eclipse.ui.dialogs.AbstractElementListSelectionDialog#handleSelectionChanged() */ @Override @@ -401,13 +401,13 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog { /** * Returns the name of the section that this dialog stores its settings in - * + * * @return String */ private String getDialogSettingsSectionName() { return IDebugUIConstants.PLUGIN_ID + ".STRING_VARIABLE_SELECTION_DIALOG_SECTION"; //$NON-NLS-1$ } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings() */ @@ -417,7 +417,7 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog { IDialogSettings section = settings.getSection(getDialogSettingsSectionName()); if (section == null) { section = settings.addNewSection(getDialogSettingsSectionName()); - } + } return section; } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/WorkingDirectoryBlock.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/WorkingDirectoryBlock.java index 6ec72b8de..973b5d310 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/WorkingDirectoryBlock.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/WorkingDirectoryBlock.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 * Remy Chi Jian Suen <remy.suen@gmail.com> @@ -49,27 +49,27 @@ import org.eclipse.ui.dialogs.ContainerSelectionDialog; /** * A control for setting the working directory associated with a launch * configuration. - * + * * @since 3.5 */ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationTab { - + // Local directory private Button fWorkspaceButton; private Button fFileSystemButton; private Button fVariablesButton; - + //bug 29565 fix private Button fUseDefaultDirButton = null; private Button fUseOtherDirButton = null; private Text fOtherWorkingText = null; private Text fWorkingDirText; - + /** * The last launch config this tab was initialized from */ private ILaunchConfiguration fLaunchConfiguration; - + /** * A listener to update for text changes and widget selection */ @@ -86,16 +86,16 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT } else if (source == fFileSystemButton) { handleWorkingDirBrowseButtonSelected(); - } + } else if (source == fVariablesButton) { handleWorkingDirVariablesButtonSelected(); - } + } else if(source == fUseDefaultDirButton) { //only perform the action if this is the button that was selected if(fUseDefaultDirButton.getSelection()) { setDefaultWorkingDir(); } - } + } else if(source == fUseOtherDirButton) { //only perform the action if this is the button that was selected if(fUseOtherDirButton.getSelection()) { @@ -104,33 +104,33 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT } } } - + private WidgetListener fListener = new WidgetListener(); - + /** * The name of the launch configuration attribute that will be used to save * the location of the working directory. */ private final String workingDirectoryAttribteName; - + /** * The help context id to use to connect this working directory block * to the help system. */ private final String helpContextId; - + /** * Creates a new WorkingDirectoryBlock for setting a working directory. - * + * * @param workingDirectoryAttribteName the name of the launch configuration attribute to set the working directory's location, cannot be <tt>null</tt> */ protected WorkingDirectoryBlock(String workingDirectoryAttribteName) { this(workingDirectoryAttribteName, null); } - + /** * Creates a new WorkingDirectoryBlock for setting a working directory. - * + * * @param workingDirectoryAttribteName the name of the launch configuration attribute to set the working directory's location, cannot be <tt>null</tt> * @param helpContextId the help context id to use to hook onto the help system */ @@ -140,25 +140,25 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT this.workingDirectoryAttribteName = workingDirectoryAttribteName; this.helpContextId = helpContextId; } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite) */ @Override public final void createControl(Composite parent) { - Font font = parent.getFont(); + Font font = parent.getFont(); Group group = SWTFactory.createGroup(parent, DebugUIMessages.WorkingDirectoryBlock_12, 2, 1, GridData.FILL_HORIZONTAL); setControl(group); - + if (helpContextId != null) { - PlatformUI.getWorkbench().getHelpSystem().setHelp(group, helpContextId); + PlatformUI.getWorkbench().getHelpSystem().setHelp(group, helpContextId); } - + //default choice Composite comp = SWTFactory.createComposite(group, font, 2, 2, GridData.FILL_BOTH, 0, 0); fUseDefaultDirButton = SWTFactory.createRadioButton(comp, DebugUIMessages.WorkingDirectoryBlock_18); fUseDefaultDirButton.addSelectionListener(fListener); - fWorkingDirText = SWTFactory.createSingleText(comp, 1); + fWorkingDirText = SWTFactory.createSingleText(comp, 1); fWorkingDirText.addModifyListener(fListener); fWorkingDirText.setEnabled(false); //user enter choice @@ -167,60 +167,60 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT fOtherWorkingText = SWTFactory.createSingleText(comp, 1); fOtherWorkingText.addModifyListener(fListener); //buttons - Composite buttonComp = SWTFactory.createComposite(comp, font, 3, 2, GridData.HORIZONTAL_ALIGN_END); + Composite buttonComp = SWTFactory.createComposite(comp, font, 3, 2, GridData.HORIZONTAL_ALIGN_END); GridLayout ld = (GridLayout)buttonComp.getLayout(); ld.marginHeight = 1; ld.marginWidth = 0; - fWorkspaceButton = createPushButton(buttonComp, DebugUIMessages.WorkingDirectoryBlock_0, null); + fWorkspaceButton = createPushButton(buttonComp, DebugUIMessages.WorkingDirectoryBlock_0, null); fWorkspaceButton.addSelectionListener(fListener); - fFileSystemButton = createPushButton(buttonComp, DebugUIMessages.WorkingDirectoryBlock_1, null); + fFileSystemButton = createPushButton(buttonComp, DebugUIMessages.WorkingDirectoryBlock_1, null); fFileSystemButton.addSelectionListener(fListener); - fVariablesButton = createPushButton(buttonComp, DebugUIMessages.WorkingDirectoryBlock_17, null); + fVariablesButton = createPushButton(buttonComp, DebugUIMessages.WorkingDirectoryBlock_17, null); fVariablesButton.addSelectionListener(fListener); } - + /** * Show a dialog that lets the user select a working directory */ private void handleWorkingDirBrowseButtonSelected() { DirectoryDialog dialog = new DirectoryDialog(getShell()); - dialog.setMessage(DebugUIMessages.WorkingDirectoryBlock_7); + dialog.setMessage(DebugUIMessages.WorkingDirectoryBlock_7); String currentWorkingDir = getWorkingDirectoryText(); if (!currentWorkingDir.trim().equals("")) { //$NON-NLS-1$ File path = new File(currentWorkingDir); if (path.exists()) { dialog.setFilterPath(currentWorkingDir); - } + } } String selectedDirectory = dialog.open(); if (selectedDirectory != null) { fOtherWorkingText.setText(selectedDirectory); - } + } } /** - * Show a dialog that lets the user select a working directory from + * Show a dialog that lets the user select a working directory from * the workspace */ private void handleWorkspaceDirBrowseButtonSelected() { IContainer currentContainer= getContainer(); if (currentContainer == null) { currentContainer = ResourcesPlugin.getWorkspace().getRoot(); - } - ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), currentContainer, false, DebugUIMessages.WorkingDirectoryBlock_4); + } + ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), currentContainer, false, DebugUIMessages.WorkingDirectoryBlock_4); dialog.showClosedProjects(false); dialog.open(); - Object[] results = dialog.getResult(); + Object[] results = dialog.getResult(); if ((results != null) && (results.length > 0) && (results[0] instanceof IPath)) { IPath path = (IPath)results[0]; String containerName = path.makeRelative().toString(); setOtherWorkingDirectoryText("${workspace_loc:" + containerName + "}"); //$NON-NLS-1$ //$NON-NLS-2$ - } + } } - + /** * Returns the selected workspace container or <code>null</code> - * @return the selected workspace container or <code>null</code> + * @return the selected workspace container or <code>null</code> */ protected IContainer getContainer() { String path = getWorkingDirectoryText(); @@ -236,12 +236,12 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT if (containers.length > 0) { res = containers[0]; } - } + } catch (CoreException e) { log(e); } - } - else { + } + else { res = root.findMember(path); } if (res instanceof IContainer) { @@ -250,7 +250,7 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT } return null; } - + /** * The default working dir radio button has been selected. */ @@ -284,7 +284,7 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT fOtherWorkingText.insert(variableText); } } - + /** * Sets the default working directory. */ @@ -298,17 +298,17 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT return; } } - } + } catch (CoreException ce) { log(ce); } setDefaultWorkingDirectoryText(System.getProperty("user.dir")); //$NON-NLS-1$ } - + /** * Returns the project associated with the specified launch configuration or * <code>null</code> if none. - * + * * @param configuration the launch configuration that has been set to this working directory block * @return the project specified by the launch configuration, or <tt>null</tt> if nothing has been set * @throws CoreException if an error occurred while retrieving the project from the launch configuration @@ -333,7 +333,7 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT setErrorMessage(e.getMessage()); return false; } - } + } else if (workingDirPath.length() > 0) { IContainer container = getContainer(); if (container == null) { @@ -341,7 +341,7 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT if (dir.isDirectory()) { return true; } - setErrorMessage(DebugUIMessages.WorkingDirectoryBlock_10); + setErrorMessage(DebugUIMessages.WorkingDirectoryBlock_10); return false; } } else if (workingDirPath.length() == 0) { @@ -354,7 +354,7 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT /** * Sets the default working directory to be used by the launch configuration. * The default implementation has no default working directory. - * + * * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) */ @Override @@ -368,13 +368,13 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT @Override public void initializeFrom(ILaunchConfiguration configuration) { setLaunchConfiguration(configuration); - try { + try { String wd = configuration.getAttribute(workingDirectoryAttribteName, (String)null); setDefaultWorkingDir(); if (wd != null) { setOtherWorkingDirectoryText(wd); } - } + } catch (CoreException e) { setErrorMessage(DebugUIMessages.WorkingDirectoryBlock_Exception_occurred_reading_configuration___15 + e.getStatus().getMessage()); } @@ -392,15 +392,15 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT configuration.setAttribute(workingDirectoryAttribteName, getWorkingDirectoryText()); } } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() */ @Override public String getName() { - return DebugUIMessages.WorkingDirectoryBlock_Working_Directory_8; + return DebugUIMessages.WorkingDirectoryBlock_Working_Directory_8; } - + /** * Logs exceptions that have been caught by this working directory block. * Subclasses should reimplement if they wish to monitor such exceptions. @@ -410,7 +410,7 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT protected void log(CoreException e) { // nothing } - + /** * Retrieves the path from the text box that has been selected. * @return the working directory the user wishes to use @@ -421,7 +421,7 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT } return fOtherWorkingText.getText().trim(); } - + /** * Sets the text of the default working directory. * @param dir the directory to set the widget to @@ -433,7 +433,7 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT handleUseDefaultWorkingDirButtonSelected(); } } - + /** * Sets the directory of the other working directory to be used. * @param dir the directory to set the widget to @@ -446,15 +446,15 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT handleUseOtherWorkingDirButtonSelected(); } } - + /** * Sets the launch configuration to be used by this working directory block. * @param config set the backing launch configuration for this block */ protected void setLaunchConfiguration(ILaunchConfiguration config) { fLaunchConfiguration = config; - } - + } + /** * Returns the launch configuration that this working directory block is using. * @return this working directory block's launch configuration @@ -462,7 +462,7 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT protected ILaunchConfiguration getLaunchConfiguration() { return fLaunchConfiguration; } - + /** * Allows this entire block to be enabled/disabled * @param enabled whether to enable it or not @@ -481,6 +481,6 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT fOtherWorkingText.setEnabled(enabled); } } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchHistoryAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchHistoryAction.java index 65590c866..e73d9c530 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchHistoryAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchHistoryAction.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.debug.ui.actions; - + import java.util.ArrayList; import java.util.List; import java.util.Set; @@ -73,34 +73,34 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I * The menu created by this action */ private Menu fMenu; - + /** * The action used to render this delegate. */ private IAction fAction; - + /** * The associated <code>ILaunchGroup</code> * @since 3.3 */ private ILaunchGroup fLaunchGroup = null; - + /** * Indicates whether the launch history has changed and * the sub menu needs to be recreated. */ protected boolean fRecreateMenu = false; - + /** * Constructs a launch history action. - * + * * @param launchGroupIdentifier unique identifier of the launch group * extension that this action displays a launch history for. */ public AbstractLaunchHistoryAction(String launchGroupIdentifier) { fLaunchGroup = getLaunchConfigurationManager().getLaunchGroup(launchGroupIdentifier); } - + /** * A listener to be notified of launch label updates * @since 3.3 @@ -115,10 +115,10 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I updateTooltip(); } }; - + /** * Sets the action used to render this delegate. - * + * * @param action the action used to render this delegate */ private void setAction(IAction action) { @@ -127,17 +127,17 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I /** * Returns the action used to render this delegate. - * + * * @return the action used to render this delegate */ protected IAction getAction() { return fAction; } - + /** * Adds the given action to the specified menu with an accelerator specified * by the given number. - * + * * @param menu the menu to add the action to * @param action the action to add * @param accelerator the number that should appear as an accelerator @@ -158,21 +158,21 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I /** * Initialize this action so that it can dynamically set its tool-tip. Also set the enabled state - * of the underlying action based on whether there are any registered launch configuration types that + * of the underlying action based on whether there are any registered launch configuration types that * understand how to launch in the mode of this action. * @param action the {@link IAction} to initialize */ private void initialize(IAction action) { getLaunchConfigurationManager().addLaunchHistoryListener(this); setAction(action); - updateTooltip(); - action.setEnabled(existsConfigTypesForMode()); + updateTooltip(); + action.setEnabled(existsConfigTypesForMode()); } - + /** * Return whether there are any registered launch configuration types for * the mode of this action. - * + * * @return whether there are any registered launch configuration types for * the mode of this action */ @@ -182,10 +182,10 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I if (configTypes[i].supportsMode(getMode())) { return true; } - } + } return false; } - + /** * Updates this action's tool-tip. The tooltip is based on user preference settings * for launching - either the previous launch, or based on the selection and which @@ -197,10 +197,10 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I protected void updateTooltip() { getAction().setToolTipText(getToolTip()); } - + /** * Returns the tooltip specific to a configuration. - * + * * @param configuration a <code>ILauncConfiguration</code> * @return the string for the tool tip */ @@ -209,22 +209,22 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I String mode= getMode(); String label; if (mode.equals(ILaunchManager.RUN_MODE)) { - label= ActionMessages.AbstractLaunchHistoryAction_1; + label= ActionMessages.AbstractLaunchHistoryAction_1; } else if (mode.equals(ILaunchManager.DEBUG_MODE)){ - label= ActionMessages.AbstractLaunchHistoryAction_2; + label= ActionMessages.AbstractLaunchHistoryAction_2; } else if (mode.equals(ILaunchManager.PROFILE_MODE)){ - label= ActionMessages.AbstractLaunchHistoryAction_3; + label= ActionMessages.AbstractLaunchHistoryAction_3; } else { - label= ActionMessages.AbstractLaunchHistoryAction_4; + label= ActionMessages.AbstractLaunchHistoryAction_4; } return MessageFormat.format(ActionMessages.AbstractLaunchHistoryAction_0, new Object[] { label, launchName }); } - + /** * Returns this action's tooltip. The tooltip is retrieved from the launch resource manager * which builds tool tips asynchronously for context launching support. - * + * * @return the string for the tool tip */ private String getToolTip() { @@ -235,13 +235,13 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I String label = null; String mode = getMode(); if (mode.equals(ILaunchManager.RUN_MODE)) { - label = ActionMessages.AbstractLaunchHistoryAction_1; + label = ActionMessages.AbstractLaunchHistoryAction_1; } else if (mode.equals(ILaunchManager.DEBUG_MODE)){ - label = ActionMessages.AbstractLaunchHistoryAction_2; + label = ActionMessages.AbstractLaunchHistoryAction_2; } else if (mode.equals(ILaunchManager.PROFILE_MODE)){ - label = ActionMessages.AbstractLaunchHistoryAction_3; + label = ActionMessages.AbstractLaunchHistoryAction_3; } else { - label = ActionMessages.AbstractLaunchHistoryAction_4; + label = ActionMessages.AbstractLaunchHistoryAction_4; } if(IInternalDebugCoreConstants.EMPTY_STRING.equals(launchName)) { return MessageFormat.format(ActionMessages.AbstractLaunchHistoryAction_5, new Object[] { label }); @@ -269,10 +269,10 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I getLaunchConfigurationManager().removeLaunchHistoryListener(this); DebugUIPlugin.getDefault().getLaunchingResourceManager().removeLaunchLabelChangedListener(fLabelListener); } - + /** * Return the last launch in this action's launch history. - * + * * @return the most recent configuration that was launched from this * action's launch history that is not filtered from the menu */ @@ -290,7 +290,7 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I initMenu(); return fMenu; } - + /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWindowPulldownDelegate2#getMenu(org.eclipse.swt.widgets.Menu) */ @@ -301,7 +301,7 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I initMenu(); return fMenu; } - + /** * Creates the menu for the action */ @@ -326,7 +326,7 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I /** * Sets this action's drop-down menu, disposing the previous menu. - * + * * @param menu the new menu */ private void setMenu(Menu menu) { @@ -338,13 +338,13 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I /** * Fills the drop-down menu with favorites and launch history - * + * * @param menu the menu to fill */ - protected void fillMenu(Menu menu) { + protected void fillMenu(Menu menu) { ILaunchConfiguration[] historyList= getHistory(); ILaunchConfiguration[] favoriteList = getFavorites(); - + // Add favorites int accelerator = 1; for (int i = 0; i < favoriteList.length; i++) { @@ -352,13 +352,13 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I LaunchAction action= new LaunchAction(launch, getMode()); addToMenu(menu, action, accelerator); accelerator++; - } - + } + // Separator between favorites and history if (favoriteList.length > 0 && historyList.length > 0) { addSeparator(menu); } - + // Add history launches next for (int i = 0; i < historyList.length; i++) { ILaunchConfiguration launch= historyList[i]; @@ -366,24 +366,24 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I addToMenu(menu, action, accelerator); accelerator++; } - + if(accelerator == 1) { - IAction action = new Action(ActionMessages.AbstractLaunchHistoryAction_6) {}; + IAction action = new Action(ActionMessages.AbstractLaunchHistoryAction_6) {}; action.setEnabled(false); ActionContributionItem item= new ActionContributionItem(action); item.fill(menu, -1); } } - + /** * Adds a separator to the given menu - * + * * @param menu the menu to add the separator to */ protected void addSeparator(Menu menu) { new MenuItem(menu, SWT.SEPARATOR); } - + /** * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ @@ -391,7 +391,7 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I public void run(IAction action) { // do nothing - this is just a menu } - + /** * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event) * @since 3.6 @@ -411,8 +411,8 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I configs.add(configuration); } DebugUIPlugin.openLaunchConfigurationsDialog( - DebugUIPlugin.getShell(), - new StructuredSelection(configs), + DebugUIPlugin.getShell(), + new StructuredSelection(configs), groupid, true); return; @@ -473,7 +473,7 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I } return getLaunchConfigurationManager().getFilteredLastLaunch(getLaunchGroupIdentifier()); } - + /** * Creates an {@link ILaunchConfiguration} from the given set of {@link ILaunchConfigurationType}s * @param types the set of {@link String} {@link ILaunchConfigurationType} identifiers @@ -494,7 +494,7 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I } return null; } - + /** * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction) * @since 3.6 @@ -502,8 +502,8 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I @Override public void init(IAction action) { // do nothing by default - } - + } + /** * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) */ @@ -511,9 +511,9 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I public void selectionChanged(IAction action, ISelection selection){ if (fAction == null) { initialize(action); - } + } } - + /** * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow) */ @@ -523,10 +523,10 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I DebugUIPlugin.getDefault().getLaunchingResourceManager().addLaunchLabelUpdateListener(fLabelListener); } } - + /** * Returns the launch history associated with this action's launch group. - * + * * @return the launch history associated with this action's launch group * @deprecated this method returns a class that is not API and is not intended * for clients of the debug platform. Instead, use <code>getHistory()</code>, @@ -535,68 +535,68 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I @Deprecated protected LaunchHistory getLaunchHistory() { return getLaunchConfigurationManager().getLaunchHistory(getLaunchGroupIdentifier()); - } - + } + /** * Returns the launch history associated with this action's launch group. - * + * * @return the launch history associated with this action's launch group * @since 3.3 */ private LaunchHistory internalGetHistory() { return getLaunchConfigurationManager().getLaunchHistory(getLaunchGroupIdentifier()); } - + /** * Returns the launch history associated with this action's launch mode and group in most * recently launched order. Configurations associated with disabled activities are not included * in the list. As well, configurations are filtered based on workspace preference settings * to filter configurations from closed projects, deleted projects, working sets and to filter * specific launch configuration types. - * + * * @return launch history * @since 3.3 */ protected ILaunchConfiguration[] getHistory() { return LaunchConfigurationManager.filterConfigs(internalGetHistory().getHistory()); } - + /** * Returns the launch favorites associated with this action's launch mode and group in user * preference order. Configurations associated with disabled activities are not included * in the list. As well, configurations are filtered based on workspace preference settings * to filter configurations from closed projects, deleted projects, working sets and to filter * specific launch configuration types. - * + * * @return favorite launch configurations * @since 3.3 */ protected ILaunchConfiguration[] getFavorites() { return LaunchConfigurationManager.filterConfigs(internalGetHistory().getFavorites()); } - + /** * Returns the mode (e.g., 'run' or 'debug') of this drop down. - * + * * @return the mode of this action */ protected String getMode() { return internalGetHistory().getLaunchGroup().getMode(); } - + /** * Returns the launch configuration manager. - * + * * @return launch configuration manager */ private LaunchConfigurationManager getLaunchConfigurationManager() { return DebugUIPlugin.getDefault().getLaunchConfigurationManager(); } - + /** * Returns the identifier of the launch group this action is associated * with. - * + * * @return the identifier of the launch group this action is associated * with */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchToolbarAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchToolbarAction.java index 685422b0e..0ba9bcc1c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchToolbarAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchToolbarAction.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 *******************************************************************************/ @@ -60,7 +60,7 @@ public class AbstractLaunchToolbarAction extends AbstractLaunchHistoryAction { addToMenu(menu, getOpenDialogAction(), -1); addToMenu(menu, new OrganizeFavoritesAction(getLaunchGroupIdentifier()), -1); } - + /** * Returns an action to open the launch dialog * @return the new {@link OpenLaunchDialogAction} @@ -69,10 +69,10 @@ public class AbstractLaunchToolbarAction extends AbstractLaunchHistoryAction { protected IAction getOpenDialogAction() { return new OpenLaunchDialogAction(getLaunchGroupIdentifier()); } - + /** * Launch the last launch, or open the launch config dialog if none. - * + * * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ @Override diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AddMemoryRenderingActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AddMemoryRenderingActionDelegate.java index 892e30696..42e584472 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AddMemoryRenderingActionDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AddMemoryRenderingActionDelegate.java @@ -7,8 +7,8 @@ * * Contributors: * IBM Corporation - initial API and implementation - * WindRiver - Bug 192028 [Memory View] Memory view does not - * display memory blocks that do not reference IDebugTarget + * WindRiver - Bug 192028 [Memory View] Memory view does not + * display memory blocks that do not reference IDebugTarget *******************************************************************************/ package org.eclipse.debug.ui.actions; @@ -49,20 +49,20 @@ import org.eclipse.ui.IWorkbenchWindow; /** * A cascade menu to add a memory rendering to the memory view. This action delegate can be - * contributed to a an editor, view or object via standard workbench extension points. - * The action works on the {@link IAddMemoryRenderingsTarget} adapter provided + * contributed to a an editor, view or object via standard workbench extension points. + * The action works on the {@link IAddMemoryRenderingsTarget} adapter provided * by the active debug context, creating a context menu to add applicable renderings * to the memory view. * <p> * Clients may reference/contribute this class as an action delegate - * in plug-in XML. + * in plug-in XML. * </p> * @since 3.2 * @noextend This class is not intended to be subclassed by clients. * @noinstantiate This class is not intended to be instantiated by clients. */ public class AddMemoryRenderingActionDelegate extends Action implements IViewActionDelegate, IEditorActionDelegate, IObjectActionDelegate, IActionDelegate2{ - + private IAction fAction; private IWorkbenchPart fPart; private ISelection fCurrentSelection; @@ -71,7 +71,7 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct private IAdaptable fDebugContext; private IWorkbenchWindow fWindow; private DebugContextListener fDebugContextListener = new DebugContextListener(); - + private class AddMemoryRenderingAction extends Action { private IMemoryRenderingType fRenderingType; // type of rendering to add @@ -93,13 +93,13 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct } } } - + private class AddMemoryRenderingMenuCreator implements IMenuCreator { @Override public void dispose() { - + } @Override @@ -120,16 +120,16 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct } fillMenu(m); } - }); + }); return menu; } - + private void fillMenu(Menu parent) { if (fActionDelegate != null) { IMemoryRenderingType[] types = fActionDelegate.getMemoryRenderingTypes(fPart, fCurrentSelection); - + for (int i=0; i<types.length; i++) { AddMemoryRenderingAction action = new AddMemoryRenderingAction(types[i]); @@ -138,14 +138,14 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct } } } - } - + } + private class DebugContextListener implements IDebugContextListener { private void contextActivated(ISelection selection) { setupActionDelegate(selection); - + if(fAction != null) updateAction(fAction, fCurrentSelection); } @@ -155,9 +155,9 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct contextActivated(event.getContext()); } - + } - + private void setupActionDelegate(ISelection context) { IAdaptable debugContext = null; @@ -166,23 +166,23 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct if (((IStructuredSelection)context).getFirstElement() instanceof IAdaptable) debugContext = (IAdaptable)((IStructuredSelection)context).getFirstElement(); } - + if (debugContext == null) fActionDelegate = null; - + if (debugContext == fDebugContext) return; - + fDebugContext = debugContext; - + if (fDebugContext == null) return; - + IMemoryBlockRetrieval retrieval = MemoryViewUtil.getMemoryBlockRetrieval(fDebugContext); - + if (retrieval == null) return; - + IAddMemoryRenderingsTarget target = null; if (fCurrentSelection instanceof IStructuredSelection) { @@ -201,7 +201,7 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct // try to get target from memory block retrieval target = getAddMemoryRenderingTarget(retrieval); } - + fActionDelegate = target; } @@ -210,7 +210,7 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct */ @Override public void init(IViewPart view) { - bindPart(view); + bindPart(view); } /* (non-Javadoc) @@ -227,13 +227,13 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct @Override public void selectionChanged(IAction action, ISelection selection) { fCurrentSelection = selection; - + if(action != null) { bindAction(action); updateAction(action, selection); } } - + /** * @param action - the action to bind with the menu and to update enablement, must not be null * @param selection the current selection @@ -265,7 +265,7 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct private IAddMemoryRenderingsTarget getAddMemoryRenderingTarget(Object elmt) { IAddMemoryRenderingsTarget target = null; - + if (elmt instanceof IAddMemoryRenderingsTarget) { target = (IAddMemoryRenderingsTarget)elmt; @@ -283,7 +283,7 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct @Override public void setActiveEditor(IAction action, IEditorPart targetEditor) { bindPart(targetEditor); - + if(action != null) { bindAction(action); updateAction(action, fCurrentSelection); @@ -296,7 +296,7 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct @Override public void setActivePart(IAction action, IWorkbenchPart targetPart) { bindPart(targetPart); - + if(action != null) { bindAction(action); updateAction(action, fCurrentSelection); @@ -307,7 +307,7 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction) */ @Override - public void init(IAction action) { + public void init(IAction action) { if (action != null) { bindAction(action); @@ -315,7 +315,7 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct action.setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_MONITOR_EXPRESSION)); action.setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_ADD)); action.setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_MONITOR_EXPRESSION)); - } + } } /* (non-Javadoc) @@ -328,7 +328,7 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct fPart = null; fCurrentSelection = null; fActionDelegate = null; - + // remove debug context listener bindPart(null); } @@ -340,7 +340,7 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct public void runWithEvent(IAction action, Event event) { // do nothing } - + private void bindPart(IWorkbenchPart part) { IWorkbenchWindow window = null; @@ -350,22 +350,22 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct } if (window != fWindow) { - + if (fWindow != null) { DebugUITools.getDebugContextManager().getContextService(fWindow).removeDebugContextListener(fDebugContextListener); } - + if (window != null) { DebugUITools.getDebugContextManager().getContextService(window).addDebugContextListener(fDebugContextListener); } fWindow = window; } - + if (part != fPart) fPart = part; - + if (fWindow != null) setupActionDelegate(DebugUITools.getDebugContextManager().getContextService(fWindow).getActiveContext()); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/BreakpointTypesContribution.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/BreakpointTypesContribution.java index aff60b58d..90c7abc81 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/BreakpointTypesContribution.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/BreakpointTypesContribution.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 * IBM Corporation - bug fixing @@ -34,21 +34,21 @@ import org.eclipse.ui.menus.IWorkbenchContribution; import org.eclipse.ui.services.IServiceLocator; /** - * Breakpoint ruler pop-up action that creates a sub-menu to select the currently - * active breakpoint type. This menu contribution can be added to an editor - * with the <code>org.eclipse.ui.menus</code> extension point. The breakpoint - * types are calculated based on the toggle breakpoint target factories + * Breakpoint ruler pop-up action that creates a sub-menu to select the currently + * active breakpoint type. This menu contribution can be added to an editor + * with the <code>org.eclipse.ui.menus</code> extension point. The breakpoint + * types are calculated based on the toggle breakpoint target factories * contributed through the <code>toggleBreakpointsTargetFactories</code> extension point. * <p> * Following is example plug-in XML used to contribute this action to an editor's - * vertical ruler context menu. + * vertical ruler context menu. * <pre> * <extension point="org.eclipse.ui.menus"> * <menuContribution * locationURI="popup:#CEditorRulerContext?after=additions" * id="example.RulerPopupActions"> * <menu\ - * id="breakpointTypes" + * id="breakpointTypes" * label="Toggle Breakpoint"> * <dynamic\ * id="example.rulerContextMenu.breakpointTypesAction"> @@ -66,7 +66,7 @@ import org.eclipse.ui.services.IServiceLocator; * @noextend This class is not intended to be sub-classed by clients. */ public class BreakpointTypesContribution extends CompoundContributionItem implements IWorkbenchContribution { - + private class SelectTargetAction extends Action { private final Set<String> fPossibleIDs; private final String fID; @@ -86,10 +86,10 @@ public class BreakpointTypesContribution extends CompoundContributionItem implem } } } - + private IServiceLocator fServiceLocator; - private static IContributionItem[] NO_BREAKPOINT_TYPES_CONTRIBUTION_ITEMS = new IContributionItem[] { + private static IContributionItem[] NO_BREAKPOINT_TYPES_CONTRIBUTION_ITEMS = new IContributionItem[] { new ContributionItem() { @Override public void fill(Menu menu, int index) { @@ -97,14 +97,14 @@ public class BreakpointTypesContribution extends CompoundContributionItem implem item.setEnabled(false); item.setText(Messages.BreakpointTypesContribution_0); } - + @Override public boolean isEnabled() { return false; } } }; - + /* (non-Javadoc) * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems() */ @@ -112,8 +112,8 @@ public class BreakpointTypesContribution extends CompoundContributionItem implem protected IContributionItem[] getContributionItems() { IWorkbenchPart part = null; ISelection selection = null; - - ISelectionService selectionService = + + ISelectionService selectionService = fServiceLocator.getService(ISelectionService.class); if (selectionService != null) { selection = selectionService.getSelection(); @@ -127,9 +127,9 @@ public class BreakpointTypesContribution extends CompoundContributionItem implem if (part == null || selection == null) { return NO_BREAKPOINT_TYPES_CONTRIBUTION_ITEMS; } - + // Get breakpoint toggle target IDs. - IToggleBreakpointsTargetManager manager = DebugUITools.getToggleBreakpointsTargetManager(); + IToggleBreakpointsTargetManager manager = DebugUITools.getToggleBreakpointsTargetManager(); Set<String> enabledIDs = manager.getEnabledToggleBreakpointsTargetIDs(part, selection); String preferredId = manager.getPreferredToggleBreakpointsTargetID(part, selection); @@ -141,18 +141,18 @@ public class BreakpointTypesContribution extends CompoundContributionItem implem } actions.add(action); } - + if ( enabledIDs.isEmpty() ) { return NO_BREAKPOINT_TYPES_CONTRIBUTION_ITEMS; } - + IContributionItem[] items = new IContributionItem[enabledIDs.size()]; for (int i = 0; i < actions.size(); i++) { items[i] = new ActionContributionItem(actions.get(i)); } return items; } - + /* (non-Javadoc) * @see org.eclipse.ui.menus.IWorkbenchContribution#initialize(org.eclipse.ui.services.IServiceLocator) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java index 61f658dba..69baf7b80 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java @@ -73,10 +73,10 @@ public abstract class ContextualLaunchAction implements IObjectActionDelegate, I private Map<String, ILaunchGroup> fGroupsByCategory = null; // whether to re-fill the menu (reset on selection change) private boolean fFillMenu = true; - + /** * Constructs a contextual launch action for the given launch mode. - * + * * @param mode launch mode */ public ContextualLaunchAction(String mode) { @@ -94,7 +94,7 @@ public abstract class ContextualLaunchAction implements IObjectActionDelegate, I } } } - + /* * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart) */ @@ -126,7 +126,7 @@ public abstract class ContextualLaunchAction implements IObjectActionDelegate, I Menu menu = new Menu(parent); /** * Add listener to re-populate the menu each time - * it is shown because MenuManager.update(boolean, boolean) + * it is shown because MenuManager.update(boolean, boolean) * doesn't dispose pull-down ActionContribution items for each popup menu. */ menu.addMenuListener(new MenuAdapter() { @@ -153,7 +153,7 @@ public abstract class ContextualLaunchAction implements IObjectActionDelegate, I public void run(IAction action) { // Never called because we become a menu. } - + /* * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) */ @@ -172,7 +172,7 @@ public abstract class ContextualLaunchAction implements IObjectActionDelegate, I } action.setEnabled(false); } - + /** * Returns the launch manager * @return the launch manager @@ -181,7 +181,7 @@ public abstract class ContextualLaunchAction implements IObjectActionDelegate, I protected ILaunchManager getLaunchManager() { return DebugPlugin.getDefault().getLaunchManager(); } - + /** * Fills the menu with applicable launch shortcuts * @param menu The menu to fill @@ -218,14 +218,14 @@ public abstract class ContextualLaunchAction implements IObjectActionDelegate, I if (!WorkbenchActivityHelper.filterItem(ext) && isApplicable(ext, context)) { filteredShortCuts.add(ext); } - } + } catch (CoreException e) { IStatus status = new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), "Launch shortcut '" + ext.getId() + "' enablement expression caused exception. Shortcut was removed.", e); //$NON-NLS-1$ //$NON-NLS-2$ DebugUIPlugin.log(status); iter.remove(); } } - + //we need a separator iff the shared config entry has been added and there are following shortcuts if(menu.getItemCount() > 0 && filteredShortCuts.size() > 0) { new MenuItem(menu, SWT.SEPARATOR); @@ -243,7 +243,7 @@ public abstract class ContextualLaunchAction implements IObjectActionDelegate, I } } } - + // add in the open ... dialog shortcut(s) if (categories.isEmpty()) { if (accelerator > 1) { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugAction.java index 163b2cbd8..29a64c24c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugAction.java @@ -25,7 +25,7 @@ import org.eclipse.debug.ui.IDebugUIConstants; * @since 2.0 */ public final class DebugAction extends ExecutionAction { - + public DebugAction() { super(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP); } @@ -37,5 +37,5 @@ public final class DebugAction extends ExecutionAction { protected String getMode() { return ILaunchManager.DEBUG_MODE; } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandAction.java index 33267b8b1..c39cdc872 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandAction.java @@ -30,23 +30,23 @@ import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.PlatformUI; /** - * Abstract base class for re-targeting actions which delegate execution to - * {@link org.eclipse.debug.core.commands.IDebugCommandHandler} handlers. - * The specific type of <code>IDebugCommandHandler</code> is determined by the - * abstract {@link #getCommandType()} method. + * Abstract base class for re-targeting actions which delegate execution to + * {@link org.eclipse.debug.core.commands.IDebugCommandHandler} handlers. + * The specific type of <code>IDebugCommandHandler</code> is determined by the + * abstract {@link #getCommandType()} method. * <p> - * This base class is an action which can be instantiated directly by views, - * etc. In order to contribute an action using an extension point, a class + * This base class is an action which can be instantiated directly by views, + * etc. In order to contribute an action using an extension point, a class * implementing {@link org.eclipse.ui.IActionDelegate} should be created first. - * The delegate should then use a <code>DebugCommandAction</code> to implement + * The delegate should then use a <code>DebugCommandAction</code> to implement * the needed functionality. The IActionDelegate must use {@link #setActionProxy(IAction)} * specifying the workbench's action that is a proxy to the action delegate. This * way, the workbench action can be updated visually as needed.<br> * Note: <code>IDebugCommandHandler</code> command typically act on the active - * debug context as opposed to the active selection in view or window. The - * action delegate should ignore the active window selection, and instead allow - * the <code>DebugCommandAction</code> to update itself based on the active - * debug context. + * debug context as opposed to the active selection in view or window. The + * action delegate should ignore the active window selection, and instead allow + * the <code>DebugCommandAction</code> to update itself based on the active + * debug context. * </p> * <p> * Clients may subclass this class. @@ -57,23 +57,23 @@ import org.eclipse.ui.PlatformUI; public abstract class DebugCommandAction extends Action implements IDebugContextListener { private boolean fInitialized = false; - + /** * The window this action is working for. */ private IWorkbenchWindow fWindow; - + /** * The part this action is working for, or <code>null</code> if global to * a window. */ private IWorkbenchPart fPart; - + /** * Command service. */ private DebugCommandService fUpdateService; - + /** * Delegate this action is working for or <code>null</code> if none. */ @@ -85,7 +85,7 @@ public abstract class DebugCommandAction extends Action implements IDebugContext DebugCommandAction.this.setEnabled(enabled); } }; - + /** * Constructor */ @@ -103,7 +103,7 @@ public abstract class DebugCommandAction extends Action implements IDebugContext * that is using this action to perform its actual work. This only needs to be called when * an {@link org.eclipse.ui.IActionDelegate} is using one of these actions to perform its * function. - * + * * @param action workbench proxy action */ public void setActionProxy(IAction action) { @@ -113,39 +113,39 @@ public abstract class DebugCommandAction extends Action implements IDebugContext /** * Executes this action on the given target object - * @param targets the targets to perform the action on + * @param targets the targets to perform the action on * @return if the command stays enabled while the command executes */ private boolean execute(final Object[] targets) { return fUpdateService.executeCommand( - getCommandType(), targets, + getCommandType(), targets, new ICommandParticipant() { @Override public void requestDone(org.eclipse.debug.core.IRequest request) { DebugCommandAction.this.postExecute(request, targets); - } + } }); } - + /** - * This method is called after the completion of the execution of this + * This method is called after the completion of the execution of this * command. Extending classes may override this method to perform additional - * operation after command execution. - * - * @param request The completed request object which was given to the + * operation after command execution. + * + * @param request The completed request object which was given to the * debug command handler. * @param targets Objects which were the targets of this action */ protected void postExecute(IRequest request, Object[] targets) { // do nothing by default } - + /** - * Returns the {@link org.eclipse.debug.core.commands.IDebugCommandHandler} + * Returns the {@link org.eclipse.debug.core.commands.IDebugCommandHandler} * command handler that type this action executes. - * + * * @return command class. - * + * * @see org.eclipse.debug.core.commands.IDebugCommandHandler */ abstract protected Class<?> getCommandType(); @@ -168,7 +168,7 @@ public abstract class DebugCommandAction extends Action implements IDebugContext fInitialized = true; notifyAll(); } - } + } super.setEnabled(enabled); if (fAction != null) { fAction.setEnabled(enabled); @@ -177,7 +177,7 @@ public abstract class DebugCommandAction extends Action implements IDebugContext /** * Initializes this action for a specific part. - * + * * @param part workbench part */ public void init(IWorkbenchPart part) { @@ -195,10 +195,10 @@ public abstract class DebugCommandAction extends Action implements IDebugContext setEnabled(getInitialEnablement()); } } - + /** * Initializes this action for a workbench window. - * + * * @param window the window */ public void init(IWorkbenchWindow window) { @@ -214,12 +214,12 @@ public abstract class DebugCommandAction extends Action implements IDebugContext setEnabled(getInitialEnablement()); } } - + /** * Returns whether this action should be enabled when initialized * and there is no active debug context. By default, <code>false</code> * is returned. - * + * * @return initial enabled state when there is no active context. */ protected boolean getInitialEnablement() { @@ -230,7 +230,7 @@ public abstract class DebugCommandAction extends Action implements IDebugContext * Returns the context (selection) this action operates on. By default * the active debug context in this action's associated part or window is used, * but subclasses may override as required. - * + * * @return the context this action operates on * @since 3.7 */ @@ -253,9 +253,9 @@ public abstract class DebugCommandAction extends Action implements IDebugContext wait(); } catch (InterruptedException e) { } - } - } - + } + } + ISelection selection = getContext(); if (selection instanceof IStructuredSelection && isEnabled()) { IStructuredSelection ss = (IStructuredSelection) selection; @@ -287,11 +287,11 @@ public abstract class DebugCommandAction extends Action implements IDebugContext fWindow = null; fPart = null; } - + /** * Returns the context service this action linked to. By default, this actions is * associated with the context service for the window this action is operating in. - * + * * @return associated context service */ protected IDebugContextService getDebugContextService() { @@ -300,9 +300,9 @@ public abstract class DebugCommandAction extends Action implements IDebugContext /** * Returns the help context id for this action or <code>null</code> if none. - * + * * @return The help context id for this action or <code>null</code> - */ + */ public abstract String getHelpContextId(); /* @@ -346,14 +346,14 @@ public abstract class DebugCommandAction extends Action implements IDebugContext */ @Override public abstract ImageDescriptor getImageDescriptor(); - + /** * Returns the workbench proxy associated with this action or <code>null</code> * if none. This is the workbench proxy to an {@link org.eclipse.ui.IActionDelegate} * that is using this action to perform its actual work. This is only used when * an {@link org.eclipse.ui.IActionDelegate} is using one of these actions to perform its * function. - * + * * @return workbench proxy action or <code>null</code> */ protected IAction getActionProxy() { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java index 561e64e16..aff4f216d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java @@ -37,17 +37,17 @@ import org.eclipse.ui.PlatformUI; import org.eclipse.ui.handlers.HandlerUtil; /** - * Abstract base class for re-targeting command framework handlers, which - * delegate execution to {@link org.eclipse.debug.core.commands.IDebugCommandHandler} - * handlers. The specific type of <code>IDebugCommandHandler</code> is - * determined by the abstract {@link #getCommandType()} method. - * + * Abstract base class for re-targeting command framework handlers, which + * delegate execution to {@link org.eclipse.debug.core.commands.IDebugCommandHandler} + * handlers. The specific type of <code>IDebugCommandHandler</code> is + * determined by the abstract {@link #getCommandType()} method. + * * <p> Note: This class is not an implementation of the <code>IDebugCommandHandler</code> - * interface, which was somewhat unfortunately named. <code>IDebugCommandHandler</code> - * is an interface that used only by the debugger plug-ins. This class implements - * {@link org.eclipse.core.commands.IHandler} interface and is to be used with the + * interface, which was somewhat unfortunately named. <code>IDebugCommandHandler</code> + * is an interface that used only by the debugger plug-ins. This class implements + * {@link org.eclipse.core.commands.IHandler} interface and is to be used with the * platform commands framework. </p> - * + * * <p> * Clients may subclass this class. * </p> @@ -59,18 +59,18 @@ import org.eclipse.ui.handlers.HandlerUtil; public abstract class DebugCommandHandler extends AbstractHandler { /** - * The DebugCommandService is able to evaluate the command handler + * The DebugCommandService is able to evaluate the command handler * enablement in each workbench window separately, however the workbench * command framework uses only a single handler instance for all windows. * This IEnabledTarget implementation tracks enablement of the command - * for a given window. When the handler enablement is tested, the - * currently active window is used to determine which enabled target - * to use. + * for a given window. When the handler enablement is tested, the + * currently active window is used to determine which enabled target + * to use. */ private class EnabledTarget implements IEnabledTarget, IDebugContextListener { boolean fEnabled = getInitialEnablement(); IWorkbenchWindow fWindow; - + EnabledTarget(IWorkbenchWindow window) { fWindow = window; } @@ -88,12 +88,12 @@ public abstract class DebugCommandHandler extends AbstractHandler { fireHandlerChanged(new HandlerEvent(DebugCommandHandler.this, true, false)); } } - + @Override public void debugContextChanged(DebugContextEvent event) { DebugCommandService.getService(fWindow).postUpdateCommand(getCommandType(), this); } - + void dispose() { if (isDisposed()) { return; @@ -101,26 +101,26 @@ public abstract class DebugCommandHandler extends AbstractHandler { getContextService(fWindow).removeDebugContextListener(this); fWindow = null; } - + boolean isDisposed() { return fWindow == null; } } /** - * Window listener is used to make sure that the handler enablement + * Window listener is used to make sure that the handler enablement * is updated when the active workbench window is changed. */ private IWindowListener fWindowListener = new IWindowListener() { - + @Override public void windowOpened(IWorkbenchWindow w) { } - + @Override public void windowDeactivated(IWorkbenchWindow w) { } - + @Override public void windowClosed(IWorkbenchWindow w) { EnabledTarget enabledTarget = fEnabledTargetsMap.get(w); @@ -128,14 +128,14 @@ public abstract class DebugCommandHandler extends AbstractHandler { enabledTarget.dispose(); } } - + @Override public void windowActivated(IWorkbenchWindow w) { fCurrentEnabledTarget = fEnabledTargetsMap.get(w); fireHandlerChanged(new HandlerEvent(DebugCommandHandler.this, true, false)); } }; - + /** * Map of enabled targets keyed by workbench window. */ @@ -146,15 +146,15 @@ public abstract class DebugCommandHandler extends AbstractHandler { * workbench window. */ private EnabledTarget fCurrentEnabledTarget = null; - + /** - * The constructor adds the handler as the + * The constructor adds the handler as the */ public DebugCommandHandler() { super(); PlatformUI.getWorkbench().addWindowListener(fWindowListener); } - + /* (non-Javadoc) * @see org.eclipse.core.commands.AbstractHandler#setEnabled(java.lang.Object) */ @@ -162,9 +162,9 @@ public abstract class DebugCommandHandler extends AbstractHandler { public void setEnabled(Object evaluationContext) { // This method is called with the current evaluation context // just prior to the isEnabled() being called. Check the active - // window and update the current enabled target based on it + // window and update the current enabled target based on it fCurrentEnabledTarget = null; - + if (!(evaluationContext instanceof IEvaluationContext)) { return; } @@ -175,7 +175,7 @@ public abstract class DebugCommandHandler extends AbstractHandler { fCurrentEnabledTarget = getEnabledTarget(window); } } - + /* (non-Javadoc) * @see org.eclipse.core.commands.AbstractHandler#isEnabled() */ @@ -186,7 +186,7 @@ public abstract class DebugCommandHandler extends AbstractHandler { } return fCurrentEnabledTarget.fEnabled; } - + private EnabledTarget getEnabledTarget(IWorkbenchWindow window) { EnabledTarget target = fEnabledTargetsMap.get(window); if (target == null) { @@ -196,7 +196,7 @@ public abstract class DebugCommandHandler extends AbstractHandler { } return target; } - + /* (non-Javadoc) * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent) */ @@ -212,42 +212,42 @@ public abstract class DebugCommandHandler extends AbstractHandler { if (selection instanceof IStructuredSelection && isEnabled()) { IStructuredSelection ss = (IStructuredSelection) selection; boolean enabledAfterExecute = execute(window, ss.toArray()); - + // enable/disable the action according to the command fCurrentEnabledTarget.setEnabled(enabledAfterExecute); } return null; } - + private IDebugContextService getContextService(IWorkbenchWindow window) { return DebugUITools.getDebugContextManager().getContextService(window); } - + /** * Executes this action on the given target objects - * @param window the window + * @param window the window * @param targets the targets to execute this action on * @return if the command stays enabled while the command executes */ private boolean execute(IWorkbenchWindow window, final Object[] targets) { - DebugCommandService service = DebugCommandService.getService(window); + DebugCommandService service = DebugCommandService.getService(window); return service.executeCommand( - getCommandType(), targets, + getCommandType(), targets, new ICommandParticipant() { @Override public void requestDone(org.eclipse.debug.core.IRequest request) { DebugCommandHandler.this.postExecute(request, targets); - } + } }); } /** - * This method is called after the completion of the execution of this + * This method is called after the completion of the execution of this * command. Extending classes may override this method to perform additional - * operation after command execution. - * - * @param request The completed request object which was given the the + * operation after command execution. + * + * @param request The completed request object which was given the the * debug command handler. * @param targets Objects which were the targets of this action */ @@ -256,20 +256,20 @@ public abstract class DebugCommandHandler extends AbstractHandler { } /** - * Returns the {@link org.eclipse.debug.core.commands.IDebugCommandHandler} + * Returns the {@link org.eclipse.debug.core.commands.IDebugCommandHandler} * command handler that type this action executes. - * + * * @return command class. - * + * * @see org.eclipse.debug.core.commands.IDebugCommandHandler */ abstract protected Class<?> getCommandType(); - + /** * Returns whether this action should be enabled when initialized * and there is no active debug context. - * + * * @return false, by default */ protected boolean getInitialEnablement() { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ExportBreakpointsOperation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ExportBreakpointsOperation.java index f6c4cd455..78a4417b0 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ExportBreakpointsOperation.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ExportBreakpointsOperation.java @@ -56,10 +56,10 @@ public class ExportBreakpointsOperation implements IRunnableWithProgress { */ private String fFileName = null; private StringWriter fWriter = null; - + /** * Constructs an operation to export breakpoints to a file. - * + * * @param breakpoints the breakpoints to export * @param fileName absolute path of file to export breakpoints to - the file * will be overwritten if it already exists @@ -72,7 +72,7 @@ public class ExportBreakpointsOperation implements IRunnableWithProgress { /** * Constructs an operation to export breakpoints to a string buffer. The buffer * is available after the operation is run via {@link #getBuffer()}. - * + * * @param breakpoints the breakpoints to export * @since 3.5 */ @@ -111,7 +111,7 @@ public class ExportBreakpointsOperation implements IRunnableWithProgress { root.putString(IImportExportConstants.IE_NODE_TYPE, marker.getType()); Object val = marker.getAttribute(IMarker.LINE_NUMBER); root.putString(IMarker.LINE_NUMBER, (val != null) ? val.toString() : null); - val = marker.getAttribute(IImportExportConstants.CHARSTART); + val = marker.getAttribute(IImportExportConstants.CHARSTART); root.putString(IImportExportConstants.CHARSTART, (val != null) ? val.toString() : null); String value = null; boolean wsattrib = false; @@ -160,9 +160,9 @@ public class ExportBreakpointsOperation implements IRunnableWithProgress { /** * Collects all of the breakpoint working sets that contain the given {@link IBreakpoint} * in the given list - * + * * @param breakpoint the breakpoint to get working set information about - * @return the {@link IImportExportConstants#DELIMITER} delimited {@link String} for all of the work sets the given breakpoint belongs to + * @return the {@link IImportExportConstants#DELIMITER} delimited {@link String} for all of the work sets the given breakpoint belongs to * @since 3.5 */ private String getWorkingSetsAttribute(IBreakpoint breakpoint) { @@ -177,7 +177,7 @@ public class ExportBreakpointsOperation implements IRunnableWithProgress { } return buffer.toString(); } - + /** * Method to ensure markers and breakpoints are not both added to the working set * @param set the set to check @@ -194,13 +194,13 @@ public class ExportBreakpointsOperation implements IRunnableWithProgress { } return false; } - + /** * Returns a string buffer containing a memento of the exported breakpoints * or <code>null</code> if the operation was configured to export to a file. * The memento can be used to import breakpoints into the workspace using an * {@link ImportBreakpointsOperation}. - * + * * @return a string buffer containing a memento of the exported breakpoints * or <code>null</code> if the operation was configured to export to a file * @since 3.5 @@ -211,6 +211,6 @@ public class ExportBreakpointsOperation implements IRunnableWithProgress { } return null; } - - + + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IAddMemoryBlocksTarget.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IAddMemoryBlocksTarget.java index 29316c3aa..61f25c9d8 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IAddMemoryBlocksTarget.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IAddMemoryBlocksTarget.java @@ -25,18 +25,18 @@ import org.eclipse.ui.IWorkbenchPart; * @since 3.2 */ public interface IAddMemoryBlocksTarget { - + /** * Returns whether an add memory block operation can be performed from the specified * part and the given selection. - * + * * @param part the part on which the action has been invoked * @param selection the selection on which the action has been invoked * @return <code>true</code> if the add memory block operation can be performed from the given part and selection, <code>false</code> otherwise - * @throws CoreException if unable to perform the action + * @throws CoreException if unable to perform the action */ public boolean canAddMemoryBlocks(IWorkbenchPart part, ISelection selection) throws CoreException; - + /** * Returns whether this target will support adding memory block from the specified * part. @@ -45,19 +45,19 @@ public interface IAddMemoryBlocksTarget { * part, false otherwise. */ public boolean supportsAddMemoryBlocks(IWorkbenchPart part); - - + + /** - * Perform an add memory block on the given element that is + * Perform an add memory block on the given element that is * currently selected in the Debug view. If a memory block can be successfully * created, implementations must add the resulted memory block to <code>IMemoryBlockManager</code> * In addition, implementations must query to see if default renderings should be created * for the given memory block and add these renderings accordingly. - * + * * @param part the part on which the action has been invoked * @param selection the selection on which the action has been invoked - * @throws CoreException if unable to perform the action - * + * @throws CoreException if unable to perform the action + * * @see org.eclipse.debug.core.model.IMemoryBlockRetrieval * @see org.eclipse.debug.ui.memory.IMemoryRenderingManager * @see org.eclipse.debug.core.IMemoryBlockManager diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IAddMemoryRenderingsTarget.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IAddMemoryRenderingsTarget.java index 3e42dd8ac..537753655 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IAddMemoryRenderingsTarget.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IAddMemoryRenderingsTarget.java @@ -17,7 +17,7 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.ui.IWorkbenchPart; /** - * Adapter for the platform's retargettable "add memory rendering" action. + * Adapter for the platform's retargettable "add memory rendering" action. * Clients implementing this adapter are expected to add the necessary memory blocks * and renderings when the adapter is invoked. * <p> @@ -28,10 +28,10 @@ import org.eclipse.ui.IWorkbenchPart; * <li>Create the new rendering from <code>IMemoryRenderingTypeDelegate</code></li> * <li>Bring the required memory view to the top. (<code>IMemoryRenderingSite</code>)</li> * <li>Find the container from the memory view to host the new memory rendering. - * (<code>IMemoryRenderingContainer</code>)</li> + * (<code>IMemoryRenderingContainer</code>)</li> * <li>Initialize the new rendering with the appropriate memory block and container.</li> * <li>Add the new rendering to the container.</li> - * </ol> + * </ol> * </p> * <p> * Clients may implement this interface. @@ -44,16 +44,16 @@ public interface IAddMemoryRenderingsTarget { * Returns whether a memory rendering can be added from the specified * part, based on the the given selection, which is the active debug context * in the current workbench window. - * + * * @param part the part on which the action has been invoked - * @param selection the active debug context in the active workbench window + * @param selection the active debug context in the active workbench window * @return <code>true</code> if a memory rendering can be added from the specified * part with the given selection, <code>false</code> otherwise */ public boolean canAddMemoryRenderings(IWorkbenchPart part, ISelection selection); - + /** - * Adds memory renderings. Based on the part and selection (active debug context), this + * Adds memory renderings. Based on the part and selection (active debug context), this * adapter does the following: * <ol> * <li>creates and adds the required memory block to the memory block manager</li> @@ -63,8 +63,8 @@ public interface IAddMemoryRenderingsTarget { * @param part the part on which the action has been invoked * @param selection the active debug context * @param renderingTypes renderings to add - * @throws CoreException if unable to perform the action - * + * @throws CoreException if unable to perform the action + * * @see org.eclipse.debug.core.model.IMemoryBlockRetrieval * @see org.eclipse.debug.ui.memory.IMemoryRenderingManager * @see org.eclipse.debug.core.IMemoryBlockManager @@ -72,11 +72,11 @@ public interface IAddMemoryRenderingsTarget { * @see org.eclipse.debug.ui.memory.IMemoryRenderingContainer */ public void addMemoryRenderings(IWorkbenchPart part, ISelection selection, IMemoryRenderingType[] renderingTypes) throws CoreException; - + /** * Returns a list of rendering types that can be added from the given workbench part and active * debug context, possibly empty. - * + * * @param part the part on which the action has been invoked * @param selection the active debug context * @return a list of rendering types that can be added, possibly empty diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ILaunchable.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ILaunchable.java index 38643a381..b348f2fcb 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ILaunchable.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ILaunchable.java @@ -13,7 +13,7 @@ package org.eclipse.debug.ui.actions; /** * Interface used to tag objects as launchable. Objects that provide * an adapter of this type will be considered by the contextual - * launch support. + * launch support. * <p> * The debug platform uses the {@link ILaunchable} interface as a tag for * objects that can be launched via the context menu 'Run As / Debug As' actions @@ -32,13 +32,13 @@ package org.eclipse.debug.ui.actions; * Thus objects that can be launched need to register {@link ILaunchable} adapters, but * don't have to provide implementations. There is also no harm in implementing the interface * or providing the adapter. For example, JDT contributes an adapter as follows. Although - * no adapter is actually provided the platform will answer <code>true</code> to + * no adapter is actually provided the platform will answer <code>true</code> to * <code>hasAdapter(...)</code>. * </p> * <pre> * <extension point="org.eclipse.core.runtime.adapters"> - * <factory - * class="" + * <factory + * class="" * adaptableType="org.eclipse.jdt.core.IJavaElement"> * <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/> * </factory> @@ -50,7 +50,7 @@ package org.eclipse.debug.ui.actions; * required. * </p> * <p> - * Clients that need to check for presence of launchable adapter using + * Clients that need to check for presence of launchable adapter using * standard expression mechanism, should use a property tester as follows: * <pre> * <with variable="selection"> @@ -59,7 +59,7 @@ package org.eclipse.debug.ui.actions; * </iterator> * </with> * </pre> - * + * * </p> * @see org.eclipse.debug.ui.actions.ContextualLaunchAction * @since 3.0 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IRunToLineTarget.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IRunToLineTarget.java index 23541342d..016bbde63 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IRunToLineTarget.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IRunToLineTarget.java @@ -28,8 +28,8 @@ import org.eclipse.ui.IWorkbenchPart; * the user invokes an associated action. If an adapter does not exist * for the part, the retargettable actions asks selected objects in the * active part for an adapter. Generally, a debug implementation will - * provide breakpoint adapters for relevant editors and model objects. - * </p> + * provide breakpoint adapters for relevant editors and model objects. + * </p> * <p> * Clients are intended to implement this interface and provide instances as * an adapter on applicable parts (for example, editors) that support the @@ -38,25 +38,25 @@ import org.eclipse.ui.IWorkbenchPart; * @since 3.0 */ public interface IRunToLineTarget { - + /** - * Perform a run to line operation on the given element that is + * Perform a run to line operation on the given element that is * currently selected and suspended in the Debug view. Implementations * must honor the user preference of whether to skip breakpoints * during the operation - * see <code>IDebugUIConstants.PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE</code>. - * + * * @param part the part on which the action has been invoked * @param selection the selection on which the action has been invoked * @param target suspended element to perform the "run to line" action on - * @throws CoreException if unable to perform the action + * @throws CoreException if unable to perform the action */ public void runToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) throws CoreException; /** * Returns whether a run to line operation can be performed on the given * element that is currently selected and suspended in the Debug view. - * + * * @param part the part on which the action has been invoked * @param selection the selection on which the action has been invoked * @param target suspended element to perform the "run to line" action on diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTarget.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTarget.java index c0f9c8bf7..a0f20a1e7 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTarget.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTarget.java @@ -29,8 +29,8 @@ import org.eclipse.ui.IWorkbenchPart; * the user invokes an associated action. If an adapter does not exist * for the part, the retargettable actions asks selected objects in the * active part for an adapter. Generally, a debug implementation will - * provide breakpoint adapters for relevant editors and model objects. - * </p> + * provide breakpoint adapters for relevant editors and model objects. + * </p> * <p> * Clients are intended to implement this interface and provide instances as * an adapter on applicable parts (for example, editors) and objects (for @@ -39,25 +39,25 @@ import org.eclipse.ui.IWorkbenchPart; * @since 3.0 */ public interface IToggleBreakpointsTarget { - + /** * Creates new line breakpoints or removes existing breakpoints. * The selection varies depending on the given part. For example, * a text selection is provided for text editors, and a structured * selection is provided for tree views, and may be a multi-selection. - * - * @param part the part on which the action has been invoked + * + * @param part the part on which the action has been invoked * @param selection selection on which line breakpoints should be toggled - * @throws CoreException if unable to perform the action + * @throws CoreException if unable to perform the action */ public void toggleLineBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException; - + /** * Returns whether line breakpoints can be toggled on the given selection. * The selection varies depending on the given part. For example, * a text selection is provided for text editors, and a structured * selection is provided for tree views, and may be a multi-selection. - * + * * @param part the part on which the action has been invoked * @param selection selection on which line breakpoints may be toggled * @return whether line breakpoints can be toggled on the given selection @@ -69,46 +69,46 @@ public interface IToggleBreakpointsTarget { * The selection varies depending on the given part. For example, * a text selection is provided for text editors, and a structured * selection is provided for tree views, and may be a multi-selection. - * - * @param part the part on which the action has been invoked + * + * @param part the part on which the action has been invoked * @param selection selection on which method breakpoints should be toggled - * @throws CoreException if unable to perform the action + * @throws CoreException if unable to perform the action */ public void toggleMethodBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException; - + /** * Returns whether method breakpoints can be toggled on the given selection. * The selection varies depending on the given part. For example, * a text selection is provided for text editors, and a structured * selection is provided for tree views, and may be a multi-selection. - * + * * @param part the part on which the action has been invoked * @param selection selection on which method breakpoints may be toggled * @return whether method breakpoints can be toggled on the given selection */ public boolean canToggleMethodBreakpoints(IWorkbenchPart part, ISelection selection); - + /** * Creates new watchpoints or removes existing breakpoints. * The selection varies depending on the given part. For example, * a text selection is provided for text editors, and a structured * selection is provided for tree views, and may be a multi-selection. - * - * @param part the part on which the action has been invoked + * + * @param part the part on which the action has been invoked * @param selection selection on which watchpoints should be toggled - * @throws CoreException if unable to perform the action + * @throws CoreException if unable to perform the action */ public void toggleWatchpoints(IWorkbenchPart part, ISelection selection) throws CoreException; - + /** * Returns whether watchpoints can be toggled on the given selection. * The selection varies depending on the given part. For example, * a text selection is provided for text editors, and a structured * selection is provided for tree views, and may be a multi-selection. - * + * * @param part the part on which the action has been invoked * @param selection selection on which watchpoints may be toggled * @return whether watchpoints can be toggled on the given selection */ - public boolean canToggleWatchpoints(IWorkbenchPart part, ISelection selection); + public boolean canToggleWatchpoints(IWorkbenchPart part, ISelection selection); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetExtension.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetExtension.java index 99e7e0879..70e8d9684 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetExtension.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetExtension.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.ui.IWorkbenchPart; * This interface provides the ability to selectively create any type of breakpoint * when invoked, rather than a specific type of breakpoint (for example, a line * breakpoint). This allows targets to choose the type of breakpoint to create - * when the user double-clicks in the vertical ruler. + * when the user double-clicks in the vertical ruler. * <p> * Clients implementing <code>IToggleBreakpointsTarget</code> may optionally * implement this interface. @@ -28,25 +28,25 @@ import org.eclipse.ui.IWorkbenchPart; * @see org.eclipse.debug.ui.actions.ToggleBreakpointAction */ public interface IToggleBreakpointsTargetExtension extends IToggleBreakpointsTarget { - + /** * Creates new line breakpoints or removes existing breakpoints. * The selection varies depending on the given part. For example, * a text selection is provided for text editors, and a structured * selection is provided for tree views, and may be a multi-selection. - * - * @param part the part on which the action has been invoked + * + * @param part the part on which the action has been invoked * @param selection selection on which line breakpoints should be toggled - * @throws CoreException if unable to perform the action + * @throws CoreException if unable to perform the action */ public void toggleBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException; - + /** * Returns whether line breakpoints can be toggled on the given selection. * The selection varies depending on the given part. For example, * a text selection is provided for text editors, and a structured * selection is provided for tree views, and may be a multi-selection. - * + * * @param part the part on which the action has been invoked * @param selection selection on which line breakpoints may be toggled * @return whether line breakpoints can be toggled on the given selection diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetExtension2.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetExtension2.java index 8a7bce3bb..b4c276320 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetExtension2.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetExtension2.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.ui.IWorkbenchPart; * Extension interface for {@link org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension}. * This interface provides the ability to inspect the key modifiers * being used when toggling a breakpoint. This allows targets to choose the type of breakpoint to create - * when the user double-clicks in the vertical ruler. + * when the user double-clicks in the vertical ruler. * <p> * Clients implementing <code>IToggleBreakpointsTarget</code> or <code>IToggleBreakpointsTargetExtension</code> may optionally * implement or adapt to this interface. @@ -28,27 +28,27 @@ import org.eclipse.ui.IWorkbenchPart; * @see org.eclipse.debug.ui.actions.ToggleBreakpointAction */ public interface IToggleBreakpointsTargetExtension2 extends IToggleBreakpointsTargetExtension { - + /** * Creates or removes existing breakpoints based on any modifiers in the given {@link Event}. * The selection varies depending on the given part. For example, * a text selection is provided for text editors, and a structured * selection is provided for tree views, and may be a multi-selection. - * - * @param part the part on which the action has been invoked + * + * @param part the part on which the action has been invoked * @param selection selection on which line breakpoints should be toggled * @param event the accompanying {@link Event} which can be <code>null</code> if unavailable - * @throws CoreException if unable to perform the action + * @throws CoreException if unable to perform the action */ public void toggleBreakpointsWithEvent(IWorkbenchPart part, ISelection selection, Event event) throws CoreException; - + /** * Returns whether breakpoints can be toggled on the given selection with the given {@link Event}. * The selection varies depending on the given part. For example, * a text selection is provided for text editors, and a structured * selection is provided for tree views, and may be a multi-selection. - * - * @param part the part on which the action has been invoked + * + * @param part the part on which the action has been invoked * @param selection selection on which line breakpoints should be toggled * @param event the accompanying {@link Event} which can be <code>null</code> if unavailable * @return whether breakpoints can be toggled on the given selection with the given {@link Event} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetFactory.java index 61025767b..b0c6c71bb 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetFactory.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetFactory.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 @@ -17,13 +17,13 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.ui.IWorkbenchPart; /** - * A toggle breakpoints target factory creates one or more toggle breakpoint + * A toggle breakpoints target factory creates one or more toggle breakpoint * targets. The toggle breakpoints targets are used by toggle breakpoint actions - * to create breakpoints appropriate for the active editor, debug session, project, + * to create breakpoints appropriate for the active editor, debug session, project, * or selection. - * + * * <p> - * Toggle breakpoints target factories are contributed via the + * Toggle breakpoints target factories are contributed via the * <code>org.eclipse.debug.ui.toggleBreakpointsTargetFactories</code> * extension point. Following is an example of a detail pane factory extension: * <pre> @@ -33,7 +33,7 @@ import org.eclipse.ui.IWorkbenchPart; * class="com.example.BreakpointToggleTargetFactory"> * <enablement> * <!-- Test the active debug context. Enable only if the active context - * is an element from "Example" debugger, or if there is no debug context + * is an element from "Example" debugger, or if there is no debug context * associated with the context element. Also enable if debug context is * empty --> * <with variable="debugContext"> @@ -44,7 +44,7 @@ import org.eclipse.ui.IWorkbenchPart; * </or> * </iterate> * </with> - * <!-- If there is no active debug context. Enable the breakpoint toggle for + * <!-- If there is no active debug context. Enable the breakpoint toggle for * the "Example" editors --> * <instanceof value="com.example.Editor"/> * </enablement> @@ -54,9 +54,9 @@ import org.eclipse.ui.IWorkbenchPart; * </p> * <p> * <p> - * Clients contributing a toggle breakpoints target factory are intended to + * Clients contributing a toggle breakpoints target factory are intended to * implement this interface. - * + * * @see IToggleBreakpointsTarget * @see IToggleBreakpointsTargetExtension * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetManager @@ -64,55 +64,55 @@ import org.eclipse.ui.IWorkbenchPart; */ public interface IToggleBreakpointsTargetFactory { /** - * Returns all possible types of toggle breakpoints targets that this - * factory can create for the given selection and part, possibly empty. + * Returns all possible types of toggle breakpoints targets that this + * factory can create for the given selection and part, possibly empty. * Toggle breakpoints targets are returned as a set of IDs. - * + * * @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 */ public Set<String> getToggleTargets(IWorkbenchPart part, ISelection selection); - + /** - * Returns the identifier of the default toggle breakpoints target to use - * for the given selection, or <code>null</code> if this factory has no - * preference. - * + * Returns the identifier of the default toggle breakpoints target to use + * for the given selection, or <code>null</code> if this factory has no + * preference. + * * @param part The active part. * @param selection The current selection * @return a breakpoint toggle target identifier or <code>null</code> */ public String getDefaultToggleTarget(IWorkbenchPart part, ISelection selection); - + /** - * Creates and returns a toggle breakpoint target corresponding to the - * given identifier that this factory can produce (according to + * Creates and returns a toggle breakpoint target corresponding to the + * given identifier that this factory can produce (according to * {@link #getToggleTargets}). - * + * * @param targetID The id of the toggle target to be created * @return toggle target or <code>null</code> if one could not be created */ public IToggleBreakpointsTarget createToggleTarget(String targetID); - + /** - * Returns a human readable name for the breakpoint toggle target associated with the + * Returns a human readable name for the breakpoint toggle target associated with the * given ID. Used to populate the context menu with meaningful names of the types of * breakpoints created by the given target. - * + * * @param targetID toggle breakpoints target identifier * @return toggle target name */ public String getToggleTargetName(String targetID); - + /** - * Returns a description for the breakpoint toggle target associated with the - * given ID or <code>null</code> if none. - * + * Returns a description for the breakpoint toggle target associated with the + * given ID or <code>null</code> if none. + * * @param targetID toggle breakpoints target identifier * @return toggle target name or <code>null</code> if none */ public String getToggleTargetDescription(String targetID); - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetManager.java index f768c2880..6705c8167 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetManager.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetManager.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 * IBM Corporation - bug fixing @@ -17,33 +17,33 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.ui.IWorkbenchPart; /** - * Organizes the toggle breakpoints target factories contributed through the - * extension point and keeps track of the toggle breakpoints target that + * Organizes the toggle breakpoints target factories contributed through the + * extension point and keeps track of the toggle breakpoints target that * the factories produce. The manager is accessed as a singleton through * the <code>getDefault()</code> method. * <p> * The adapter mechanism for obtaining a toggle breakpoints target is * still supported through a specialized toggle target factory. Targets - * contributed through this mechanism are labeled as "Default" in the UI. - * </p> + * contributed through this mechanism are labeled as "Default" in the UI. + * </p> * <p> * Clients should call {@link org.eclipse.debug.ui.DebugUITools#getToggleBreakpointsTargetManager()} * for an instance of this instance. * </p> - * + * * @see IToggleBreakpointsTargetFactory * @see IToggleBreakpointsTarget * @see IToggleBreakpointsTargetExtension - * + * * @since 3.8 * @noimplement This interface is not intended to be implemented by clients. */ public interface IToggleBreakpointsTargetManager { - + /** - * Returns the set of <code>String</code> IDs of toggle breakpoint targets, + * Returns the set of <code>String</code> IDs of toggle breakpoint targets, * which are enabled for the given active part and selection. The IDs can be used - * to create the {@link IToggleBreakpointsTarget} instance. + * to create the {@link IToggleBreakpointsTarget} instance. * @param part active part * @param selection active selection in part * @return Set of toggle target IDs or an empty set @@ -52,49 +52,49 @@ public interface IToggleBreakpointsTargetManager { /** * Returns the ID of the calculated preferred toggle breakpoints target for the - * given active part and selection. The returned ID is chosen based on factory - * enablement, whether the target is a default one, and on user choice. + * given active part and selection. The returned ID is chosen based on factory + * enablement, whether the target is a default one, and on user choice. * @param part active part * @param selection active selection in part * @return The toggle target IDs or null if none. */ public String getPreferredToggleBreakpointsTargetID(IWorkbenchPart part, ISelection selection); - + /** * Given the ID of toggle breakpoint target, this method will try to find the factory * that creates it and return an instance of it. - * + * * @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 instantiated target or null */ public IToggleBreakpointsTarget getToggleBreakpointsTarget(IWorkbenchPart part, ISelection selection); - + /** - * Given the ID of a toggle breakpoints target, this method will try + * Given the ID of a toggle breakpoints target, this method will try * to find the factory that creates it and ask it for the name of it. - * + * * @param id The ID of the requested toggle breakpoint target. * @return The name of the target. */ public String getToggleBreakpointsTargetName(String id); - + /** - * Given the ID of a toggle breakpoints target, this method will try + * Given the ID of a toggle breakpoints target, this method will try * to find the factory that creates it and ask it for the description of it. - * + * * @param id The ID of the requested toggle breakpoint target. * @return The description of the target or null. */ public String getToggleBreakpointsTargetDescription(String id); - + /** * Adds the given listener to the list of listeners notified when the preferred * toggle breakpoints targets change. * @param listener The listener to add. */ public void addChangedListener(IToggleBreakpointsTargetManagerListener listener); - + /** * Removes the given listener from the list of listeners notified when the preferred * toggle breakpoints targets change. diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetManagerListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetManagerListener.java index 58f8fd3ae..643278c07 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetManagerListener.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetManagerListener.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 *******************************************************************************/ @@ -16,13 +16,13 @@ package org.eclipse.debug.ui.actions; * breakpoints target manager. This interface allows toggle breakpoint * actions to update their enablement when the user changes the preferred * toggle target settings. - * + * * @see IToggleBreakpointsTargetManager * @see IToggleBreakpointsTargetFactory * @since 3.8 */ public interface IToggleBreakpointsTargetManagerListener { - + /** * Called when the preferred toggle targets have changed. */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IVariableValueEditor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IVariableValueEditor.java index 0fc8f9813..623822819 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IVariableValueEditor.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IVariableValueEditor.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 @@ import org.eclipse.swt.widgets.Shell; * <ul> * <li><code>modelId</code> the debug model identifier for which the given * variable value editor is applicable</li> - * <li><code>class</code> fully qualified name of a class that implements + * <li><code>class</code> fully qualified name of a class that implements * {@link IVariableValueEditor}</li> * </ul> * </p> @@ -45,7 +45,7 @@ public interface IVariableValueEditor { * Edits the given variable, if appropriate. If this editor does not apply to * the given variable this method returns false, which indicates that the * Debug Platform's default variable edit dialog should be used. - * + * * @param variable the variable to edit * @param shell the currently active shell, which can be used to open a dialog * for the user @@ -55,13 +55,13 @@ public interface IVariableValueEditor { * variable editor */ public boolean editVariable(IVariable variable, Shell shell); - + /** * Saves the given expression to the given variable, if appropriate. If this * editor does not set the given variable's value from the given expression, this * method returns false. Returning false indicates that the Debug Platform should * perform the default operation to set a variable's value based on a String. - * + * * @param variable the variable to edit * @param expression the expression to assign to the given variable * @param shell the currently active shell, which can be used to report errors to the diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IWatchExpressionFactoryAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IWatchExpressionFactoryAdapter.java index d6199cdfb..213194fc0 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IWatchExpressionFactoryAdapter.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IWatchExpressionFactoryAdapter.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,11 +33,11 @@ import org.eclipse.debug.core.model.IVariable; * @since 3.2 */ public interface IWatchExpressionFactoryAdapter { - + /** * Creates and returns an expression for the specified variable * which is used to created an {@link org.eclipse.debug.core.model.IWatchExpression}. - * + * * @param variable variable a watch expression is required for * @return text used to create a watch expression * @exception org.eclipse.core.runtime.CoreException if unable to create a watch diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IWatchExpressionFactoryAdapter2.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IWatchExpressionFactoryAdapter2.java index 9c30fde8e..13e810732 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IWatchExpressionFactoryAdapter2.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IWatchExpressionFactoryAdapter2.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) @@ -16,9 +16,9 @@ import org.eclipse.core.runtime.CoreException; /** * An optional adapter used to create a watch expression for a selected element. * <p> - * The 'Create Watch Expression' action is enabled for an adaptable element + * The 'Create Watch Expression' action is enabled for an adaptable element * that have an associated <code>IWatchExpressionFactoryAdapter2</code>. - * + * * When a watch expression factory adapter is available for an element, the factory is * consulted to create a watch expression for that element. * </p> @@ -28,11 +28,11 @@ import org.eclipse.core.runtime.CoreException; * @since 3.4 */ public interface IWatchExpressionFactoryAdapter2 { - + /** * Creates and returns an expression for the specified variable * which is used to created an {@link org.eclipse.debug.core.model.IWatchExpression}. - * + * * @param element element a watch expression is required for * @return text used to create a watch expression * @exception org.eclipse.core.runtime.CoreException if unable to create a watch @@ -42,7 +42,7 @@ public interface IWatchExpressionFactoryAdapter2 { /** * Returns whether a watch expression can be created for the specified variable. - * + * * @param variable the specified variable * @return whether an expression can be created */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IWatchExpressionFactoryAdapterExtension.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IWatchExpressionFactoryAdapterExtension.java index 02b149e10..1ad06baf6 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IWatchExpressionFactoryAdapterExtension.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IWatchExpressionFactoryAdapterExtension.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.model.IVariable; * By default, the 'Create Watch Expression' action is enabled for instances of * {@link org.eclipse.debug.core.model.IVariable} that have an associated * {@link org.eclipse.debug.core.model.IWatchExpressionDelegate} registered - * for that debug model. + * for that debug model. * When a watch expression factory adapter is available for a variable that implements * this interface, the factory is consulted to enable the action. * </p> @@ -30,10 +30,10 @@ import org.eclipse.debug.core.model.IVariable; * @since 3.3 */ public interface IWatchExpressionFactoryAdapterExtension extends IWatchExpressionFactoryAdapter { - + /** * Returns whether a watch expression can be created for the specified variable. - * + * * @param variable variable a watch expression is required for * @return whether an expression can be created */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java index 48e809373..b9816dd83 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java @@ -69,12 +69,12 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { private boolean fCreateWorkingSets = false; private ArrayList<IBreakpoint> fAdded = new ArrayList<IBreakpoint>(); - + private String fCurrentWorkingSetProperty = null; private BreakpointManager fManager = (BreakpointManager) DebugPlugin.getDefault().getBreakpointManager(); - - /** + + /** * When a buffer is specified, a file is not used. */ private StringBuffer fBuffer = null; @@ -83,8 +83,8 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { /** * Constructs an operation to import breakpoints. - * - * @param fileName the file to read breakpoints from - the file should have been + * + * @param fileName the file to read breakpoints from - the file should have been * created from an export operation * @param overwrite whether imported breakpoints will overwrite existing equivalent breakpoints * @param createWorkingSets whether breakpoint working sets should be created. Breakpoints @@ -98,7 +98,7 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { /** * Constructs an operation to import breakpoints. - * + * * @param fileName the file to read breakpoints from - the file should have been created from an * export operation * @param overwrite whether imported breakpoints will overwrite existing equivalent breakpoints @@ -115,12 +115,12 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { fCreateWorkingSets = createWorkingSets; fImportBreakpoints = importBreakpoints; } - + /** * Constructs an operation to import breakpoints from a string buffer. The buffer * must contain a memento created an {@link ExportBreakpointsOperation}. - * - * @param buffer the string buffer to read breakpoints from - the file should have been + * + * @param buffer the string buffer to read breakpoints from - the file should have been * created from an export operation * @param overwrite whether imported breakpoints will overwrite existing equivalent breakpoints * @param createWorkingSets whether breakpoint working sets should be created. Breakpoints @@ -132,11 +132,11 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { public ImportBreakpointsOperation(StringBuffer buffer, boolean overwrite, boolean createWorkingSets) { this(buffer, overwrite, createWorkingSets, true); } - + /** * Constructs an operation to import breakpoints from a string buffer. The buffer must contain a * memento created an {@link ExportBreakpointsOperation}. - * + * * @param buffer the string buffer to read breakpoints from - the file should have been created * from an export operation * @param overwrite whether imported breakpoints will overwrite existing equivalent breakpoints @@ -152,7 +152,7 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { fOverwriteAll = overwrite; fCreateWorkingSets = createWorkingSets; fImportBreakpoints = importBreakpoints; - } + } /* (non-Javadoc) * @see org.eclipse.core.resources.IWorkspaceRunnable#run(org.eclipse.core.runtime.IProgressMonitor) @@ -202,9 +202,9 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { } // filter resource breakpoints that do not exist in this workspace - if(resource != null) { + if(resource != null) { try { - participants = fManager.getImportParticipants((String) attributes.get(IImportExportConstants.IE_NODE_TYPE)); + participants = fManager.getImportParticipants((String) attributes.get(IImportExportConstants.IE_NODE_TYPE)); } catch(CoreException ce) {} IMarker marker = findExistingMarker(attributes, participants); @@ -229,16 +229,16 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { if(fAdded.size() > 0 && fImportBreakpoints) { fManager.addBreakpoints(fAdded.toArray(new IBreakpoint[fAdded.size()])); } - } + } catch(CoreException ce) { - throw new InvocationTargetException(ce, + throw new InvocationTargetException(ce, MessageFormat.format("There was a problem importing breakpoints from: {0}", new Object[] { fFileName })); //$NON-NLS-1$ } finally { localmonitor.done(); } } - + /** * Returns a marker backing an existing breakpoint based on the given set of breakpoint attributes * @param attributes the map of attributes to compare for marker equality @@ -247,7 +247,7 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { * @since 3.5 */ protected IMarker findExistingMarker(Map<String, Object> attributes, IBreakpointImportParticipant[] participants) { - IBreakpoint[] bps = fManager.getBreakpoints(); + IBreakpoint[] bps = fManager.getBreakpoints(); for(int i = 0; i < bps.length; i++) { for(int j = 0; j < participants.length; j++) { try { @@ -260,7 +260,7 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { } return null; } - + /** * Collects all of the properties for a breakpoint from the memento describing it. * The values in the map will be one of: @@ -275,7 +275,7 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { */ protected Map<String, Object> collectBreakpointProperties(IMemento memento) { HashMap<String, Object> map = new HashMap<String, Object>(); - + //collect attributes from the 'breakpoint' node map.put(IImportExportConstants.IE_BP_ENABLED, memento.getBoolean(IImportExportConstants.IE_BP_ENABLED)); map.put(IImportExportConstants.IE_BP_PERSISTANT, memento.getBoolean(IImportExportConstants.IE_BP_PERSISTANT)); @@ -297,14 +297,14 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { map.put(IImportExportConstants.IE_NODE_PATH, child.getString(IImportExportConstants.IE_NODE_PATH)); return map; } - + /** * Collects the 'name' and 'value' key / attribute from the given memento and places it in the specified map - * @param memento the memento to read a name / value attribute from + * @param memento the memento to read a name / value attribute from * @param map the map to add the read attribute to */ private void readAttribute(IMemento memento, Map<String, Object> map) { - String name = memento.getString(IImportExportConstants.IE_NODE_NAME), + String name = memento.getString(IImportExportConstants.IE_NODE_NAME), value = memento.getString(IImportExportConstants.IE_NODE_VALUE); if (value != null && name != null) { if (name.equals(IInternalDebugUIConstants.WORKING_SET_NAME)) { @@ -323,7 +323,7 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { } } } - + /** * restores all of the attributes back into the given marker, recreates the breakpoint in the * breakpoint manager, and optionally recreates any working set(s) the breakpoint belongs to. @@ -368,7 +368,7 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { } } } - + /** * Updates the working sets the given breakpoint belongs to * @param wsnames the array of working set names @@ -407,13 +407,13 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { } } } - + /** * Collects all of the breakpoint working sets that contain the given {@link IBreakpoint} * in the given list - * - * @param breakpoint the breakpoint to collect working set containers from - * @param collector the list to collect containing working sets in + * + * @param breakpoint the breakpoint to collect working set containers from + * @param collector the list to collect containing working sets in * @since 3.5 */ private void collectContainingWorkingsets(IBreakpoint breakpoint, List<IWorkingSet> collector) { @@ -426,7 +426,7 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { } } } - + /** * Method to ensure markers and breakpoints are not both added to the working set * @param set the set to check @@ -442,11 +442,11 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { } return false; } - + /** * Returns the breakpoints that were imported by this operation, possibly - * an empty list. - * + * an empty list. + * * @return breakpoints imported by this operation * @since 3.5 */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchAction.java index 527709750..25c3b5f98 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchAction.java @@ -53,11 +53,11 @@ public class LaunchAction extends Action { * The mode to launch in */ private String fMode; - + /** * Constructs an action that launches the specified launch configuration * in the specified mode. - * + * * @param configuration launch configuration * @param mode launch mode - one of <code>ILaunchManager.RUN_MODE</code> or * <code>ILaunchManager.DEBUG_MODE</code> @@ -87,7 +87,7 @@ public class LaunchAction extends Action { /** * If the user has control-clicked the launch history item, open the launch * configuration dialog on the launch configuration, rather than running it. - * + * * @see org.eclipse.jface.action.IAction#runWithEvent(org.eclipse.swt.widgets.Event) */ @Override @@ -98,12 +98,12 @@ public class LaunchAction extends Action { //prompt based on pref IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore(); if(store.getBoolean(IInternalDebugUIConstants.PREF_REMOVE_FROM_LAUNCH_HISTORY)) { - MessageDialogWithToggle mdwt = MessageDialogWithToggle.openYesNoQuestion(DebugUIPlugin.getShell(), - ActionMessages.LaunchAction_0, + MessageDialogWithToggle mdwt = MessageDialogWithToggle.openYesNoQuestion(DebugUIPlugin.getShell(), + ActionMessages.LaunchAction_0, MessageFormat.format(ActionMessages.LaunchAction_1, new Object[] { fConfiguration.getName() }), - ActionMessages.LaunchAction_2, - false, - null, + ActionMessages.LaunchAction_2, + false, + null, null); int ret = mdwt.getReturnCode(); if(ret == IDialogConstants.YES_ID) { @@ -124,18 +124,18 @@ public class LaunchAction extends Action { else { runInternal(((event.stateMask & SWT.SHIFT) > 0) ? true : false); } - } + } else { runInternal(((event.stateMask & SWT.SHIFT) > 0) ? true : false); } } - + /** * Removes the specified <code>ILaunchConfiguration</code> from the launch histories associated * with the specified listing of <code>ILaunchGroup</code>s. * @param config the configuration to remove from the histories from the given launch groups * @param groups the launch groups whose histories the given configuration should be removed from - * + * * @since 3.4 */ private void removeFromLaunchHistories(ILaunchConfiguration config, ILaunchGroup[] groups) { @@ -149,13 +149,13 @@ public class LaunchAction extends Action { } } } - + /** * Collects all of the launch groups associated with the specified <code>ILaunchConfiguration</code> * @param config the config to collect launch groups for - * @return the listing of associated <code>ILaunchGroup</code>s for the specified <code>ILaunchConfiguration</code>, or + * @return the listing of associated <code>ILaunchGroup</code>s for the specified <code>ILaunchConfiguration</code>, or * an empty listing, never <code>null</code> - * @since 3.4 + * @since 3.4 */ private ILaunchGroup[] getAllGroupsForConfiguration(ILaunchConfiguration config) { ArrayList<ILaunchGroup> list = new ArrayList<ILaunchGroup>(); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchAsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchAsAction.java index 5f563daea..98d80bc2d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchAsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchAsAction.java @@ -51,39 +51,39 @@ import org.eclipse.ui.activities.WorkbenchActivityHelper; */ @Deprecated public class LaunchAsAction extends Action implements IMenuCreator, IWorkbenchWindowPulldownDelegate2 { - + /** - * Cascading menu + * Cascading menu */ private Menu fCreatedMenu; - + /** - * Launch group identifier + * Launch group identifier */ private String fLaunchGroupIdentifier; - + /** * Presentation wrapper for this action */ private IAction fAction; - + /** * Creates a cascading menu action to populate with shortcuts in the given * launch group. - * + * * @param launchGroupIdentifier launch group identifier */ public LaunchAsAction(String launchGroupIdentifier) { super(); fLaunchGroupIdentifier = launchGroupIdentifier; ILaunchMode launchMode = DebugPlugin.getDefault().getLaunchManager().getLaunchMode(getMode()); - setText(launchMode.getLaunchAsLabel()); + setText(launchMode.getLaunchAsLabel()); setMenuCreator(this); } - + /** * Returns the launch group associated with this action. - * + * * @return the launch group associated with this action */ private LaunchGroupExtension getLaunchGroup() { @@ -97,7 +97,7 @@ public class LaunchAsAction extends Action implements IMenuCreator, IWorkbenchWi public void run() { //do nothing, this action just creates a cascading menu. } - + private void createAction(Menu parent, IAction action, int count) { StringBuffer label= new StringBuffer(); //add the numerical accelerator @@ -111,7 +111,7 @@ public class LaunchAsAction extends Action implements IMenuCreator, IWorkbenchWi ActionContributionItem item= new ActionContributionItem(action); item.fill(parent, -1); } - + /** * @see IMenuCreator#dispose() */ @@ -121,7 +121,7 @@ public class LaunchAsAction extends Action implements IMenuCreator, IWorkbenchWi getCreatedMenu().dispose(); } } - + /** * @see IMenuCreator#getMenu(Control) */ @@ -129,7 +129,7 @@ public class LaunchAsAction extends Action implements IMenuCreator, IWorkbenchWi public Menu getMenu(Control parent) { return null; } - + /** * @see IMenuCreator#getMenu(Menu) */ @@ -143,7 +143,7 @@ public class LaunchAsAction extends Action implements IMenuCreator, IWorkbenchWi initMenu(); return getCreatedMenu(); } - + private void fillMenu() { //Retrieve the current perspective and the registered shortcuts List<LaunchShortcutExtension> shortcuts = null; @@ -151,7 +151,7 @@ public class LaunchAsAction extends Action implements IMenuCreator, IWorkbenchWi if (activePerspID != null) { shortcuts = getLaunchConfigurationManager().getLaunchShortcuts(activePerspID, getCategory()); } - + // If NO shortcuts are listed in the current perspective, add ALL shortcuts // to avoid an empty cascading menu if (shortcuts == null || shortcuts.isEmpty()) { @@ -167,7 +167,7 @@ public class LaunchAsAction extends Action implements IMenuCreator, IWorkbenchWi } } } - + /** * Creates the menu for the action */ @@ -186,7 +186,7 @@ public class LaunchAsAction extends Action implements IMenuCreator, IWorkbenchWi } }); } - + /** * Add the shortcut to the menu. * @param mode the launch mode identifier @@ -202,11 +202,11 @@ public class LaunchAsAction extends Action implements IMenuCreator, IWorkbenchWi PlatformUI.getWorkbench().getHelpSystem().setHelp(action, helpContextId); } /*if (fKeyBindingService != null) { - fKeyBindingService.registerGlobalAction(action); + fKeyBindingService.registerGlobalAction(action); }*/ createAction(menu, action, menuCount); } - + /** * Return the ID of the currently active perspective, or <code>null</code> * if there is none. @@ -225,16 +225,16 @@ public class LaunchAsAction extends Action implements IMenuCreator, IWorkbenchWi } return null; } - + /** - * Returns the mode of this action - run or debug - * + * Returns the mode of this action - run or debug + * * @return the mode of this action - run or debug */ private String getMode() { return getLaunchGroup().getMode(); } - + /** * Returns the category of this action - possibly <code>null</code> * @@ -243,15 +243,15 @@ public class LaunchAsAction extends Action implements IMenuCreator, IWorkbenchWi private String getCategory() { return getLaunchGroup().getCategory(); } - + private Menu getCreatedMenu() { return fCreatedMenu; } - + private void setCreatedMenu(Menu createdMenu) { fCreatedMenu = createdMenu; } - + /** * Returns the launch configuration manager. * @@ -259,8 +259,8 @@ public class LaunchAsAction extends Action implements IMenuCreator, IWorkbenchWi */ private LaunchConfigurationManager getLaunchConfigurationManager() { return DebugUIPlugin.getDefault().getLaunchConfigurationManager(); - } - + } + /** * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow) */ @@ -288,7 +288,7 @@ public class LaunchAsAction extends Action implements IMenuCreator, IWorkbenchWi initialize(action); } } - + /** * Set the enabled state of the underlying action based on whether there are any * registered launch shortcuts for this launch mode. @@ -296,13 +296,13 @@ public class LaunchAsAction extends Action implements IMenuCreator, IWorkbenchWi */ private void initialize(IAction action) { fAction = action; - action.setEnabled(existsShortcutsForMode()); - } + action.setEnabled(existsShortcutsForMode()); + } /** * Return whether there are any registered launch shortcuts for * the mode of this action. - * + * * @return whether there are any registered launch shortcuts for * the mode of this action */ @@ -312,8 +312,8 @@ public class LaunchAsAction extends Action implements IMenuCreator, IWorkbenchWi if (ext.getModes().contains(getMode())) { return true; } - } + } return false; - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchShortcutsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchShortcutsAction.java index b184ebee9..99f5cf47d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchShortcutsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchShortcutsAction.java @@ -57,42 +57,42 @@ import org.eclipse.ui.activities.WorkbenchActivityHelper; * selection. This action is similar to <code>ContextualLaunchAction</code> * except this action is an <code>IAction</code> rather than an action * delegate. - * <p> + * <p> * This action appears in the main Run menu - * </p> + * </p> * <p> * Clients may subclass this class. * </p> * @since 3.1 */ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWorkbenchWindowPulldownDelegate2 { - + /** - * Cascading menu + * Cascading menu */ private Menu fCreatedMenu; - + /** * Launch group */ private ILaunchGroup fGroup; - + /** * Whether this actions enablement has been initialized */ private boolean fInitialized = false; - + /** * Creates a cascading menu action to populate with shortcuts in the given * launch group. - * + * * @param launchGroupIdentifier launch group identifier */ public LaunchShortcutsAction(String launchGroupIdentifier) { super(); fGroup = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(launchGroupIdentifier); ILaunchMode mode = DebugPlugin.getDefault().getLaunchManager().getLaunchMode(fGroup.getMode()); - setText(mode.getLaunchAsLabel()); + setText(mode.getLaunchAsLabel()); setMenuCreator(this); setEnabled(existsConfigTypesForMode()); } @@ -104,7 +104,7 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork public void run() { //do nothing, this action just creates a cascading menu. } - + /** * @see IMenuCreator#dispose() */ @@ -114,7 +114,7 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork fCreatedMenu.dispose(); } } - + /** * @see IMenuCreator#getMenu(Control) */ @@ -122,7 +122,7 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork public Menu getMenu(Control parent) { return null; } - + /** * @see IMenuCreator#getMenu(Menu) */ @@ -135,7 +135,7 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork initMenu(); return fCreatedMenu; } - + /** * @return an Evaluation context with default variable = selection */ @@ -153,10 +153,10 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork context.setAllowPluginActivation(true); context.addVariable("selection", list); //$NON-NLS-1$ return context; - } - + } + /** - * Fills the fly-out menu + * Fills the fly-out menu */ private void fillMenu() { IEvaluationContext context = createContext(); @@ -200,13 +200,13 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork } if (accelerator == 1) { // No shortcuts added. Add "none available" action. - IAction action= new Action(ActionMessages.LaunchShortcutsAction_1) {}; + IAction action= new Action(ActionMessages.LaunchShortcutsAction_1) {}; action.setEnabled(false); ActionContributionItem item= new ActionContributionItem(action); item.fill(fCreatedMenu, -1); } } - + /** * Returns the first element of the current selection * @param context the current evaluation context @@ -217,7 +217,7 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork List<?> list = (List<?>) context.getVariable("selection"); //$NON-NLS-1$ return (list.isEmpty() ? null : list.get(0)); } - + /** * Add the shortcut to the context menu's launch sub-menu. * @param mode the launch mode identifier @@ -246,7 +246,7 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork ActionContributionItem item= new ActionContributionItem(action); item.fill(menu, -1); } - + /** * Evaluate the enablement logic in the contextualLaunch * element description. A true result means that we should @@ -260,7 +260,7 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork Expression expr = ext.getContextualLaunchEnablementExpression(); return ext.evalEnablementExpression(context, expr); } - + /** * Creates the menu for the action */ @@ -279,16 +279,16 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork } }); } - + /** - * Returns the mode of this action - run or debug - * + * Returns the mode of this action - run or debug + * * @return the mode of this action - run or debug */ protected String getMode() { return fGroup.getMode(); } - + /** * Returns the launch configuration manager. * @@ -296,8 +296,8 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork */ private LaunchConfigurationManager getLaunchConfigurationManager() { return DebugUIPlugin.getDefault().getLaunchConfigurationManager(); - } - + } + /** * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow) */ @@ -326,7 +326,7 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork /** * Return whether there are any registered launch configuration types for * the mode of this action. - * + * * @return whether there are any registered launch configuration types for * the mode of this action */ @@ -337,7 +337,7 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork if (configType.supportsMode(getMode())) { return true; } - } + } return false; } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/OpenLaunchDialogAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/OpenLaunchDialogAction.java index 649542dfe..7cc212d90 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/OpenLaunchDialogAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/OpenLaunchDialogAction.java @@ -48,11 +48,11 @@ public class OpenLaunchDialogAction extends Action implements IActionDelegate2, * Launch group identifier */ private String fIdentifier; - + /** * Constructs an action that opens the launch configuration dialog in * the context of the specified launch group. - * + * * @param identifier unique identifier of a launch group extension */ public OpenLaunchDialogAction(String identifier) { @@ -65,7 +65,7 @@ public class OpenLaunchDialogAction extends Action implements IActionDelegate2, } PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.OPEN_LAUNCH_CONFIGURATION_ACTION); } - + /** * @see org.eclipse.jface.action.IAction#run() */ @@ -82,7 +82,7 @@ public class OpenLaunchDialogAction extends Action implements IActionDelegate2, int result = DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUIPlugin.getShell(), selection, fIdentifier); notifyResult(result == Window.OK); } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event) */ @@ -90,7 +90,7 @@ public class OpenLaunchDialogAction extends Action implements IActionDelegate2, public void runWithEvent(IAction action, Event event) { run(); } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ @@ -98,7 +98,7 @@ public class OpenLaunchDialogAction extends Action implements IActionDelegate2, public void run(IAction action) { run(); } - + /** * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose() */ @@ -114,11 +114,11 @@ public class OpenLaunchDialogAction extends Action implements IActionDelegate2, action.setEnabled(existsConfigTypesForMode()); } } - + /** * Return whether there are any registered launch configuration types for * the mode of this action. - * + * * @return whether there are any registered launch configuration types for * the mode of this action */ @@ -129,25 +129,25 @@ public class OpenLaunchDialogAction extends Action implements IActionDelegate2, if (configType.supportsMode(getMode())) { return true; } - } + } return false; } - + /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow) */ @Override public void init(IWorkbenchWindow window) {} - + /** * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) */ @Override public void selectionChanged(IAction action, ISelection selection) {} - + /** * Returns the launch mode for this action. - * + * * @return launch mode */ private String getMode() { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RelaunchLastAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RelaunchLastAction.java index 3de0d7217..2e3c700be 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RelaunchLastAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/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
@@ -48,7 +48,7 @@ import com.ibm.icu.text.MessageFormat; /**
* Re-launches the last launch.
- *
+ *
* @see ContextRunner
* @see ILaunchConfiguration
* @see RunLastAction
@@ -69,11 +69,11 @@ public abstract class RelaunchLastAction implements IWorkbenchWindowActionDelega }
}
}
-
+
private Listener fListener = new Listener();
private IWorkbenchWindow fWorkbenchWindow;
private IAction fAction;
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
*/
@@ -150,17 +150,17 @@ public abstract class RelaunchLastAction implements IWorkbenchWindowActionDelega DebugUITools.launch(configuration, getMode(), isShift);
} else {
String configName = configuration.getName();
- String title = ActionMessages.RelaunchLastAction_Cannot_relaunch_1;
+ String title = ActionMessages.RelaunchLastAction_Cannot_relaunch_1;
String message = MessageFormat.format(ActionMessages.RelaunchLastAction_Cannot_relaunch___0___because_it_does_not_support__2__mode_2, new Object[] {
configName, getMode() });
- MessageDialog.openError(getShell(), title, message);
+ MessageDialog.openError(getShell(), title, message);
}
} else {
// If the history is empty, just open the launch config dialog
openLaunchConfigurationDialog();
}
} catch (CoreException ce) {
- DebugUIPlugin.errorDialog(getShell(), ActionMessages.RelaunchLastAction_Error_relaunching_3, ActionMessages.RelaunchLastAction_Error_encountered_attempting_to_relaunch_4, ce); //
+ DebugUIPlugin.errorDialog(getShell(), ActionMessages.RelaunchLastAction_Error_relaunching_3, ActionMessages.RelaunchLastAction_Error_encountered_attempting_to_relaunch_4, ce); //
}
}
@@ -172,11 +172,11 @@ public abstract class RelaunchLastAction implements IWorkbenchWindowActionDelega if (dwindow == null) {
return;
}
- LaunchConfigurationsDialog dialog = new LaunchConfigurationsDialog(DebugUIPlugin.getShell(), DebugUIPlugin.getDefault().getLaunchConfigurationManager().getDefaultLaunchGroup(getMode()));
+ LaunchConfigurationsDialog dialog = new LaunchConfigurationsDialog(DebugUIPlugin.getShell(), DebugUIPlugin.getDefault().getLaunchConfigurationManager().getDefaultLaunchGroup(getMode()));
dialog.setOpenMode(LaunchConfigurationsDialog.LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_LAST_LAUNCHED);
dialog.open();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
*/
@@ -184,9 +184,9 @@ public abstract class RelaunchLastAction implements IWorkbenchWindowActionDelega public void selectionChanged(IAction action, ISelection selection){
if (fAction == null) {
initialize(action);
- }
+ }
}
-
+
/**
* Set the enabled state of the underlying action based on whether there are any
* registered launch configuration types that understand how to launch in the
@@ -209,11 +209,11 @@ public abstract class RelaunchLastAction implements IWorkbenchWindowActionDelega }
}
}
-
+
/**
* Return whether there are any registered launch configuration types for
* the mode of this action.
- *
+ *
* @return whether there are any registered launch configuration types for
* the mode of this action
*/
@@ -224,10 +224,10 @@ public abstract class RelaunchLastAction implements IWorkbenchWindowActionDelega if (configType.supportsMode(getMode())) {
return true;
}
- }
+ }
return false;
}
-
+
/**
* Return the last launch that occurred in the workspace.
* @return the filtered last launch
@@ -235,54 +235,54 @@ public abstract class RelaunchLastAction implements IWorkbenchWindowActionDelega protected ILaunchConfiguration getLastLaunch() {
return DebugUIPlugin.getDefault().getLaunchConfigurationManager().getFilteredLastLaunch(getLaunchGroupId());
}
-
+
/**
* Returns the parent shell for this menu item
- *
+ *
* @return the parent shell
*/
protected Shell getShell() {
return fWorkbenchWindow.getShell();
}
-
+
/**
* Returns the mode (run or debug) of this action.
- * @return the mode
+ * @return the mode
*/
protected abstract String getMode();
-
+
/**
* Returns the launch group id of this action.
- *
+ *
* @return the launch group id
*/
- protected abstract String getLaunchGroupId();
+ protected abstract String getLaunchGroupId();
/**
* Returns the text to display on the menu item.
- *
+ *
* @return the text for the menu item
*/
protected abstract String getText();
-
+
/**
* Returns the text to display in the menu item tooltip
- *
+ *
* @return the text for the tooltip
*/
protected abstract String getTooltipText();
-
+
/**
* Returns the command id this action is associated with.
- *
+ *
* @return command id
*/
protected abstract String getCommandId();
-
+
/**
* Returns a description for this action (to associate with command).
- *
+ *
* @return command description
*/
- protected abstract String getDescription();
+ protected abstract String getDescription();
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerBreakpointAction.java index c48abc8d4..754a3b297 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerBreakpointAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerBreakpointAction.java @@ -34,14 +34,14 @@ import org.eclipse.ui.texteditor.SimpleMarkerAnnotation; * @since 3.2 */ public abstract class RulerBreakpointAction extends Action { - + private ITextEditor fEditor; private IVerticalRulerInfo fRulerInfo; - + /** * Constructs an action to work on breakpoints in the specified * text editor with the specified vertical ruler information. - * + * * @param editor text editor * @param info vertical ruler information */ @@ -53,7 +53,7 @@ public abstract class RulerBreakpointAction extends Action { /** * Returns the breakpoint at the last line of mouse activity in the ruler * or <code>null</code> if none. - * + * * @return breakpoint associated with activity in the ruler or <code>null</code> */ protected IBreakpoint getBreakpoint() { @@ -85,19 +85,19 @@ public abstract class RulerBreakpointAction extends Action { } return null; } - + /** * Returns the editor this action was created for. - * + * * @return editor */ protected ITextEditor getEditor() { return fEditor; } - + /** * Returns the vertical ruler information this action was created for. - * + * * @return vertical ruler information */ protected IVerticalRulerInfo getVerticalRulerInfo() { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerBreakpointTypesActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerBreakpointTypesActionDelegate.java index 05ad9edd1..50a721dc2 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerBreakpointTypesActionDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerBreakpointTypesActionDelegate.java @@ -1,13 +1,13 @@ /******************************************************************************* * Copyright (c) 2005, 2013 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials + * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation - * Wind River Systems - adapted action to use for breakpoint types + * Wind River Systems - adapted action to use for breakpoint types ******************************************************************************/ package org.eclipse.debug.ui.actions; @@ -39,15 +39,15 @@ import org.eclipse.ui.texteditor.ITextEditor; import org.eclipse.ui.texteditor.ITextEditorExtension; /** - * Breakpoint ruler pop-up action that creates a sub-menu to select the currently - * active breakpoint type. This action delegate can be contributed to an editor - * with the <code>editorActions</code> extension point. The breakpoint types are + * Breakpoint ruler pop-up action that creates a sub-menu to select the currently + * active breakpoint type. This action delegate can be contributed to an editor + * with the <code>editorActions</code> extension point. The breakpoint types are * calculated based on the toggle breakpoint target factories contributed through * the <code>toggleBreakpointsTargetFactories</code> extension point. * <p> * Following is example plug-in XML used to contribute this action to an editor's - * vertical ruler context menu. It uses the <code>popupMenus</code> extension - * point, by referencing the ruler's context menu identifier in the + * vertical ruler context menu. It uses the <code>popupMenus</code> extension + * point, by referencing the ruler's context menu identifier in the * <code>targetID</code> attribute. * <pre> * <extension point="org.eclipse.ui.popupMenus"> @@ -71,7 +71,7 @@ import org.eclipse.ui.texteditor.ITextEditorExtension; * @see IToggleBreakpointsTargetFactory * @noextend This class is not intended to be subclassed by clients. * @since 3.5 - * + * * @deprecated Should use BreakpointTypesContribution instead. */ @Deprecated @@ -80,12 +80,12 @@ public class RulerBreakpointTypesActionDelegate implements IEditorActionDelegate private IAction fCallerAction = null; private IVerticalRulerInfo fRulerInfo; private ISelection fSelection; - + /** * The menu created by this action */ private Menu fMenu; - + private class SelectTargetAction extends Action { private final Set<String> fPossibleIDs; private final String fID; @@ -104,23 +104,23 @@ public class RulerBreakpointTypesActionDelegate implements IEditorActionDelegate } } - + @Override public void selectionChanged(IAction action, ISelection selection) { // In the editor we're not using the selection. } - + @Override public void run(IAction action) { // Do nothing, this is a pull-down menu. } - + /* (non-Javadoc) * @see org.eclipse.ui.IEditorActionDelegate#setActiveEditor(org.eclipse.jface.action.IAction, org.eclipse.ui.IEditorPart) */ @Override public void setActiveEditor(IAction callerAction, IEditorPart targetEditor) { - // Clean up old editor data. + // Clean up old editor data. if (fCallerAction != null) { fCallerAction.setMenuCreator(null); } @@ -128,13 +128,13 @@ public class RulerBreakpointTypesActionDelegate implements IEditorActionDelegate ((ITextEditorExtension) fEditor).removeRulerContextMenuListener(this); } fRulerInfo = null; - + // Set up new editor data. fCallerAction = callerAction; fCallerAction.setMenuCreator(this); - + fEditor= targetEditor == null ? null : targetEditor.getAdapter(ITextEditor.class); - + if (fEditor != null) { if (fEditor instanceof ITextEditorExtension) { ((ITextEditorExtension) fEditor).addRulerContextMenuListener(this); @@ -160,7 +160,7 @@ public class RulerBreakpointTypesActionDelegate implements IEditorActionDelegate public void menuAboutToShow(IMenuManager manager) { fSelection = StructuredSelection.EMPTY; if (fEditor != null && fRulerInfo != null) { - + IDocumentProvider provider = fEditor.getDocumentProvider(); if (provider != null) { IDocument document = provider.getDocument(fEditor.getEditorInput()); @@ -172,18 +172,18 @@ public class RulerBreakpointTypesActionDelegate implements IEditorActionDelegate } catch (BadLocationException e) {} } } - ToggleBreakpointsTargetManager toggleTargetManager = ToggleBreakpointsTargetManager.getDefault(); + ToggleBreakpointsTargetManager toggleTargetManager = ToggleBreakpointsTargetManager.getDefault(); Set<String> enabledIDs = toggleTargetManager.getEnabledToggleBreakpointsTargetIDs(fEditor, fSelection); fCallerAction.setEnabled(enabledIDs.size() > 0); } else { fCallerAction.setEnabled(false); } - + } - + /** * Sets this action's drop-down menu, disposing the previous menu. - * + * * @param menu the new menu */ private void setMenu(Menu menu) { @@ -208,14 +208,14 @@ public class RulerBreakpointTypesActionDelegate implements IEditorActionDelegate initMenu(); return fMenu; } - + /** * Fills the drop-down menu with enabled toggle breakpoint targets - * + * * @param menu the menu to fill */ private void fillMenu(Menu menu) { - ToggleBreakpointsTargetManager manager = ToggleBreakpointsTargetManager.getDefault(); + ToggleBreakpointsTargetManager manager = ToggleBreakpointsTargetManager.getDefault(); Set<String> enabledIDs = manager.getEnabledToggleBreakpointsTargetIDs(fEditor, fSelection); String preferredId = manager.getPreferredToggleBreakpointsTargetID(fEditor, fSelection); for (String id : enabledIDs) { @@ -225,7 +225,7 @@ public class RulerBreakpointTypesActionDelegate implements IEditorActionDelegate } ActionContributionItem item= new ActionContributionItem(action); item.fill(menu, -1); - } + } } /** diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerEnableDisableBreakpointActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerEnableDisableBreakpointActionDelegate.java index b41960f02..c9c9a161d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerEnableDisableBreakpointActionDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerEnableDisableBreakpointActionDelegate.java @@ -36,7 +36,7 @@ import org.eclipse.ui.texteditor.ITextEditor; * </pre> * </p> * <p> - * Clients may refer to this class as an action delegate in plug-in XML. + * Clients may refer to this class as an action delegate in plug-in XML. * </p> * @since 3.2 * @noextend This class is not intended to be subclassed by clients. diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerToggleBreakpointActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerToggleBreakpointActionDelegate.java index fba8e40ce..4aade5a7c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerToggleBreakpointActionDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerToggleBreakpointActionDelegate.java @@ -22,7 +22,7 @@ import org.eclipse.ui.texteditor.AbstractRulerActionDelegate; import org.eclipse.ui.texteditor.ITextEditor; /** - * Toggles a breakpoint when ruler is double-clicked. This action delegate can be + * Toggles a breakpoint when ruler is double-clicked. This action delegate can be * contributed to an editor with the <code>editorActions</code> extension point. * This action is as a factory that creates another action that performs the * actual breakpoint toggling. The created action acts on the editor's @@ -30,7 +30,7 @@ import org.eclipse.ui.texteditor.ITextEditor; * <p> * Following is example plug-in XML used to contribute this action to an editor. * Note that the label attribute of this action is not displayed in the editor. - * Instead, the label of the created action is displayed. + * Instead, the label of the created action is displayed. * <pre> * <extension point="org.eclipse.ui.editorActions"> * <editorContribution @@ -65,14 +65,14 @@ import org.eclipse.ui.texteditor.ITextEditor; * </pre> * </p> * <p> - * Clients may refer to this class as an action delegate in plug-in XML. + * Clients may refer to this class as an action delegate in plug-in XML. * </p> * @since 3.1 * @noextend This class is not intended to be subclassed by clients. * @noinstantiate This class is not intended to be instantiated by clients. */ public class RulerToggleBreakpointActionDelegate extends AbstractRulerActionDelegate implements IActionDelegate2 { - + private IEditorPart fEditor = null; private ToggleBreakpointAction fDelegate = null; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunAction.java index ed3a12692..57c570c5c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunAction.java @@ -26,7 +26,7 @@ import org.eclipse.debug.ui.IDebugUIConstants; * @since 2.0 */ public final class RunAction extends ExecutionAction { - + public RunAction() { super(IDebugUIConstants.ID_RUN_LAUNCH_GROUP); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineActionDelegate.java index 0372d40f3..7f687386c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineActionDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineActionDelegate.java @@ -45,7 +45,7 @@ import org.eclipse.ui.IWorkbenchWindow; * an appropriate <code>IRunToLineTarget</code> adapter. * <p> * Clients may reference/contribute this class as an action delegate - * in plug-in XML. + * in plug-in XML. * </p> * <p> * Since 3.1, this action also implements {@link org.eclipse.ui.IViewActionDelegate}. @@ -55,13 +55,13 @@ import org.eclipse.ui.IWorkbenchWindow; * @noinstantiate This class is not intended to be instantiated by clients. */ public class RunToLineActionDelegate implements IEditorActionDelegate, IActionDelegate2, IViewActionDelegate { - + private IWorkbenchPart fActivePart = null; private IRunToLineTarget fPartTarget = null; private IAction fAction = null; private DebugContextListener fContextListener = new DebugContextListener(); private ISuspendResume fTargetElement = null; - + class DebugContextListener implements IDebugContextListener { protected void contextActivated(ISelection selection) { @@ -80,9 +80,9 @@ public class RunToLineActionDelegate implements IEditorActionDelegate, IActionDe public void debugContextChanged(DebugContextEvent event) { contextActivated(event.getContext()); } - - } - + + } + /*(non-Javadoc) * @see org.eclipse.ui.IActionDelegate2#dispose() */ @@ -91,7 +91,7 @@ public class RunToLineActionDelegate implements IEditorActionDelegate, IActionDe DebugUITools.getDebugContextManager().getContextService(fActivePart.getSite().getWorkbenchWindow()).removeDebugContextListener(fContextListener); fActivePart = null; fPartTarget = null; - + } /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) @@ -102,7 +102,7 @@ public class RunToLineActionDelegate implements IEditorActionDelegate, IActionDe try { fPartTarget.runToLine(fActivePart, fActivePart.getSite().getSelectionProvider().getSelection(), fTargetElement); } catch (CoreException e) { - DebugUIPlugin.errorDialog(fActivePart.getSite().getWorkbenchWindow().getShell(), ActionMessages.RunToLineAction_0, ActionMessages.RunToLineAction_1, e.getStatus()); // + DebugUIPlugin.errorDialog(fActivePart.getSite().getWorkbenchWindow().getShell(), ActionMessages.RunToLineAction_0, ActionMessages.RunToLineAction_1, e.getStatus()); // } } } @@ -114,7 +114,7 @@ public class RunToLineActionDelegate implements IEditorActionDelegate, IActionDe this.fAction = action; update(); } - + /* (non-Javadoc) * @see org.eclipse.ui.texteditor.IUpdate#update() */ @@ -136,20 +136,20 @@ public class RunToLineActionDelegate implements IEditorActionDelegate, IActionDe } } } - fAction.setEnabled(enabled); + fAction.setEnabled(enabled); } }; DebugUIPlugin.getStandardDisplay().asyncExec(r); } - + /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction) */ @Override public void init(IAction action) { - this.fAction = action; + this.fAction = action; if (action != null) { - action.setText(ActionMessages.RunToLineActionDelegate_4); + action.setText(ActionMessages.RunToLineActionDelegate_4); action.setImageDescriptor(DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_LCL_RUN_TO_LINE)); action.setDisabledImageDescriptor(DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_RUN_TO_LINE)); } @@ -167,9 +167,9 @@ public class RunToLineActionDelegate implements IEditorActionDelegate, IActionDe @Override public void setActiveEditor(IAction action, IEditorPart targetEditor) { init(action); - bindTo(targetEditor); + bindTo(targetEditor); } - + /* (non-Javadoc) * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart) */ @@ -177,10 +177,10 @@ public class RunToLineActionDelegate implements IEditorActionDelegate, IActionDe public void init(IViewPart view) { bindTo(view); } - + /** * Binds this action to operate on the given part's run to line adapter. - * + * * @param part the workbench part to bind this delegate to */ private void bindTo(IWorkbenchPart part) { @@ -205,6 +205,6 @@ public class RunToLineActionDelegate implements IEditorActionDelegate, IActionDe ISelection activeContext = service.getActiveContext(); fContextListener.contextActivated(activeContext); } - update(); + update(); } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineHandler.java index 7e6222cb4..e852dabde 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineHandler.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineHandler.java @@ -32,10 +32,10 @@ import org.eclipse.debug.ui.IDebugUIConstants; /** * Handles a run to line operation. Clients implementing a run to line action - * can use this handler to carry out a run to line operation implemented with + * can use this handler to carry out a run to line operation implemented with * a breakpoint. Handles the user preference to skip breakpoints while performing * a run to line operation, and cancelling the run to line operation if another - * breakpoint is encountered before the operation is completed. + * breakpoint is encountered before the operation is completed. * <p> * Clients may instantiate this class. * </p> @@ -43,15 +43,15 @@ import org.eclipse.debug.ui.IDebugUIConstants; * @noextend This class is not intended to be subclassed by clients. */ public class RunToLineHandler implements IDebugEventSetListener, IBreakpointManagerListener, IWorkspaceRunnable { - + private IDebugTarget fTarget; private ISuspendResume fResumee; private IBreakpoint fBreakpoint; private boolean fAutoSkip = false; - + /** * Constructs a handler to perform a run to line operation. - * + * * @param target the debug target in which the operation is to be performed * @param suspendResume the element to be resumed to begin the operation * @param breakpoint the run to line breakpoint @@ -86,7 +86,7 @@ public class RunToLineHandler implements IDebugEventSetListener, IBreakpointMana } } } - + } /* (non-Javadoc) @@ -97,15 +97,15 @@ public class RunToLineHandler implements IDebugEventSetListener, IBreakpointMana // if the user changes the breakpoint manager enablement, don't restore it fAutoSkip = false; } - + private IBreakpointManager getBreakpointManager() { return getDebugPlugin().getBreakpointManager(); } - + private DebugPlugin getDebugPlugin() { return DebugPlugin.getDefault(); } - + /** * Cancels the run to line operation. */ @@ -134,7 +134,7 @@ public class RunToLineHandler implements IDebugEventSetListener, IBreakpointMana getBreakpointManager().setEnabled(false); breakpointManager.addBreakpointManagerListener(this); } - Job job = new Job(ActionMessages.RunToLineHandler_0) { + Job job = new Job(ActionMessages.RunToLineHandler_0) { @Override protected IStatus run(IProgressMonitor jobMonitor) { if (!jobMonitor.isCanceled()) { @@ -147,9 +147,9 @@ public class RunToLineHandler implements IDebugEventSetListener, IBreakpointMana } } return Status.OK_STATUS; - } + } }; job.schedule(); } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleBreakpointAction.java index f41cad7f3..247eb9ba7 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleBreakpointAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleBreakpointAction.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 @@ -38,28 +38,28 @@ import org.eclipse.ui.texteditor.IUpdate; * adapter which may optionally be an instance of an * <code>IToggleBreakpointsTargetExtension</code>. * <p> - * Clients may instantiate this class. + * Clients may instantiate this class. * </p> * @since 3.1 * @see org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate * @noextend This class is not intended to be subclassed by clients. */ public class ToggleBreakpointAction extends Action implements IUpdate { - + private IWorkbenchPart fPart; private IDocument fDocument; private IVerticalRulerInfo fRulerInfo; private IToggleBreakpointsTargetManagerListener fListener = new IToggleBreakpointsTargetManagerListener() { @Override public void preferredTargetsChanged() { - update(); + update(); } }; /** * Constructs a new action to toggle a breakpoint in the given * part containing the given document and ruler. - * + * * @param part the part in which to toggle the breakpoint - provides * an <code>IToggleBreakpointsTarget</code> adapter * @param document the document breakpoints are being set in or @@ -74,7 +74,7 @@ public class ToggleBreakpointAction extends Action implements IUpdate { fRulerInfo = rulerInfo; DebugUITools.getToggleBreakpointsTargetManager().addChangedListener(fListener); } - + /* * (non-Javadoc) * @see org.eclipse.jface.action.IAction#run() @@ -83,7 +83,7 @@ public class ToggleBreakpointAction extends Action implements IUpdate { public void run() { doIt(null); } - + /* (non-Javadoc) * @see org.eclipse.jface.action.Action#runWithEvent(org.eclipse.swt.widgets.Event) */ @@ -91,11 +91,11 @@ public class ToggleBreakpointAction extends Action implements IUpdate { public void runWithEvent(Event event) { doIt(event); } - + /** * Delegate method to perform the toggling * @param event the event, possibly <code>null</code> - * + * * @since 3.8 */ void doIt(Event event) { @@ -107,7 +107,7 @@ public class ToggleBreakpointAction extends Action implements IUpdate { ITextSelection selection = getTextSelection(document, line); IToggleBreakpointsTarget target = DebugUITools.getToggleBreakpointsTargetManager().getToggleBreakpointsTarget(fPart, selection); if (target != null) { - IToggleBreakpointsTargetExtension2 ext = (IToggleBreakpointsTargetExtension2) + IToggleBreakpointsTargetExtension2 ext = (IToggleBreakpointsTargetExtension2) DebugPlugin.getAdapter(target, IToggleBreakpointsTargetExtension2.class); if (ext != null) { if(ext.canToggleBreakpointsWithEvent(fPart, selection, event)) { @@ -115,7 +115,7 @@ public class ToggleBreakpointAction extends Action implements IUpdate { return; } } - IToggleBreakpointsTargetExtension ext2 = (IToggleBreakpointsTargetExtension) + IToggleBreakpointsTargetExtension ext2 = (IToggleBreakpointsTargetExtension) DebugPlugin.getAdapter(target, IToggleBreakpointsTargetExtension.class); if(ext2 != null) { if (ext2.canToggleBreakpoints(fPart, selection)) { @@ -141,16 +141,16 @@ public class ToggleBreakpointAction extends Action implements IUpdate { } } } - + /** * Report an error to the user. - * + * * @param e underlying exception */ private void reportException(Exception e) { DebugUIPlugin.errorDialog(fPart.getSite().getShell(), ActionMessages.ToggleBreakpointAction_1, ActionMessages.ToggleBreakpointAction_2, e); // } - + /** * Disposes this action. Clients must call this method when * this action is no longer needed. @@ -164,28 +164,28 @@ public class ToggleBreakpointAction extends Action implements IUpdate { /** * Returns the document on which this action operates. - * + * * @return the document or <code>null</code> if none */ private IDocument getDocument() { if (fDocument != null) return fDocument; - + if (fPart instanceof ITextEditor) { ITextEditor editor= (ITextEditor)fPart; IDocumentProvider provider = editor.getDocumentProvider(); if (provider != null) return provider.getDocument(editor.getEditorInput()); } - + IDocument doc = fPart.getAdapter(IDocument.class); if (doc != null) { return doc; } - + return null; } - + /* (non-Javadoc) * @see org.eclipse.ui.texteditor.IUpdate#update() */ @@ -197,8 +197,8 @@ public class ToggleBreakpointAction extends Action implements IUpdate { if (line > -1) { try { ITextSelection selection = getTextSelection(document, line); - - IToggleBreakpointsTarget adapter = + + IToggleBreakpointsTarget adapter = ToggleBreakpointsTargetManager.getDefault().getToggleBreakpointsTarget(fPart, selection); if (adapter == null) { setEnabled(false); @@ -213,7 +213,7 @@ public class ToggleBreakpointAction extends Action implements IUpdate { } if (adapter.canToggleLineBreakpoints(fPart, selection) || adapter.canToggleWatchpoints(fPart, selection) || - adapter.canToggleMethodBreakpoints(fPart, selection)) + adapter.canToggleMethodBreakpoints(fPart, selection)) { setEnabled(true); return; @@ -228,9 +228,9 @@ public class ToggleBreakpointAction extends Action implements IUpdate { /** * Determines the text selection for the breakpoint action. If clicking on the ruler inside - * the highlighted text, return the text selection for the highlighted text. Otherwise, + * the highlighted text, return the text selection for the highlighted text. Otherwise, * return a text selection representing the start of the line. - * + * * @param document The IDocument backing the Editor. * @param line The line clicked on in the ruler. * @return An ITextSelection as described. @@ -246,7 +246,7 @@ public class ToggleBreakpointAction extends Action implements IUpdate { && ((ITextSelection) selection).getStartLine() <= line && ((ITextSelection) selection).getEndLine() >= line) { textSelection = (ITextSelection) selection; - } + } } return textSelection; } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleMethodBreakpointActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleMethodBreakpointActionDelegate.java index aeed58b01..9c289afa6 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleMethodBreakpointActionDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleMethodBreakpointActionDelegate.java @@ -21,7 +21,7 @@ import org.eclipse.ui.IWorkbenchPart; * that provide an <code>IToggleBreakpointsTarget</code> adapter. * <p> * Clients may reference/contribute this class as an object contribution - * action delegate in plug-in XML. + * action delegate in plug-in XML. * </p> * @since 3.0 * @noextend This class is not intended to be subclassed by clients. diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleWatchpointActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleWatchpointActionDelegate.java index ac1bdd8a3..475ddfb7e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleWatchpointActionDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleWatchpointActionDelegate.java @@ -21,7 +21,7 @@ import org.eclipse.ui.IWorkbenchPart; * that provide an <code>IToggleBreakpointsTarget</code> adapter. * <p> * Clients may reference/contribute this class as an object contribution - * action delegate in plug-in XML. + * action delegate in plug-in XML. * </p> * @since 3.0 * @noextend This class is not intended to be subclassed by clients. diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/ConsoleColorProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/ConsoleColorProvider.java index 62b9b5e13..c01932885 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/ConsoleColorProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/ConsoleColorProvider.java @@ -30,7 +30,7 @@ public class ConsoleColorProvider implements IConsoleColorProvider { private IProcess fProcess; private IConsole fConsole; - + /* (non-Javadoc) * @see org.eclipse.debug.ui.console.IConsoleColorProvider#connect(org.eclipse.debug.core.model.IProcess, org.eclipse.debug.ui.console.IConsole) */ @@ -39,7 +39,7 @@ public class ConsoleColorProvider implements IConsoleColorProvider { fProcess = process; fConsole = console; IStreamsProxy streamsProxy = fProcess.getStreamsProxy(); - if (streamsProxy != null) { + if (streamsProxy != null) { fConsole.connect(streamsProxy); } } @@ -71,28 +71,28 @@ public class ConsoleColorProvider implements IConsoleColorProvider { } if (IDebugUIConstants.ID_STANDARD_ERROR_STREAM.equals(streamIdentifer)) { return DebugUIPlugin.getPreferenceColor(IDebugPreferenceConstants.CONSOLE_SYS_ERR_COLOR); - } + } if (IDebugUIConstants.ID_STANDARD_INPUT_STREAM.equals(streamIdentifer)) { return DebugUIPlugin.getPreferenceColor(IDebugPreferenceConstants.CONSOLE_SYS_IN_COLOR); - } + } return null; } /** * Returns the process this color provider is providing color for, or * <code>null</code> if none. - * + * * @return the process this color provider is providing color for, or * <code>null</code> if none */ protected IProcess getProcess() { return fProcess; } - + /** * Returns the console this color provider is connected to, or * <code>null</code> if none. - * + * * @return IConsole the console this color provider is connected to, or * <code>null</code> if none */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/FileLink.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/FileLink.java index 32962f107..47d67bc34 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/FileLink.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/FileLink.java @@ -49,10 +49,10 @@ public class FileLink implements IConsoleHyperlink { private int fFileLength; private int fFileLineNumber; private String fEditorId; - + /** * Constructs a hyperlink to the specified file. - * + * * @param file the file to open when activated * @param editorId the identifier of the editor to open the file in, or * <code>null</code> if the default editor should be used @@ -117,7 +117,7 @@ public class FileLink implements IConsoleHyperlink { } } catch (PartInitException e) { DebugUIPlugin.log(e); - } + } } } } @@ -135,7 +135,7 @@ public class FileLink implements IConsoleHyperlink { @Override public void linkExited() { } - + private String getEditorId() { if (fEditorId == null) { IWorkbench workbench= DebugUIPlugin.getDefault().getWorkbench(); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsole.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsole.java index 55f46ec24..02e131877 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsole.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsole.java @@ -35,21 +35,21 @@ public interface IConsole { * Connects this console to the given streams proxy. This associates the * standard in, out, and error streams with the console. Keyboard input will * be written to the given proxy. - * + * * @param streamsProxy the proxy to connect this console to */ public void connect(IStreamsProxy streamsProxy); - + /** * Connects this console to the given stream monitor, uniquely identified by * the given identifier. This allows for more than the standard (in, out, * error) streams to be connected to the console. - * + * * @param streamMonitor the monitor to connect this console to * @param streamIdentifer the stream identifier to connect this console to */ public void connect(IStreamMonitor streamMonitor, String streamIdentifer); - + /** * Adds the given hyperlink to this console. The link will be notified when * entered, exited, and activated. @@ -58,7 +58,7 @@ public interface IConsole { * current bounds, it is added immediately. Otherwise, the link is added * when the console's document grows to contain the link's region. * </p> - * @param link the hyperlink to add + * @param link the hyperlink to add * @param offset the character offset within the console document where the * text associated with the hyperlink begins * @param length the length of the associated hyperlink text @@ -75,19 +75,19 @@ public interface IConsole { * current bounds, it is added immediately. Otherwise, the link is added * when the console's document grows to contain the link's region. * </p> - * @param link the hyperlink to add + * @param link the hyperlink to add * @param offset the character offset within the console document where the * text associated with the hyperlink begins * @param length the length of the associated hyperlink text * @since 3.1 */ public void addLink(IHyperlink link, int offset, int length); - + /** * Returns the region of text associated with the given hyperlink, or * <code>null</code> if the given hyperlink is not contained in this * console. - * + * * @param link a console hyperlink * @return region of text associated with the hyperlink, or <code>null</code> * @deprecated replaced with getRegion(IHyperlink link) instead @@ -99,27 +99,27 @@ public interface IConsole { * Returns the region of text associated with the given hyperlink, or * <code>null</code> if the given hyperlink is not contained in this * console. - * + * * @param link a console hyperlink * @return region of text associated with the hyperlink, or <code>null</code> * @since 3.1 */ public IRegion getRegion(IHyperlink link); - + /** * Returns the document associated with this console. - * + * * @return document */ - public IDocument getDocument(); - + public IDocument getDocument(); + /** * Returns the process associated with this console. - * + * * @return the process associated with this console */ public IProcess getProcess(); - + /** * Adds the given pattern match listener to this console. The listener will * be connected and receive match notifications. @@ -127,18 +127,18 @@ public interface IConsole { * @since 3.1 */ public void addPatternMatchListener(IPatternMatchListener matchListener); - + /** * Removes the given pattern match listener from this console. The listener will be - * disconnected and will no longer receive match notifications. + * disconnected and will no longer receive match notifications. * @param matchListener the pattern match listener to remove. * @since 3.1 */ public void removePatternMatchListener(IPatternMatchListener matchListener); - + /** * Returns the stream associated with the specified stream identifier. - * @param streamIdentifier Uniquely identifies the required stream + * @param streamIdentifier Uniquely identifies the required stream * @return The stream or <code>null</code> if none found with matching streamIdentifier * @since 3.1 */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleColorProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleColorProvider.java index aa81dd793..523fe79a9 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleColorProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleColorProvider.java @@ -28,7 +28,7 @@ import org.eclipse.swt.graphics.Color; * provider extension. * <pre> * <extension point="org.eclipse.debug.ui.consoleColorProviders"> - * <consoleColorProvider + * <consoleColorProvider * id="com.example.ExampleConsoleColorProvider" * class="com.example.ExampleConsoleColorProviderClass" * processType="ExampleProcessType"> @@ -44,7 +44,7 @@ import org.eclipse.swt.graphics.Color; * this content provider is associated with (which corresponds to the * <code>ATTR_PROCESS_TYPE</code> attribute on a process).</li> * </ul> - * </p> + * </p> * <p> * Clients may implement this interface. * </p> @@ -57,30 +57,30 @@ public interface IConsoleColorProvider { * Returns whether the console associated with this color provider's * process can currently accept keyboard input. This attribute is dynamic * and may change over the lifetime of a process/document. - * + * * @return whether the console associated with this color provider's * process can currently accept keyboard input */ public boolean isReadOnly(); - + /** * Returns the color to draw output associated with the given stream. - * + * * @param streamIdentifer the identifier of the stream * @return Color */ public Color getColor(String streamIdentifer); - + /** * Connects this color provider to the given process and console. * This color provider should connect its streams to the given console * document. - * + * * @param process the process to connect this color provider to * @param console the console to connect this color provider to */ public void connect(IProcess process, IConsole console); - + /** * Disconnects this color provider. */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleHyperlink.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleHyperlink.java index bf7ccf74c..b50537ad3 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleHyperlink.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleHyperlink.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,7 +22,7 @@ import org.eclipse.ui.console.IHyperlink; * Since 3.1, this interface now extends * {@link org.eclipse.ui.console.IHyperlink}. * </p> - * + * * @since 2.1 * @deprecated replaced by org.eclipse.ui.console.IHyperlink */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleLineTracker.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleLineTracker.java index a518818c9..5330f11a6 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleLineTracker.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleLineTracker.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.jface.text.IRegion; * extension. * <pre> * <extension point="org.eclipse.debug.ui.consoleLineTrackers"> - * <consoleLineTracker + * <consoleLineTracker * id="com.example.ExampleConsoleLineTracker" * class="com.example.ExampleConsoleLineTrackerClass" * processType="ExampleProcessType"> @@ -42,11 +42,11 @@ import org.eclipse.jface.text.IRegion; * @since 2.1 */ public interface IConsoleLineTracker { - + /** * Notification that a console document has been created for which this - * listener is registered. - * + * listener is registered. + * * @param console console that has been created */ public void init(IConsole console); @@ -55,14 +55,14 @@ public interface IConsoleLineTracker { * Notification that a line of text has been appended to the console. The * given region describes the offset and length of the line appended to the * console, excluding the line delimiter. - * + * * @param line region describing the offset and length of line appended to * the console, excluding the line delimiter */ public void lineAppended(IRegion line); - + /** - * Disposes this console line tracker. + * Disposes this console line tracker. */ public void dispose(); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleLineTrackerExtension.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleLineTrackerExtension.java index e8c61ad90..7d72f56fe 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleLineTrackerExtension.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleLineTrackerExtension.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,11 +19,11 @@ package org.eclipse.debug.ui.console; * @since 3.0 */ public interface IConsoleLineTrackerExtension extends IConsoleLineTracker { - + /** * Notification that all output streams connected to the console have been * closed. No more lines will be appended after this method is called. */ public void consoleClosed(); - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/AbstractDebugContextProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/AbstractDebugContextProvider.java index e19bd7991..3f1824d80 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/AbstractDebugContextProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/AbstractDebugContextProvider.java @@ -24,20 +24,20 @@ import org.eclipse.ui.IWorkbenchPart; * @since 3.3 */ public abstract class AbstractDebugContextProvider implements IDebugContextProvider { - + /** * Event listeners */ private ListenerList<IDebugContextListener> fListeners = new ListenerList<>(); - + /** * Part or <code>null</code> */ private IWorkbenchPart fPart; - + /** * Constructs a context provider for the specified part, possibly <code>null</code>. - * + * * @param part workbench part or <code>null</code> */ public AbstractDebugContextProvider(IWorkbenchPart part) { @@ -70,7 +70,7 @@ public abstract class AbstractDebugContextProvider implements IDebugContextProvi /** * Fires the given context event to all registered listeners. - * + * * @param event debug context event */ protected void fire(final DebugContextEvent event) { @@ -86,7 +86,7 @@ public abstract class AbstractDebugContextProvider implements IDebugContextProvi DebugUIPlugin.log(exception); } }); - + } } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/DebugContextEvent.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/DebugContextEvent.java index 7cc2787d5..a8e116f05 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/DebugContextEvent.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/DebugContextEvent.java @@ -32,22 +32,22 @@ public class DebugContextEvent extends EventObject { * The context */ private ISelection fContext; - + /** * Change flags. */ private int fFlags; - + /** * Change constant (bit mask) indicating a context has been activated. */ public static final int ACTIVATED = 0x01; - + /** * Change constant (bit mask) indicating the state of a context has changed. * State changes are only broadcast for previously activated contexts. */ - public static final int STATE = 0x10; + public static final int STATE = 0x10; /** * Generated serial version UID for this class. @@ -56,7 +56,7 @@ public class DebugContextEvent extends EventObject { /** * Constructs a new debug context event. - * + * * @param source source of the event - a debug context provider * @param context the relevant context * @param flags bit mask indicating how the context has changed - see change constants @@ -67,29 +67,29 @@ public class DebugContextEvent extends EventObject { fContext = context; fFlags = flags; } - + /** * Returns the debug context associated with this event. - * + * * @return debug context, possible an empty selection */ public ISelection getContext() { return fContext; } - + /** * Returns flags which describe in more detail how a context has changed. * See change constants defined in this class. - * + * * @return event flags */ public int getFlags() { return fFlags; } - + /** * Returns the context provider that initiated this event. - * + * * @return context provider */ public IDebugContextProvider getDebugContextProvider() { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextListener.java index c55cfc83d..3163dd277 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextListener.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextListener.java @@ -23,10 +23,10 @@ package org.eclipse.debug.ui.contexts; * @since 3.3 */ public interface IDebugContextListener { - + /** * Notification the debug context has changed as specified by the given event. - * + * * @param event debug context event */ public void debugContextChanged(DebugContextEvent event); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextManager.java index 61f12e46d..5db67188e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextManager.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextManager.java @@ -21,7 +21,7 @@ import org.eclipse.ui.IWorkbenchWindow; * <p> * Clients register debug context providers with a context service - i.e. * for a specific window. - * </p> + * </p> * @see IDebugContextProvider * @see IDebugContextListener * @see IDebugContextService @@ -29,25 +29,25 @@ import org.eclipse.ui.IWorkbenchWindow; * @noimplement This interface is not intended to be implemented by clients. * @noextend This interface is not intended to be extended by clients. */ -public interface IDebugContextManager { - +public interface IDebugContextManager { + /** * Registers the given listener for debug context notification in all windows. - * + * * @param listener debug context listener - */ + */ public void addDebugContextListener(IDebugContextListener listener); - + /** * Unregisters the given listener for context notification in all windows. - * + * * @param listener debug context listener - */ + */ public void removeDebugContextListener(IDebugContextListener listener); - + /** * Returns the debug context service for the specified window. - * + * * @param window workbench window * @return debug context service */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider.java index f8a22f6db..579569f00 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider.java @@ -15,7 +15,7 @@ import org.eclipse.ui.IWorkbenchPart; /** * Interface common to all objects that provide a debug context. A context provider - * is registered with a debug context service associated with a specific window. + * is registered with a debug context service associated with a specific window. * <p> * A context provider can provide context information for a specific workbench part. * There can only be one context provider registered per part with a context @@ -26,9 +26,9 @@ import org.eclipse.ui.IWorkbenchPart; * A context provider does not have to be associated with a part. In this case the provider * specifies <code>null</code> for its part, and provides context information for the window. * There can only be one context provider without an associated part registered per context - * service (i.e. per window). A context provider that provides context without an associated + * service (i.e. per window). A context provider that provides context without an associated * part is only active (i.e. used to provide context information) when there are no other - * context providers with associated parts registered with that service. + * context providers with associated parts registered with that service. * </p> * <p> * Clients may implement this interface. @@ -39,32 +39,32 @@ import org.eclipse.ui.IWorkbenchPart; * @since 3.3 */ public interface IDebugContextProvider { - + /** * Returns the part associated with this context provider or <code>null</code> * if none. - * + * * @return part associated with this context provider or <code>null</code> */ public IWorkbenchPart getPart(); - + /** * Registers the given listener for debug context events. - * + * * @param listener event listener */ public void addDebugContextListener(IDebugContextListener listener); - + /** * Unregisters the given listener for debug context events. - * + * * @param listener event listener */ public void removeDebugContextListener(IDebugContextListener listener); - + /** * Returns the currently active context, possibly empty or <code>null</code>. - * + * * @return active context, possibly empty or <code>null</code>. */ public ISelection getActiveContext(); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider2.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider2.java index 48c8b1690..93176c3c7 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider2.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider2.java @@ -6,7 +6,7 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Patrick Chuong (Texas Instruments) - Allow multiple debug views and + * Patrick Chuong (Texas Instruments) - Allow multiple debug views and * multiple debug context providers (Bug 327263) *****************************************************************/ package org.eclipse.debug.ui.contexts; @@ -16,26 +16,26 @@ import org.eclipse.ui.IWorkbenchWindow; /** - * This extension to {@link IDebugContextProvider} allows clients to specify the scope that the context + * This extension to {@link IDebugContextProvider} allows clients to specify the scope that the context * provider will apply to. With {@link IDebugContextProvider2}, a provider indicate if it should be a context - * provider for the entire {@link IWorkbenchWindow} or only for is given {@link IWorkbenchPart}. - * + * provider for the entire {@link IWorkbenchWindow} or only for is given {@link IWorkbenchPart}. + * * <p> * This interface is intended to be implemented by clients * </p> - * + * * @since 3.7 */ public interface IDebugContextProvider2 extends IDebugContextProvider { /** - * Return whether the provider can be set as an active provider for the - * window. + * Return whether the provider can be set as an active provider for the + * window. * <p> - * If <code>true</code>, when the provider's part is + * If <code>true</code>, when the provider's part is * activated this provider will become the active debug context provider * for the whole window. If <code>false</code>, this provider will * only set the active context in a given workbench part. - * + * * @return <code>true</code> if this provider can act as the provider for the entire window, <code>false</code> if it can * only be the provider for its given part. * provider for a window. diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextService.java index 7b2a5d7fa..690c2ec7e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextService.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextService.java @@ -7,7 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation - * Patrick Chuong (Texas Instruments) - Allow multiple debug views and + * Patrick Chuong (Texas Instruments) - Allow multiple debug views and * multiple debug context providers (Bug 327263) *******************************************************************************/ package org.eclipse.debug.ui.contexts; @@ -15,7 +15,7 @@ package org.eclipse.debug.ui.contexts; import org.eclipse.jface.viewers.ISelection; -/** +/** * Debug context service for a window. Clients may register for debug context * notification with this service. A context service is obtained from the * debug context manager. @@ -25,156 +25,156 @@ import org.eclipse.jface.viewers.ISelection; * @noextend This interface is not intended to be extended by clients. */ public interface IDebugContextService { - + /** * Registers for the given listener for debug context change notification * in this service's window. - * + * * @param listener debug context listener */ public void addDebugContextListener(IDebugContextListener listener); /** * Unregisters for the given listener for debug context change notification * in this service's window. - * + * * @param listener debug context listener - */ + */ public void removeDebugContextListener(IDebugContextListener listener); - + /** * Registers for the given debug context listener for context notification * from the specified part in this service's window. - * + * * @param listener debug context listener * @param partId part identifier */ public void addDebugContextListener(IDebugContextListener listener, String partId); - + /** * Unregisters the given debug context listener for context change notification * from the specified part in this service's window. - * + * * @param listener debug context listener * @param partId part identifier */ public void removeDebugContextListener(IDebugContextListener listener, String partId); - + /** * Returns the active context in this service's window * or <code>null</code>. - * + * * @return active context or <code>null</code> */ public ISelection getActiveContext(); - + /** * Returns the active context in the specified part of this service's window * or <code>null</code> if none. - * + * * @param partId part identifier * @return active context or <code>null</code> */ public ISelection getActiveContext(String partId); - + /** * Registers the given debug context listener for post context change notification * in this service's window. Post listeners are notified of context changes after all - * non-post listeners are notified. - * + * non-post listeners are notified. + * * @param listener debug context listener */ public void addPostDebugContextListener(IDebugContextListener listener); - + /** * Unregisters the given debug context listener for post context change notification * in this service's window. - * + * * @param listener debug context listener. - */ + */ public void removePostDebugContextListener(IDebugContextListener listener); - + /** * Registers the given debug context listener for post context change notification * in the specified part of this service's window. Post listeners are notified of - * context changes after all non-post listeners are notified. - * + * context changes after all non-post listeners are notified. + * * @param listener debug context listener * @param partId part identifier */ public void addPostDebugContextListener(IDebugContextListener listener, String partId); - + /** * Unregisters the given debug context listener for post context change notification * in the specified part of this service's window. - * + * * @param listener debug context listener * @param partId part identifier */ public void removePostDebugContextListener(IDebugContextListener listener, String partId); - + /** * Registers the given debug context provider with this service. - * + * * @param provider debug context provider */ public void addDebugContextProvider(IDebugContextProvider provider); - + /** * Unregisters the given debug context provider from this service. - * + * * @param provider debug context provider */ public void removeDebugContextProvider(IDebugContextProvider provider); - + /** * Returns the active context in the specified part of this service's window * or <code>null</code> if none. - * + * * @param partId part identifier * @param partSecondaryId part secondary identifier * @return active context or <code>null</code> * @since 3.7 */ ISelection getActiveContext(String partId, String partSecondaryId); - + /** * Registers for the given debug context listener for context notification * from the specified part in this service's window. - * + * * @param listener debug context listener * @param partId part identifier * @param partSecondaryId part secondary identifier * @since 3.7 */ void addDebugContextListener(IDebugContextListener listener, String partId, String partSecondaryId); - + /** * Unregisters the given debug context listener for context change notification * from the specified part in this service's window. - * + * * @param listener debug context listener * @param partId part identifier * @param partSecondaryId part secondary identifier * @since 3.7 */ void removeDebugContextListener(IDebugContextListener listener, String partId, String partSecondaryId); - + /** * Registers the given debug context listener for post context change notification * in the specified part of this service's window. Post listeners are notified of - * context changes after all non-post listeners are notified. - * + * context changes after all non-post listeners are notified. + * * @param listener debug context listener * @param partSecondaryId part secondary identifier * @param partId part identifier * @since 3.7 */ void addPostDebugContextListener(IDebugContextListener listener, String partId, String partSecondaryId); - + /** * Unregisters the given debug context listener for post context change notification * in the specified part of this service's window. - * + * * @param listener debug context listener * @param partSecondaryId part secondary identifier * @param partId part identifier diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTrigger.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTrigger.java index 02477bf82..95762d321 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTrigger.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTrigger.java @@ -20,17 +20,17 @@ package org.eclipse.debug.ui.contexts; * preferences. The debug platform asks each registered launch for its suspend * trigger adapter or registers with the launch itself if it implements * <code>ISuspendTrigger</code>. - * </p> + * </p> * <p> * It is important that the same instance of a suspend trigger adapter is * returned each time it is asked for the same object, such that listeners * can be added and removed from the same instance. When a listener is removed * and no more listeners are registered, this trigger can be disposed or replaced - * with a new adapter the next time one is requested. + * with a new adapter the next time one is requested. * </p> * <p> * Clients may implement this interface. The debug platform provides a suspend trigger - * adapter for implementations of <code>ILaunch</code>. The implementation provided by + * adapter for implementations of <code>ILaunch</code>. The implementation provided by * the platform is based on a standard debug model that fires debug events. Clients * wishing to provide their own implementation must also provide their own implementation * of <code>ILaunch</code> (or subclass of <code>Launch</code>), in order to register @@ -40,19 +40,19 @@ package org.eclipse.debug.ui.contexts; * @since 3.3 */ public interface ISuspendTrigger { - + /** * Registers the given listener for suspend notifications. - * + * * @param listener suspend listener */ public void addSuspendTriggerListener(ISuspendTriggerListener listener); - + /** * Unregisters the given listener for suspend notifications. - * + * * @param listener suspend listener */ public void removeSuspendTriggerListener(ISuspendTriggerListener listener); - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTriggerListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTriggerListener.java index 393151e83..f701c5a9f 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTriggerListener.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTriggerListener.java @@ -26,11 +26,11 @@ import org.eclipse.debug.core.ILaunch; * @noextend This interface is not intended to be extended by clients. */ public interface ISuspendTriggerListener { - + /** * Notification the given launch has suspended at the * specified context. - * + * * @param launch the launch that has suspended * @param context the context on which the launch suspended */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractMemoryRendering.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractMemoryRendering.java index ab9dcdd90..938b6ac52 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractMemoryRendering.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractMemoryRendering.java @@ -7,7 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation - * Wind River - Bug 206407 AbstractMemoryRendering connect()s the wrong "this" + * Wind River - Bug 206407 AbstractMemoryRendering connect()s the wrong "this" *******************************************************************************/ package org.eclipse.debug.ui.memory; @@ -41,13 +41,13 @@ import org.eclipse.ui.IWorkbenchActionConstants; * Abstract implementation of a memory rendering. * <p> * To contribute an action to a rendering, an <code>objectContribution</code> can - * be used on a rendering implementation class itself using a + * be used on a rendering implementation class itself using a * <code>popupMenus</code> extension. Additionally, the context menu created * by <code>createPopupMenu()</code> is registered with an identifier of this * rendering's container identifier. Actions may also be contributed to the * container's context menu specifically by using a <code>viewerContribution</code> * on a <code>popupMenus</code> extension that has a <code>targetID</code> referring - * to this rendering container's identifier. + * to this rendering container's identifier. * </p> * <p> * Clients implementing memory renderings must subclass this class. @@ -62,7 +62,7 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements private boolean fVisible = true; private MenuManager fPopupMenuMgr; private String fRenderingId; - + private class ConnectionJob extends Job { Runnable fRunnable; @@ -79,25 +79,25 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements return Status.OK_STATUS; } } - + /** * Client may provide a label decorator adapter from its memory block * to decorate the label of a rendering. - * @since 3.2 + * @since 3.2 */ private ILabelDecorator fLabelDecorator; private IMenuListener fMenuListener; - + /** * Constructs a new rendering of the given type. - * + * * @param renderingId memory rendering type identifier */ public AbstractMemoryRendering(String renderingId) { fRenderingId = renderingId; } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.memory.IMemoryRendering#init(org.eclipse.debug.ui.memory.IMemoryRenderingSite, org.eclipse.debug.core.model.IMemoryBlock) */ @@ -105,7 +105,7 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements public void init(IMemoryRenderingContainer container, IMemoryBlock block) { fContainer = container; fMemoryBlock = block; - + fLabelDecorator = fMemoryBlock.getAdapter(ILabelDecorator.class); } @@ -121,11 +121,11 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements Runnable runnable = new Runnable(){ @Override public void run() { - ((IMemoryBlockExtension)fMemoryBlock).disconnect(AbstractMemoryRendering.this); + ((IMemoryBlockExtension)fMemoryBlock).disconnect(AbstractMemoryRendering.this); }}; new ConnectionJob(runnable).schedule(); } - + if (fPopupMenuMgr != null) { fPopupMenuMgr.removeMenuListener(fMenuListener); @@ -133,7 +133,7 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements fPopupMenuMgr.dispose(); fPopupMenuMgr = null; } - + if (fPropertyListeners != null) fPropertyListeners = null; } @@ -165,13 +165,13 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements @Override public void becomesVisible() { fVisible = true; - + if (fMemoryBlock instanceof IMemoryBlockExtension) { Runnable runnable = new Runnable(){ @Override public void run() { - ((IMemoryBlockExtension)fMemoryBlock).connect(AbstractMemoryRendering.this); + ((IMemoryBlockExtension)fMemoryBlock).connect(AbstractMemoryRendering.this); }}; new ConnectionJob(runnable).schedule(); } @@ -188,7 +188,7 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements Runnable runnable = new Runnable(){ @Override public void run() { - ((IMemoryBlockExtension)fMemoryBlock).disconnect(AbstractMemoryRendering.this); + ((IMemoryBlockExtension)fMemoryBlock).disconnect(AbstractMemoryRendering.this); }}; new ConnectionJob(runnable).schedule(); } @@ -216,10 +216,10 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements */ @Override public void addPropertyChangeListener(IPropertyChangeListener listener) { - + if (fPropertyListeners == null) fPropertyListeners = new ListenerList<>(); - + fPropertyListeners.add(listener); } @@ -228,7 +228,7 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements */ @Override public void removePropertyChangeListener(IPropertyChangeListener listener) { - + if (fPropertyListeners == null) return; fPropertyListeners.remove(listener); @@ -241,18 +241,18 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements public Image getImage() { return decorateImage(null); } - + /** * Decorates and returns this rendering's image. - * + * * @param image base image * @return decorated image * @since 3.2 - */ + */ protected Image decorateImage(Image image) { if (fLabelDecorator != null) return fLabelDecorator.decorateImage(image, this); - return image; + return image; } /* (non-Javadoc) @@ -263,26 +263,26 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements { if (fMemoryBlock == null) return IInternalDebugCoreConstants.EMPTY_STRING; - + StringBuffer label = new StringBuffer(IInternalDebugCoreConstants.EMPTY_STRING); - + if (fMemoryBlock instanceof IMemoryBlockExtension) { String expression = ((IMemoryBlockExtension)fMemoryBlock).getExpression(); - + if (expression == null) expression = IInternalDebugCoreConstants.EMPTY_STRING; - + label.append(expression); - + if (expression.startsWith("&")) //$NON-NLS-1$ - label.insert(0, "&"); //$NON-NLS-1$ - + label.insert(0, "&"); //$NON-NLS-1$ + // show full address if the rendering is visible // hide address if the rendering is invisible try { if (fVisible && ((IMemoryBlockExtension)fMemoryBlock).getBigBaseAddress() != null) - { + { label.append(" : 0x"); //$NON-NLS-1$ label.append(((IMemoryBlockExtension)fMemoryBlock).getBigBaseAddress().toString(16).toUpperCase()); } @@ -295,13 +295,13 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements long address = fMemoryBlock.getStartAddress(); label.append(Long.toHexString(address).toUpperCase()); } - + IMemoryRenderingType type = DebugUITools.getMemoryRenderingManager().getRenderingType(getRenderingId()); - + if (type != null) { String preName = type.getLabel(); - + if (preName != null) { label.append(" <"); //$NON-NLS-1$ @@ -309,13 +309,13 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements label.append(">"); //$NON-NLS-1$ } } - + return decorateLabel(label.toString()); } - + /** * Decorates and returns this rendering's label. - * + * * @param label base label * @return decorated label * @since 3.2 @@ -323,24 +323,24 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements protected String decorateLabel(String label) { if (fLabelDecorator != null) return fLabelDecorator.decorateText(label.toString(), this); - return label.toString(); + return label.toString(); } - + /** * Helper method for creating a pop up menu in the rendering for a control. * Call this method when a context menu is required for a control * in a rendering. * <p> * To contribute an action to a rendering, an <code>objectContribution</code> can - * be used on a rendering implementation class itself using a + * be used on a rendering implementation class itself using a * <code>popupMenus</code> extension. Additionally, the context menu created * by this method is registered with an identifier of this rendering's container. - * Actions may also be contributed to the context menu specifically by using a + * Actions may also be contributed to the context menu specifically by using a * <code>viewerContribution</code> on a <code>popupMenus</code> extension - * that has a <code>targetID</code> referring to this rendering container's identifier. + * that has a <code>targetID</code> referring to this rendering container's identifier. * </p> * <p> - * Clients are expected to become a menu listener for their pop up + * Clients are expected to become a menu listener for their pop up * menu if they require to fill the context menu for the rendering. * </p> * @param control - control to create the pop up menu for @@ -353,37 +353,37 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements fPopupMenuMgr.setRemoveAllWhenShown(true); IMemoryRenderingSite site = fContainer.getMemoryRenderingSite(); String menuId = fContainer.getId(); - + ISelectionProvider selProvider = site.getSite().getSelectionProvider(); - + fMenuListener = new IMenuListener() { @Override public void menuAboutToShow(IMenuManager manager) { manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); }}; fPopupMenuMgr.addMenuListener(fMenuListener); - + site.getSite().registerContextMenu(menuId, fPopupMenuMgr, selProvider); } - + Menu popupMenu = fPopupMenuMgr.createContextMenu(control); control.setMenu(popupMenu); } - + /** * Returns the pop up menu manager for this rendering, or <code>null</code> * if none. - * + * * @return the pop up menu manager for this rendering, or <code>null</code> */ protected MenuManager getPopupMenuManager() { return fPopupMenuMgr; } - + /** * Fires the given event to all registered listeners. - * + * * @param event the event to fire */ protected void firePropertyChangedEvent(PropertyChangeEvent event) @@ -396,10 +396,10 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements SafeRunner.run(notifier); } } - + /** * Returns the container hosting this memory rendering. - * + * * @return the container hosting this memory rendering */ public IMemoryRenderingContainer getMemoryRenderingContainer() @@ -409,7 +409,7 @@ public abstract class AbstractMemoryRendering extends PlatformObject implements /** * Returns whether this rendering is currently visible. - * + * * @return whether this rendering is currently visible */ public boolean isVisible() { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractMemoryRenderingBindingsProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractMemoryRenderingBindingsProvider.java index f49b04a28..7647ad68a 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractMemoryRenderingBindingsProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractMemoryRenderingBindingsProvider.java @@ -24,10 +24,10 @@ import org.eclipse.debug.internal.ui.DebugUIPlugin; * @since 3.1 */ public abstract class AbstractMemoryRenderingBindingsProvider implements IMemoryRenderingBindingsProvider { - + // list of binding listeners private ListenerList<IMemoryRenderingBindingsListener> fListeners; - + /* (non-Javadoc) * @see org.eclipse.debug.ui.memory.IMemoryRenderingBindingsProvider#addListener(org.eclipse.debug.ui.memory.IMemoryRenderingBindingsListener) */ @@ -47,7 +47,7 @@ public abstract class AbstractMemoryRenderingBindingsProvider implements IMemory fListeners.remove(listener); } } - + /** * Notifies all registered listeners that bindings have changed. */ @@ -55,7 +55,7 @@ public abstract class AbstractMemoryRenderingBindingsProvider implements IMemory if (fListeners == null) { return; } - + for (IMemoryRenderingBindingsListener iMemoryRenderingBindingsListener : fListeners) { final IMemoryRenderingBindingsListener listener = iMemoryRenderingBindingsListener; ISafeRunnable runnable = new ISafeRunnable() { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTableRendering.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTableRendering.java index 3c775b855..adcaa5cd5 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTableRendering.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTableRendering.java @@ -121,7 +121,7 @@ import org.eclipse.ui.part.PageBook; * The label of the rendering is constructed by retrieving the expression from * <code>IMemoryBlockExtension</code>. For IMemoryBlock, the label is constructed * using the memory block's start address. - * + * * This rendering manages the change states of its memory bytes if the memory * block does not opt to manage the change states. For IMemoryBlockExtension, if * the memory block returns false when #supportsChangeManagement() is called, this @@ -130,17 +130,17 @@ import org.eclipse.ui.part.PageBook; * #supportsChangeManagement() is called. This will cause this rendering to stop * calculating the change states of the memory block. Instead it would rely on the * attributes returned in the MemoryByte array to determine if a byte has changed. - * For IMemoryBlock, this rendering will manage the change states its content. - * + * For IMemoryBlock, this rendering will manage the change states its content. + * * When firing change event, be aware of the following: * - whenever a change event is fired, the content provider for Memory View - * view checks to see if memory has actually changed. + * view checks to see if memory has actually changed. * - If memory has actually changed, a refresh will commence. Changes to the memory block * will be computed and will be shown with the delta icons. - * - If memory has not changed, content will not be refreshed. However, previous delta information + * - If memory has not changed, content will not be refreshed. However, previous delta information * will be erased. The screen will be refreshed to show that no memory has been changed. (All * delta icons will be removed.) - * + * * Please note that these APIs will be called multiple times by the Memory View. * To improve performance, debug adapters need to cache the content of its memory block and only * retrieve updated data when necessary. @@ -148,47 +148,47 @@ import org.eclipse.ui.part.PageBook; * @since 3.1 */ -public abstract class AbstractTableRendering extends AbstractBaseTableRendering implements IPropertyChangeListener, IResettableMemoryRendering{ +public abstract class AbstractTableRendering extends AbstractBaseTableRendering implements IPropertyChangeListener, IResettableMemoryRendering{ /** * Property identifier for the selected address in a table rendering * This property is used for synchronization between renderings. */ public static final String PROPERTY_SELECTED_ADDRESS = "selectedAddress"; //$NON-NLS-1$ - + /** * Property identifier for the column size in a table rendering * This property is used for synchronization between renderings. */ public static final String PROPERTY_COL_SIZE = "columnSize"; //$NON-NLS-1$ - + /** - * Property identifier for the top row address in a table rendering. + * Property identifier for the top row address in a table rendering. * This property is used for synchronization between renderings. */ public static final String PROPERTY_TOP_ADDRESS = "topAddress"; //$NON-NLS-1$ - + /** * Property identifier for the row size in a table rendering * This property is used for synchronization between renderings. * @since 3.2 */ public static final String PROPERTY_ROW_SIZE = "rowSize"; //$NON-NLS-1$ - + private static final int BUFFER_THRESHOLD = 1; // threshold value private static final int BUFFER_START = 0; // flag to indicate asking for threshold at buffer start private static final int BUFFER_END = 1; // flat to indicate asking for threshold at buffer end - + private PageBook fPageBook; private TableViewer fTableViewer; private TextViewer fTextViewer; - + private int fBytePerLine; // number of bytes per line: 16 private int fColumnSize; // number of bytes per column: 1,2,4,8 - private int fAddressableSize; - + private int fAddressableSize; + private boolean fIsShowingErrorPage; - + private TableRenderingContentProvider fContentProvider; private BigInteger fSelectedAddress; private TableRenderingContentInput fContentInput; @@ -201,7 +201,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering private TraverseListener fCursorTraverseListener; private KeyAdapter fCursorKeyAdapter; private BigInteger fTopRowAddress; - + private CopyTableRenderingToClipboardAction fCopyToClipboardAction; private GoToAddressAction fGoToAddressAction; private ResetToBaseAddressAction fResetMemoryBlockAction; @@ -216,12 +216,12 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering private SelectionAdapter fCursorSelectionListener; private IWorkbenchAdapter fWorkbenchAdapter; private IMemoryBlockConnection fConnection; - + private boolean fIsShowAddressColumn = true; private SelectionAdapter fScrollbarSelectionListener; private PropertyDialogAction fPropertiesAction; - + private int fPageSize; private NextPageAction fNextAction; private PrevPageAction fPrevAction; @@ -230,14 +230,14 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering private FormatTableRenderingAction fFormatRenderingAction; private IMenuListener fMenuListener; - + private int fPreBuffer; private int fPostBuffer; - + private class EventHandleLock { Object fOwner; - + public boolean acquireLock(Object client) { if (fOwner == null) @@ -247,7 +247,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } return false; } - + public boolean releaseLock(Object client) { if (fOwner == client) @@ -257,10 +257,10 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } return false; } - - } - - + + } + + private class ToggleAddressColumnAction extends Action { public ToggleAddressColumnAction() { @@ -272,7 +272,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering /* * (non-Javadoc) - * + * * @see org.eclipse.jface.action.IAction#run() */ @Override @@ -283,25 +283,25 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } /** - * + * */ private void updateActionLabel() { if (fIsShowAddressColumn) { - setText(DebugUIMessages.ShowAddressColumnAction_0); + setText(DebugUIMessages.ShowAddressColumnAction_0); } else { - setText(DebugUIMessages.ShowAddressColumnAction_1); + setText(DebugUIMessages.ShowAddressColumnAction_1); } } } - - + + private class NextPageAction extends Action { private NextPageAction() { super(); setText(DebugUIMessages.AbstractTableRendering_4); - PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugUIConstants.PLUGIN_ID + ".NextPageAction_context"); //$NON-NLS-1$ + PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugUIConstants.PLUGIN_ID + ".NextPageAction_context"); //$NON-NLS-1$ } @Override @@ -311,7 +311,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering handlePageStartAddressChanged(address); } } - + private class PrevPageAction extends Action { private PrevPageAction() @@ -328,16 +328,16 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering handlePageStartAddressChanged(address); } } - + /** * Constructs a new table rendering of the specified type. - * + * * @param renderingId memory rendering type identifier */ public AbstractTableRendering(String renderingId) { super(renderingId); } - + /* (non-Javadoc) * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent) */ @@ -347,13 +347,13 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering if (event.getProperty().equals(IInternalDebugUIConstants.FONT_NAME)) { if (!fIsDisposed) - { + { Font memoryViewFont = JFaceResources.getFont(IInternalDebugUIConstants.FONT_NAME); - setFont(memoryViewFont); + setFont(memoryViewFont); } return; } - + if (event.getProperty().equals(IDebugUIConstants.PREF_PADDED_STR) || event.getProperty().equals(IDebugUIConstants.PREF_MEMORY_HISTORY_KNOWN_COLOR) || event.getProperty().equals(IDebugUIConstants.PREF_MEMORY_HISTORY_UNKNOWN_COLOR)) @@ -365,31 +365,31 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } return; } - + Object evtSrc = event.getSource(); - + if (event.getProperty().equals(IDebugPreferenceConstants.PREF_TABLE_RENDERING_PAGE_SIZE) || event.getProperty().equals(IDebugPreferenceConstants.PREF_TABLE_RENDERING_PRE_BUFFER_SIZE) || event.getProperty().equals(IDebugPreferenceConstants.PREF_TABLE_RENDERING_POST_BUFFER_SIZE)) { // always update page size, only refresh if the table is visible getPageSizeFromPreference(); } - + // do not handle event if the rendering is displaying an error if (isDisplayingError()) { return; } - + // do not handle property change event if the rendering is not visible if (!isVisible()) { return; } - + if (event.getProperty().equals(IDebugPreferenceConstants.PREF_DYNAMIC_LOAD_MEM)) { handleDyanicLoadChanged(); return; } - + if (event.getProperty().equals(IDebugPreferenceConstants.PREF_TABLE_RENDERING_PAGE_SIZE)) { if (!isDynamicLoad()) { @@ -398,7 +398,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } return; } - + if (event.getProperty().equals(IDebugPreferenceConstants.PREF_TABLE_RENDERING_PRE_BUFFER_SIZE) || event.getProperty().equals(IDebugPreferenceConstants.PREF_TABLE_RENDERING_POST_BUFFER_SIZE)) { if (isDynamicLoad()) @@ -408,26 +408,26 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } return; } - + if (evtSrc == this) { return; } - + if (!(evtSrc instanceof IMemoryRendering)) { return; } - + IMemoryRendering rendering = (IMemoryRendering)evtSrc; IMemoryBlock memoryBlock = rendering.getMemoryBlock(); - + // do not handle event from renderings displaying other memory blocks if (memoryBlock != getMemoryBlock()) { return; } - + String propertyName = event.getProperty(); Object value = event.getNewValue(); - + if (propertyName.equals(AbstractTableRendering.PROPERTY_SELECTED_ADDRESS) && value instanceof BigInteger) { selectedAddressChanged((BigInteger)value); @@ -457,11 +457,11 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } private void handleDyanicLoadChanged() { - + // if currently in dynamic load mode, update page // start address updateSyncPageStartAddress(); - + updateDynamicLoadProperty(); if (isDynamicLoad()) { @@ -478,27 +478,27 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } private void updateDynamicLoadProperty() { - + boolean value = DebugUIPlugin .getDefault() .getPreferenceStore() .getBoolean(IDebugPreferenceConstants.PREF_DYNAMIC_LOAD_MEM); - + if (value != isDynamicLoad()) { fContentProvider.setDynamicLoad(value); - + if (!fIsDisposed) { if (isDynamicLoad()) { fContentInput.setPostBuffer(20); fContentInput.setPreBuffer(20); fContentInput.setNumLines(getNumberOfVisibleLines()); - + } else { fContentInput.setPostBuffer(0); fContentInput.setPreBuffer(0); fContentInput.setNumLines(fPageSize); - } + } } } } @@ -517,14 +517,14 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering if (!isVisible() && !force) { return; } - + // do not handle event if the base address of the memory // block has changed, wait for debug event to update to // new location if (isBaseAddressChanged()) { return; } - + if (!address.equals(fTopRowAddress)) { fTopRowAddress = address; @@ -551,27 +551,27 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { setTopIndex(table, index); } - + if (isAddressVisible(fSelectedAddress)) { fTableCursor.setVisible(true); } else { fTableCursor.setVisible(false); } - + } /** * @param address the address */ private void handleTopAddressChangedforExtended(final BigInteger address) { - + Object evtLockClient = new Object(); - try + try { if (!fEvtHandleLock.acquireLock(evtLockClient)) { return; } - + if (!isAddressOutOfRange(address)) { Table table = fTableViewer.getTable(); @@ -612,11 +612,11 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } } else - { + { // approaching limit, reload table reloadTable(address, false); } - + if (isAddressVisible(fSelectedAddress)) { fTableCursor.setVisible(true); } else { @@ -627,22 +627,22 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { fEvtHandleLock.releaseLock(evtLockClient); } - } - + } + /** * @param value the new value */ private void selectedAddressChanged(BigInteger value) { - + // do not handle event if the base address of the memory // block has changed, wait for debug event to update to // new location if (isBaseAddressChanged()) { return; } - + try { - // do not handle event if the event is out of range and the + // do not handle event if the event is out of range and the // rendering is in non-dynamic-load mode, otherwise, will // cause rendering to continue to scroll when it shouldn't if (isDynamicLoad()) { @@ -654,63 +654,63 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering // do nothing } } - + private void handlePageStartAddressChanged(BigInteger address) { // do not handle if in dynamic mode if (isDynamicLoad()) { return; } - + if (fContentInput == null) { return; } - + if (!(getMemoryBlock() instanceof IMemoryBlockExtension)) { return; } - + // do not handle event if the base address of the memory // block has changed, wait for debug event to update to // new location if (isBaseAddressChanged()) { return; } - + if(fContentProvider.getBufferTopAddress().equals(address)) { return; } - + BigInteger start = fContentInput.getStartAddress(); BigInteger end = fContentInput.getEndAddress(); - + // smaller than start address, load at start address if (address.compareTo(start) < 0) { if (isAtTopLimit()) { return; } - + address = start; } - + // bigger than end address, no need to load, already at top if (address.compareTo(end) > 0) { if (isAtBottomLimit()) { return; } - + address = end.subtract(BigInteger.valueOf(getPageSizeInUnits())); } - + fContentInput.setLoadAddress(address); refresh(); updateSyncPageStartAddress(); setTopIndex(fTableViewer.getTable(), 0); fTopRowAddress = address; updateSyncTopAddress(); - + BigInteger selectedAddress = (BigInteger)getSynchronizedProperty(AbstractTableRendering.PROPERTY_SELECTED_ADDRESS); if (selectedAddress != null) { @@ -732,49 +732,49 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering */ @Override public Control createControl(Composite parent) { - + fPageBook = new PageBook(parent, SWT.NONE); createErrorPage(fPageBook); createTableViewer(fPageBook); - + fTableViewer.getTable().redraw(); createToolTip(); - + return fPageBook; } /** * Create the table viewer and other support controls * for this rendering. - * + * * @param parent parent composite */ private void createTableViewer(Composite parent) { - + fTableViewer= new TableViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.HIDE_SELECTION | SWT.BORDER); - + TableRenderingLabelProvider labelProvider; if (hasCustomizedDecorations()) { labelProvider = new TableRenderingLabelProviderEx(this); } else { labelProvider = new TableRenderingLabelProvider(this); } - + fTableViewer.setLabelProvider(labelProvider); - + fContentProvider = new TableRenderingContentProvider(); fContentProvider.setDynamicLoad(DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IDebugPreferenceConstants.PREF_DYNAMIC_LOAD_MEM)); - - fTableViewer.setContentProvider(fContentProvider); + + fTableViewer.setContentProvider(fContentProvider); fContentProvider.setViewer(fTableViewer); - + ScrollBar scroll = ((Table)fTableViewer.getControl()).getVerticalBar(); scroll.setMinimum(-100); - scroll.setMaximum(200); + scroll.setMaximum(200); fTableViewer.getTable().setHeaderVisible(true); fTableViewer.getTable().setLinesVisible(true); - + // set up addressable size and figure out number of bytes required per line fAddressableSize = -1; @@ -787,24 +787,24 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering fAddressableSize = 1; displayError(e1); return; - + } if (getAddressableSize() < 1) { fAddressableSize = 1; } - + // set up initial format setupInitialFormat(); - -// set up selected address + +// set up selected address setupSelectedAddress(); - + // figure out top visible address BigInteger topVisibleAddress = getInitialTopVisibleAddress(); - + getPageSizeFromPreference(); - - + + if (isDynamicLoad()) { int numLines = getNumberOfVisibleLines(); @@ -827,7 +827,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering else { BigInteger addressToLoad = topVisibleAddress; - + // check synchronization service to see if we need to sync with another rendering Object obj = getSynchronizedProperty(IInternalDebugUIConstants.PROPERTY_PAGE_START_ADDRESS); if (obj != null && obj instanceof BigInteger) @@ -836,24 +836,24 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } fContentInput = new TableRenderingContentInput(this, 0, 0, addressToLoad, fPageSize, false, null); } - + fTableViewer.setInput(fContentInput); - + // set up cell modifier fCellModifier = new TableRenderingCellModifier(this); fTableViewer.setCellModifier(fCellModifier); - - // SET UP FONT + + // SET UP FONT // set to a non-proportional font fTableViewer.getTable().setFont(JFaceResources.getFont(IInternalDebugUIConstants.FONT_NAME)); if (!(getMemoryBlock() instanceof IMemoryBlockExtension)) - { + { // If not extended memory block, do not create any buffer // no scrolling fContentInput.setPreBuffer(0); fContentInput.setPostBuffer(0); } - + // set up table cursor createCursor(fTableViewer.getTable(), fSelectedAddress); fTableViewer.getTable().addMouseListener(new MouseAdapter() { @@ -861,12 +861,12 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering public void mouseDown(MouseEvent e) { handleTableMouseEvent(e); }}); - + // create pop up menu for the rendering createActions(); createPopupMenu(fTableViewer.getControl()); createPopupMenu(fTableCursor); - + fMenuListener = new IMenuListener() { @Override public void menuAboutToShow(IMenuManager manager) { @@ -874,14 +874,14 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); }}; getPopupMenuManager().addMenuListener(fMenuListener); - + // now the rendering is successfully created fIsCreated = true; //synchronize addRenderingToSyncService(); synchronize(); - + fTopRowAddress = getTopVisibleAddress(); // Need to resize column after content is filled in // Pack function does not work unless content is not filled in @@ -892,12 +892,12 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { if(((IMemoryBlockExtension)getMemoryBlock()).getBigBaseAddress() == null) { - DebugException e = new DebugException(DebugUIPlugin.newErrorStatus(DebugUIMessages.AbstractTableRendering_1, null)); - displayError(e); + DebugException e = new DebugException(DebugUIPlugin.newErrorStatus(DebugUIMessages.AbstractTableRendering_1, null)); + displayError(e); } } } catch (DebugException e1) { - displayError(e1); + displayError(e1); } // add font change listener and update font when the font has been changed @@ -907,17 +907,17 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering @Override public void widgetSelected(SelectionEvent event) { handleScrollBarSelection(); - + }}; scroll.addSelectionListener(fScrollbarSelectionListener); DebugUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this); } - + private boolean validateInitialFormat() { int rowSize = getDefaultRowSize(); int columnSize = getDefaultColumnSize(); - + if (rowSize < columnSize || rowSize % columnSize != 0 || rowSize == 0 || columnSize == 0) { return false; @@ -946,7 +946,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } private void setupSelectedAddress() { - // figure out selected address + // figure out selected address BigInteger selectedAddress = (BigInteger) getSynchronizedProperty(AbstractTableRendering.PROPERTY_SELECTED_ADDRESS); if (selectedAddress == null) { @@ -970,9 +970,9 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } private void setupInitialFormat() { - + boolean validated = validateInitialFormat(); - + if (!validated) { // pop up dialog to ask user for default values @@ -984,24 +984,24 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering msgBuffer.append("\n"); //$NON-NLS-1$ msgBuffer.append(DebugUIMessages.AbstractTableRendering_18); msgBuffer.append("\n\n"); //$NON-NLS-1$ - + int bytePerLine = fBytePerLine; int columnSize = fColumnSize; - + // initialize this value to populate the dialog properly fBytePerLine = getDefaultRowSize() / getAddressableSize(); fColumnSize = getDefaultColumnSize() / getAddressableSize(); FormatTableRenderingDialog dialog = new FormatTableRenderingDialog(this, DebugUIPlugin.getShell()); dialog.openError(msgBuffer.toString()); - + // restore to original value before formatting fBytePerLine = bytePerLine; fColumnSize = columnSize; - + bytePerLine = dialog.getRowSize() * getAddressableSize(); columnSize = dialog.getColumnSize() * getAddressableSize(); - + format(bytePerLine, columnSize); } else @@ -1010,10 +1010,10 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering int bytePerLine = getDefaultRowSize(); // column size is now stored as number of addressable units int columnSize = getDefaultColumnSize(); - - // format memory block with specified "bytesPerLine" and "columnSize" + + // format memory block with specified "bytesPerLine" and "columnSize" boolean ok = format(bytePerLine, columnSize); - + if (!ok) { // this is to ensure that the rest of the rendering can be created @@ -1024,42 +1024,42 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } private int getDefaultColumnSize() { - + // default to global preference store IPreferenceStore prefStore = DebugUITools.getPreferenceStore(); int columnSize = prefStore.getInt(IDebugPreferenceConstants.PREF_COLUMN_SIZE); // actual column size is number of addressable units * size of the addressable unit columnSize = columnSize * getAddressableSize(); - + // check synchronized column size Integer colSize = (Integer)getSynchronizedProperty(AbstractTableRendering.PROPERTY_COL_SIZE); if (colSize != null) { // column size is stored as actual number of bytes in synchronizer - int syncColSize = colSize.intValue(); + int syncColSize = colSize.intValue(); if (syncColSize > 0) { columnSize = syncColSize; - } + } } else { IPersistableDebugElement elmt = getMemoryBlock().getAdapter(IPersistableDebugElement.class); int defaultColSize = -1; - + if (elmt != null) { if (elmt.supportsProperty(this, IDebugPreferenceConstants.PREF_COL_SIZE_BY_MODEL)) { defaultColSize = getDefaultFromPersistableElement(IDebugPreferenceConstants.PREF_COL_SIZE_BY_MODEL); } } - + if (defaultColSize <= 0) { // if not provided, get default by model defaultColSize = getDefaultColumnSizeByModel(getMemoryBlock().getModelIdentifier()); } - + if (defaultColSize > 0) { columnSize = defaultColSize * getAddressableSize(); } @@ -1068,20 +1068,20 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } private int getDefaultRowSize() { - + int rowSize = DebugUITools.getPreferenceStore().getInt(IDebugPreferenceConstants.PREF_ROW_SIZE); int bytePerLine = rowSize * getAddressableSize(); - + // check synchronized row size Integer size = (Integer)getSynchronizedProperty(AbstractTableRendering.PROPERTY_ROW_SIZE); if (size != null) { // row size is stored as actual number of bytes in synchronizer - int syncRowSize = size.intValue(); + int syncRowSize = size.intValue(); if (syncRowSize > 0) { bytePerLine = syncRowSize; - } + } } else { @@ -1095,12 +1095,12 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering return defaultRowSize * getAddressableSize(); } } - + if (defaultRowSize <= 0) { // no synchronized property, ask preference store by id defaultRowSize = getDefaultRowSizeByModel(getMemoryBlock().getModelIdentifier()); } - + if (defaultRowSize > 0) { bytePerLine = defaultRowSize * getAddressableSize(); } @@ -1120,7 +1120,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering IStatus status = DebugUIPlugin.newErrorStatus("Model returned invalid type on " + propertyId, null); //$NON-NLS-1$ DebugUIPlugin.log(status); } - + if (valueMB != null) { Integer value = (Integer)valueMB; @@ -1132,50 +1132,50 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } return defaultValue; } - + private void getPageSizeFromPreference() { fPageSize = DebugUIPlugin.getDefault().getPreferenceStore().getInt(IDebugPreferenceConstants.PREF_TABLE_RENDERING_PAGE_SIZE); fPreBuffer = DebugUIPlugin.getDefault().getPreferenceStore().getInt(IDebugPreferenceConstants.PREF_TABLE_RENDERING_PRE_BUFFER_SIZE); fPostBuffer = DebugUIPlugin.getDefault().getPreferenceStore().getInt(IDebugPreferenceConstants.PREF_TABLE_RENDERING_POST_BUFFER_SIZE); } - + private void createCursor(Table table, BigInteger address) { fTableCursor = new TableCursor(table, SWT.NONE); Display display = fTableCursor.getDisplay(); - + // set up cursor color fTableCursor.setBackground(display.getSystemColor(SWT.COLOR_LIST_SELECTION)); fTableCursor.setForeground(display.getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT)); - + fTableCursor.setFont(JFaceResources.getFont(IInternalDebugUIConstants.FONT_NAME)); fTableCursor.setVisible(true); - + fCursorKeyAdapter = new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { handleCursorKeyPressed(e); - } + } }; fTableCursor.addKeyListener(fCursorKeyAdapter); - + fCursorTraverseListener = new TraverseListener() { @Override public void keyTraversed(TraverseEvent e) { handleCursorTraverseEvt(e); }}; - + fTableCursor.addTraverseListener(fCursorTraverseListener); - + fCursorMouseListener = new MouseAdapter() { @Override public void mouseDown(MouseEvent e) { handleCursorMouseEvent(e); }}; fTableCursor.addMouseListener(fCursorMouseListener); - + // cursor may be disposed before disposed is called // remove listeners whenever the cursor is disposed fTableCursor.addDisposeListener(new DisposeListener() { @@ -1189,35 +1189,35 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering fTableCursor.removeMouseListener(fCursorMouseListener); fTableCursor.removeSelectionListener(fCursorSelectionListener); }}); - + fCursorSelectionListener = new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - + if (!fEvtHandleLock.acquireLock(this)) { return; } - + handleCursorMoved(); - + fEvtHandleLock.releaseLock(this); } }; fTableCursor.addSelectionListener(fCursorSelectionListener); - - + + setCursorAtAddress(address); - - fCursorEditor = new TableEditor (fTableViewer.getTable()); + + fCursorEditor = new TableEditor (fTableViewer.getTable()); } - + private void handleCursorTraverseEvt(TraverseEvent e){ - + if (fTableCursor.getRow() == null) { return; } - + Table table = (Table)fTableCursor.getParent(); int row = table.indexOf(fTableCursor.getRow()); int col = fTableCursor.getColumn(); @@ -1227,7 +1227,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { return; } - + row = row +1; col = 0; fTableCursor.setSelection(row, col); @@ -1238,52 +1238,52 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { return; } - + row = row - 1; col = getNumCol()+1; fTableCursor.setSelection(row, col); - } - + } + Object evtLockClient = new Object(); if (!fEvtHandleLock.acquireLock(evtLockClient)) { return; } - + handleCursorMoved(); - + fEvtHandleLock.releaseLock(evtLockClient); } - + /** * Update selected address. * Load more memory if required. */ private void handleCursorMoved() - { + { if (fIsDisposed) { return; } - + BigInteger selectedAddress = getSelectedAddressFromCursor(fTableCursor); - + // when the cursor is moved, the selected address is changed if (selectedAddress != null && !selectedAddress.equals(fSelectedAddress)) { setSelectedAddress(selectedAddress); updateSyncSelectedAddress(); } - + // now check to see if the cursor is approaching buffer limit TableItem item = fTableCursor.getRow(); if (item == null) { return; } - + if (getMemoryBlock() instanceof IMemoryBlockExtension) { int row = fTableViewer.getTable().indexOf(item); - + if (row < getBufferThreshold(BUFFER_START)) { if (!isAtTopLimit() && getBufferThreshold(BUFFER_START) > 0) @@ -1307,7 +1307,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } } } - + // if the cursor has moved, the top index of the table may change // just update the synchronization service BigInteger address = getTopVisibleAddress(); @@ -1317,7 +1317,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering updateSyncTopAddress(); } } - + private void handleCursorKeyPressed(KeyEvent event) { // allow edit if user hits return @@ -1325,10 +1325,10 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { activateCellEditor(null); return; - } - + } + if (MemoryViewUtil.isValidEditEvent(event.keyCode)) - { + { // activate edit as soon as user types something at the cursor if (event.getSource() instanceof TableCursor) { @@ -1338,7 +1338,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } } } - + /** * Calculate selected address based on cursor's current position * @param cursor the cursor @@ -1348,7 +1348,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { TableItem row = cursor.getRow(); int col = cursor.getColumn(); - + return getAddressFromTableItem(row, col); } @@ -1356,14 +1356,14 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering if (row == null) { return null; } - + // get row address String temp = ((TableRenderingLine)row.getData()).getAddress(); BigInteger rowAddress = new BigInteger(temp, 16); - + int offset; if (col > 0) - { + { // get address offset int addressableUnit = getAddressableUnitPerColumn(); offset = (col-1) * addressableUnit; @@ -1372,11 +1372,11 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { offset = 0; } - + return rowAddress.add(BigInteger.valueOf(offset)); } - - + + /** * Sets the cursor at the specified address * @param address the address @@ -1387,12 +1387,12 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering if (fContentProvider.getBufferTopAddress() == null) { return false; } - + // selected address is out of range, simply return false if (address.compareTo(fContentProvider.getBufferTopAddress()) < 0) { return false; } - + // calculate selected row address int addressableUnit = getAddressableUnitPerLine(); int numOfRows = address.subtract(fContentProvider.getBufferTopAddress()).intValue()/addressableUnit; @@ -1400,120 +1400,120 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering // try to find the row of the selected address int row = findAddressIndex(address); - + if (row == -1) { return false; } - + // calculate offset to the row address BigInteger offset = address.subtract(rowAddress); - + // locate column int colAddressableUnit = getAddressableUnitPerColumn(); int col = ((offset.intValue()/colAddressableUnit)+1); - + if (col == 0) { col = 1; } - + fTableCursor.setSelection(row, col); - - return true; + + return true; } - - + + /** * Format view tab based on the bytes per line and column. - * + * * @param bytesPerLine - number of bytes per line, possible values: (1 / 2 / 4 / 8 / 16 / 32 / 64 / 128) * addressableSize * @param columnSize - number of bytes per column, possible values: (1 / 2 / 4 / 8 / 16 / 32 / 64 / 128) * addressableSize * @return true if format is successful, false, otherwise - * + * */ @Override public boolean format(int bytesPerLine, int columnSize) - { - + { + // selected address gets changed as the cursor is moved // during the reformat. // Back up the address and restore it later. BigInteger selectedAddress = fSelectedAddress; - + // bytes per cell must be divisible to bytesPerLine if (bytesPerLine % columnSize != 0) { return false; } - + if (bytesPerLine < columnSize) { return false; } - + // do not format if the view tab is already in that format if(fBytePerLine == bytesPerLine && fColumnSize == columnSize){ return false; } - + fBytePerLine = bytesPerLine; fColumnSize = columnSize; - + Object evtLockClient = new Object(); if (!fEvtHandleLock.acquireLock(evtLockClient)) { return false; } - + // if the tab is already created and is being reformatted if (fIsCreated) - { + { if (fTableViewer == null) { return false; } - + if (fTableViewer.getTable() == null) { return false; } - + // clean up old columns TableColumn[] oldColumns = fTableViewer.getTable().getColumns(); - + for (int i=0; i<oldColumns.length; i++) { oldColumns[i].dispose(); } - + // clean up old cell editors CellEditor[] oldCellEditors = fTableViewer.getCellEditors(); - + for (int i=0; i<oldCellEditors.length; i++) { oldCellEditors[i].dispose(); } } - + TableColumn column0 = new TableColumn(fTableViewer.getTable(),SWT.LEFT,0); - column0.setText(DebugUIMessages.AbstractTableRendering_2); - + column0.setText(DebugUIMessages.AbstractTableRendering_2); + // create new byte columns - TableColumn [] byteColumns = new TableColumn[bytesPerLine/columnSize]; - + TableColumn [] byteColumns = new TableColumn[bytesPerLine/columnSize]; + String[] columnLabels = new String[0]; IMemoryBlockTablePresentation presentation = getTablePresentationAdapter(); if (presentation != null) { columnLabels = presentation.getColumnLabels(getMemoryBlock(), bytesPerLine, getNumCol()); } - + // check that column labels are not null if (columnLabels == null) { columnLabels = new String[0]; } - + for (int i=0;i<byteColumns.length; i++) { TableColumn column = new TableColumn(fTableViewer.getTable(), SWT.LEFT, i+1); - + // if the number of column labels returned is correct // use supplied column labels if (columnLabels.length == byteColumns.length) @@ -1526,7 +1526,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering int addressableUnit = columnSize/getAddressableSize(); if (getAddressableUnitPerColumn() >= 4) { - column.setText(Integer.toHexString(i*addressableUnit).toUpperCase() + + column.setText(Integer.toHexString(i*addressableUnit).toUpperCase() + " - " + Integer.toHexString(i*addressableUnit+addressableUnit-1).toUpperCase()); //$NON-NLS-1$ } else @@ -1535,7 +1535,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } } } - + //Empty column for cursor navigation TableColumn emptyCol = new TableColumn(fTableViewer.getTable(),SWT.LEFT,byteColumns.length+1); emptyCol.setText(" "); //$NON-NLS-1$ @@ -1545,7 +1545,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering // +2 to include properties for address and navigation column String[] columnProperties = new String[byteColumns.length+2]; columnProperties[0] = TableRenderingLine.P_ADDRESS; - + int addressableUnit = columnSize / getAddressableSize(); // use column beginning offset to the row address as properties @@ -1555,52 +1555,52 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering // the line address columnProperties[i] = Integer.toHexString((i-1)*addressableUnit); } - + // Empty column for cursor navigation columnProperties[columnProperties.length-1] = " "; //$NON-NLS-1$ - - fTableViewer.setColumnProperties(columnProperties); - - + + fTableViewer.setColumnProperties(columnProperties); + + Table table = fTableViewer.getTable(); fEditors = new CellEditor[table.getColumnCount()]; for (int i=0; i<fEditors.length; i++) { fEditors[i] = new TextCellEditor(table); } - + // create and set cell editors - fTableViewer.setCellEditors(fEditors); - + fTableViewer.setCellEditors(fEditors); + if (fIsCreated) { fTableViewer.refresh(); - } - + } + resizeColumnsToPreferredSize(); updateSyncRowSize(); updateSyncColSize(); - + if (fIsCreated) { // for Linux GTK, this must happen after table viewer is refreshed int i = findAddressIndex(fTopRowAddress); - + if (i >= 0) { setTopIndex(fTableViewer.getTable(), i); } - + if (isAddressVisible(selectedAddress)) { // after refresh, make sure the cursor is at the correct position setCursorAtAddress(selectedAddress); - } + } } - + fEvtHandleLock.releaseLock(evtLockClient); - + return true; } - + /** * Create the error page for this rendering. * The error page is used to report any error resulted from @@ -1611,14 +1611,14 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { if (fTextViewer == null) { - fTextViewer = new TextViewer(parent, SWT.WRAP); + fTextViewer = new TextViewer(parent, SWT.WRAP); fTextViewer.setDocument(new Document()); StyledText styleText = fTextViewer.getTextWidget(); styleText.setEditable(false); styleText.setEnabled(false); } } - + /** * Displays the content of the table viewer. */ @@ -1627,11 +1627,11 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering fIsShowingErrorPage = false; fPageBook.showPage(fTableViewer.getControl()); } - + /** * Displays an error message for the given exception. - * - * @param e exception to display + * + * @param e exception to display */ public void displayError(DebugException e) { @@ -1639,26 +1639,26 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering fIsShowingErrorPage = true; styleText = fTextViewer.getTextWidget(); - + if (styleText != null) { styleText.setText(DebugUIMessages.AbstractTableRendering_3 + e.getMessage()); } fPageBook.showPage(fTextViewer.getControl()); - + // clear content cache if we need to display error fContentProvider.clearContentCache(); } - + /** * Returns whether the error page is displayed. - * + * * @return whether the error page is displayed */ public boolean isDisplayingError() - { + { return fIsShowingErrorPage; } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.memory.IMemoryRendering#getControl() */ @@ -1666,31 +1666,31 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering public Control getControl() { return fPageBook; } - + /** * Returns the addressable size of this rendering's memory block in bytes. - * + * * @return the addressable size of this rendering's memory block in bytes */ @Override public int getAddressableSize() { return fAddressableSize; } - + private Object getSynchronizedProperty(String propertyId) { IMemoryRenderingSynchronizationService syncService = getMemoryRenderingContainer().getMemoryRenderingSite().getSynchronizationService(); - + if (syncService == null) { return null; } - - return syncService.getProperty(getMemoryBlock(), propertyId); + + return syncService.getProperty(getMemoryBlock(), propertyId); } - + /** * This method estimates the number of visible lines in the rendering - * table. + * table. * @return estimated number of visible lines in the table */ private int getNumberOfVisibleLines() @@ -1698,25 +1698,25 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering if(fTableViewer == null) { return -1; } - + Table table = fTableViewer.getTable(); int height = fTableViewer.getTable().getSize().y; - + // when table is not yet created, height is zero if (height == 0) { // make use of the table viewer to estimate table size height = fTableViewer.getTable().getParent().getSize().y; } - + int numberOfLines = doGetNumberOfVisibleLines(table, height); - + if (numberOfLines <= 0) { return 0; } - - return numberOfLines; + + return numberOfLines; } /** @@ -1727,35 +1727,35 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering private int doGetNumberOfVisibleLines(Table table, int height) { // height of border int border = fTableViewer.getTable().getHeaderHeight(); - + // height of scroll bar int scroll = fTableViewer.getTable().getHorizontalBar().getSize().y; - // height of table is table's area minus border and scroll bar height + // height of table is table's area minus border and scroll bar height height = height-border-scroll; // calculate number of visible lines int lineHeight = getMinTableItemHeight(table); - + int numberOfLines = height/lineHeight; return numberOfLines; } - + private static void setTopIndex(Table table, int index) { table.setTopIndex(index); } private void addRenderingToSyncService() - { + { IMemoryRenderingSynchronizationService syncService = getMemoryRenderingContainer().getMemoryRenderingSite().getSynchronizationService(); - + if (syncService == null) { return; } - + syncService.addPropertyChangeListener(this, null); - + // we could be in a format error even though the error is not yet displayed // do not update sync property in this case if (!isDisplayingError()) @@ -1763,13 +1763,13 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering if (syncService.getSynchronizationProvider() == null) { syncService.setSynchronizationProvider(this); } - + // check if there is already synchronization info available Object selectedAddress =getSynchronizedProperty( AbstractTableRendering.PROPERTY_SELECTED_ADDRESS); Object rowSize = getSynchronizedProperty(AbstractTableRendering.PROPERTY_ROW_SIZE); Object colSize =getSynchronizedProperty( AbstractTableRendering.PROPERTY_COL_SIZE); Object topAddress =getSynchronizedProperty( AbstractTableRendering.PROPERTY_TOP_ADDRESS); - + if (!isDynamicLoad()) { Object pageStartAddress = getSynchronizedProperty(IInternalDebugUIConstants.PROPERTY_PAGE_START_ADDRESS); @@ -1777,14 +1777,14 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering updateSyncPageStartAddress(); } } - + // if info is available, some other view tab has already been // created // do not overwrite info in the synchronizer if that's the case if (selectedAddress == null) { updateSyncSelectedAddress(); } - + if (rowSize == null) { updateSyncRowSize(); @@ -1798,12 +1798,12 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } } } - + /** * Get properties from synchronizer and synchronize settings */ private void synchronize() - { + { if (!isDynamicLoad()) { BigInteger pageStart = (BigInteger)getSynchronizedProperty(IInternalDebugUIConstants.PROPERTY_PAGE_START_ADDRESS); @@ -1818,12 +1818,12 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering handlePageStartAddressChanged(pageStart); } } - + Integer rowSize = (Integer) getSynchronizedProperty(AbstractTableRendering.PROPERTY_ROW_SIZE); Integer columnSize = (Integer) getSynchronizedProperty(AbstractTableRendering.PROPERTY_COL_SIZE); BigInteger selectedAddress = (BigInteger)getSynchronizedProperty(AbstractTableRendering.PROPERTY_SELECTED_ADDRESS); BigInteger topAddress = (BigInteger)getSynchronizedProperty(AbstractTableRendering.PROPERTY_TOP_ADDRESS); - + if (rowSize != null) { int rSize = rowSize.intValue(); @@ -1831,7 +1831,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering rowSizeChanged(rSize); } } - + if (columnSize != null) { int colSize = columnSize.intValue(); if (colSize > 0 && colSize != fColumnSize) { @@ -1854,7 +1854,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } } } - + /** * Resize column to the preferred size. */ @@ -1863,23 +1863,23 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering // pack columns Table table = fTableViewer.getTable(); TableColumn[] columns = table.getColumns(); - + for (int i=0 ;i<columns.length-1; i++) - { + { columns[i].pack(); } - + if (!fIsShowAddressColumn) { columns[0].setWidth(0); } } - + /** * update selected address in synchronizer if update is true. */ private void updateSyncSelectedAddress() { - + if (!fIsCreated) { return; } @@ -1891,33 +1891,33 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering * update column size in synchronizer */ private void updateSyncColSize() { - + if (!fIsCreated) { return; } - + PropertyChangeEvent event = new PropertyChangeEvent(this, AbstractTableRendering.PROPERTY_COL_SIZE, null, Integer.valueOf(fColumnSize)); firePropertyChangedEvent(event); } - + /** * update column size in synchronizer */ private void updateSyncRowSize() { - + if (!fIsCreated) { return; } - + PropertyChangeEvent event = new PropertyChangeEvent(this, AbstractTableRendering.PROPERTY_ROW_SIZE, null, Integer.valueOf(fBytePerLine)); firePropertyChangedEvent(event); } - + /** * update top visible address in synchronizer */ private void updateSyncTopAddress() { - + if (!fIsCreated) { return; } @@ -1925,17 +1925,17 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering PropertyChangeEvent event = new PropertyChangeEvent(this, AbstractTableRendering.PROPERTY_TOP_ADDRESS, null, fTopRowAddress); firePropertyChangedEvent(event); } - + private void updateSyncPageStartAddress() { - + if (!fIsCreated) { return; } - + if (isBaseAddressChanged()) { return; } - + BigInteger pageStart; if (isDynamicLoad()) { @@ -1948,33 +1948,33 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering // otherwise, the address is the buffer's start address pageStart = fContentProvider.getBufferTopAddress(); } - + PropertyChangeEvent event = new PropertyChangeEvent(this, IInternalDebugUIConstants.PROPERTY_PAGE_START_ADDRESS, null, pageStart); firePropertyChangedEvent(event); } - + /** * Fills the context menu for this rendering - * + * * @param menu menu to fill */ protected void fillContextMenu(IMenuManager menu) { - + menu.add(new Separator("topMenu")); //$NON-NLS-1$ menu.add(fResetMemoryBlockAction); menu.add(fGoToAddressAction); - + menu.add(new Separator()); - + menu.add(fFormatRenderingAction); if (!isDynamicLoad() && getMemoryBlock() instanceof IMemoryBlockExtension) - { + { menu.add(new Separator()); menu.add(fPrevAction); menu.add(fNextAction); } - + menu.add(new Separator()); menu.add(fReformatAction); menu.add(fToggleAddressColumnAction); @@ -1986,32 +1986,32 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering menu.add(new Separator()); menu.add(fPropertiesAction); } - + } - + /** * Returns the number of addressable units per row. - * + * * @return number of addressable units per row */ @Override public int getAddressableUnitPerLine() { return fBytePerLine / getAddressableSize(); } - + /** * Returns the number of addressable units per column. - * + * * @return number of addressable units per column */ @Override public int getAddressableUnitPerColumn() { return fColumnSize / getAddressableSize(); } - + /** * Returns the number of bytes displayed in a single column cell. - * + * * @return the number of bytes displayed in a single column cell */ @Override @@ -2022,15 +2022,15 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering /** * Returns the number of bytes displayed in a row. - * + * * @return the number of bytes displayed in a row */ @Override public int getBytesPerLine() - { + { return fBytePerLine; } - + /** * Updates labels of this rendering. */ @@ -2039,7 +2039,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { // update tab labels updateRenderingLabel(true); - + if (fTableViewer != null) { // update column labels @@ -2047,10 +2047,10 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering fTableViewer.refresh(); } } - + /* Returns the label of this rendering. - * + * * @return label of this rendering */ @Override @@ -2058,20 +2058,20 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering if (fLabel == null) { fLabel = buildLabel(true); } - + return fLabel; } - + /** * Updates the label of this rendering, optionally displaying the * base address of this rendering's memory block. - * + * * @param showAddress whether to display the base address of this * rendering's memory block in this rendering's label */ protected void updateRenderingLabel(boolean showAddress) - { + { fLabel = buildLabel(showAddress); firePropertyChangedEvent(new PropertyChangeEvent(this, IBasicPropertyConstants.P_TEXT, null, fLabel)); } @@ -2083,17 +2083,17 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering label = ((IMemoryBlockExtension)getMemoryBlock()).getExpression(); if (label == null) { - label = DebugUIMessages.AbstractTableRendering_8; + label = DebugUIMessages.AbstractTableRendering_8; } - + if (label.startsWith("&")) //$NON-NLS-1$ { label = "&" + label; //$NON-NLS-1$ } - + try { if (showAddress && ((IMemoryBlockExtension)getMemoryBlock()).getBigBaseAddress() != null) - { + { label += " : 0x"; //$NON-NLS-1$ label += ((IMemoryBlockExtension)getMemoryBlock()).getBigBaseAddress().toString(16).toUpperCase(); } @@ -2106,39 +2106,39 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering long address = getMemoryBlock().getStartAddress(); label = Long.toHexString(address).toUpperCase(); } - + String preName = DebugUITools.getMemoryRenderingManager().getRenderingType(getRenderingId()).getLabel(); - + if (preName != null) { label += " <" + preName + ">"; //$NON-NLS-1$ //$NON-NLS-2$ } - + return decorateLabel(label); } - + private void setColumnHeadings() { String[] columnLabels = new String[0]; - + IMemoryBlockTablePresentation presentation = getTablePresentationAdapter(); if (presentation != null) { columnLabels = presentation.getColumnLabels(getMemoryBlock(), fBytePerLine, getNumCol()); } - + // check that column labels returned are not null if (columnLabels == null) { columnLabels = new String[0]; } - + int numByteColumns = fBytePerLine/fColumnSize; - + TableColumn[] columns = fTableViewer.getTable().getColumns(); - + int j=0; for (int i=1; i<columns.length-1; i++) - { + { // if the number of column labels returned is correct // use supplied column labels if (columnLabels.length == numByteColumns) @@ -2151,7 +2151,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering // otherwise, use default if (fColumnSize >= 4) { - columns[i].setText(Integer.toHexString(j*fColumnSize).toUpperCase() + + columns[i].setText(Integer.toHexString(j*fColumnSize).toUpperCase() + " - " + Integer.toHexString(j*fColumnSize+fColumnSize-1).toUpperCase()); //$NON-NLS-1$ } else @@ -2162,26 +2162,26 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } } } - + /** * Refresh the table viewer with the current top visible address. * Update labels in the memory rendering. */ @Override public void refresh() - { + { // refresh at start address of this memory block // address may change if expression is evaluated to a different value IMemoryBlock mem = getMemoryBlock(); BigInteger address; - + if (mem instanceof IMemoryBlockExtension) { try { address = ((IMemoryBlockExtension)mem).getBigBaseAddress(); if (address == null) - { - DebugException e = new DebugException(DebugUIPlugin.newErrorStatus(DebugUIMessages.AbstractTableRendering_10, null)); + { + DebugException e = new DebugException(DebugUIPlugin.newErrorStatus(DebugUIMessages.AbstractTableRendering_10, null)); displayError(e); return; } @@ -2192,18 +2192,18 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering // get to new address setSelectedAddress(address); updateSyncSelectedAddress(); - + reloadTable(address, true); - + if (!isDynamicLoad()) { updateSyncPageStartAddress(); setTopIndex(fTableViewer.getTable(), 0); } - + fTopRowAddress = getTopVisibleAddress(); updateSyncTopAddress(); - + fContentInput.updateContentBaseAddress(); } else @@ -2219,7 +2219,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } catch (DebugException e) { displayError(e); return; - } + } } else { @@ -2227,39 +2227,39 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering reloadTable(address, true); } } - + synchronized private void reloadTable(BigInteger topAddress, boolean updateDelta){ - + if (fTableViewer == null) { return; } - + try { - Table table = (Table)fTableViewer.getControl(); - + Table table = (Table)fTableViewer.getControl(); + TableRenderingContentInput input; if (isDynamicLoad()) { input = new TableRenderingContentInput(this, fPreBuffer, fPostBuffer, topAddress, getNumberOfVisibleLines(), updateDelta, null); } else { input = new TableRenderingContentInput(this, fContentInput.getPreBuffer(), fContentInput.getPostBuffer(), topAddress, fPageSize, updateDelta, null); } - + fContentInput = input; fTableViewer.setInput(fContentInput); - + if (isDynamicLoad()) { if (getMemoryBlock() instanceof IMemoryBlockExtension) { int topIdx = findAddressIndex(topAddress); - + if (topIdx != -1) { setTopIndex(table, topIdx); } } - + // cursor needs to be refreshed after reload if (isAddressVisible(fSelectedAddress)) { setCursorAtAddress(fSelectedAddress); @@ -2282,9 +2282,9 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { } } - + private BigInteger getTopVisibleAddress() { - + if (fTableViewer == null) { return BigInteger.valueOf(0); } @@ -2294,10 +2294,10 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering if (topIndex < 1) { topIndex = 0; } - if (table.getItemCount() > topIndex) + if (table.getItemCount() > topIndex) { TableRenderingLine topItem = (TableRenderingLine)table.getItem(topIndex).getData(); - + String calculatedAddress = null; if (topItem == null) { @@ -2305,44 +2305,44 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } else { - calculatedAddress = topItem.getAddress(); + calculatedAddress = topItem.getAddress(); } - + BigInteger bigInt = new BigInteger(calculatedAddress, 16); return bigInt; } return BigInteger.valueOf(0); } - + private int findAddressIndex(BigInteger address) { TableItem items[] = fTableViewer.getTable().getItems(); - + for (int i=0; i<items.length; i++){ - + // Again, when the table resizes, the table may have a null item // at then end. This is to handle that. if (items[i] != null) - { + { TableRenderingLine line = (TableRenderingLine)items[i].getData(); BigInteger lineAddress = new BigInteger(line.getAddress(), 16); int addressableUnit = getAddressableUnitPerLine(); BigInteger endLineAddress = lineAddress.add(BigInteger.valueOf(addressableUnit)); - + if (lineAddress.compareTo(address) <= 0 && endLineAddress.compareTo(address) > 0) - { + { return i; } } } - + return -1; } - + private static int getTopVisibleIndex(Table table) { int index = table.getTopIndex(); - + TableItem item; try { item = table.getItem(index); @@ -2350,7 +2350,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering return 0; } int cnt = table.getItemCount(); - + while (item.getBounds(0).y < 0) { index++; @@ -2361,120 +2361,120 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } item = table.getItem(index); } - + return index; } - + /** * Returns this rendering's table viewer. - * + * * @return the {@link TableViewer} */ public TableViewer getTableViewer() { return fTableViewer; } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.memory.IMemoryRendering#dispose() */ @Override public void dispose() { - try { + try { // prevent rendering from being disposed again if (fIsDisposed) { return; } - + fIsDisposed = true; - + if (fContentProvider != null) { fContentProvider.dispose(); } - + ScrollBar scroll = ((Table)fTableViewer.getControl()).getVerticalBar(); if (scroll != null && !scroll.isDisposed()) { scroll.removeSelectionListener(fScrollbarSelectionListener); } - + if (!fTableCursor.isDisposed()) { fTableCursor.removeTraverseListener(fCursorTraverseListener); fTableCursor.removeKeyListener(fCursorKeyAdapter); fTableCursor.removeMouseListener(fCursorMouseListener); } - + fCursorEditor.dispose(); - + fTextViewer = null; fTableViewer = null; fTableCursor = null; - + // clean up cell editors for (int i=0; i<fEditors.length; i++) { fEditors[i].dispose(); } - + // remove font change listener when the view tab is disposed JFaceResources.getFontRegistry().removeListener(this); - + // remove the view tab from the synchronizer IMemoryRenderingSynchronizationService syncService = getMemoryRenderingContainer().getMemoryRenderingSite().getSynchronizationService(); if (syncService != null) { syncService.removePropertyChangeListener(this); } - + DebugUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this); - + fToolTipShell.dispose(); - + if (getPopupMenuManager() != null) { getPopupMenuManager().removeMenuListener(fMenuListener); } - + super.dispose(); } catch (Exception e) {} } - + private int getNumCol() { - + int bytesPerLine = getBytesPerLine(); int columnSize = getBytesPerColumn(); - + return bytesPerLine/columnSize; } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.IMemoryViewTab#setFont(org.eclipse.swt.graphics.Font) */ private void setFont(Font font) - { + { int oldIdx = getTopVisibleIndex(fTableViewer.getTable()); - + // BUG in table, if font is changed when table is not starting // from the top, causes table grid-line to be misaligned. setTopIndex(fTableViewer.getTable(), 0); - + // set font fTableViewer.getTable().setFont(font); fTableCursor.setFont(font); - + setTopIndex(fTableViewer.getTable(), oldIdx); - + resizeColumnsToPreferredSize(); - + // update table cursor and force redraw setCursorAtAddress(fSelectedAddress); } - - + + /** * Moves the cursor to the specified address. * Will load more memory if the address is not currently visible. - * + * * @param address address to position cursor at * @throws DebugException if an exception occurs */ @@ -2482,21 +2482,21 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering public void goToAddress(BigInteger address) throws DebugException { Object evtLockClient = new Object(); try - { + { if (!fEvtHandleLock.acquireLock(evtLockClient)) { return; } - // if address is within the range, highlight + // if address is within the range, highlight if (!isAddressOutOfRange(address)) { setSelectedAddress(address); updateSyncSelectedAddress(); setCursorAtAddress(fSelectedAddress); - + // force the cursor to be shown if (!isAddressVisible(fSelectedAddress)) - { + { int i = findAddressIndex(fSelectedAddress); fTableViewer.getTable().showItem(fTableViewer.getTable().getItem(i)); } @@ -2509,7 +2509,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { Status stat = new Status( IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), - DebugException.NOT_SUPPORTED, DebugUIMessages.AbstractTableRendering_11, null + DebugException.NOT_SUPPORTED, DebugUIMessages.AbstractTableRendering_11, null ); DebugException e = new DebugException(stat); throw e; @@ -2517,32 +2517,32 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering BigInteger startAdd = fContentInput.getStartAddress(); BigInteger endAdd = fContentInput.getEndAddress(); - + if (address.compareTo(startAdd) < 0 || address.compareTo(endAdd) > 0) { Status stat = new Status( IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), - DebugException.NOT_SUPPORTED, DebugUIMessages.AbstractTableRendering_11, null + DebugException.NOT_SUPPORTED, DebugUIMessages.AbstractTableRendering_11, null ); DebugException e = new DebugException(stat); throw e; } - + setSelectedAddress(address); updateSyncSelectedAddress(); - + reloadTable(address, false); - + if (!isDynamicLoad()) - { + { updateSyncPageStartAddress(); } - + // if the table is reloaded, the top address is changed in this case fTopRowAddress = address; updateSyncTopAddress(); - + // set the cursor at the selected address after reload setCursorAtAddress(address); } @@ -2557,7 +2557,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering fEvtHandleLock.releaseLock(evtLockClient); } } - + /** * Check if address provided is out of buffered range * @param address the address @@ -2567,7 +2567,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { return fContentProvider.isAddressOutOfRange(address); } - + /** * Check if address is visible * @param address the address @@ -2575,23 +2575,23 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering */ private boolean isAddressVisible(BigInteger address) { - // if view tab is not yet created + // if view tab is not yet created // cursor should always be visible if (!fIsCreated) { return true; } - + BigInteger topVisible = getTopVisibleAddress(); int addressableUnit = getAddressableUnitPerLine(); BigInteger lastVisible = getTopVisibleAddress().add(BigInteger.valueOf((getNumberOfVisibleLines() * addressableUnit) + addressableUnit)); - + if (topVisible.compareTo(address) <= 0 && lastVisible.compareTo(address) > 0) { return true; } return false; } - + /** * Create actions for this rendering */ @@ -2600,21 +2600,21 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering fGoToAddressAction = new GoToAddressAction(getMemoryRenderingContainer(), this); fResetMemoryBlockAction = new ResetToBaseAddressAction(this); fPrintViewTabAction = new PrintTableRenderingAction(this, fTableViewer); - - fFormatRenderingAction = new FormatTableRenderingAction(this); + + fFormatRenderingAction = new FormatTableRenderingAction(this); fReformatAction = new ReformatAction(this); fToggleAddressColumnAction = new ToggleAddressColumnAction(); - + IMemoryRenderingSite site = getMemoryRenderingContainer().getMemoryRenderingSite(); if (site.getSite().getSelectionProvider() != null) { - fPropertiesAction = new PropertyDialogAction(site.getSite(),site.getSite().getSelectionProvider()); + fPropertiesAction = new PropertyDialogAction(site.getSite(),site.getSite().getSelectionProvider()); } - + fNextAction = new NextPageAction(); fPrevAction = new PrevPageAction(); } - + /** * Handle scrolling and reload table if necessary */ @@ -2622,23 +2622,23 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { Object evtLockClient = new Object(); try - { + { if (fIsDisposed) { return; } - + BigInteger address = getTopVisibleAddress(); - + if (!fTopRowAddress.equals(address)) { fTopRowAddress = address; updateSyncTopAddress(); } - + if (!fEvtHandleLock.acquireLock(evtLockClient)) { return; } - + if (getMemoryBlock() instanceof IMemoryBlockExtension) { @@ -2669,12 +2669,12 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } } else - { + { // approaching limit, reload table reloadTable(address, false); } } - + if (isAddressVisible(fSelectedAddress)) { fTableCursor.setVisible(true); } else { @@ -2687,53 +2687,53 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering fEvtHandleLock.releaseLock(evtLockClient); } } - - + + private boolean isAtTopLimit() - { + { BigInteger startAddress = fContentInput.getStartAddress(); startAddress = MemoryViewUtil.alignToBoundary(startAddress, getAddressableUnitPerLine() ); - + BigInteger startBufferAddress = fContentProvider.getBufferTopAddress(); startBufferAddress = MemoryViewUtil.alignToBoundary(startBufferAddress, getAddressableUnitPerLine()); - + if (startAddress.compareTo(startBufferAddress) == 0) { return true; } - + return false; } - + private boolean isAtBottomLimit() { BigInteger endAddress = fContentInput.getEndAddress(); endAddress = MemoryViewUtil.alignToBoundary(endAddress, getAddressableUnitPerLine()); - + BigInteger endBufferAddress = fContentProvider.getBufferEndAddress(); endBufferAddress = MemoryViewUtil.alignToBoundary(endBufferAddress, getAddressableUnitPerLine()); - + if (endAddress.compareTo(endBufferAddress) == 0) { return true; } - - return false; + + return false; } - + private boolean needMoreLines() { if (getMemoryBlock() instanceof IMemoryBlockExtension) - { + { Table table = fTableViewer.getTable(); TableItem firstItem = table.getItem(0); TableItem lastItem = table.getItem(table.getItemCount()-1); - + if (firstItem == null || lastItem == null) { return true; } - + TableRenderingLine first = (TableRenderingLine)firstItem.getData(); TableRenderingLine last = (TableRenderingLine) lastItem.getData(); - + if (first == null ||last == null) { // For some reason, the table does not return the correct number @@ -2741,18 +2741,18 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering // This check is to ensure that we don't get a null pointer exception. return true; } - + BigInteger startAddress = new BigInteger(first.getAddress(), 16); BigInteger lastAddress = new BigInteger(last.getAddress(), 16); int addressableUnit = getAddressableUnitPerLine(); lastAddress = lastAddress.add(BigInteger.valueOf(addressableUnit)); - + BigInteger topVisibleAddress = getTopVisibleAddress(); long numVisibleLines = getNumberOfVisibleLines(); long numOfBytes = numVisibleLines * addressableUnit; - + BigInteger lastVisibleAddrss = topVisibleAddress.add(BigInteger.valueOf(numOfBytes)); - + // if there are only 3 lines left at the top, refresh BigInteger numTopLine = topVisibleAddress.subtract(startAddress).divide(BigInteger.valueOf(addressableUnit)); if (numTopLine.compareTo(BigInteger.valueOf(getBufferThreshold(BUFFER_START))) <= 0 && (startAddress.compareTo(BigInteger.valueOf(0)) != 0)) @@ -2761,7 +2761,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering return true; } } - + // if there are only 3 lines left at the bottom, refresh BigInteger numBottomLine = lastAddress.subtract(lastVisibleAddrss).divide(BigInteger.valueOf(addressableUnit)); if (numBottomLine.compareTo(BigInteger.valueOf(getBufferThreshold(BUFFER_END))) <= 0) @@ -2770,10 +2770,10 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering return true; } } - + return false; } - + return false; } @@ -2783,7 +2783,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering TableItem selectedRow = null; int colNum = -1; int numCol = fTableViewer.getColumnProperties().length; - + for (int j=0; j<tableItems.length; j++) { TableItem item = tableItems[j]; @@ -2798,12 +2798,12 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } } } - + // if column position cannot be determined, return if (colNum < 1) { return; } - + // handle user mouse click onto table // move cursor to new position if (selectedRow != null) @@ -2811,15 +2811,15 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering int row = fTableViewer.getTable().indexOf(selectedRow); fTableCursor.setVisible(true); fTableCursor.setSelection(row, colNum); - + // manually call this since we don't get an event when // the table cursor changes selection. handleCursorMoved(); - + fTableCursor.setFocus(); - } + } } - + /** * Handle column size changed event from synchronizer * @param newColumnSize the new column size @@ -2837,7 +2837,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } }); } - + /** * @param newRowSize - new row size in number of bytes */ @@ -2847,7 +2847,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering if (!isVisible()) { return; } - + int bytesPerLine = newRowSize; int col = getBytesPerColumn(); if (bytesPerLine < getBytesPerColumn()) { @@ -2861,9 +2861,9 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering public void run() { format(rowSize, columnSize); } - }); + }); } - + private void handleCursorMouseEvent(MouseEvent e){ if (e.button == 1) { @@ -2871,19 +2871,19 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering if (col > 0 && col <= (getNumCol())) { activateCellEditor(null); } - } + } } - + /** * Activate cell editor and pre-fill it with initial value. * If initialValue is null, use cell content as initial value - * @param initialValue the initial value to edit + * @param initialValue the initial value to edit */ private void activateCellEditor(String initialValue) { - + int col = fTableCursor.getColumn(); int row = findAddressIndex(fSelectedAddress); - + if (row < 0) { return; } @@ -2892,22 +2892,22 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { return; } - + ICellModifier cellModifier = null; - + if (fTableViewer == null) { return; } cellModifier = fTableViewer.getCellModifier(); - + TableItem tableItem = fTableViewer.getTable().getItem(row); - + Object element = tableItem.getData(); Object property = fTableViewer.getColumnProperties()[col]; Object value = cellModifier.getValue(element, (String)property); - - // The cell modifier canModify function always returns false if the edit action + + // The cell modifier canModify function always returns false if the edit action // is not invoked from here. This is to prevent data to be modified when // the table cursor loses focus from a cell. By default, data will // be changed in a table when the cell loses focus. This is to workaround @@ -2916,57 +2916,57 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering ((TableRenderingCellModifier)cellModifier).setEditActionInvoked(true); boolean canEdit = cellModifier.canModify(element, (String)property); ((TableRenderingCellModifier)cellModifier).setEditActionInvoked(false); - + if (!canEdit) { return; } - + // activate based on current cursor position TextCellEditor selectedEditor = (TextCellEditor)fTableViewer.getCellEditors()[col]; - + if (fTableViewer != null && selectedEditor != null) { // The control that will be the editor must be a child of the Table Text text = (Text)selectedEditor.getControl(); - + String cellValue = null; - + if (initialValue != null) { - cellValue = initialValue; + cellValue = initialValue; } - else + else { cellValue = ((String)value); } - + text.setText(cellValue); - + fCursorEditor.horizontalAlignment = SWT.LEFT; fCursorEditor.grabHorizontal = true; - + // Open the text editor in selected column of the selected row. fCursorEditor.setEditor (text, tableItem, col); - + // Assign focus to the text control selectedEditor.setFocus(); - + if (initialValue != null) { text.clearSelection(); } - + text.setFont(JFaceResources.getFont(IInternalDebugUIConstants.FONT_NAME)); // add listeners for the text control addListeners(text); - + // move cursor below text control fTableCursor.moveBelow(text); } } - + /** * @param text the {@link Text} widget to add the listeners to */ @@ -2979,7 +2979,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } }; text.addFocusListener(fEditorFocusListener); - + fEditorKeyListener = new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { @@ -2989,16 +2989,16 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering text.addKeyListener(fEditorKeyListener); } - + /** * @param text the {@link Text} widget to remove the listeners from */ private void removeListeners(Text text) { - + text.removeFocusListener(fEditorFocusListener); text.removeKeyListener(fEditorKeyListener); } - + private void handleTableEditorFocusLost(FocusEvent event) { final FocusEvent e = event; @@ -3012,16 +3012,16 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { int row = findAddressIndex(fSelectedAddress); int col = fTableCursor.getColumn(); - + Text text = (Text)e.getSource(); removeListeners(text); // get new value String newValue = text.getText(); - + // modify memory at fRow and fCol modifyValue(row, col, newValue); - + // show cursor after modification is completed setCursorAtAddress(fSelectedAddress); fTableCursor.moveAbove(text); @@ -3030,13 +3030,13 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } catch (NumberFormatException e1) { - MemoryViewUtil.openError(DebugUIMessages.MemoryViewCellModifier_failure_title, + MemoryViewUtil.openError(DebugUIMessages.MemoryViewCellModifier_failure_title, DebugUIMessages.MemoryViewCellModifier_data_is_invalid, null); - } + } } - }); + }); } - + /** * @param event the {@link KeyEvent} */ @@ -3050,54 +3050,54 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering Text text = (Text)e.getSource(); int row = findAddressIndex(fSelectedAddress); int col = fTableCursor.getColumn(); - + try { switch (e.keyCode) { case SWT.ARROW_UP : - - // move text editor box up one row + + // move text editor box up one row if (row-1 < 0) { return; } - + // modify value for current cell modifyValue(row, col, text.getText()); - + row--; - // update cursor location and selection in table + // update cursor location and selection in table fTableCursor.setSelection(row, col); handleCursorMoved(); - + // remove listeners when focus is lost removeListeners(text); activateCellEditor(null); break; case SWT.ARROW_DOWN : - + // move text editor box down one row - + if (row+1 >= fTableViewer.getTable().getItemCount()) { return; } - + // modify value for current cell modifyValue(row, col, text.getText()); - + row++; - - // update cursor location and selection in table + + // update cursor location and selection in table fTableCursor.setSelection(row, col); handleCursorMoved(); - + // remove traverse listener when focus is lost removeListeners(text); - activateCellEditor(null); + activateCellEditor(null); break; case 0: - + // if user has entered the max number of characters allowed in a cell, move to next cell // Extra changes will be used as initial value for the next cell int numCharsPerByte = getNumCharsPerByte(); @@ -3107,9 +3107,9 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { String newValue = text.getText(); text.setText(newValue.substring(0, getBytesPerColumn()*numCharsPerByte)); - + modifyValue(row, col, text.getText()); - + // if cursor is at the end of a line, move to next line if (col >= getNumCol()) { @@ -3121,34 +3121,34 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering // move to next column row++; } - + // update cursor position and selected address fTableCursor.setSelection(row, col); handleCursorMoved(); - + removeListeners(text); - + // activate text editor at next cell activateCellEditor(newValue.substring(getBytesPerColumn()*numCharsPerByte)); } } - break; + break; case SWT.ESC: // if user has pressed escape, do not commit the changes // that's why "modifyValue" is not called fTableCursor.setSelection(row, col); handleCursorMoved(); - + removeListeners(text); - + // cursor needs to have focus to remove focus from cell editor fTableCursor.setFocus(); - break; + break; default : numCharsPerByte = getNumCharsPerByte(); if (numCharsPerByte > 0) - { + { if (text.getText().length()> getBytesPerColumn()* numCharsPerByte) { String newValue = text.getText(); @@ -3164,12 +3164,12 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { col++; } - + fTableCursor.setSelection(row, col); handleCursorMoved(); - + removeListeners(text); - + activateCellEditor(newValue.substring(getBytesPerColumn()*numCharsPerByte)); } } @@ -3178,19 +3178,19 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } catch (NumberFormatException e1) { - MemoryViewUtil.openError(DebugUIMessages.MemoryViewCellModifier_failure_title, + MemoryViewUtil.openError(DebugUIMessages.MemoryViewCellModifier_failure_title, DebugUIMessages.MemoryViewCellModifier_data_is_invalid, null); - + fTableCursor.setSelection(row, col); handleCursorMoved(); - + removeListeners(text); } } }); } - + /** * Modify value and send new value to debug adapter * @param row the row @@ -3201,23 +3201,23 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering private void modifyValue(int row, int col, String newValue) throws NumberFormatException { if (newValue.length() == 0) - { + { // do not do anything if user has not entered anything return; } - + TableItem tableItem = fTableViewer.getTable().getItem(row); Object property = fTableViewer.getColumnProperties()[col]; fTableViewer.getCellModifier().modify(tableItem, (String)property, newValue); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.memory.IMemoryRendering#becomesHidden() */ @Override public void becomesHidden() { - + if (isVisible() == false) { // super should always be called @@ -3226,25 +3226,25 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } super.becomesHidden(); - + if (getMemoryBlock() instanceof IMemoryBlockExtension) - { + { updateRenderingLabel(false); } - + // once the view tab is disabled, all deltas information becomes invalid. // reset changed information and recompute if data has really changed when - // user revisits the same tab. + // user revisits the same tab. fContentProvider.resetDeltas(); - + } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.memory.IMemoryRendering#becomesVisible() */ @Override public void becomesVisible() { - + // do not do anything if already visible if (isVisible() == true) { @@ -3252,9 +3252,9 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering super.becomesVisible(); return; } - + super.becomesVisible(); - + boolean value = DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IDebugPreferenceConstants.PREF_DYNAMIC_LOAD_MEM); if (value != isDynamicLoad()) { // this call will cause a reload @@ -3262,17 +3262,17 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } else { refresh(); } - + synchronize(); updateRenderingLabel(true); } - + /** * Resets this memory rendering. * The cursor will be moved to the base address of the memory block. * The table will be positioned to have the base address * at the top. - * + * * @deprecated use <code>resetRendering</code> to reset this rendering. */ @Deprecated @@ -3284,9 +3284,9 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering MemoryViewUtil.openError(DebugUIMessages.AbstractTableRendering_12, DebugUIMessages.AbstractTableRendering_13, e); // } } - + /** - * Reset this rendering to the base address. + * Reset this rendering to the base address. * The cursor will be moved to the base address of the memory block. * The table will be positioned to have the base address * at the top. @@ -3308,10 +3308,10 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering goToAddress(baseAddress); topVisibleAddressChanged(baseAddress, true); } - + /** * Returns the currently selected address in this rendering. - * + * * @return the currently selected address in this rendering */ @Override @@ -3321,7 +3321,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering /** * Returns the currently selected content in this rendering as a String. - * + * * @return the currently selected content in this rendering */ @Override @@ -3330,31 +3330,31 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering if (isAddressOutOfRange(fSelectedAddress)) { return IInternalDebugCoreConstants.EMPTY_STRING; } - + int col = fTableCursor.getColumn(); TableItem rowItem = fTableCursor.getRow(); int row = fTableViewer.getTable().indexOf(rowItem); - + if (col == 0) { return rowItem.getText(0); } - + // check precondition if (col > getBytesPerLine()/getBytesPerColumn()) { return IInternalDebugCoreConstants.EMPTY_STRING; } - + TableItem tableItem = getTableViewer().getTable().getItem(row); - - return tableItem.getText(col); + + return tableItem.getText(col); } - + /** * Returns the currently selected content in this rendering as MemoryByte. - * - * @return the currently selected content in array of MemoryByte. + * + * @return the currently selected content in array of MemoryByte. * Returns an empty array if the selected address is out of buffered range. */ @Override @@ -3363,39 +3363,39 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering if (isAddressOutOfRange(fSelectedAddress)) { return new MemoryByte[0]; } - + int col = fTableCursor.getColumn(); TableItem rowItem = fTableCursor.getRow(); - + // check precondition if (col == 0 || col > getBytesPerLine()/getBytesPerColumn()) { return new MemoryByte[0]; } - + Object data = rowItem.getData(); if (data == null || !(data instanceof TableRenderingLine)) { return new MemoryByte[0]; } - + TableRenderingLine line = (TableRenderingLine)data; int offset = (col-1)*(getAddressableUnitPerColumn()*getAddressableSize()); int end = offset + (getAddressableUnitPerColumn()*getAddressableSize()); - + // make a copy of the bytes to ensure that data cannot be changed // by caller MemoryByte[] bytes = line.getBytes(offset, end); MemoryByte[] retBytes = new MemoryByte[bytes.length]; - + System.arraycopy(bytes, 0, retBytes, 0, bytes.length); - + return retBytes; } - + /** * Returns the number of characters a byte will convert to * or -1 if unknown. - * + * * @return the number of characters a byte will convert to * or -1 if unknown */ @@ -3404,9 +3404,9 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { return -1; } - + private int getMinTableItemHeight(Table table){ - + // Hack to get around Linux GTK problem. // On Linux GTK, table items have variable item height as // carriage returns are actually shown in a cell. Some rows will be @@ -3423,36 +3423,36 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { minHeight = Math.min(items[i].getBounds(0).height, minHeight); } - + return minHeight; - + } return table.getItemHeight(); } - + /* (non-Javadoc) * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class) */ @SuppressWarnings("unchecked") @Override public <T> T getAdapter(Class<T> adapter) { - + if (adapter == IColorProvider.class) { return (T) getColorProviderAdapter(); } - + if (adapter == ILabelProvider.class) { return (T) getLabelProviderAdapter(); } - + if (adapter == IFontProvider.class) { return (T) getFontProviderAdapter(); } - + if (adapter == IMemoryBlockTablePresentation.class) { return (T) getTablePresentationAdapter(); } - + if (adapter == IWorkbenchAdapter.class) { // needed workbench adapter to fill the title of property page @@ -3462,17 +3462,17 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering public Object[] getChildren(Object o) { return new Object[0]; } - + @Override public ImageDescriptor getImageDescriptor(Object object) { return null; } - + @Override public String getLabel(Object o) { return AbstractTableRendering.this.getLabel(); } - + @Override public Object getParent(Object o) { return null; @@ -3481,7 +3481,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } return (T) fWorkbenchAdapter; } - + if (adapter == IMemoryBlockConnection.class) { if (fConnection == null) { fConnection = new IMemoryBlockConnection() { @@ -3505,21 +3505,21 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } else { fContentProvider.loadContentForSimpleMemoryBlock(); } - + // update UI asynchronously Display display = DebugUIPlugin.getDefault().getWorkbench().getDisplay(); display.asyncExec(new Runnable() { @Override public void run() { updateLabels(); - + if (getMemoryBlock() instanceof IMemoryBlockExtension) { int topIdx = findAddressIndex(fTopRowAddress); if (topIdx != -1) { setTopIndex(fTableViewer.getTable(),topIdx); } } - + // cursor needs to be refreshed after reload if (isAddressVisible(fSelectedAddress)) { @@ -3531,11 +3531,11 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { fTableCursor.setVisible(false); } - + if (!isDynamicLoad()) { updateSyncPageStartAddress(); } - + updateSyncTopAddress(); } }); @@ -3546,11 +3546,11 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering }; } return (T) fConnection; - } - + } + return super.getAdapter(adapter); } - + private boolean hasCustomizedDecorations() { if (getFontProviderAdapter() == null && @@ -3560,7 +3560,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } return true; } - + private boolean isBaseAddressChanged() { try { @@ -3580,7 +3580,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } return false; } - + /** * Returns the color provider for this rendering's memory block or * <code>null</code> if none. @@ -3588,7 +3588,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering * By default a color provider is obtained by asking this rendering's * memory block for its {@link IColorProvider} adapter. When the color * provider is queried for color information, it is provided with a - * {@link MemoryRenderingElement} as an argument. + * {@link MemoryRenderingElement} as an argument. * </p> * @return the color provider for this rendering's memory block, * or <code>null</code> @@ -3597,7 +3597,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { return getMemoryBlock().getAdapter(IColorProvider.class); } - + /** * Returns the label provider for this rendering's memory block or * <code>null</code> if none. @@ -3605,7 +3605,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering * By default a label provider is obtained by asking this rendering's * memory block for its {@link ILabelProvider} adapter. When the label * provider is queried for label information, it is provided with a - * {@link MemoryRenderingElement} as an argument. + * {@link MemoryRenderingElement} as an argument. * </p> * @return the label provider for this rendering's memory block, * or <code>null</code> @@ -3614,7 +3614,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { return getMemoryBlock().getAdapter(ILabelProvider.class); } - + /** * Returns the font provider for this rendering's memory block or * <code>null</code> if none. @@ -3622,7 +3622,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering * By default a font provider is obtained by asking this rendering's * memory block for its {@link IFontProvider} adapter. When the font * provider is queried for font information, it is provided with a - * {@link MemoryRenderingElement} as an argument. + * {@link MemoryRenderingElement} as an argument. * </p> * @return the font provider for this rendering's memory block, * or <code>null</code> @@ -3631,7 +3631,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { return getMemoryBlock().getAdapter(IFontProvider.class); } - + /** * Returns the table presentation for this rendering's memory block or * <code>null</code> if none. @@ -3646,27 +3646,27 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { return getMemoryBlock().getAdapter(IMemoryBlockTablePresentation.class); } - + private boolean isDynamicLoad() { return fContentProvider.isDynamicLoad(); } - + private int getPageSizeInUnits() { return fPageSize * getAddressableUnitPerLine(); } - + private void setSelectedAddress(BigInteger address) { fSelectedAddress = address; } - + /** * Setup the viewer so it supports hovers to show the offset of each field */ private void createToolTip() { - + fToolTipShell = new Shell(DebugUIPlugin.getShell(), SWT.ON_TOP | SWT.RESIZE ); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 1; @@ -3674,66 +3674,66 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering gridLayout.marginHeight = 0; fToolTipShell.setLayout(gridLayout); fToolTipShell.setBackground(fTableViewer.getTable().getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND)); - + final Control toolTipControl = createToolTipControl(fToolTipShell); - + if (toolTipControl == null) { // if client decide not to use tooltip support fToolTipShell.dispose(); return; } - + MouseTrackAdapter listener = new MouseTrackAdapter(){ - + private TableItem fTooltipItem = null; private int fCol = -1; - + @Override public void mouseExit(MouseEvent e){ - + if (!fToolTipShell.isDisposed()) { fToolTipShell.setVisible(false); } fTooltipItem = null; } - + @Override public void mouseHover(MouseEvent e){ - + Point hoverPoint = new Point(e.x, e.y); Control control = null; - + if (e.widget instanceof Control) { control = (Control)e.widget; } - + if (control == null) { return; } - + hoverPoint = control.toDisplay(hoverPoint); TableItem item = getItem(hoverPoint); int column = getColumn(hoverPoint); - + //Only if there is a change in hover if(this.fTooltipItem != item || fCol != column){ - + //Keep Track of the latest hover fTooltipItem = item; fCol = column; - + if(item != null){ toolTipAboutToShow(toolTipControl, fTooltipItem, column); - + //Setting location of the tooltip Rectangle shellBounds = fToolTipShell.getBounds(); shellBounds.x = hoverPoint.x; shellBounds.y = hoverPoint.y + item.getBounds(0).height; - + fToolTipShell.setBounds(shellBounds); fToolTipShell.pack(); - + fToolTipShell.setVisible(true); } else { @@ -3742,11 +3742,11 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } } }; - + fTableViewer.getTable().addMouseTrackListener(listener); fTableCursor.addMouseTrackListener(listener); } - + /** * Bug with table widget,BUG 113015, the widget is not able to return the correct * table item if SWT.FULL_SELECTION is not on when the table is created. @@ -3763,14 +3763,14 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering Point start = new Point(items[i].getBounds(0).x, items[i].getBounds(0).y); start = fTableViewer.getTable().toDisplay(start); Point end = new Point(start.x + items[i].getBounds(0).width, start.y + items[i].getBounds(0).height); - + if (start.y < point.y && point.y < end.y) { return items[i]; } } return null; } - + /** * Method for figuring out which column the point is located. * @param point the {@link Point} to et the column number for @@ -3798,7 +3798,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering * a label is used to display the address of the cell. Clients may override this * method to create custom tooltip controls. * <p> - * Also see the methods <code>getToolTipText(...)</code> and + * Also see the methods <code>getToolTipText(...)</code> and * <code>toolTipAboutToShow(...)</code>. * </p> * @param composite parent for the tooltip control @@ -3813,8 +3813,8 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering GridData.VERTICAL_ALIGN_CENTER)); return fToolTipLabel; } - - + + /* (non-Javadoc) * @see org.eclipse.debug.ui.memory.IResettableMemoryRendering#resetRendering() */ @@ -3868,13 +3868,13 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } } } - + /** * Returns the text to display in a tool tip at the specified address * for the specified bytes. By default the address of the bytes is displayed. * Subclasses may override. - * - * @param address address of cell that tool tip is displayed for + * + * @param address address of cell that tool tip is displayed for * @param bytes the bytes in the cell * @return the tooltip text for the memory bytes located at the specified * address @@ -3884,11 +3884,11 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { StringBuffer buf = new StringBuffer("0x"); //$NON-NLS-1$ buf.append(address.toString(16).toUpperCase()); - + return buf.toString(); } - - + + private String getRowPrefId(String modelId) { String rowPrefId = IDebugPreferenceConstants.PREF_ROW_SIZE + ":" + modelId; //$NON-NLS-1$ return rowPrefId; @@ -3898,7 +3898,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering String colPrefId = IDebugPreferenceConstants.PREF_COLUMN_SIZE + ":" + modelId; //$NON-NLS-1$ return colPrefId; } - + /** * @param modelId the debug model identifier * @return default number of addressable units per line for the model @@ -3910,12 +3910,12 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { DebugUITools.getPreferenceStore().setValue(getRowPrefId(modelId), IDebugPreferenceConstants.PREF_ROW_SIZE_DEFAULT); } - + row = DebugUITools.getPreferenceStore().getInt(getRowPrefId(modelId)); return row; - + } - + /** * @param modelId the debug model identifier * @return default number of addressable units per column for the model @@ -3927,11 +3927,11 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering { DebugUITools.getPreferenceStore().setValue(getColumnPrefId(modelId), IDebugPreferenceConstants.PREF_COLUMN_SIZE_DEFAULT); } - + col = DebugUITools.getPreferenceStore().getInt(getColumnPrefId(modelId)); return col; } - + private int getBufferThreshold(int startOrEnd) { if (startOrEnd == BUFFER_START) @@ -3941,20 +3941,20 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering } return BUFFER_THRESHOLD; } - + if (BUFFER_THRESHOLD > fPostBuffer) { return fPostBuffer; } - + return BUFFER_THRESHOLD; } - + /** * Returns text for the given memory bytes at the specified address for the specified * rendering type. This is called by the label provider for. * Subclasses must override. - * + * * @param renderingTypeId rendering type identifier * @param address address where the bytes belong to * @param data the bytes @@ -3964,7 +3964,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering */ @Override abstract public String getString(String renderingTypeId, BigInteger address, MemoryByte[] data); - + /** * Returns bytes for the given text corresponding to bytes at the given * address for the specified rendering type. This is called by the cell modifier @@ -3972,7 +3972,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering * Subclasses must convert the string value to an array of bytes. The bytes will * be passed to the debug adapter for memory block modification. * Returns <code>null</code> if the bytes cannot be formatted properly. - * + * * @param renderingTypeId rendering type identifier * @param address address the bytes begin at * @param currentValues current values of the data in bytes format @@ -3983,5 +3983,5 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering abstract public byte[] getBytes(String renderingTypeId, BigInteger address, MemoryByte[] currentValues, String newValue); -} +} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTextRendering.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTextRendering.java index fc5758bd8..13d7aa379 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTextRendering.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTextRendering.java @@ -19,7 +19,7 @@ import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.debug.ui.IDebugUIConstants; /** - * Abstract implementation of a rendering that translates memory into + * Abstract implementation of a rendering that translates memory into * text, displayed in a table. * <p> * Clients should subclass from this class if they wish to provide a table @@ -27,24 +27,24 @@ import org.eclipse.debug.ui.IDebugUIConstants; * </p> * @since 3.1 */ -abstract public class AbstractTextRendering extends AbstractTableRendering { - +abstract public class AbstractTextRendering extends AbstractTableRendering { + private String fCodePage; /** * Constructs a text rendering of the specified type. - * + * * @param renderingId memory rendering type identifier */ public AbstractTextRendering(String renderingId) { super(renderingId); } - + /** * Constructs a text rendering of the specified type on the given * code page. - * + * * @param renderingId memory rendering type identifier * @param codePage the name of a supported * {@link java.nio.charset.Charset </code>charset<code>}, for @@ -55,12 +55,12 @@ abstract public class AbstractTextRendering extends AbstractTableRendering { super(renderingId); fCodePage = codePage; } - + /** * Sets the code page for this rendering. This does not cause * the rendering to be updated with the new code page. Clients need * to update the rendering manually when the code page is changed. - * + * * @param codePage the name of a supported * {@link java.nio.charset.Charset </code>charset<code>}, for * example <code>CP1252</code> @@ -69,7 +69,7 @@ abstract public class AbstractTextRendering extends AbstractTableRendering { { fCodePage = codePage; } - + /** * Returns the current code page used by this rendering. Returns null * if not set. @@ -80,7 +80,7 @@ abstract public class AbstractTextRendering extends AbstractTableRendering { { return fCodePage; } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.memory.AbstractTableRendering#getString(java.lang.String, java.math.BigInteger, org.eclipse.debug.core.model.MemoryByte[]) */ @@ -90,7 +90,7 @@ abstract public class AbstractTextRendering extends AbstractTableRendering { String paddedStr = DebugUIPlugin.getDefault().getPreferenceStore().getString(IDebugUIConstants.PREF_PADDED_STR); if(fCodePage == null) return IInternalDebugCoreConstants.EMPTY_STRING; - + boolean[] invalid = new boolean[data.length]; boolean hasInvalid = false; byte byteArray[] = new byte[data.length]; @@ -103,7 +103,7 @@ abstract public class AbstractTextRendering extends AbstractTableRendering { } byteArray[i] = data[i].getValue(); } - + if (hasInvalid) { StringBuffer strBuf = new StringBuffer(); @@ -123,7 +123,7 @@ abstract public class AbstractTextRendering extends AbstractTableRendering { return "-- error --"; //$NON-NLS-1$ } } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.memory.AbstractTableRendering#getBytes(java.lang.String, java.math.BigInteger, org.eclipse.debug.core.model.MemoryByte[], java.lang.String) @@ -131,13 +131,13 @@ abstract public class AbstractTextRendering extends AbstractTableRendering { @Override public byte[] getBytes(String dataType, BigInteger address, MemoryByte[] currentValues, String data) { try { - + if (fCodePage == null) return new byte[0]; - + byte[] bytes = data.getBytes(fCodePage); return bytes; - + } catch (UnsupportedEncodingException e) { return new byte[0]; } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryBlockTablePresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryBlockTablePresentation.java index ff860039a..66f471f57 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryBlockTablePresentation.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryBlockTablePresentation.java @@ -25,7 +25,7 @@ import org.eclipse.debug.ui.IDebugModelPresentation; * presentation as documented in <code>org.eclipse.debug.ui.IDebugModelPresentation</code>. * In addition, implement this interface in your debug model presentation. Your model * presentation will be called when <code>org.eclipse.debug.ui.memory.AbstractTableRendering</code> - * constructs its column and row labels. + * constructs its column and row labels. * </p> * <p> * Clients may implement this interface. @@ -34,29 +34,29 @@ import org.eclipse.debug.ui.IDebugModelPresentation; */ public interface IMemoryBlockTablePresentation extends IDebugModelPresentation { - + /** * Returns a collection of labels to head columns in a <code>AbstractTableRendering</code> * rendering, or <code>null</code> if default labels should be used. - * + * * @param blk memory block * @param bytesPerLine the number if bytes to be displayed - * @param numColumns the number of columns the bytes are divided into + * @param numColumns the number of columns the bytes are divided into * @return a collection of labels to head columns in a <code>AbstractTableRendering</code> * rendering, or <code>null</code> if default labels should be used */ public String[] getColumnLabels(IMemoryBlock blk, int bytesPerLine, int numColumns); - - + + /** * Renders and returns a label for a row starting at the given address within the given * memory block, or <code>null</code> if default rendering should be used. - * + * * @param blk memory block * @param address an address in the memory block * @return a label for a row starting at the given address within the given * memory block, or <code>null</code> if default rendering should be used */ public String getRowLabel(IMemoryBlock blk, BigInteger address); - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRendering.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRendering.java index 36c602483..b8e14e1a1 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRendering.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRendering.java @@ -57,7 +57,7 @@ import org.eclipse.swt.widgets.Control; * rendering is activated, it should set itself as the synchrnoization provider in its * rendering site and fire property change events to communicate information to * interested listeners. - * </p> + * </p> * <p> * Clients contributing a memory rendering type are intended to implement this interface * and <code>IMemoryRenderingTypeDelegate</code>. The factory will be used to create instances @@ -66,17 +66,17 @@ import org.eclipse.swt.widgets.Control; * @since 3.1 */ public interface IMemoryRendering extends IAdaptable{ - + /** * Initializes this rendering to be hosted in the given container, displaying * the given memory block. This method is called before this rendering's control * has been created. - * + * * @param container container hosting this rendering * @param block the memory block to render */ public void init(IMemoryRenderingContainer container, IMemoryBlock block); - + /** * Creates the top level control for this rendering under the given parent composite. * This method is called after this rendering's <code>init</code> method has been @@ -99,58 +99,58 @@ public interface IMemoryRendering extends IAdaptable{ * @return the top level control or <code>null</code> */ public Control getControl(); - + /** * Disposes this rendering. */ public void dispose(); - + /** * Notification this rendering has become the active rendering. Only one * rendering can be active at once. Generally, the active rendering is * visible and has focus. */ public void activated(); - + /** * Notification this rendering is no longer the active rendering. */ public void deactivated(); - + /** * Notification this rendering has become visible in its container. * Note that a rendering does not have to be active to be visible. */ public void becomesVisible(); - + /** * Notification this rendering has become hidden in its container. */ public void becomesHidden(); - + /** * Returns the memory block displayed by this rendering. - * + * * @return the memory block displayed by this rendering */ public IMemoryBlock getMemoryBlock(); - + /** * Returns the identifier associated with this rendering's type. - * + * * @return the identifier associated with this rendering's type * @see IMemoryRenderingType */ public String getRenderingId(); - + /** * Adds a listener for property changes to this rendering. * Has no effect if an identical listener is already registered. - * + * * @param listener a property change listener */ public void addPropertyChangeListener(IPropertyChangeListener listener); - + /** * Removes the given property change listener from this rendering. * Has no effect if the identical listener is not registered. @@ -158,19 +158,19 @@ public interface IMemoryRendering extends IAdaptable{ * @param listener a property change listener */ public void removePropertyChangeListener(IPropertyChangeListener listener); - + /** * Returns an image for this rendering. Clients should not dispose * this image. This rendering will dispose the image if required when * this rendering is disposed. - * + * * @return an image for this rendering */ public Image getImage(); - + /** * Returns a label for this rendering. - * + * * @return a label for this rendering */ public String getLabel(); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingBindingsListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingBindingsListener.java index 6e5ab8c43..6d8512384 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingBindingsListener.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingBindingsListener.java @@ -4,14 +4,14 @@ * 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.ui.memory; -/** +/** * A rendering bindings listener is notified of changes in the renderings provided by * a rendering bindings provider. When bindings change, a memory block may be bound * to a different set of renderings. @@ -25,7 +25,7 @@ package org.eclipse.debug.ui.memory; * @see IMemoryRenderingBindingsProvider#removeListener */ public interface IMemoryRenderingBindingsListener { - + /** * Notification that the bindings provided by a rendering bindings * provider have changed. diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingBindingsProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingBindingsProvider.java index e70659f32..4ffb32fbd 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingBindingsProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingBindingsProvider.java @@ -28,36 +28,36 @@ import org.eclipse.debug.core.model.IMemoryBlock; * @since 3.1 */ public interface IMemoryRenderingBindingsProvider { - + /** * Returns all rendering types bound to the given memory block. * This includes default and primary rendering types. - * + * * @param block memory block * @return all rendering types bound to the given memory block */ public IMemoryRenderingType[] getRenderingTypes(IMemoryBlock block); - + /** - * Returns default rendering types bound to the given memory block, + * Returns default rendering types bound to the given memory block, * possibly empty. - * + * * @param block memory block - * @return default rendering types bound to the given memory block, + * @return default rendering types bound to the given memory block, * possibly empty */ public IMemoryRenderingType[] getDefaultRenderingTypes(IMemoryBlock block); - + /** * Returns the primary rendering type bound to the given memory block, * or <code>null</code> if none. - * + * * @param block memory block * @return the primary rendering type bound to the given memory block, * or <code>null</code> if none */ public IMemoryRenderingType getPrimaryRenderingType(IMemoryBlock block); - + /** * Adds a listener to this binding provider. The listener will be notified * when rendering bindings change. @@ -67,9 +67,9 @@ public interface IMemoryRenderingBindingsProvider { * @param listener listener to add */ public void addListener(IMemoryRenderingBindingsListener listener); - + /** - * Removes a listener from this binding provider. + * Removes a listener from this binding provider. * <p> * Has no effect if an identical listener is not already registered. * </p> diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingContainer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingContainer.java index 9b5717d93..6870adbc8 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingContainer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingContainer.java @@ -17,61 +17,61 @@ package org.eclipse.debug.ui.memory; * for hosting a memory renderings. * <p> * Clients hosting memory renderings may implement this interface. - * </p> + * </p> * @since 3.1 */ public interface IMemoryRenderingContainer { /** * Returns the rendering site hosting this container. - * + * * @return the rendering site hosting this container */ public IMemoryRenderingSite getMemoryRenderingSite(); - + /** * Returns the identifier of this container. Identifiers * are unique within a container. - * + * * @return the identifier of this container */ public String getId(); - + /** * Adds the given rendering to this container. A rendering must be * initialized before it is added to a container. This causes * the rendering's control to be created. - * + * * @param rendering the rendering to add */ public void addMemoryRendering(IMemoryRendering rendering); - + /** - * Removes the given rendering from this container. This + * Removes the given rendering from this container. This * causes the rendering to be disposed. - * + * * @param rendering the rendering to remove */ public void removeMemoryRendering(IMemoryRendering rendering); - + /** * Returns all renderings currently hosted by this container. - * + * * @return all renderings currently hosted by this container */ public IMemoryRendering[] getRenderings(); - + /** * Returns the active rendering in this container, or <code>null</code> * if none. - * + * * @return the active rendering in this container, or <code>null</code> * if none */ public IMemoryRendering getActiveRendering(); - + /** * Returns the label for this container. - * + * * @return the label for this container */ public String getLabel(); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingManager.java index be00945f3..2c7f107e8 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingManager.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingManager.java @@ -20,29 +20,29 @@ package org.eclipse.debug.ui.memory; * @noextend This interface is not intended to be extended by clients. */ public interface IMemoryRenderingManager extends IMemoryRenderingBindingsProvider { - - + + /** * Returns all contributed memory rendering types. - * + * * @return all contributed memory rendering types */ public IMemoryRenderingType[] getRenderingTypes(); - + /** * Returns the memory rendering type with the given identifier, or * <code>null</code> if none. The memory rendering manager will * search through rendering types that are contributed via explicit * rendering bindings. (i.e. rendering types contributed via the - * memoryRenderings extension point). This method will not return + * memoryRenderings extension point). This method will not return * rendering types that are contributed by a memory binding provider. - * + * * @param id memory rendering type identifier * @return the memory rendering type with the given identifier, or * <code>null</code> if none */ public IMemoryRenderingType getRenderingType(String id); - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSite.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSite.java index 027cf5121..319770336 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSite.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSite.java @@ -18,7 +18,7 @@ import org.eclipse.ui.IWorkbenchPartSite; * <p> * A rendering site has an optional synchronization provider at any one time. If a * rendering provides synchronization information it should set itself as the synchronization - * provider for its memory rendering site when it is activated. + * provider for its memory rendering site when it is activated. * </p> * <p> * Clients hosting memory rendering may implement this interface. @@ -29,26 +29,26 @@ public interface IMemoryRenderingSite { /** * Returns the workbench part site hosting memory renderings for this rendering site. - * + * * @return the view site hosting memory renderings for this rendering site */ public IWorkbenchPartSite getSite(); - + /** * Returns the syncrhonization service for this rendering site * or <code>null</code> if none. - * + * * @return the syncrhonization service for this rendering site or <code>null</code> */ public IMemoryRenderingSynchronizationService getSynchronizationService(); - + /** * Returns all the memory rendering containers within this rendering site. - * + * * @return all the memory rendering containers within this rendering site */ public IMemoryRenderingContainer[] getMemoryRenderingContainers(); - + /** * Returns the rendering container with the given id or <code>null</code> * if none. @@ -58,6 +58,6 @@ public interface IMemoryRenderingSite { * if none */ public IMemoryRenderingContainer getContainer(String id); - - + + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSite2.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSite2.java index 037811e97..94fed29ef 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSite2.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSite2.java @@ -11,16 +11,16 @@ package org.eclipse.debug.ui.memory; /** - * Extension to memory site that allows a client to request a rendering container + * Extension to memory site that allows a client to request a rendering container * to become visible. - * + * * @since 3.8 */ public interface IMemoryRenderingSite2 extends IMemoryRenderingSite { - + /** - * Sets whether the identified container should be visible. - * + * Sets whether the identified container should be visible. + * * @param id identifier of the container to be affected * @param visible whether the given container should be made visible */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSynchronizationService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSynchronizationService.java index 9a3de4368..bf81198de 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSynchronizationService.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSynchronizationService.java @@ -22,19 +22,19 @@ import org.eclipse.jface.util.IPropertyChangeListener; * @since 3.1 */ public interface IMemoryRenderingSynchronizationService { - + /** * Adds a listener for property changes notification for the specified properties. - * Specifying <code>null</code> indicates that the listener is interested in all + * Specifying <code>null</code> indicates that the listener is interested in all * properties. If an identical listener is already registered, the properties * it is registered to listen for are updated. * * @param listener a property change listener * @param properties properties the listener is interested in, or <code>null</code> * to indicate all properties. - */ + */ public void addPropertyChangeListener(IPropertyChangeListener listener, String[] properties); - + /** * Removes the given listener for property change notification. * Has no effect if the identical listener is not registered. @@ -42,31 +42,31 @@ public interface IMemoryRenderingSynchronizationService { * @param listener a property change listener */ public void removePropertyChangeListener(IPropertyChangeListener listener); - + /** * Returns the current value of the specified property for the given memory block, or * <code>null</code> if none. - * + * * @param block memory block for which a property is requested * @param property the name of the property * @return the property value or <code>null</code> */ public Object getProperty(IMemoryBlock block, String property); - + /** * Sets the rendering currently providing sychronization information for * this synchronization service, or <code>null</code> if none. - * + * * @param rendering active rendering providing synchronization information or * <code>null</code> */ public void setSynchronizationProvider(IMemoryRendering rendering); - + /** * Returns the rendering currently providing synchronization information for * this synchronization service, or <code>null</code if none. - * + * * @return rendering providing synchronization information or <code>null</code> */ - public IMemoryRendering getSynchronizationProvider(); + public IMemoryRendering getSynchronizationProvider(); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingType.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingType.java index 3fff87eee..a2769eee6 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingType.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingType.java @@ -19,32 +19,32 @@ import org.eclipse.core.runtime.CoreException; * Clients contributing a rendering usually * implement {@link org.eclipse.debug.ui.memory.IMemoryRenderingTypeDelegate} * and {@link org.eclipse.debug.ui.memory.IMemoryRendering}. Clients providing - * dynamic rendering bindings via an + * dynamic rendering bindings via an * {@link org.eclipse.debug.ui.memory.IMemoryRenderingBindingsProvider} * may implement this interface. * </p> * @since 3.1 */ public interface IMemoryRenderingType { - + /** * Returns a label for this type of memory rendering. - * + * * @return a label for this type of memory rendering */ public String getLabel(); - + /** * Returns the unique identifier for this rendering type. - * + * * @return the unique identifier for this rendering type */ public String getId(); - + /** * Creates and returns a new rendering of this type or <code>null</code> * if none. - * + * * @return a new rendering of this type * @exception CoreException if an exception occurs creating * the rendering diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingTypeDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingTypeDelegate.java index 94291240b..0e273c203 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingTypeDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingTypeDelegate.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,17 +16,17 @@ import org.eclipse.core.runtime.CoreException; * A factory that creates memory renderings. * <p> * Clients contributing a memory rendering type are intended to implement this - * interface. This factory will be used to create renderings. + * interface. This factory will be used to create renderings. * </p> * @since 3.1 * @see org.eclipse.debug.ui.memory.IMemoryRendering */ public interface IMemoryRenderingTypeDelegate { - + /** * Creates and returns a rendering of the specified type, or <code>null</code> * if none. - * + * * @param id unique identifier of a memory rendering type * @return a new rendering of the given type or <code>null</code> * @exception CoreException if unable to create the rendering diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IRepositionableMemoryRendering.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IRepositionableMemoryRendering.java index ff755edcd..24cac1aef 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IRepositionableMemoryRendering.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IRepositionableMemoryRendering.java @@ -17,8 +17,8 @@ import org.eclipse.debug.core.model.MemoryByte; /** * A memory rendering that can be repositioned. Reposition behavior is rendering - * specific. Typically, reposition means that the rendering should move its - * cursor/current selection to the given address. However, clients may define + * specific. Typically, reposition means that the rendering should move its + * cursor/current selection to the given address. However, clients may define * its reposition behavior that is suitable for the rendering. * <p> * Clients may implement this interface. @@ -27,15 +27,15 @@ import org.eclipse.debug.core.model.MemoryByte; * */ public interface IRepositionableMemoryRendering extends IMemoryRendering{ - + /** * Returns the currently selected address of this rendering or <code>null</code> if none * @return the currently selected address of this rendering or <code>null</code> if none */ public BigInteger getSelectedAddress(); - + /** - * Returns the currently selected content as <code>MemoryByte</code> array. + * Returns the currently selected content as <code>MemoryByte</code> array. * Returns an empty array if there is no selection. * @return the currently selected as <code>MemoryByte</code> array or empty if there is * no selection. @@ -44,9 +44,9 @@ public interface IRepositionableMemoryRendering extends IMemoryRendering{ /** * Position the rendering to the given address. - * + * * @param address the address to go to - * @throws DebugException when there is a problem repositioning the rendering to the + * @throws DebugException when there is a problem repositioning the rendering to the * address */ public void goToAddress(BigInteger address) throws DebugException ; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IResettableMemoryRendering.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IResettableMemoryRendering.java index 100f7429b..0c09b0db1 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IResettableMemoryRendering.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IResettableMemoryRendering.java @@ -16,7 +16,7 @@ import org.eclipse.debug.core.DebugException; /** * A memory rendering that can be reset. Reset behavior is rendering * specific. Typically, reset means that the rendering would position - * itself back to the base address of its memory block. However, clients + * itself back to the base address of its memory block. However, clients * may define its reset behavior that is suitable for its rendering. * <p> * Clients may implement this interface. @@ -25,10 +25,10 @@ import org.eclipse.debug.core.DebugException; * */ public interface IResettableMemoryRendering extends IMemoryRendering { - + /** * Reset this memory rendering. - * + * * @throws DebugException when there is a problem resetting this memory rendering. */ public void resetRendering() throws DebugException; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/MemoryRenderingElement.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/MemoryRenderingElement.java index 7629ec1a4..4d76ca818 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/MemoryRenderingElement.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/MemoryRenderingElement.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 *******************************************************************************/ @@ -30,11 +30,11 @@ public class MemoryRenderingElement { private IMemoryRendering fRendering; private BigInteger fAddress; private MemoryByte[] fBytes; - + /** * Constructs a new memory rendering element for the given rendering * and specified bytes. - * + * * @param rendering the rendering containing the memory block being rendered * @param address the address at which the rendering is taking place * @param bytes the memory bytes being rendered @@ -45,30 +45,30 @@ public class MemoryRenderingElement { fAddress = address; fBytes = bytes; } - + /** * Returns the memory rendering in which bytes are being rendered. - * + * * @return the memory rendering in which bytes are being rendered */ public IMemoryRendering getRendering() { return fRendering; } - + /** * Returns the address at which bytes are being rendered. - * + * * @return the address at which bytes are being rendered */ public BigInteger getAddress() { return fAddress; } - + /** * Returns the memory bytes being rendered. - * + * * @return the memory bytes being rendered */ public MemoryByte[] getBytes() { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/AbstractSourceContainerBrowser.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/AbstractSourceContainerBrowser.java index 2473d0717..03d5c5fef 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/AbstractSourceContainerBrowser.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/AbstractSourceContainerBrowser.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -31,10 +31,10 @@ public class AbstractSourceContainerBrowser implements ISourceContainerBrowser { return new ISourceContainer[0]; } /* (non-Javadoc) - * + * * Generally, a source container browser can add source containers. Subclasses * should override as required. - * + * * @see org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser#canAddSourceContainers(org.eclipse.debug.core.sourcelookup.ISourceLookupDirector) */ @Override @@ -49,10 +49,10 @@ public class AbstractSourceContainerBrowser implements ISourceContainerBrowser { return new ISourceContainer[0]; } /* (non-Javadoc) - * + * * Not all source containers can be edited. Subclasses should override * as required. - * + * * @see org.eclipse.debug.internal.ui.sourcelookup.ISourceContainerBrowser#canEditSourceContainers(org.eclipse.debug.core.sourcelookup.ISourceLookupDirector, org.eclipse.debug.core.sourcelookup.ISourceContainer[]) */ @Override diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/CommonSourceNotFoundEditor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/CommonSourceNotFoundEditor.java index e6a338181..aac8d0419 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/CommonSourceNotFoundEditor.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/CommonSourceNotFoundEditor.java @@ -61,31 +61,31 @@ import org.eclipse.ui.part.EditorPart; * @since 3.2 */ public class CommonSourceNotFoundEditor extends EditorPart implements IReusableEditor { - + /** * Text widgets used for this editor */ - private Text fText; - + private Text fText; + /** * Launch listener to handle launch events, or <code>null</code> if none */ private ILaunchesListener2 fLaunchesListener; - + /* (non-Javadoc) * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor) */ @Override public void doSave(IProgressMonitor monitor) { } - + /* (non-Javadoc) * @see org.eclipse.ui.part.EditorPart#doSaveAs() */ @Override public void doSaveAs() { } - + /* (non-Javadoc) * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput) */ @@ -95,7 +95,7 @@ public class CommonSourceNotFoundEditor extends EditorPart implements IReusableE setInput(input); initialize(); } - + /* (non-Javadoc) * @see org.eclipse.ui.part.EditorPart#isDirty() */ @@ -103,7 +103,7 @@ public class CommonSourceNotFoundEditor extends EditorPart implements IReusableE public boolean isDirty() { return false; } - + /* (non-Javadoc) * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed() */ @@ -111,40 +111,40 @@ public class CommonSourceNotFoundEditor extends EditorPart implements IReusableE public boolean isSaveAsAllowed() { return false; } - + /* (non-Javadoc) * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite) */ @Override public void createPartControl(Composite parent) { GridLayout topLayout = new GridLayout(); - GridData data = new GridData(); + GridData data = new GridData(); topLayout.numColumns = 1; topLayout.verticalSpacing = 10; parent.setLayout(topLayout); - parent.setLayoutData(data); + parent.setLayoutData(data); parent.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE)); - + fText = new Text(parent,SWT.READ_ONLY|SWT.WRAP); data = new GridData(GridData.FILL_HORIZONTAL); data.grabExcessHorizontalSpace = true; fText.setLayoutData(data); - fText.setForeground(JFaceColors.getErrorText(fText.getDisplay())); - fText.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE)); + fText.setForeground(JFaceColors.getErrorText(fText.getDisplay())); + fText.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE)); if (getEditorInput() != null) { setInput(getEditorInput()); } - - createButtons(parent); - + + createButtons(parent); + Dialog.applyDialogFont(parent); - + PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IDebugHelpContextIds.NO_SOURCE_EDITOR); } /** * Create buttons to be displayed in this editor - * + * * @param parent composite to create the buttons in. */ protected void createButtons(Composite parent) { @@ -154,7 +154,7 @@ public class CommonSourceNotFoundEditor extends EditorPart implements IReusableE data.grabExcessHorizontalSpace = false; data.grabExcessVerticalSpace = false; button.setLayoutData(data); - button.setText(SourceLookupUIMessages.addSourceLocation_addButton2); + button.setText(SourceLookupUIMessages.addSourceLocation_addButton2); button.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent evt) { @@ -162,20 +162,20 @@ public class CommonSourceNotFoundEditor extends EditorPart implements IReusableE } }); } - + /** * Edits the source lookup path associated with the active debug context. * After the path is edited, source lookup is performed again and this * editor is closed. */ protected void editSourceLookupPath(){ - ISourceLocator locator = null; - ILaunch launch = null; + ISourceLocator locator = null; + ILaunch launch = null; IAdaptable selection = DebugUITools.getDebugContext(); if(selection == null) { - new MessageDialog(getSite().getShell(), - SourceLookupUIMessages.CommonSourceNotFoundEditor_0, - null, + new MessageDialog(getSite().getShell(), + SourceLookupUIMessages.CommonSourceNotFoundEditor_0, + null, SourceLookupUIMessages.CommonSourceNotFoundEditor_1, MessageDialog.INFORMATION, new String[] {IDialogConstants.OK_LABEL}, 0).open(); @@ -183,26 +183,26 @@ public class CommonSourceNotFoundEditor extends EditorPart implements IReusableE } if (selection.getAdapter(ILaunch.class) != null ) { launch = selection.getAdapter(ILaunch.class); - locator = launch.getSourceLocator(); - } + locator = launch.getSourceLocator(); + } else if (selection.getAdapter(IDebugElement.class) != null ) { launch = selection.getAdapter(IDebugElement.class).getLaunch(); - locator = launch.getSourceLocator(); + locator = launch.getSourceLocator(); } else { return; //should not occur } if (locator == null || !(locator instanceof AbstractSourceLookupDirector)) { - return; + return; } - final SourceLookupDialog dialog = new SourceLookupDialog(DebugUIPlugin.getShell(),(AbstractSourceLookupDirector) locator); + final SourceLookupDialog dialog = new SourceLookupDialog(DebugUIPlugin.getShell(),(AbstractSourceLookupDirector) locator); if(dialog.open() == Window.OK) { IWorkbenchPage page = getEditorSite().getPage(); SourceLookupManager.getDefault().displaySource(getArtifact(), page, true); closeEditor(); } } - + /* (non-Javadoc) * @see org.eclipse.ui.part.WorkbenchPart#setFocus() */ @@ -212,7 +212,7 @@ public class CommonSourceNotFoundEditor extends EditorPart implements IReusableE fText.setFocus(); } } - + /* (non-Javadoc) * @see org.eclipse.ui.part.EditorPart#setInput(org.eclipse.ui.IEditorInput) */ @@ -220,22 +220,22 @@ public class CommonSourceNotFoundEditor extends EditorPart implements IReusableE public void setInput(IEditorInput input) { super.setInput(input); setPartName(input.getName()); - if (fText != null) { + if (fText != null) { fText.setText(getText()); } firePropertyChange(PROP_INPUT); } - + /** * Return the text to be displayed in this editor. The text is reset each time * the editor input is set. - * + * * @return the text to be displayed in this editor */ protected String getText() { return getEditorInput().getToolTipText() + "\n"; //$NON-NLS-1$ } - + /** * Closes this editor. */ @@ -255,11 +255,11 @@ public class CommonSourceNotFoundEditor extends EditorPart implements IReusableE } }); } - - + + /* * (non-Javadoc) - * + * * @see org.eclipse.ui.IWorkbenchPart#dispose() */ @Override @@ -268,11 +268,11 @@ public class CommonSourceNotFoundEditor extends EditorPart implements IReusableE DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(fLaunchesListener); super.dispose(); } - + /** * Returns the artifact this editor was opened for (i.e. the artifact that source * was not found for), or <code>null</code> - * + * * @return artifact with associated source or <code>null</code> */ protected Object getArtifact() { @@ -283,7 +283,7 @@ public class CommonSourceNotFoundEditor extends EditorPart implements IReusableE } return null; } - + /** * Initialize this editor. * Called after <code>init(IEditorSite, IEditorInput)</code>. By default, a launch @@ -319,8 +319,8 @@ public class CommonSourceNotFoundEditor extends EditorPart implements IReusableE @Override public void launchesChanged(ILaunch[] launches) { - }}; - + }}; + DebugPlugin.getDefault().getLaunchManager().addLaunchListener(fLaunchesListener); } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/CommonSourceNotFoundEditorInput.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/CommonSourceNotFoundEditorInput.java index 4529315d2..33f9517ba 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/CommonSourceNotFoundEditorInput.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/CommonSourceNotFoundEditorInput.java @@ -31,7 +31,7 @@ import com.ibm.icu.text.MessageFormat; * @since 3.2 */ public class CommonSourceNotFoundEditorInput extends PlatformObject implements IEditorInput { - + /** * input element label (cached on creation) */ @@ -40,7 +40,7 @@ public class CommonSourceNotFoundEditorInput extends PlatformObject implements I * the artifact that the editor is being opened for */ private Object fArtifact; - + /** * Constructs an editor input for the given artifact associated with source. * @@ -56,8 +56,8 @@ public class CommonSourceNotFoundEditorInput extends PlatformObject implements I if (fLabel == null) { fLabel = IInternalDebugCoreConstants.EMPTY_STRING; } - } - + } + /* (non-Javadoc) * @see org.eclipse.ui.IEditorInput#exists() */ @@ -65,7 +65,7 @@ public class CommonSourceNotFoundEditorInput extends PlatformObject implements I public boolean exists() { return false; } - + /* (non-Javadoc) * @see org.eclipse.ui.IEditorInput#getImageDescriptor() */ @@ -73,15 +73,15 @@ public class CommonSourceNotFoundEditorInput extends PlatformObject implements I public ImageDescriptor getImageDescriptor() { return DebugUITools.getDefaultImageDescriptor(fArtifact); } - + /* (non-Javadoc) * @see org.eclipse.ui.IEditorInput#getName() */ @Override public String getName() { - return fLabel; + return fLabel; } - + /* (non-Javadoc) * @see org.eclipse.ui.IEditorInput#getPersistable() */ @@ -89,7 +89,7 @@ public class CommonSourceNotFoundEditorInput extends PlatformObject implements I public IPersistableElement getPersistable() { return null; } - + /* (non-Javadoc) * @see org.eclipse.ui.IEditorInput#getToolTipText() */ @@ -97,14 +97,14 @@ public class CommonSourceNotFoundEditorInput extends PlatformObject implements I public String getToolTipText() { return MessageFormat.format(SourceLookupUIMessages.addSourceLocation_editorMessage, new Object[] { fLabel }); } - + /** * Returns the artifact that source was not found for. - * + * * @return artifact that source was not found for */ public Object getArtifact(){ return fArtifact; } - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceContainerBrowser.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceContainerBrowser.java index f73c9f858..44742c078 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceContainerBrowser.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceContainerBrowser.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 *******************************************************************************/ @@ -40,43 +40,43 @@ public interface ISourceContainerBrowser { /** * Creates and returns new source containers to add to the given * source lookup director. - * + * * @param shell the shell to use to parent any dialogs * @param director the director the new containers will be added to * @return the new source containers to add */ public ISourceContainer[] addSourceContainers(Shell shell, ISourceLookupDirector director); - + /** * Returns whether this browser can add any source containers to the * given source lookup director. - * + * * @param director source lookup director to potentially add source * containers to * @return whether this browser can add any source containers to the * given source lookup director */ public boolean canAddSourceContainers(ISourceLookupDirector director); - + /** * Edits and returns source containers to replace the given source * containers. - * + * * @param shell the shell to use to parent any dialogs * @param director the director the new containers will be added to * @param containers the source containers to be edited * @return the replacement source containers */ public ISourceContainer[] editSourceContainers(Shell shell, ISourceLookupDirector director, ISourceContainer[] containers); - + /** * Returns whether this browser can edit the given source containers. - * + * * @param director source lookup director to potentially edit source * containers for * @param containers the containers to edit * @return whether this browser can edit the given source containers */ - public boolean canEditSourceContainers(ISourceLookupDirector director, ISourceContainer[] containers); - + public boolean canEditSourceContainers(ISourceLookupDirector director, ISourceContainer[] containers); + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceDisplay.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceDisplay.java index 1cc942d6a..82272286e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceDisplay.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceDisplay.java @@ -22,8 +22,8 @@ import org.eclipse.ui.IWorkbenchPage; * The debug platform provides a source display adapter for instances * of <code>IStackFrame</code>. The standard adapter uses the source locator associated * with the stack frame's launch to lookup source. Clients may provide their own - * source display adapters as required. - * </p> + * source display adapters as required. + * </p> * <p> * Clients may implement this interface. * </p> @@ -31,15 +31,15 @@ import org.eclipse.ui.IWorkbenchPage; * @since 3.3 */ public interface ISourceDisplay { - + /** * Displays source for the given element in the specified page. - * + * * @param element debug model element to display source for * @param page the page in which to display source * @param forceSourceLookup whether source lookup should be performed, * ignoring any previously cached results for the same element */ public void displaySource(Object element, IWorkbenchPage page, boolean forceSourceLookup); - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceLookupResult.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceLookupResult.java index 09715430d..927dea10c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceLookupResult.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceLookupResult.java @@ -18,7 +18,7 @@ import org.eclipse.ui.IEditorInput; * of an editor (editor id, and editor input) in which to display * the result. * @see org.eclipse.debug.ui.DebugUITools#lookupSource(Object, org.eclipse.debug.core.model.ISourceLocator) - * @see org.eclipse.debug.ui.DebugUITools#displaySource(ISourceLookupResult, org.eclipse.ui.IWorkbenchPage) + * @see org.eclipse.debug.ui.DebugUITools#displaySource(ISourceLookupResult, org.eclipse.ui.IWorkbenchPage) * @since 3.1 * @noimplement This interface is not intended to be implemented by clients. * @noextend This interface is not intended to be extended by clients. @@ -28,32 +28,32 @@ public interface ISourceLookupResult { /** * Returns the artifact for which source lookup was performed, * such as a stack frame. - * + * * @return the artifact for which source lookup was performed */ public Object getArtifact(); - + /** * Returns the source element resolved during source lookup, * or <code>null</code> if a source element was not resolved. - * + * * @return resolved source element or <code>null</code> if unknown */ public Object getSourceElement(); - + /** * Returns the identifier of an editor used to display this result, * or <code>null</code> if unknown. - * + * * @return the identifier of an editor used to display this result, * or <code>null</code> if unknown */ public String getEditorId(); - + /** * Returns the editor input used to display result, * or <code>null</code> if unknown. - * + * * @return the editor input used to display result, * or <code>null</code> if unknown */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java index 4cc9f57b8..c63d37ffc 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java @@ -42,37 +42,37 @@ import org.eclipse.ui.PlatformUI; * @noextend This class is not intended to be subclassed by clients. */ public class SourceLookupDialog extends TitleAreaDialog { - + private SourceLookupPanel fPanel; private ISourceLookupDirector fDirector; - + /** * Constructs a dialog to edit the source lookup path managed by the * given source lookup director. Persists the resulting source lookup * path on the launch configuration associated with the given source * lookup director. - * + * * @param shell shell to parent the dialog * @param director source lookup director managing the source lookup * path to be edited */ public SourceLookupDialog(Shell shell, ISourceLookupDirector director) { - super(shell); + super(shell); setShellStyle(getShellStyle() | SWT.RESIZE); fDirector = director; } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite) */ @Override protected Control createDialogArea(Composite parent) { // create a composite with standard margins and spacing - setTitle(SourceLookupUIMessages.manageSourceDialog_description); + setTitle(SourceLookupUIMessages.manageSourceDialog_description); setTitleImage(DebugPluginImages.getImage(IInternalDebugUIConstants.IMG_EDIT_SRC_LOC_WIZ)); setMessage(SourceLookupUIMessages.SourceLookupDialog_add_edit_remove); Composite composite = new Composite(parent, SWT.NONE); - + GridLayout layout = new GridLayout(); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); @@ -83,7 +83,7 @@ public class SourceLookupDialog extends TitleAreaDialog { layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); composite.setLayout(layout); - GridData data = new GridData(GridData.FILL_BOTH); + GridData data = new GridData(GridData.FILL_BOTH); composite.setLayoutData(data); composite.setFont(parent.getFont()); fPanel = new SourceLookupPanel(); @@ -95,10 +95,10 @@ public class SourceLookupDialog extends TitleAreaDialog { setErrorMessage(SourceLookupUIMessages.SourceLookupDialog_0+config.getName()+SourceLookupUIMessages.SourceLookupDialog_1); } PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IDebugHelpContextIds.EDIT_SOURCELOOKUP_DIALOG); - + return composite; } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#okPressed() */ @@ -111,21 +111,21 @@ public class SourceLookupDialog extends TitleAreaDialog { copy = config.getWorkingCopy(); fPanel.performApply(copy); copy.doSave(); - } + } catch (CoreException e) {DebugUIPlugin.log(e);} } super.okPressed(); } - + /* (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(SourceLookupUIMessages.manageSourceDialog_title); + shell.setText(SourceLookupUIMessages.manageSourceDialog_title); } - + /* (non-Javadoc) * @see org.eclipse.jface.window.Window#close() */ @@ -134,7 +134,7 @@ public class SourceLookupDialog extends TitleAreaDialog { fPanel.dispose(); return super.close(); } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings() * @since 3.2 @@ -145,7 +145,7 @@ public class SourceLookupDialog extends TitleAreaDialog { IDialogSettings section = settings.getSection(getClass().getName()); if (section == null) { section = settings.addNewSection(getClass().getName()); - } + } return section; } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupTab.java index af2f4edd6..e908e70d0 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupTab.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupTab.java @@ -33,26 +33,26 @@ import org.eclipse.ui.PlatformUI; * with associated participants and source containers. * <p> * Clients may call {@link #setHelpContextId(String)} on this tab prior to control - * creation to alter the default context help associated with this tab. + * creation to alter the default context help associated with this tab. * </p> * <p> - * This tab may be instantiated. + * This tab may be instantiated. * </p> - * @since 3.0 + * @since 3.0 * @noextend This class is not intended to be subclassed by clients. */ public class SourceLookupTab extends AbstractLaunchConfigurationTab { //the panel displaying the containers private SourceLookupPanel fSourceLookupPanel; - + /** * Constructs a new tab with default context help. */ public SourceLookupTab() { setHelpContextId(IDebugHelpContextIds.SOURCELOOKUP_TAB); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite) */ @@ -67,7 +67,7 @@ public class SourceLookupTab extends AbstractLaunchConfigurationTab { topLayout.numColumns = 1; comp.setLayout(topLayout); comp.setFont(parent.getFont()); - + fSourceLookupPanel = new SourceLookupPanel(); fSourceLookupPanel.setLaunchConfigurationDialog( getLaunchConfigurationDialog()); @@ -77,15 +77,15 @@ public class SourceLookupTab extends AbstractLaunchConfigurationTab { gd.widthHint = 250; Dialog.applyDialogFont(comp); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) */ @Override public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { - + } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration) */ @@ -93,7 +93,7 @@ public class SourceLookupTab extends AbstractLaunchConfigurationTab { public void initializeFrom(ILaunchConfiguration configuration) { fSourceLookupPanel.initializeFrom(configuration); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) */ @@ -101,7 +101,7 @@ public class SourceLookupTab extends AbstractLaunchConfigurationTab { public void performApply(ILaunchConfigurationWorkingCopy configuration) { fSourceLookupPanel.performApply(configuration); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getId() */ @@ -109,15 +109,15 @@ public class SourceLookupTab extends AbstractLaunchConfigurationTab { public String getId() { return "org.eclipse.debug.ui.sourceLookupTab"; //$NON-NLS-1$ } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() */ @Override public String getName() { - return SourceLookupUIMessages.sourceTab_tabTitle; + return SourceLookupUIMessages.sourceTab_tabTitle; } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage() */ @@ -125,7 +125,7 @@ public class SourceLookupTab extends AbstractLaunchConfigurationTab { public Image getImage() { return DebugPluginImages.getImage(IInternalDebugUIConstants.IMG_SRC_LOOKUP_TAB); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) */ @@ -133,7 +133,7 @@ public class SourceLookupTab extends AbstractLaunchConfigurationTab { public void activated(ILaunchConfigurationWorkingCopy workingCopy) { fSourceLookupPanel.activated(workingCopy); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#dispose() */ @@ -145,10 +145,10 @@ public class SourceLookupTab extends AbstractLaunchConfigurationTab { } fSourceLookupPanel.dispose(); } - fSourceLookupPanel = null; + fSourceLookupPanel = null; super.dispose(); } - + /* (non-Javadoc) * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getErrorMessage() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/WorkingSetSourceContainer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/WorkingSetSourceContainer.java index de724381b..23d3e88e1 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/WorkingSetSourceContainer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/WorkingSetSourceContainer.java @@ -35,22 +35,22 @@ import org.eclipse.ui.IWorkingSet; * @noextend This class is not intended to be subclassed by clients. */ public class WorkingSetSourceContainer extends CompositeSourceContainer{ - + private IWorkingSet fWorkingSet; /** * Unique identifier for the working set source container type * (value <code>org.eclipse.debug.ui.containerType.workingSet</code>.) */ public static final String TYPE_ID = DebugUIPlugin.getUniqueIdentifier()+".containerType.workingSet"; //$NON-NLS-1$ - + /** * Creates a source container for the working set. * @param workingSet the working set represented by this container */ public WorkingSetSourceContainer(IWorkingSet workingSet) { - fWorkingSet = workingSet; + fWorkingSet = workingSet; } - + /* (non-Javadoc) * @see org.eclipse.debug.core.sourcelookup.ISourceContainer#getName() */ @@ -58,23 +58,23 @@ public class WorkingSetSourceContainer extends CompositeSourceContainer{ public String getName() { return fWorkingSet.getName(); } - + /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { - if (obj != null && obj instanceof WorkingSetSourceContainer) { - return ((WorkingSetSourceContainer)obj).fWorkingSet.equals(fWorkingSet); - } + if (obj != null && obj instanceof WorkingSetSourceContainer) { + return ((WorkingSetSourceContainer)obj).fWorkingSet.equals(fWorkingSet); + } return false; - } + } @Override public int hashCode() { return fWorkingSet.hashCode(); } - + /* (non-Javadoc) * @see org.eclipse.debug.core.sourcelookup.ISourceContainer#getType() */ @@ -82,29 +82,29 @@ public class WorkingSetSourceContainer extends CompositeSourceContainer{ public ISourceContainerType getType() { return getSourceContainerType(TYPE_ID); } - + /* (non-Javadoc) * @see org.eclipse.debug.core.sourcelookup.containers.CompositeSourceContainer#createSourceContainers() */ @Override protected ISourceContainer[] createSourceContainers() throws CoreException { IAdaptable[] elements = fWorkingSet.getElements(); - + if(elements == null) { return new ISourceContainer[0]; } - + ArrayList<ISourceContainer> locationList = new ArrayList<ISourceContainer>(); for (int i = 0; i < elements.length; i++) { IResource resource = elements[i].getAdapter(IResource.class); - + if (resource != null) { switch (resource.getType()) { - case IResource.FOLDER: - locationList.add(new FolderSourceContainer((IFolder)resource, true)); + case IResource.FOLDER: + locationList.add(new FolderSourceContainer((IFolder)resource, true)); break; case IResource.PROJECT: - locationList.add(new ProjectSourceContainer((IProject)resource, true)); + locationList.add(new ProjectSourceContainer((IProject)resource, true)); break; //if the element corresponds to an IFile, do nothing default: diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/stringsubstitution/IArgumentSelector.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/stringsubstitution/IArgumentSelector.java index 5d4437086..93b6a4c87 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/stringsubstitution/IArgumentSelector.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/stringsubstitution/IArgumentSelector.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,17 +16,17 @@ import org.eclipse.swt.widgets.Shell; /** * A variable presentation extension can contribute an argument selector - * which is use to configure the argument for a string substitution + * which is use to configure the argument for a string substitution * variable. - * + * * @since 3.9 */ public interface IArgumentSelector { /** - * Selects and returns an argument for the given variable, + * Selects and returns an argument for the given variable, * or <code>null</code> if none. - * + * * @param variable the variable an argument is being selected for * @param shell the shell to create any dialogs on, or <code>null</code> if none * @return argument for the given variable or <code>null</code> |