Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractBreakpointOrganizerDelegate.java90
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/BreakpointTypeCategory.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java502
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugElementWorkbenchAdapter.java30
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugPopup.java276
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java460
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DeferredDebugElementWorkbenchAdapter.java30
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointOrganizerDelegate.java174
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointOrganizerDelegateExtension.java36
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java224
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugView.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane3.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IInstructionPointerPresentation.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationDialog.java14
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java344
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java28
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/WorkingDirectoryBlock.java36
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AddMemoryRenderingActionDelegate.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/BreakpointTypesContribution.java128
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java26
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandAction.java470
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java394
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetFactory.java92
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetManager.java108
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetManagerListener.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IVariableValueEditor.java58
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IWatchExpressionFactoryAdapter2.java22
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchShortcutsAction.java22
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerBreakpointAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerBreakpointTypesActionDelegate.java276
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineActionDelegate.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineHandler.java172
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleBreakpointAction.java64
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/FileLink.java22
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsole.java22
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/DebugContextEvent.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider.java30
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTrigger.java20
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTextRendering.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryBlockTablePresentation.java16
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRendering.java214
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingBindingsProvider.java74
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingManager.java40
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSite.java56
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSite2.java14
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSynchronizationService.java74
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingType.java42
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingTypeDelegate.java18
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/CommonSourceNotFoundEditor.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceLookupResult.java60
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java18
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupTab.java2
54 files changed, 2425 insertions, 2425 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 2d24acb8a..79e0c9547 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
@@ -32,80 +32,80 @@ import org.eclipse.jface.util.PropertyChangeEvent;
*/
public abstract class AbstractBreakpointOrganizerDelegate implements IBreakpointOrganizerDelegate {
- // property change listeners
+ // property change listeners
private ListenerList<IPropertyChangeListener> fListeners = new ListenerList<>();
- @Override
+ @Override
public void addBreakpoint(IBreakpoint breakpoint, IAdaptable category) {
- // do noting, not supported by default
- }
+ // do noting, not supported by default
+ }
- @Override
+ @Override
public void addPropertyChangeListener(IPropertyChangeListener listener) {
- fListeners.add(listener);
- }
+ fListeners.add(listener);
+ }
/*
* Subclasses that override should return super.canAdd(...) when they are not
* able to add the breakpoint.
*/
- @Override
+ @Override
public boolean canAdd(IBreakpoint breakpoint, IAdaptable category) {
- return category instanceof OtherBreakpointCategory;
- }
+ return category instanceof OtherBreakpointCategory;
+ }
/*
* Subclasses that override should return super.canRemove(...) when they are not
* able to remove the breakpoint.
*/
- @Override
+ @Override
public boolean canRemove(IBreakpoint breakpoint, IAdaptable category) {
- return category instanceof OtherBreakpointCategory;
- }
+ return category instanceof OtherBreakpointCategory;
+ }
- @Override
+ @Override
public void dispose() {
fListeners = new ListenerList<>();
- }
+ }
- @Override
+ @Override
public void removeBreakpoint(IBreakpoint breakpoint, IAdaptable category) {
- // do nothing, not supported by default
- }
+ // do nothing, not supported by default
+ }
- @Override
+ @Override
public void removePropertyChangeListener(IPropertyChangeListener listener) {
- fListeners.remove(listener);
- }
+ fListeners.remove(listener);
+ }
- /**
- * Fires a property change notification for the given category.
- *
- * @param category category that has changed
- */
- protected void fireCategoryChanged(IAdaptable category) {
- if (fListeners.isEmpty()) {
- return;
- }
- final PropertyChangeEvent event = new PropertyChangeEvent(this, P_CATEGORY_CHANGED, category, null);
+ /**
+ * Fires a property change notification for the given category.
+ *
+ * @param category category that has changed
+ */
+ protected void fireCategoryChanged(IAdaptable category) {
+ if (fListeners.isEmpty()) {
+ return;
+ }
+ final PropertyChangeEvent event = new PropertyChangeEvent(this, P_CATEGORY_CHANGED, category, null);
for (IPropertyChangeListener iPropertyChangeListener : fListeners) {
final IPropertyChangeListener listener = iPropertyChangeListener;
- ISafeRunnable runnable = new ISafeRunnable() {
- @Override
+ ISafeRunnable runnable = new ISafeRunnable() {
+ @Override
public void handleException(Throwable exception) {
- DebugUIPlugin.log(exception);
- }
- @Override
+ DebugUIPlugin.log(exception);
+ }
+ @Override
public void run() throws Exception {
- listener.propertyChange(event);
- }
- };
- SafeRunner.run(runnable);
- }
- }
+ listener.propertyChange(event);
+ }
+ };
+ SafeRunner.run(runnable);
+ }
+ }
- @Override
+ @Override
public IAdaptable[] getCategories() {
- return null;
- }
+ return null;
+ }
}
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 ea5438a74..073504821 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
@@ -678,7 +678,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi
* Sets the viewer for this view.
*
* @param viewer viewer
- * @since 3.1
+ * @since 3.1
*/
protected void setViewer(Viewer viewer) {
fViewer = viewer;
@@ -789,7 +789,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi
* 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#syncExec(java.lang.Runnable)
*/
public void syncExec(Runnable r) {
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 7a5199cd5..bc4e4fb6c 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
@@ -100,6 +100,6 @@ public class BreakpointTypeCategory extends PlatformObject implements IBreakpoin
@Override
public String toString() {
- return fName;
+ 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 559197f64..9ac350da1 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
@@ -128,16 +128,16 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
private Text fSharedLocationText;
private Button fSharedLocationButton;
private Button fLaunchInBackgroundButton;
- private Button fDefaultEncodingButton;
- private Button fAltEncodingButton;
- private Combo fEncodingCombo;
+ private Button fDefaultEncodingButton;
+ private Button fAltEncodingButton;
+ private Combo fEncodingCombo;
private Button fConsoleOutput;
- private Button fFileOutput;
- private Button fFileBrowse;
- private Text fFileText;
- private Button fVariables;
- private Button fAppend;
- private Button fWorkspaceBrowse;
+ private Button fFileOutput;
+ private Button fFileBrowse;
+ private Text fFileText;
+ private Button fVariables;
+ private Button fAppend;
+ private Button fWorkspaceBrowse;
private Button fInputFileCheckButton;
private Text fInputFileLocationText;
@@ -160,7 +160,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
}
};
- /**
+ /**
* Constructs a new tab with default context help.
*/
public CommonTab() {
@@ -260,96 +260,96 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
setSharedEnabled(false);
}
- /**
- * Creates the component set for the capture output composite
- * @param parent the parent to add this component to
- */
+ /**
+ * Creates the component set for the capture output composite
+ * @param parent the parent to add this component to
+ */
private void createOutputCaptureComponent(Composite parent) {
- Group group = SWTFactory.createGroup(parent, LaunchConfigurationsMessages.CommonTab_4, 5, 2, GridData.FILL_HORIZONTAL);
+ Group group = SWTFactory.createGroup(parent, LaunchConfigurationsMessages.CommonTab_4, 5, 2, GridData.FILL_HORIZONTAL);
createInputCaptureComponent(group);
Composite comp = SWTFactory.createComposite(group, group.getFont(), 5, 5, GridData.FILL_BOTH, 0, 0);
fFileOutput = createCheckButton(comp, LaunchConfigurationsMessages.CommonTab_6);
- fFileOutput.setLayoutData(new GridData(SWT.BEGINNING, SWT.NORMAL, false, false));
- fFileOutput.addSelectionListener(new SelectionAdapter() {
- @Override
+ fFileOutput.setLayoutData(new GridData(SWT.BEGINNING, SWT.NORMAL, false, false));
+ fFileOutput.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
- enableOuputCaptureWidgets(fFileOutput.getSelection());
- updateLaunchConfigurationDialog();
- }
- });
- fFileText = SWTFactory.createSingleText(comp, 4);
- fFileText.getAccessible().addAccessibleListener(new AccessibleAdapter() {
- @Override
+ enableOuputCaptureWidgets(fFileOutput.getSelection());
+ updateLaunchConfigurationDialog();
+ }
+ });
+ fFileText = SWTFactory.createSingleText(comp, 4);
+ fFileText.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+ @Override
public void getName(AccessibleEvent e) {
- e.result = LaunchConfigurationsMessages.CommonTab_6;
- }
- });
- fFileText.addModifyListener(fBasicModifyListener);
+ e.result = LaunchConfigurationsMessages.CommonTab_6;
+ }
+ });
+ fFileText.addModifyListener(fBasicModifyListener);
- Composite bcomp = SWTFactory.createComposite(comp, 3, 5, GridData.HORIZONTAL_ALIGN_END);
+ 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.addSelectionListener(new SelectionAdapter() {
- @Override
+ ld.marginHeight = 1;
+ ld.marginWidth = 0;
+ 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.setComparator(new ResourceComparator(ResourceComparator.NAME));
- dialog.setDialogBoundsSettings(getDialogBoundsSettings(WORKSPACE_SELECTION_DIALOG), Dialog.DIALOG_PERSISTSIZE);
- if (dialog.open() == IDialogConstants.OK_ID) {
- IResource resource = (IResource) dialog.getFirstResult();
- if(resource != null) {
- String arg = resource.getFullPath().toString();
- String fileLoc = VariablesPlugin.getDefault().getStringVariableManager().generateVariableExpression("workspace_loc", arg); //$NON-NLS-1$
- fFileText.setText(fileLoc);
- }
- }
- }
- });
- fFileBrowse = createPushButton(bcomp, LaunchConfigurationsMessages.CommonTab_7, null);
- fFileBrowse.addSelectionListener(new SelectionAdapter() {
- @Override
+ 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.setComparator(new ResourceComparator(ResourceComparator.NAME));
+ dialog.setDialogBoundsSettings(getDialogBoundsSettings(WORKSPACE_SELECTION_DIALOG), Dialog.DIALOG_PERSISTSIZE);
+ if (dialog.open() == IDialogConstants.OK_ID) {
+ IResource resource = (IResource) dialog.getFirstResult();
+ if(resource != null) {
+ String arg = resource.getFullPath().toString();
+ String fileLoc = VariablesPlugin.getDefault().getStringVariableManager().generateVariableExpression("workspace_loc", arg); //$NON-NLS-1$
+ fFileText.setText(fileLoc);
+ }
+ }
+ }
+ });
+ fFileBrowse = createPushButton(bcomp, LaunchConfigurationsMessages.CommonTab_7, null);
+ fFileBrowse.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
- String filePath = fFileText.getText();
+ String filePath = fFileText.getText();
FileDialog dialog = new FileDialog(getShell(), SWT.SAVE | SWT.SHEET);
- filePath = dialog.open();
- if (filePath != null) {
- fFileText.setText(filePath);
- }
- }
- });
- fVariables = createPushButton(bcomp, LaunchConfigurationsMessages.CommonTab_9, null);
- fVariables.addSelectionListener(new SelectionListener() {
- @Override
+ filePath = dialog.open();
+ if (filePath != null) {
+ fFileText.setText(filePath);
+ }
+ }
+ });
+ fVariables = createPushButton(bcomp, LaunchConfigurationsMessages.CommonTab_9, null);
+ fVariables.addSelectionListener(new SelectionListener() {
+ @Override
public void widgetSelected(SelectionEvent e) {
- StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
+ StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
dialog.open();
String variable = dialog.getVariableExpression();
if (variable != null) {
fFileText.insert(variable);
}
- }
- @Override
+ }
+ @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;
- fAppend.setLayoutData(gd);
+ gd.horizontalSpan = 4;
+ fAppend.setLayoutData(gd);
fAppend.addSelectionListener(new SelectionAdapter() {
- @Override
+ @Override
public void widgetSelected(SelectionEvent e) {
- updateLaunchConfigurationDialog();
- }
+ updateLaunchConfigurationDialog();
+ }
});
- }
+ }
- private void createInputCaptureComponent(Composite parent){
+ private void createInputCaptureComponent(Composite parent){
Composite comp1 = SWTFactory.createComposite(parent, parent.getFont(), 5, 5, GridData.FILL_BOTH, 0, 0);
fConsoleOutput = createCheckButton(comp1, LaunchConfigurationsMessages.CommonTab_5);
fConsoleOutput.addSelectionListener(new SelectionAdapter() {
@@ -450,30 +450,30 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
});
setInputFileEnabled(false);
- }
- /**
- * Enables or disables the output capture widgets based on the the specified enablement
- * @param enable if the output capture widgets should be enabled or not
- * @since 3.2
- */
- private void enableOuputCaptureWidgets(boolean enable) {
- fFileText.setEnabled(enable);
- fFileBrowse.setEnabled(enable);
- fWorkspaceBrowse.setEnabled(enable);
- 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) {
- try {
- IResource[] resources = config.getMappedResources();
+ }
+ /**
+ * Enables or disables the output capture widgets based on the the specified enablement
+ * @param enable if the output capture widgets should be enabled or not
+ * @since 3.2
+ */
+ private void enableOuputCaptureWidgets(boolean enable) {
+ fFileText.setEnabled(enable);
+ fFileBrowse.setEnabled(enable);
+ fWorkspaceBrowse.setEnabled(enable);
+ 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) {
+ try {
+ IResource[] resources = config.getMappedResources();
if(resources != null && resources.length > 0) {
IResource res = resources[0];
if(res instanceof IFile) {
@@ -483,62 +483,62 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
return ((IContainer)res).getDefaultCharset();
}
}
- }
- catch(CoreException ce) {
- DebugUIPlugin.log(ce);
- }
- 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);
- GridData gd = new GridData(SWT.BEGINNING, SWT.NORMAL, true, false);
- gd.horizontalSpan = 2;
- fDefaultEncodingButton.setLayoutData(gd);
-
- 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());
- List<String> allEncodings = IDEEncoding.getIDEEncodings();
- String[] encodingArray = allEncodings.toArray(new String[0]);
- fEncodingCombo.setItems(encodingArray);
- if (encodingArray.length > 0) {
- fEncodingCombo.select(0);
- }
- fEncodingCombo.getAccessible().addAccessibleListener(new AccessibleAdapter() {
- @Override
+ }
+ catch(CoreException ce) {
+ DebugUIPlugin.log(ce);
+ }
+ 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);
+ GridData gd = new GridData(SWT.BEGINNING, SWT.NORMAL, true, false);
+ gd.horizontalSpan = 2;
+ fDefaultEncodingButton.setLayoutData(gd);
+
+ 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());
+ List<String> allEncodings = IDEEncoding.getIDEEncodings();
+ String[] encodingArray = allEncodings.toArray(new String[0]);
+ fEncodingCombo.setItems(encodingArray);
+ if (encodingArray.length > 0) {
+ fEncodingCombo.select(0);
+ }
+ fEncodingCombo.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+ @Override
public void getName(AccessibleEvent e) {
- e.result = LaunchConfigurationsMessages.CommonTab_3;
- }
- });
- SelectionListener listener = new SelectionAdapter() {
- @Override
+ e.result = LaunchConfigurationsMessages.CommonTab_3;
+ }
+ });
+ SelectionListener listener = new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
- if(e.getSource() instanceof Button) {
- Button button = (Button)e.getSource();
- if(button.getSelection()) {
- updateLaunchConfigurationDialog();
- fEncodingCombo.setEnabled(fAltEncodingButton.getSelection() == true);
- }
- }
- else {
- updateLaunchConfigurationDialog();
- }
- }
- };
- fAltEncodingButton.addSelectionListener(listener);
- fDefaultEncodingButton.addSelectionListener(listener);
- fEncodingCombo.addSelectionListener(listener);
- fEncodingCombo.addKeyListener(new KeyAdapter() {
+ if(e.getSource() instanceof Button) {
+ Button button = (Button)e.getSource();
+ if(button.getSelection()) {
+ updateLaunchConfigurationDialog();
+ fEncodingCombo.setEnabled(fAltEncodingButton.getSelection() == true);
+ }
+ }
+ else {
+ updateLaunchConfigurationDialog();
+ }
+ }
+ };
+ fAltEncodingButton.addSelectionListener(listener);
+ fDefaultEncodingButton.addSelectionListener(listener);
+ fEncodingCombo.addSelectionListener(listener);
+ fEncodingCombo.addKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent e) {
scheduleUpdateJob();
@@ -658,9 +658,9 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
String currentContainerString = fSharedLocationText.getText();
IContainer currentContainer = getContainer(currentContainerString);
ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(),
- currentContainer,
- false,
- LaunchConfigurationsMessages.CommonTab_Select_a_location_for_the_launch_configuration_13);
+ currentContainer,
+ false,
+ LaunchConfigurationsMessages.CommonTab_Select_a_location_for_the_launch_configuration_13);
dialog.showClosedProjects(false);
dialog.setDialogBoundsSettings(getDialogBoundsSettings(SHARED_LAUNCH_CONFIGURATON_DIALOG), Dialog.DIALOG_PERSISTSIZE);
dialog.open();
@@ -706,33 +706,33 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
updateConsoleOutput(configuration);
}
- /**
- * Updates the console output form the local configuration
- * @param configuration the local configuration
- */
- private void updateConsoleOutput(ILaunchConfiguration configuration) {
- boolean outputToConsole = true;
+ /**
+ * Updates the console output form the local configuration
+ * @param configuration the local configuration
+ */
+ private void updateConsoleOutput(ILaunchConfiguration configuration) {
+ boolean outputToConsole = true;
String stdinFromFile = null;
- String outputFile = null;
- boolean append = false;
+ String outputFile = null;
+ boolean append = false;
- try {
- outputToConsole = configuration.getAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE, true);
+ try {
+ outputToConsole = configuration.getAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE, true);
stdinFromFile = configuration.getAttribute(IDebugUIConstants.ATTR_CAPTURE_STDIN_FILE, (String) null);
- outputFile = configuration.getAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_FILE, (String)null);
- append = configuration.getAttribute(IDebugUIConstants.ATTR_APPEND_TO_FILE, false);
- } catch (CoreException e) {
- }
+ outputFile = configuration.getAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_FILE, (String)null);
+ append = configuration.getAttribute(IDebugUIConstants.ATTR_APPEND_TO_FILE, false);
+ } catch (CoreException e) {
+ }
fConsoleOutput.setSelection(outputToConsole);
- fAppend.setSelection(append);
- boolean haveOutputFile= outputFile != null;
- if (haveOutputFile) {
- fFileText.setText(outputFile);
- }
- fFileOutput.setSelection(haveOutputFile);
- enableOuputCaptureWidgets(haveOutputFile);
+ fAppend.setSelection(append);
+ boolean haveOutputFile= outputFile != null;
+ if (haveOutputFile) {
+ fFileText.setText(outputFile);
+ }
+ fFileOutput.setSelection(haveOutputFile);
+ enableOuputCaptureWidgets(haveOutputFile);
boolean haveInputFile = stdinFromFile != null;
if (haveInputFile) {
@@ -740,13 +740,13 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
}
fInputFileCheckButton.setSelection(haveInputFile);
setInputFileEnabled(haveInputFile);
- }
+ }
- /**
- * Updates the launch on background check button
- * @param configuration the local launch configuration
- */
- protected void updateLaunchInBackground(ILaunchConfiguration configuration) {
+ /**
+ * Updates the launch on background check button
+ * @param configuration the local launch configuration
+ */
+ protected void updateLaunchInBackground(ILaunchConfiguration configuration) {
fLaunchInBackgroundButton.setSelection(isLaunchInBackground(configuration));
}
@@ -755,24 +755,24 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
* @param configuration the local configuration
*/
private void updateEncoding(ILaunchConfiguration configuration) {
- String encoding = null;
- try {
- encoding = configuration.getAttribute(DebugPlugin.ATTR_CONSOLE_ENCODING, (String)null);
- } catch (CoreException e) {
- }
- String defaultEncoding = getDefaultEncoding(configuration);
+ String encoding = null;
+ try {
+ encoding = configuration.getAttribute(DebugPlugin.ATTR_CONSOLE_ENCODING, (String)null);
+ } catch (CoreException e) {
+ }
+ String defaultEncoding = getDefaultEncoding(configuration);
fDefaultEncodingButton.setText(MessageFormat.format(LaunchConfigurationsMessages.CommonTab_2, new Object[] { defaultEncoding }));
- fDefaultEncodingButton.pack();
- if (encoding != null) {
- fAltEncodingButton.setSelection(true);
- fDefaultEncodingButton.setSelection(false);
- fEncodingCombo.setText(encoding);
- fEncodingCombo.setEnabled(true);
- } else {
- fDefaultEncodingButton.setSelection(true);
- fAltEncodingButton.setSelection(false);
- fEncodingCombo.setEnabled(false);
- }
+ fDefaultEncodingButton.pack();
+ if (encoding != null) {
+ fAltEncodingButton.setSelection(true);
+ fDefaultEncodingButton.setSelection(false);
+ fEncodingCombo.setText(encoding);
+ fEncodingCombo.setEnabled(true);
+ } else {
+ fDefaultEncodingButton.setSelection(true);
+ fAltEncodingButton.setSelection(false);
+ fEncodingCombo.setEnabled(false);
+ }
}
/**
@@ -925,42 +925,42 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
return validateLocalShared() && validateRedirectFile() && validateEncoding() && validateStdinFile();
}
- /**
- * validates the encoding selection
- * @return true if the validate encoding is allowable, false otherwise
- */
- private boolean validateEncoding() {
- if (fAltEncodingButton.getSelection()) {
- if (fEncodingCombo.getSelectionIndex() == -1) {
- if (!isValidEncoding(fEncodingCombo.getText().trim())) {
- setErrorMessage(LaunchConfigurationsMessages.CommonTab_15);
- return false;
- }
- }
- }
- return true;
- }
-
- /**
- * Validates if the redirect file is valid
- * @return true if the filename is not zero, false otherwise
- */
- private boolean validateRedirectFile() {
- if(fFileOutput.getSelection()) {
- int len = fFileText.getText().trim().length();
- if (len == 0) {
- setErrorMessage(LaunchConfigurationsMessages.CommonTab_8);
- return false;
- }
- }
- return true;
- }
-
- /**
- * validates the local shared config file location
- * @return true if the local shared file exists, false otherwise
- */
- private boolean validateLocalShared() {
+ /**
+ * validates the encoding selection
+ * @return true if the validate encoding is allowable, false otherwise
+ */
+ private boolean validateEncoding() {
+ if (fAltEncodingButton.getSelection()) {
+ if (fEncodingCombo.getSelectionIndex() == -1) {
+ if (!isValidEncoding(fEncodingCombo.getText().trim())) {
+ setErrorMessage(LaunchConfigurationsMessages.CommonTab_15);
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Validates if the redirect file is valid
+ * @return true if the filename is not zero, false otherwise
+ */
+ private boolean validateRedirectFile() {
+ if(fFileOutput.getSelection()) {
+ int len = fFileText.getText().trim().length();
+ if (len == 0) {
+ setErrorMessage(LaunchConfigurationsMessages.CommonTab_8);
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * validates the local shared config file location
+ * @return true if the local shared file exists, false otherwise
+ */
+ private boolean validateLocalShared() {
if (isShared()) {
String path = fSharedLocationText.getText().trim();
IContainer container = getContainer(path);
@@ -1004,15 +1004,15 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, configuration, fLaunchInBackgroundButton.getSelection(), true);
String encoding = null;
if(fAltEncodingButton.getSelection()) {
- encoding = fEncodingCombo.getText().trim();
+ encoding = fEncodingCombo.getText().trim();
}
configuration.setAttribute(DebugPlugin.ATTR_CONSOLE_ENCODING, encoding);
boolean captureOutput = false;
if (fConsoleOutput.getSelection()) {
- captureOutput = true;
+ captureOutput = true;
configuration.setAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE, (String) null);
} else {
- configuration.setAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE, false);
+ configuration.setAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE, false);
}
if (fInputFileCheckButton.getSelection()) {
configuration.setAttribute(IDebugUIConstants.ATTR_CAPTURE_STDIN_FILE, fInputFileLocationText.getText());
@@ -1020,22 +1020,22 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
configuration.setAttribute(IDebugUIConstants.ATTR_CAPTURE_STDIN_FILE, (String) null);
}
if (fFileOutput.getSelection()) {
- captureOutput = true;
- String file = fFileText.getText();
- configuration.setAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_FILE, file);
- if(fAppend.getSelection()) {
- configuration.setAttribute(IDebugUIConstants.ATTR_APPEND_TO_FILE, true);
- } else {
- configuration.setAttribute(IDebugUIConstants.ATTR_APPEND_TO_FILE, (String)null);
- }
+ captureOutput = true;
+ String file = fFileText.getText();
+ configuration.setAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_FILE, file);
+ if(fAppend.getSelection()) {
+ configuration.setAttribute(IDebugUIConstants.ATTR_APPEND_TO_FILE, true);
+ } else {
+ configuration.setAttribute(IDebugUIConstants.ATTR_APPEND_TO_FILE, (String)null);
+ }
} else {
- configuration.setAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_FILE, (String)null);
+ configuration.setAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_FILE, (String)null);
}
if (!captureOutput) {
- configuration.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, false);
+ configuration.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, false);
} else {
- configuration.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, (String)null);
+ configuration.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, (String)null);
}
}
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 ae1c7aa60..310bdbcea 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
@@ -37,29 +37,29 @@ import org.eclipse.ui.model.IWorkbenchAdapter2;
@Deprecated
public abstract class DebugElementWorkbenchAdapter implements IWorkbenchAdapter, IWorkbenchAdapter2 {
- @Override
+ @Override
public ImageDescriptor getImageDescriptor(Object object) {
- return DebugElementHelper.getImageDescriptor(object);
- }
+ return DebugElementHelper.getImageDescriptor(object);
+ }
- @Override
+ @Override
public String getLabel(Object o) {
- return DebugElementHelper.getLabel(o);
- }
+ return DebugElementHelper.getLabel(o);
+ }
- @Override
+ @Override
public RGB getForeground(Object element) {
- return DebugElementHelper.getForeground(element);
- }
+ return DebugElementHelper.getForeground(element);
+ }
- @Override
+ @Override
public RGB getBackground(Object element) {
- return DebugElementHelper.getBackground(element);
- }
+ return DebugElementHelper.getBackground(element);
+ }
- @Override
+ @Override
public FontData getFont(Object element) {
- return DebugElementHelper.getFont(element);
- }
+ return DebugElementHelper.getFont(element);
+ }
}
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 134ff6bf9..d939d751d 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
@@ -46,167 +46,167 @@ import com.ibm.icu.text.MessageFormat;
*/
public abstract class DebugPopup extends PopupDialog {
- private Point fAnchor;
+ private Point fAnchor;
- private IHandlerActivation fActivation;
+ private IHandlerActivation fActivation;
- private IHandlerService fHandlerService;
+ private IHandlerService fHandlerService;
private String fCommandId;
private boolean fPersisted = false;
- /**
- * Constructs a new popup dialog of type <code>PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE</code>
- * @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
- * the dialog, or <code>null</code>
- */
- public DebugPopup(Shell parent, Point anchor, String commandId) {
- super(parent, PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE, true, true, false, true, false, null, null);
- fAnchor = anchor;
- fCommandId = commandId;
- }
-
- /**
- * 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,
- * the text displayed is of the form "Press {key-sequence} to {action}". The
- * action text is specified by the method <code>getActionText()</code>.
- * </p>
- * @return The text to be shown in the popup's information area or <code>null</code>
- */
- protected String getInfoText() {
- if (getCommandId() != null && getActionText() != null) {
- IWorkbench workbench = PlatformUI.getWorkbench();
- IBindingService bindingService = workbench.getAdapter(IBindingService.class);
- String formattedBinding = bindingService.getBestActiveBindingFormattedFor(getCommandId());
-
- String infoText = null;
- if (formattedBinding != null) {
+ /**
+ * Constructs a new popup dialog of type <code>PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE</code>
+ * @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
+ * the dialog, or <code>null</code>
+ */
+ public DebugPopup(Shell parent, Point anchor, String commandId) {
+ super(parent, PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE, true, true, false, true, false, null, null);
+ fAnchor = anchor;
+ fCommandId = commandId;
+ }
+
+ /**
+ * 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,
+ * the text displayed is of the form "Press {key-sequence} to {action}". The
+ * action text is specified by the method <code>getActionText()</code>.
+ * </p>
+ * @return The text to be shown in the popup's information area or <code>null</code>
+ */
+ protected String getInfoText() {
+ if (getCommandId() != null && getActionText() != null) {
+ 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[] {
formattedBinding, getActionText() });
- }
- return infoText;
- }
- return null;
- }
-
- /**
- * Returns the text to be shown as the action performed when this dialog's
- * persist command is invoked, or <code>null</code>.
- * <p>
- * Subclasses should override as necessary.
- * </p>
- * @return the text to be shown as the action performed when this dialog's
- * persist command is invoked
- */
- protected String getActionText() {
- return null;
- }
-
- /**
- * 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.
- *
- * @return The command id to be used for persisting the contents of the
- * dialog or <code>null</code>
- */
- protected String getCommandId() {
- return fCommandId;
- }
-
- /**
- * Persists the contents of the dialog. Subclasses should override as required,
- * but also call super.persist().
- */
- 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() {
- return fPersisted;
- }
-
- @Override
+ }
+ return infoText;
+ }
+ return null;
+ }
+
+ /**
+ * Returns the text to be shown as the action performed when this dialog's
+ * persist command is invoked, or <code>null</code>.
+ * <p>
+ * Subclasses should override as necessary.
+ * </p>
+ * @return the text to be shown as the action performed when this dialog's
+ * persist command is invoked
+ */
+ protected String getActionText() {
+ return null;
+ }
+
+ /**
+ * 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.
+ *
+ * @return The command id to be used for persisting the contents of the
+ * dialog or <code>null</code>
+ */
+ protected String getCommandId() {
+ return fCommandId;
+ }
+
+ /**
+ * Persists the contents of the dialog. Subclasses should override as required,
+ * but also call super.persist().
+ */
+ 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() {
+ return fPersisted;
+ }
+
+ @Override
protected abstract Control createDialogArea(Composite parent);
- /**
- * 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>.
- * @return the initial location of the shell
- */
- @Override
+ /**
+ * 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>.
+ * @return the initial location of the shell
+ */
+ @Override
protected Point getInitialLocation(Point initialSize) {
- if (fAnchor == null) {
- return super.getInitialLocation(initialSize);
- }
- Point point = fAnchor;
- Rectangle monitor = getShell().getMonitor().getClientArea();
- if (monitor.width < point.x + initialSize.x) {
- point.x = Math.max(0, point.x - initialSize.x);
- }
- if (monitor.height < point.y + initialSize.y) {
- point.y = Math.max(0, point.y - initialSize.y);
- }
- return point;
- }
-
- @Override
+ if (fAnchor == null) {
+ return super.getInitialLocation(initialSize);
+ }
+ Point point = fAnchor;
+ Rectangle monitor = getShell().getMonitor().getClientArea();
+ if (monitor.width < point.x + initialSize.x) {
+ point.x = Math.max(0, point.x - initialSize.x);
+ }
+ if (monitor.height < point.y + initialSize.y) {
+ point.y = Math.max(0, point.y - initialSize.y);
+ }
+ return point;
+ }
+
+ @Override
protected IDialogSettings getDialogSettings() {
- IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
- return settings;
- }
+ IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
+ return settings;
+ }
- @Override
+ @Override
public int open() {
- IWorkbench workbench = PlatformUI.getWorkbench();
- String commandId = getCommandId();
- if (commandId != null) {
- IHandler fCloseHandler = new AbstractHandler() {
- @Override
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ String commandId = getCommandId();
+ if (commandId != null) {
+ IHandler fCloseHandler = new AbstractHandler() {
+ @Override
public Object execute(ExecutionEvent event) throws ExecutionException {
- persist();
- close();
- return null;
- }
- };
-
- fHandlerService = workbench.getAdapter(IHandlerService.class);
- fActivation = fHandlerService.activateHandler(commandId, fCloseHandler);
- }
-
- String infoText = getInfoText();
- if (infoText != null) {
+ persist();
+ close();
+ return null;
+ }
+ };
+
+ fHandlerService = workbench.getAdapter(IHandlerService.class);
+ fActivation = fHandlerService.activateHandler(commandId, fCloseHandler);
+ }
+
+ String infoText = getInfoText();
+ if (infoText != null) {
setInfoText(infoText);
}
- return super.open();
- }
+ return super.open();
+ }
- @Override
+ @Override
public boolean close() {
- if (fActivation != null) {
+ if (fActivation != null) {
fHandlerService.deactivateHandler(fActivation);
}
- return super.close();
- }
+ return super.close();
+ }
}
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 91baf81e1..886f32ef6 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
@@ -236,7 +236,7 @@ public class DebugUITools {
}
/**
- * Returns the element of the currently selected context in the
+ * 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>
@@ -247,38 +247,38 @@ public class DebugUITools {
* @since 2.0
*/
public static IAdaptable getDebugContext() {
- IWorkbenchWindow activeWindow = SelectedResourceManager.getDefault().getActiveWindow();
- if (activeWindow != null) {
- ISelection activeContext = DebugUITools.getDebugContextManager().getContextService(activeWindow).getActiveContext();
- return getDebugContextElementForSelection(activeContext);
- }
- return null;
+ IWorkbenchWindow activeWindow = SelectedResourceManager.getDefault().getActiveWindow();
+ if (activeWindow != null) {
+ ISelection activeContext = DebugUITools.getDebugContextManager().getContextService(activeWindow).getActiveContext();
+ return getDebugContextElementForSelection(activeContext);
+ }
+ return null;
}
- /**
- * 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,
- * or <code>null</code>
- * @since 3.8
- * @see IDebugContextService#getActiveContext(String)
- * @see IDebugContextService#getActiveContext(String, String)
- */
- public static ISelection getDebugContextForPart(IWorkbenchPart part) {
- IWorkbenchPartSite site = part.getSite();
- IWorkbenchWindow partWindow = site.getWorkbenchWindow();
- if (partWindow != null) {
- IDebugContextService contextService = DebugUITools.getDebugContextManager().getContextService(partWindow);
- if (site instanceof IViewSite) {
- return contextService.getActiveContext(site.getId(), ((IViewSite)site).getSecondaryId());
- } else {
- return contextService.getActiveContext(site.getId());
- }
- }
- return null;
- }
+ /**
+ * 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,
+ * or <code>null</code>
+ * @since 3.8
+ * @see IDebugContextService#getActiveContext(String)
+ * @see IDebugContextService#getActiveContext(String, String)
+ */
+ public static ISelection getDebugContextForPart(IWorkbenchPart part) {
+ IWorkbenchPartSite site = part.getSite();
+ IWorkbenchWindow partWindow = site.getWorkbenchWindow();
+ if (partWindow != null) {
+ IDebugContextService contextService = DebugUITools.getDebugContextManager().getContextService(partWindow);
+ if (site instanceof IViewSite) {
+ return contextService.getActiveContext(site.getId(), ((IViewSite)site).getSecondaryId());
+ } else {
+ return contextService.getActiveContext(site.getId());
+ }
+ }
+ return null;
+ }
/**
* Return the undo context that should be used for operations involving breakpoints.
@@ -354,7 +354,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.
*
@@ -363,88 +363,88 @@ public class DebugUITools {
* <code>null</code>
* @since 3.7
*/
- public static IAdaptable getPartDebugContext(IWorkbenchPartSite site) {
- IDebugContextService service = DebugUITools.getDebugContextManager().getContextService(site.getWorkbenchWindow());
- String id = null;
- String secondaryId = null;
- id = site.getId();
- if (site instanceof IViewSite) {
- secondaryId = ((IViewSite)site).getSecondaryId();
- }
- ISelection activeContext = service.getActiveContext(id, secondaryId);
- return getDebugContextElementForSelection(activeContext);
- }
-
- /**
- * Adds the given debug context listener as a listener to the debug context changed events, in
- * the context of the given workbench part.
- * <p>
- * This method is a utility method which ultimately calls
- * {@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
- */
- public static void addPartDebugContextListener(IWorkbenchPartSite site, IDebugContextListener listener) {
- IDebugContextService service = DebugUITools.getDebugContextManager().getContextService(site.getWorkbenchWindow());
- String id = site.getId();
- String secondaryId = null;
- if (site instanceof IViewSite) {
- secondaryId = ((IViewSite)site).getSecondaryId();
- }
- service.addDebugContextListener(listener, id, secondaryId);
- }
-
- /**
- * Removes the given debug context listener as a listener to the debug context changed events,
- * in the context of the given workbench part.
- * <p>
- * This method is a utility method which ultimately calls
- * {@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
- */
- public static void removePartDebugContextListener(IWorkbenchPartSite site, IDebugContextListener listener) {
- IDebugContextService service = DebugUITools.getDebugContextManager().getContextService(site.getWorkbenchWindow());
- String id = site.getId();
- String secondaryId = null;
- if (site instanceof IViewSite) {
- secondaryId = ((IViewSite)site).getSecondaryId();
- }
- service.removeDebugContextListener(listener, id, secondaryId);
- }
-
- /**
+ public static IAdaptable getPartDebugContext(IWorkbenchPartSite site) {
+ IDebugContextService service = DebugUITools.getDebugContextManager().getContextService(site.getWorkbenchWindow());
+ String id = null;
+ String secondaryId = null;
+ id = site.getId();
+ if (site instanceof IViewSite) {
+ secondaryId = ((IViewSite)site).getSecondaryId();
+ }
+ ISelection activeContext = service.getActiveContext(id, secondaryId);
+ return getDebugContextElementForSelection(activeContext);
+ }
+
+ /**
+ * Adds the given debug context listener as a listener to the debug context changed events, in
+ * the context of the given workbench part.
+ * <p>
+ * This method is a utility method which ultimately calls
+ * {@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
+ */
+ public static void addPartDebugContextListener(IWorkbenchPartSite site, IDebugContextListener listener) {
+ IDebugContextService service = DebugUITools.getDebugContextManager().getContextService(site.getWorkbenchWindow());
+ String id = site.getId();
+ String secondaryId = null;
+ if (site instanceof IViewSite) {
+ secondaryId = ((IViewSite)site).getSecondaryId();
+ }
+ service.addDebugContextListener(listener, id, secondaryId);
+ }
+
+ /**
+ * Removes the given debug context listener as a listener to the debug context changed events,
+ * in the context of the given workbench part.
+ * <p>
+ * This method is a utility method which ultimately calls
+ * {@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
+ */
+ public static void removePartDebugContextListener(IWorkbenchPartSite site, IDebugContextListener listener) {
+ IDebugContextService service = DebugUITools.getDebugContextManager().getContextService(site.getWorkbenchWindow());
+ String id = site.getId();
+ String secondaryId = null;
+ if (site instanceof IViewSite) {
+ secondaryId = ((IViewSite)site).getSecondaryId();
+ }
+ 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
*/
- private static IAdaptable getDebugContextElementForSelection(ISelection activeContext) {
- if (activeContext instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection) activeContext;
- if (!selection.isEmpty()) {
- Object firstElement = selection.getFirstElement();
- if (firstElement instanceof IAdaptable) {
- return (IAdaptable) firstElement;
- }
- }
- }
- return null;
- }
+ private static IAdaptable getDebugContextElementForSelection(ISelection activeContext) {
+ if (activeContext instanceof IStructuredSelection) {
+ IStructuredSelection selection = (IStructuredSelection) activeContext;
+ if (!selection.isEmpty()) {
+ Object firstElement = selection.getFirstElement();
+ if (firstElement instanceof IAdaptable) {
+ return (IAdaptable) firstElement;
+ }
+ }
+ }
+ return null;
+ }
/**
* Returns the currently selected resource in the active workbench window,
@@ -480,11 +480,11 @@ public class DebugUITools {
return ((IDebugElement)context).getDebugTarget().getProcess();
}
- if (context instanceof IProcess) {
+ if (context instanceof IProcess) {
return (IProcess)context;
}
- if (context instanceof ILaunch) {
+ if (context instanceof ILaunch) {
ILaunch launch= (ILaunch)context;
IDebugTarget target= launch.getDebugTarget();
if (target != null) {
@@ -499,9 +499,9 @@ public class DebugUITools {
}
}
- if (context != null) {
- return context.getAdapter(IProcess.class);
- }
+ if (context != null) {
+ return context.getAdapter(IProcess.class);
+ }
return null;
}
@@ -683,37 +683,37 @@ public class DebugUITools {
}
/**
- * Open the launch configuration dialog on the specified launch
- * configuration. The dialog displays the tabs for a single configuration
- * only (a tree of launch configuration is not displayed), and provides a
- * launch (run or debug) button.
- * <p>
- * If a status is specified, a status handler is consulted to handle the
- * status. The status handler is passed the instance of the launch
- * configuration dialog that is opened. This gives the status handler an
- * opportunity to perform error handling/initialization as required.
- * </p>
- * @param shell the parent shell for the launch configuration dialog
- * @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
- * @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>
+ * Open the launch configuration dialog on the specified launch
+ * configuration. The dialog displays the tabs for a single configuration
+ * only (a tree of launch configuration is not displayed), and provides a
+ * launch (run or debug) button.
+ * <p>
+ * If a status is specified, a status handler is consulted to handle the
+ * status. The status handler is passed the instance of the launch
+ * configuration dialog that is opened. This gives the status handler an
+ * opportunity to perform error handling/initialization as required.
+ * </p>
+ * @param shell the parent shell for the launch configuration dialog
+ * @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
+ * @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
- * @since 2.1
- */
- public static int openLaunchConfigurationDialog(Shell shell, ILaunchConfiguration configuration, String groupIdentifier, IStatus status) {
- LaunchGroupExtension group = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(groupIdentifier);
- if (group != null) {
- LaunchConfigurationDialog dialog = new LaunchConfigurationDialog(shell, configuration, group);
- dialog.setInitialStatus(status);
- return dialog.open();
- }
-
- return Window.CANCEL;
- }
+ * @since 2.1
+ */
+ public static int openLaunchConfigurationDialog(Shell shell, ILaunchConfiguration configuration, String groupIdentifier, IStatus status) {
+ LaunchGroupExtension group = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(groupIdentifier);
+ if (group != null) {
+ 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
@@ -1217,45 +1217,45 @@ public class DebugUITools {
}
}
- /**
- * 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.
- * @return a source lookup result
- * @since 3.1
- */
- public static ISourceLookupResult lookupSource(Object artifact, ISourceLocator locator) {
+ /**
+ * 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.
+ * @return a source lookup result
+ * @since 3.1
+ */
+ 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>
- * @param result source lookup result to display
- * @param page the page to display the result in
- * @since 3.1
- */
- 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();
- }
+ }
+
+ /**
+ * 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>
+ * @param result source lookup result to display
+ * @param page the page to display the result in
+ * @since 3.1
+ */
+ 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
@@ -1308,55 +1308,55 @@ public class DebugUITools {
return DebugContextManager.getDefault();
}
- /**
- * 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) {
- Object o = HandlerUtil.getVariable(event, IConfigurationElementConstants.DEBUG_CONTEXT);
- if (o instanceof ISelection) {
- return (ISelection) o;
- }
- return null;
- }
-
- /**
- * 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)
- throws ExecutionException {
- Object o = HandlerUtil.getVariableChecked(event, IConfigurationElementConstants.DEBUG_CONTEXT);
- if (!(o instanceof ISelection)) {
- throw new ExecutionException("Incorrect type for " //$NON-NLS-1$
- + IConfigurationElementConstants.DEBUG_CONTEXT
- + " found while executing " //$NON-NLS-1$
- + event.getCommand().getId()
- + ", expected " + ISelection.class.getName() //$NON-NLS-1$
- + " found " + o.getClass().getName()); //$NON-NLS-1$
- }
- return (ISelection) o;
- }
-
- /**
- * Returns the global instance of toggle breakpoints target manager.
- *
- * @return toggle breakpoints target manager
- *
- * @since 3.8
- */
- public static IToggleBreakpointsTargetManager getToggleBreakpointsTargetManager() {
- return ToggleBreakpointsTargetManager.getDefault();
- }
+ /**
+ * 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) {
+ Object o = HandlerUtil.getVariable(event, IConfigurationElementConstants.DEBUG_CONTEXT);
+ if (o instanceof ISelection) {
+ return (ISelection) o;
+ }
+ return null;
+ }
+
+ /**
+ * 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)
+ throws ExecutionException {
+ Object o = HandlerUtil.getVariableChecked(event, IConfigurationElementConstants.DEBUG_CONTEXT);
+ if (!(o instanceof ISelection)) {
+ throw new ExecutionException("Incorrect type for " //$NON-NLS-1$
+ + IConfigurationElementConstants.DEBUG_CONTEXT
+ + " found while executing " //$NON-NLS-1$
+ + event.getCommand().getId()
+ + ", expected " + ISelection.class.getName() //$NON-NLS-1$
+ + " found " + o.getClass().getName()); //$NON-NLS-1$
+ }
+ return (ISelection) o;
+ }
+
+ /**
+ * Returns the global instance of toggle breakpoints target manager.
+ *
+ * @return toggle breakpoints target manager
+ *
+ * @since 3.8
+ */
+ public static IToggleBreakpointsTargetManager getToggleBreakpointsTargetManager() {
+ return ToggleBreakpointsTargetManager.getDefault();
+ }
/**
* Returns the ILaunchConfiguration corresponding to
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 fdf8b4422..755daac87 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
@@ -39,31 +39,31 @@ public abstract class DeferredDebugElementWorkbenchAdapter extends DebugElementW
/**
* An empty collection of children
*/
- protected static final Object[] EMPTY = new Object[0];
+ protected static final Object[] EMPTY = new Object[0];
- @Override
+ @Override
public boolean isContainer() {
- return true;
- }
+ return true;
+ }
- @Override
+ @Override
public ISchedulingRule getRule(Object object) {
- return null;
- }
+ return null;
+ }
@Override
public void fetchDeferredChildren(Object object, IElementCollector collector, IProgressMonitor monitor) {
if (monitor.isCanceled()) {
return;
}
- Object[] children = getChildren(object);
- if (monitor.isCanceled()) {
- return;
- }
- if (children.length > 0) {
- collector.add(children, monitor);
- }
- collector.done();
+ Object[] children = getChildren(object);
+ if (monitor.isCanceled()) {
+ return;
+ }
+ if (children.length > 0) {
+ collector.add(children, monitor);
+ }
+ collector.done();
}
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 81679e6a5..34673c50b 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
@@ -60,101 +60,101 @@ import org.eclipse.jface.util.IPropertyChangeListener;
*/
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
- * category that has changed, and the source of the event will the the
- * breakpoint organizer. Breakpoints in the category will be
- * recategorized when this event is fired.
- *
- * @see IPropertyChangeListener
- */
- String P_CATEGORY_CHANGED = DebugUIPlugin.getUniqueIdentifier() + ".P_CATEGORY_CHANGED"; //$NON-NLS-1$
+ /**
+ * Change event id when a category's breakpoints have changed.
+ * The <code>oldValue</code> of the <code>PropertyChangeEvent</code> will be the
+ * category that has changed, and the source of the event will the the
+ * breakpoint organizer. Breakpoints in the category will be
+ * recategorized when this event is fired.
+ *
+ * @see IPropertyChangeListener
+ */
+ String P_CATEGORY_CHANGED = DebugUIPlugin.getUniqueIdentifier() + ".P_CATEGORY_CHANGED"; //$NON-NLS-1$
- /**
- * Returns objects representing the categories of the specified
- * breakpoint or <code>null</code> if this organizer cannot classify
- * 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>
- */
- IAdaptable[] getCategories(IBreakpoint breakpoint);
+ /**
+ * Returns objects representing the categories of the specified
+ * breakpoint or <code>null</code> if this organizer cannot classify
+ * 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>
+ */
+ IAdaptable[] getCategories(IBreakpoint breakpoint);
- /**
- * Adds the specified listener. Has no effect if an identical listener is
- * already registered.
- *
- * @param listener listener to add
- */
- void addPropertyChangeListener(IPropertyChangeListener listener);
+ /**
+ * Adds the specified listener. Has no effect if an identical listener is
+ * already registered.
+ *
+ * @param listener listener to add
+ */
+ void addPropertyChangeListener(IPropertyChangeListener listener);
- /**
- * Removes the specified listener. Has no effect if an identical listener
- * is not already registered.
- *
- * @param listener listener to remove
- */
- void removePropertyChangeListener(IPropertyChangeListener listener);
+ /**
+ * Removes the specified listener. Has no effect if an identical listener
+ * is not already registered.
+ *
+ * @param listener listener to remove
+ */
+ 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
- */
- void addBreakpoint(IBreakpoint breakpoint, IAdaptable category);
+ /**
+ * 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
+ */
+ 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
- */
- void removeBreakpoint(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
+ */
+ 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
- */
- boolean canAdd(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
+ */
+ 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
- */
- boolean canRemove(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
+ */
+ 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>
- */
- IAdaptable[] getCategories();
+ /**
+ * 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>
+ */
+ IAdaptable[] getCategories();
- /**
- * Disposes this breakpoint organizer.
- */
- void dispose();
+ /**
+ * Disposes this breakpoint organizer.
+ */
+ 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 5dcfd5f93..b22bb2fb4 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
@@ -27,25 +27,25 @@ import org.eclipse.debug.core.model.IBreakpoint;
*/
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
- */
- void addBreakpoints(IBreakpoint[] breakpoints, IAdaptable category);
+ /**
+ * 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
+ */
+ 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
- */
- void removeBreakpoints(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
+ */
+ void removeBreakpoints(IBreakpoint[] breakpoints, IAdaptable category);
}
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 cfb8d5028..58be140f4 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
@@ -243,8 +243,8 @@ public interface IDebugUIConstants {
/**
* The default value of the {@link IDebugUIConstants#PREF_MANAGE_VIEW_PERSPECTIVES} preference.
*
- * @see IDebugUIConstants#PREF_MANAGE_VIEW_PERSPECTIVES
- *
+ * @see IDebugUIConstants#PREF_MANAGE_VIEW_PERSPECTIVES
+ *
* @since 3.5
*/
String PREF_MANAGE_VIEW_PERSPECTIVES_DEFAULT= "DEFAULT"; //$NON-NLS-1$
@@ -283,11 +283,11 @@ public interface IDebugUIConstants {
*/
String ID_REGISTER_VIEW= "org.eclipse.debug.ui.RegisterView"; //$NON-NLS-1$
- /**
- * Module view identifier (value <code>"org.eclipse.debug.ui.ModuleView"</code>).
- * @since 3.4
- */
- String ID_MODULE_VIEW= "org.eclipse.debug.ui.ModuleView"; //$NON-NLS-1$
+ /**
+ * Module view identifier (value <code>"org.eclipse.debug.ui.ModuleView"</code>).
+ * @since 3.4
+ */
+ String ID_MODULE_VIEW= "org.eclipse.debug.ui.ModuleView"; //$NON-NLS-1$
/**
* Console view identifier (value <code>"org.eclipse.debug.ui.ConsoleView"</code>).
@@ -334,8 +334,8 @@ public interface IDebugUIConstants {
*/
String IMG_ACT_RUN= "IMG_ACT_RUN"; //$NON-NLS-1$
- /** "Link with View" action image identifier. */
- String IMG_ACT_SYNCED= "IMG_ACT_SYNCED"; //$NON-NLS-1$
+ /** "Link with View" action image identifier. */
+ String IMG_ACT_SYNCED= "IMG_ACT_SYNCED"; //$NON-NLS-1$
/** "Skip Breakpoints" action image identifier */
String IMG_SKIP_BREAKPOINTS= "IMG_SKIP_BREAKPOINTS"; //$NON-NLS-1$
@@ -367,12 +367,12 @@ public interface IDebugUIConstants {
*/
String IMG_LCL_LOCK = "IMG_LCL_LOCK"; //$NON-NLS-1$
- /**
- * Add action image identifier.
- *
- * @since 3.8
- */
- String IMG_LCL_ADD = "IMG_LCL_MONITOR_EXPRESSION"; //$NON-NLS-1$
+ /**
+ * Add action image identifier.
+ *
+ * @since 3.8
+ */
+ String IMG_LCL_ADD = "IMG_LCL_MONITOR_EXPRESSION"; //$NON-NLS-1$
/**
* Remove all action image identifier
@@ -381,12 +381,12 @@ public interface IDebugUIConstants {
*/
String IMG_LCL_REMOVE_ALL = "IMG_LCL_REMOVE_ALL"; //$NON-NLS-1$
- /**
- * Remove action image identifier
- *
- * @since 3.2
- */
- String IMG_LCL_REMOVE = "IMG_LCL_REMOVE"; //$NON-NLS-1$
+ /**
+ * Remove action image identifier
+ *
+ * @since 3.2
+ */
+ String IMG_LCL_REMOVE = "IMG_LCL_REMOVE"; //$NON-NLS-1$
/**
* Content assist action image identifier.
@@ -615,11 +615,11 @@ public interface IDebugUIConstants {
/** Error overlay image identifier. */
String IMG_OVR_ERROR = "IMG_OVR_ERROR"; //$NON-NLS-1$
- /**
- * Skip breakpoint image overlay identifier.
- * @since 3.1
- */
- String IMG_OVR_SKIP_BREAKPOINT = "IMG_OVR_SKIP_BREAKPOINT"; //$NON-NLS-1$
+ /**
+ * Skip breakpoint image overlay identifier.
+ * @since 3.1
+ */
+ String IMG_OVR_SKIP_BREAKPOINT = "IMG_OVR_SKIP_BREAKPOINT"; //$NON-NLS-1$
/**
* Prototype image overlay identifier.
@@ -633,22 +633,22 @@ public interface IDebugUIConstants {
*/
String DEBUG_ACTION_SET= PLUGIN_ID + ".debugActionSet"; //$NON-NLS-1$
- /**
- * Debug Toolbar action set identifier (value <code>"org.eclipse.debug.ui.debugToolbarActionSet"</code>).
- *
- * @since 3.8
- */
- String DEBUG_TOOLBAR_ACTION_SET= PLUGIN_ID + ".debugToolbarActionSet"; //$NON-NLS-1$
+ /**
+ * Debug Toolbar action set identifier (value <code>"org.eclipse.debug.ui.debugToolbarActionSet"</code>).
+ *
+ * @since 3.8
+ */
+ 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
- * toolbar. Actions contributing to the debug view can use this property
- * to control their visibility.
- *
- * @since 3.8
- */
- String DEBUG_VIEW_TOOBAR_VISIBLE = PLUGIN_ID + ".debugViewToolbarVisible"; //$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
+ * toolbar. Actions contributing to the debug view can use this property
+ * to control their visibility.
+ *
+ * @since 3.8
+ */
+ String DEBUG_VIEW_TOOBAR_VISIBLE = PLUGIN_ID + ".debugViewToolbarVisible"; //$NON-NLS-1$
/**
* Launch action set identifier (value <code>"org.eclipse.debug.ui.launchActionSet"</code>).
@@ -822,18 +822,18 @@ public interface IDebugUIConstants {
*/
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
- */
- String EMPTY_MODULES_GROUP = "emptyModulesGroup"; //$NON-NLS-1$
+ /**
+ * Identifier for an empty group preceding a
+ * modules group in a menu (value <code>"emptyModulesGroup"</code>).
+ * @since 3.4
+ */
+ String EMPTY_MODULES_GROUP = "emptyModulesGroup"; //$NON-NLS-1$
- /**
- * Identifier for a modules group in a menu (value <code>"modulesGroup"</code>).
- * @since 3.4
- */
- String MODULES_GROUP = "modulesGroup"; //$NON-NLS-1$
+ /**
+ * Identifier for a modules group in a menu (value <code>"modulesGroup"</code>).
+ * @since 3.4
+ */
+ String MODULES_GROUP = "modulesGroup"; //$NON-NLS-1$
/**
* Id for the popup menu associated with the variables (tree viewer) part of the VariableView
@@ -953,7 +953,7 @@ public interface IDebugUIConstants {
* from {@link org.eclipse.ui.WorkbenchEncoding}.
*
* @since 3.1
- * @deprecated in 3.3 Please use DebugPlugin.ATTR_CONSOLE_ENCODING instead.
+ * @deprecated in 3.3 Please use DebugPlugin.ATTR_CONSOLE_ENCODING instead.
*/
@Deprecated String ATTR_CONSOLE_ENCODING = DebugPlugin.ATTR_CONSOLE_ENCODING;
@@ -1086,35 +1086,35 @@ public interface IDebugUIConstants {
/**
* Variable value editors extension point identifier (value
* <code>"variableValueEditors"</code>
- *
- * @since 3.1
+ *
+ * @since 3.1
*/
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 String EXTENSION_POINT_MEMORY_RENDERIGNS = "memoryRenderings"; //$NON-NLS-1$
-
- /**
- * Memory renderings extension point identifier (value
- * <code>"memoryRenderings"</code>
- *
- * @since 3.4
- */
- String EXTENSION_POINT_MEMORY_RENDERINGS = "memoryRenderings"; //$NON-NLS-1$
-
- /**
- * Breakpoint organizers extension point identifier (value
- * <code>"breakpointOrganizers"</code>
- *
- * @since 3.1
- */
- String EXTENSION_POINT_BREAKPOINT_ORGANIZERS = "breakpointOrganizers"; //$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 String EXTENSION_POINT_MEMORY_RENDERIGNS = "memoryRenderings"; //$NON-NLS-1$
+
+ /**
+ * Memory renderings extension point identifier (value
+ * <code>"memoryRenderings"</code>
+ *
+ * @since 3.4
+ */
+ String EXTENSION_POINT_MEMORY_RENDERINGS = "memoryRenderings"; //$NON-NLS-1$
+
+ /**
+ * Breakpoint organizers extension point identifier (value
+ * <code>"breakpointOrganizers"</code>
+ *
+ * @since 3.1
+ */
+ String EXTENSION_POINT_BREAKPOINT_ORGANIZERS = "breakpointOrganizers"; //$NON-NLS-1$
/**
* Simple identifier constant (value <code>"detailPaneFactories"</code>) for the
@@ -1124,21 +1124,21 @@ public interface IDebugUIConstants {
*/
String EXTENSION_POINT_DETAIL_FACTORIES = "detailPaneFactories"; //$NON-NLS-1$
- /**
- * Simple identifier constant (value <code>"toggleBreakpointsTargetFactories"</code>) for the
- * toggle breakpoint targets extension point.
- *
- * @since 3.5
- */
- String EXTENSION_POINT_TOGGLE_BREAKPOINTS_TARGET_FACTORIES = "toggleBreakpointsTargetFactories"; //$NON-NLS-1$
+ /**
+ * Simple identifier constant (value <code>"toggleBreakpointsTargetFactories"</code>) for the
+ * toggle breakpoint targets extension point.
+ *
+ * @since 3.5
+ */
+ String EXTENSION_POINT_TOGGLE_BREAKPOINTS_TARGET_FACTORIES = "toggleBreakpointsTargetFactories"; //$NON-NLS-1$
- /**
- * Update policies extension point identifier (value
- * <code>"updatePolicies"</code>
- *
- * @since 3.2
- */
- String EXTENSION_POINT_UPDATE_POLICIES = "updatePolicies"; //$NON-NLS-1$
+ /**
+ * Update policies extension point identifier (value
+ * <code>"updatePolicies"</code>
+ *
+ * @since 3.2
+ */
+ 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
@@ -1215,25 +1215,25 @@ public interface IDebugUIConstants {
*/
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
- */
- 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
- */
- String ANNOTATION_TYPE_INSTRUCTION_POINTER_SECONDARY = "org.eclipse.debug.ui.secondaryIP"; //$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
+ */
+ 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
+ */
+ String ANNOTATION_TYPE_INSTRUCTION_POINTER_SECONDARY = "org.eclipse.debug.ui.secondaryIP"; //$NON-NLS-1$
/**
* Editor Identifier for the "Common Source Not Found" editor.
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 1de69c906..55705c994 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
@@ -155,8 +155,8 @@ public interface IDebugView extends IViewPart {
/**
* Removes the given IUpdate from this view's collection of updatable
* objects.
- * Has no effect if an identical IUpdate was not already registered.
- *
+ * Has no effect if an identical IUpdate was not already registered.
+ *
* @param updatable The IUpdate instance to be removed
*/
void remove(IUpdate updatable);
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 08d7080fc..566b0a1fc 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
@@ -45,5 +45,5 @@ public interface IDetailPane3 extends IDetailPane, ISaveablePart {
*
* @param listener a property listener
*/
- void removePropertyListener(IPropertyListener listener);
+ void removePropertyListener(IPropertyListener listener);
}
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 4db95a9ce..69e86b68b 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
@@ -68,7 +68,7 @@ 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
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 d9f4ab287..4977ccc0f 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
@@ -17,15 +17,15 @@ import org.eclipse.jface.operation.IRunnableContext;
/**
- * A launch configuration dialog is used to edit and launch
- * launch configurations. It contains a launch configuration
- * tab group.
- * @see ILaunchConfigurationTabGroup
- * @see ILaunchConfigurationTab
- * @since 2.0
+ * A launch configuration dialog is used to edit and launch
+ * launch configurations. It contains a launch configuration
+ * tab group.
+ * @see ILaunchConfigurationTabGroup
+ * @see ILaunchConfigurationTab
+ * @since 2.0
* @noimplement This interface is not intended to be implemented by clients.
* @noextend This interface is not intended to be extended by clients.
- */
+ */
public interface ILaunchConfigurationDialog extends IRunnableContext {
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 a07bb3d42..244d2d55f 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
@@ -68,88 +68,88 @@ 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;
-
- private IPresentationContext fContext;
- private TreeModelViewer fViewer;
- private SashForm fSashForm;
- private Composite fDetailPaneComposite;
- 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
- * the dialog (possibly <code>null</code>)
- * @param expression The expression being inspected
- */
- public InspectPopupDialog(Shell shell, Point anchor, String commandId, IExpression expression) {
- super(shell, anchor, commandId);
- fExpression = expression;
- }
-
- @Override
+ private static final int MIN_WIDTH = 300;
+ private static final int MIN_HEIGHT = 250;
+
+ private IPresentationContext fContext;
+ private TreeModelViewer fViewer;
+ private SashForm fSashForm;
+ private Composite fDetailPaneComposite;
+ 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
+ * the dialog (possibly <code>null</code>)
+ * @param expression The expression being inspected
+ */
+ public InspectPopupDialog(Shell shell, Point anchor, String commandId, IExpression expression) {
+ super(shell, anchor, commandId);
+ fExpression = expression;
+ }
+
+ @Override
protected Control createDialogArea(Composite parent) {
- Composite composite = new Composite(parent, parent.getStyle());
- GridLayout layout = new GridLayout();
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- fSashForm = new SashForm(composite, parent.getStyle());
- fSashForm.setOrientation(SWT.VERTICAL);
- fSashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- VariablesView view = getViewToEmulate();
- fContext = new PresentationContext(IDebugUIConstants.ID_VARIABLE_VIEW, view);
- if (view != null) {
- // copy over properties
- IPresentationContext copy = ((TreeModelViewer)view.getViewer()).getPresentationContext();
- String[] properties = copy.getProperties();
- for (int i = 0; i < properties.length; i++) {
+ Composite composite = new Composite(parent, parent.getStyle());
+ GridLayout layout = new GridLayout();
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ fSashForm = new SashForm(composite, parent.getStyle());
+ fSashForm.setOrientation(SWT.VERTICAL);
+ fSashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ VariablesView view = getViewToEmulate();
+ fContext = new PresentationContext(IDebugUIConstants.ID_VARIABLE_VIEW, view);
+ if (view != null) {
+ // copy over properties
+ IPresentationContext copy = ((TreeModelViewer)view.getViewer()).getPresentationContext();
+ String[] properties = copy.getProperties();
+ for (int i = 0; i < properties.length; i++) {
String key = properties[i];
fContext.setProperty(key, copy.getProperty(key));
}
- }
- fViewer = new TreeModelViewer(fSashForm, SWT.NO_TRIM | SWT.MULTI | SWT.VIRTUAL, fContext);
- fViewer.setAutoExpandLevel(1);
+ }
+ fViewer = new TreeModelViewer(fSashForm, SWT.NO_TRIM | SWT.MULTI | SWT.VIRTUAL, fContext);
+ fViewer.setAutoExpandLevel(1);
- fDetailPaneComposite = SWTFactory.createComposite(fSashForm, 1, 1, GridData.FILL_BOTH);
+ 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
+ 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
+ fTree = fViewer.getTree();
+ fTree.addSelectionListener(new SelectionListener() {
+ @Override
public void widgetSelected(SelectionEvent e) {
fDetailPane.display(fViewer.getStructuredSelection());
- }
- @Override
+ }
+ @Override
public void widgetDefaultSelected(SelectionEvent e) {}
- });
-
- initSashWeights();
-
- fViewer.getContentProvider();
- if (view != null) {
- StructuredViewer structuredViewer = (StructuredViewer) view.getViewer();
- if (structuredViewer != null) {
- ViewerFilter[] filters = structuredViewer.getFilters();
- for (int i = 0; i < filters.length; i++) {
- fViewer.addFilter(filters[i]);
- }
- }
- }
-
- TreeRoot treeRoot = new TreeRoot();
- // add update listener to auto-select and display details of root expression
- fViewer.addViewerUpdateListener(new IViewerUpdateListener() {
+ });
+
+ initSashWeights();
+
+ fViewer.getContentProvider();
+ if (view != null) {
+ StructuredViewer structuredViewer = (StructuredViewer) view.getViewer();
+ if (structuredViewer != null) {
+ ViewerFilter[] filters = structuredViewer.getFilters();
+ for (int i = 0; i < filters.length; i++) {
+ fViewer.addFilter(filters[i]);
+ }
+ }
+ }
+
+ TreeRoot treeRoot = new TreeRoot();
+ // add update listener to auto-select and display details of root expression
+ fViewer.addViewerUpdateListener(new IViewerUpdateListener() {
@Override
public void viewerUpdatesComplete() {
}
@@ -169,58 +169,58 @@ public class InspectPopupDialog extends DebugPopup {
}
}
});
- fViewer.setInput(treeRoot);
-
- return fTree;
- }
-
- /**
- * Initializes the sash form weights from the preference store (using default values if
- * no sash weights were stored previously).
- */
- protected void initSashWeights(){
- String prefWeights = DebugUIPlugin.getDefault().getPreferenceStore().getString(PREF_INSPECT_POPUP_SASH_WEIGHTS);
- if (prefWeights.length() > 0){
- String[] weights = prefWeights.split(":"); //$NON-NLS-1$
- if (weights.length == 2){
- try{
- int[] intWeights = new int[2];
- intWeights[0] = Integer.parseInt(weights[0]);
- intWeights[1] = Integer.parseInt(weights[1]);
- fSashForm.setWeights(intWeights);
- return;
- } catch (NumberFormatException e){}
- }
- }
- fSashForm.setWeights(DEFAULT_SASH_WEIGHTS);
- }
-
- @Override
+ fViewer.setInput(treeRoot);
+
+ return fTree;
+ }
+
+ /**
+ * Initializes the sash form weights from the preference store (using default values if
+ * no sash weights were stored previously).
+ */
+ protected void initSashWeights(){
+ String prefWeights = DebugUIPlugin.getDefault().getPreferenceStore().getString(PREF_INSPECT_POPUP_SASH_WEIGHTS);
+ if (prefWeights.length() > 0){
+ String[] weights = prefWeights.split(":"); //$NON-NLS-1$
+ if (weights.length == 2){
+ try{
+ int[] intWeights = new int[2];
+ intWeights[0] = Integer.parseInt(weights[0]);
+ intWeights[1] = Integer.parseInt(weights[1]);
+ fSashForm.setWeights(intWeights);
+ return;
+ } catch (NumberFormatException e){}
+ }
+ }
+ fSashForm.setWeights(DEFAULT_SASH_WEIGHTS);
+ }
+
+ @Override
protected void saveDialogBounds(Shell shell) {
- super.saveDialogBounds(shell);
- if (fSashForm != null && !fSashForm.isDisposed()){
- int[] weights = fSashForm.getWeights();
- if (weights.length == 2){
- String weightString = weights[0] + ":" + weights[1]; //$NON-NLS-1$
- IEclipsePreferences node = InstanceScope.INSTANCE.getNode(DebugUIPlugin.getUniqueIdentifier());
- if(node != null) {
- node.put(PREF_INSPECT_POPUP_SASH_WEIGHTS, weightString);
- try {
+ super.saveDialogBounds(shell);
+ if (fSashForm != null && !fSashForm.isDisposed()){
+ int[] weights = fSashForm.getWeights();
+ if (weights.length == 2){
+ String weightString = weights[0] + ":" + weights[1]; //$NON-NLS-1$
+ IEclipsePreferences node = InstanceScope.INSTANCE.getNode(DebugUIPlugin.getUniqueIdentifier());
+ if(node != null) {
+ node.put(PREF_INSPECT_POPUP_SASH_WEIGHTS, weightString);
+ try {
node.flush();
} catch (BackingStoreException e) {
DebugUIPlugin.log(e);
}
- }
- }
- }
- }
-
- /**
- * 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.
- *
- */
- private class TreeRoot extends ElementContentProvider {
+ }
+ }
+ }
+ }
+
+ /**
+ * 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.
+ *
+ */
+ private class TreeRoot extends ElementContentProvider {
@Override
protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return 1;
@@ -234,69 +234,69 @@ public class InspectPopupDialog extends DebugPopup {
protected boolean supportsContextId(String id) {
return true;
}
- }
-
- /**
- * Attempts to find an appropriate view to emulate, this will either be the
- * variables view or the expressions view.
- * @return a view to emulate or <code>null</code>
- */
- private VariablesView getViewToEmulate() {
- IWorkbenchPage page = DebugUIPlugin.getActiveWorkbenchWindow().getActivePage();
- VariablesView expressionsView = (VariablesView) page.findView(IDebugUIConstants.ID_EXPRESSION_VIEW);
- if (expressionsView != null && expressionsView.isVisible()) {
- return expressionsView;
- }
- VariablesView variablesView = (VariablesView) page.findView(IDebugUIConstants.ID_VARIABLE_VIEW);
- if (variablesView != null && variablesView.isVisible()) {
- return variablesView;
- }
- if (expressionsView != null) {
- return expressionsView;
- }
- return variablesView;
- }
-
- @Override
+ }
+
+ /**
+ * Attempts to find an appropriate view to emulate, this will either be the
+ * variables view or the expressions view.
+ * @return a view to emulate or <code>null</code>
+ */
+ private VariablesView getViewToEmulate() {
+ IWorkbenchPage page = DebugUIPlugin.getActiveWorkbenchWindow().getActivePage();
+ VariablesView expressionsView = (VariablesView) page.findView(IDebugUIConstants.ID_EXPRESSION_VIEW);
+ if (expressionsView != null && expressionsView.isVisible()) {
+ return expressionsView;
+ }
+ VariablesView variablesView = (VariablesView) page.findView(IDebugUIConstants.ID_VARIABLE_VIEW);
+ if (variablesView != null && variablesView.isVisible()) {
+ return variablesView;
+ }
+ if (expressionsView != null) {
+ return expressionsView;
+ }
+ return variablesView;
+ }
+
+ @Override
public boolean close() {
- if (!wasPersisted()) {
- fExpression.dispose();
- }
- fDetailPane.dispose();
- fContext.dispose();
+ if (!wasPersisted()) {
+ fExpression.dispose();
+ }
+ fDetailPane.dispose();
+ fContext.dispose();
return super.close();
}
- @Override
+ @Override
protected String getActionText() {
return DebugUIViewsMessages.InspectPopupDialog_0;
}
- @Override
+ @Override
protected void persist() {
- super.persist();
- DebugPlugin.getDefault().getExpressionManager().addExpression(fExpression);
-
- fExpression = null;
- IWorkbenchPage page = DebugUIPlugin.getActiveWorkbenchWindow().getActivePage();
- IViewPart part = page.findView(IDebugUIConstants.ID_EXPRESSION_VIEW);
- if (part == null) {
- try {
- page.showView(IDebugUIConstants.ID_EXPRESSION_VIEW);
- } catch (PartInitException e) {
- }
- } else {
- page.bringToTop(part);
- }
- }
-
- @Override
+ super.persist();
+ DebugPlugin.getDefault().getExpressionManager().addExpression(fExpression);
+
+ fExpression = null;
+ IWorkbenchPage page = DebugUIPlugin.getActiveWorkbenchWindow().getActivePage();
+ IViewPart part = page.findView(IDebugUIConstants.ID_EXPRESSION_VIEW);
+ if (part == null) {
+ try {
+ page.showView(IDebugUIConstants.ID_EXPRESSION_VIEW);
+ } catch (PartInitException e) {
+ }
+ } else {
+ page.bringToTop(part);
+ }
+ }
+
+ @Override
protected Point getInitialSize() {
- Point initialSize = super.getInitialSize();
- initialSize.x = Math.max(initialSize.x, MIN_WIDTH);
- initialSize.y = Math.max(initialSize.y, MIN_HEIGHT);
- return initialSize;
- }
+ Point initialSize = super.getInitialSize();
+ initialSize.x = Math.max(initialSize.x, MIN_WIDTH);
+ initialSize.y = Math.max(initialSize.y, MIN_HEIGHT);
+ return initialSize;
+ }
@Override
protected List<Control> getBackgroundColorExclusions() {
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 b6c7ddb2d..8db2295f0 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
@@ -355,12 +355,12 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog {
String text = null;
if (objects.length == 1) {
IStringVariable variable = (IStringVariable)objects[0];
- IArgumentSelector selector = StringVariablePresentationManager.getDefault().getArgumentSelector(variable);
- if (variable instanceof IDynamicVariable) {
- argEnabled = ((IDynamicVariable)variable).supportsArgument();
- }
- buttonEnabled = argEnabled && selector != null;
- text = variable.getDescription();
+ IArgumentSelector selector = StringVariablePresentationManager.getDefault().getArgumentSelector(variable);
+ if (variable instanceof IDynamicVariable) {
+ argEnabled = ((IDynamicVariable)variable).supportsArgument();
+ }
+ buttonEnabled = argEnabled && selector != null;
+ text = variable.getDescription();
}
if (text == null) {
text = IInternalDebugCoreConstants.EMPTY_STRING;
@@ -385,13 +385,13 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog {
return IDebugUIConstants.PLUGIN_ID + ".STRING_VARIABLE_SELECTION_DIALOG_SECTION"; //$NON-NLS-1$
}
- @Override
+ @Override
protected IDialogSettings getDialogBoundsSettings() {
- IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(getDialogSettingsSectionName());
- if (section == null) {
- section = settings.addNewSection(getDialogSettingsSectionName());
- }
- return section;
- }
+ IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
+ 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 7e66963da..b071075f9 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
@@ -209,9 +209,9 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT
* the workspace
*/
private void handleWorkspaceDirBrowseButtonSelected() {
- IContainer currentContainer= getContainer();
+ IContainer currentContainer= getContainer();
if (currentContainer == null) {
- currentContainer = ResourcesPlugin.getWorkspace().getRoot();
+ currentContainer = ResourcesPlugin.getWorkspace().getRoot();
}
ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), currentContainer, false, DebugUIMessages.WorkingDirectoryBlock_4);
dialog.showClosedProjects(false);
@@ -231,23 +231,23 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT
protected IContainer getContainer() {
String path = getWorkingDirectoryText();
if (path.length() > 0) {
- IResource res = null;
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- if (path.startsWith("${workspace_loc:")) { //$NON-NLS-1$
- IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
- try {
- path = manager.performStringSubstitution(path, false);
- IPath uriPath = new Path(path).makeAbsolute();
- IContainer[] containers = root.findContainersForLocationURI(URIUtil.toURI(uriPath));
- if (containers.length > 0) {
- res = containers[0];
- }
- }
- catch (CoreException e) {
- log(e);
- }
+ IResource res = null;
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ if (path.startsWith("${workspace_loc:")) { //$NON-NLS-1$
+ IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
+ try {
+ path = manager.performStringSubstitution(path, false);
+ IPath uriPath = new Path(path).makeAbsolute();
+ IContainer[] containers = root.findContainersForLocationURI(URIUtil.toURI(uriPath));
+ if (containers.length > 0) {
+ res = containers[0];
+ }
+ }
+ catch (CoreException e) {
+ log(e);
+ }
}
- else {
+ else {
res = root.findMember(path);
}
if (res instanceof IContainer) {
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 b0095ab7c..30eba5386 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
@@ -259,9 +259,9 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct
if (fMenuCreator == null) {
fMenuCreator = new AddMemoryRenderingMenuCreator();
}
- action.setMenuCreator(fMenuCreator);
- fAction= action;
- }
+ action.setMenuCreator(fMenuCreator);
+ fAction= action;
+ }
}
private IAddMemoryRenderingsTarget getAddMemoryRenderingTarget(Object elmt) {
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 8ff311d3f..e652248c1 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
@@ -74,30 +74,30 @@ import org.eclipse.ui.services.IServiceLocator;
*/
public class BreakpointTypesContribution extends CompoundContributionItem implements IWorkbenchContribution {
- private class SelectTargetAction extends Action {
+ private class SelectTargetAction extends Action {
private final Set<String> fPossibleIDs;
- private final String fID;
+ private final String fID;
SelectTargetAction(String name, Set<String> possibleIDs, String ID) {
- super(name, AS_RADIO_BUTTON);
- fID = ID;
- fPossibleIDs = possibleIDs;
- }
+ super(name, AS_RADIO_BUTTON);
+ fID = ID;
+ fPossibleIDs = possibleIDs;
+ }
- @Override
+ @Override
public void run() {
- if (isChecked()) {
- // Note: setPreferredTarget is not declared on the
- // IToggleBreakpontsTargetManager interface.
- ToggleBreakpointsTargetManager.getDefault().setPreferredTarget(fPossibleIDs, fID);
- }
- }
- }
-
- private IServiceLocator fServiceLocator;
-
- private static IContributionItem[] NO_BREAKPOINT_TYPES_CONTRIBUTION_ITEMS = new IContributionItem[] {
- new ContributionItem() {
+ if (isChecked()) {
+ // Note: setPreferredTarget is not declared on the
+ // IToggleBreakpontsTargetManager interface.
+ ToggleBreakpointsTargetManager.getDefault().setPreferredTarget(fPossibleIDs, fID);
+ }
+ }
+ }
+
+ private IServiceLocator fServiceLocator;
+
+ private static IContributionItem[] NO_BREAKPOINT_TYPES_CONTRIBUTION_ITEMS = new IContributionItem[] {
+ new ContributionItem() {
@Override
public void fill(Menu menu, int index) {
MenuItem item = new MenuItem(menu, SWT.NONE);
@@ -109,56 +109,56 @@ public class BreakpointTypesContribution extends CompoundContributionItem implem
public boolean isEnabled() {
return false;
}
- }
- };
+ }
+ };
- @Override
+ @Override
protected IContributionItem[] getContributionItems() {
- IWorkbenchPart part = null;
- ISelection selection = null;
-
- ISelectionService selectionService =
- fServiceLocator.getService(ISelectionService.class);
- if (selectionService != null) {
- selection = selectionService.getSelection();
- }
- IPartService partService = fServiceLocator.getService(IPartService.class);
- if (partService != null) {
- part = partService.getActivePart();
- }
-
- // If no part or selection, disable all.
- if (part == null || selection == null) {
- return NO_BREAKPOINT_TYPES_CONTRIBUTION_ITEMS;
- }
-
- // Get breakpoint toggle target IDs.
- IToggleBreakpointsTargetManager manager = DebugUITools.getToggleBreakpointsTargetManager();
+ IWorkbenchPart part = null;
+ ISelection selection = null;
+
+ ISelectionService selectionService =
+ fServiceLocator.getService(ISelectionService.class);
+ if (selectionService != null) {
+ selection = selectionService.getSelection();
+ }
+ IPartService partService = fServiceLocator.getService(IPartService.class);
+ if (partService != null) {
+ part = partService.getActivePart();
+ }
+
+ // If no part or selection, disable all.
+ if (part == null || selection == null) {
+ return NO_BREAKPOINT_TYPES_CONTRIBUTION_ITEMS;
+ }
+
+ // Get breakpoint toggle target IDs.
+ IToggleBreakpointsTargetManager manager = DebugUITools.getToggleBreakpointsTargetManager();
Set<String> enabledIDs = manager.getEnabledToggleBreakpointsTargetIDs(part, selection);
- String preferredId = manager.getPreferredToggleBreakpointsTargetID(part, selection);
+ String preferredId = manager.getPreferredToggleBreakpointsTargetID(part, selection);
List<Action> actions = new ArrayList<>(enabledIDs.size());
for (String id : enabledIDs) {
- Action action = new SelectTargetAction(manager.getToggleBreakpointsTargetName(id), enabledIDs, id);
- if (id.equals(preferredId)) {
- action.setChecked(true);
- }
- 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;
- }
-
- @Override
+ Action action = new SelectTargetAction(manager.getToggleBreakpointsTargetName(id), enabledIDs, id);
+ if (id.equals(preferredId)) {
+ action.setChecked(true);
+ }
+ 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;
+ }
+
+ @Override
public void initialize(IServiceLocator serviceLocator) {
- fServiceLocator = serviceLocator;
- }
+ fServiceLocator = serviceLocator;
+ }
}
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 e0c837f28..a763267c5 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
@@ -179,10 +179,10 @@ public abstract class ContextualLaunchAction implements IObjectActionDelegate, I
return DebugPlugin.getDefault().getLaunchManager();
}
- /**
- * Fills the menu with applicable launch shortcuts
- * @param menu The menu to fill
- */
+ /**
+ * Fills the menu with applicable launch shortcuts
+ * @param menu The menu to fill
+ */
protected void fillMenu(Menu menu) {
IStructuredSelection ss = SelectedResourceManager.getDefault().getCurrentSelection();
int accelerator = 1;
@@ -190,10 +190,10 @@ public abstract class ContextualLaunchAction implements IObjectActionDelegate, I
try {
//try to add the shared config it the context is one.
ILaunchConfiguration config = getLaunchConfigurationManager().isSharedConfig(ss.getFirstElement());
- if(config != null && config.exists() && config.supportsMode(fMode)) {
- IAction action = new LaunchConfigurationAction(config, fMode, config.getName(), DebugUITools.getDefaultImageDescriptor(config), accelerator++);
- ActionContributionItem item = new ActionContributionItem(action);
- item.fill(menu, -1);
+ if(config != null && config.exists() && config.supportsMode(fMode)) {
+ IAction action = new LaunchConfigurationAction(config, fMode, config.getName(), DebugUITools.getDefaultImageDescriptor(config), accelerator++);
+ ActionContributionItem item = new ActionContributionItem(action);
+ item.fill(menu, -1);
}
}
catch (CoreException ce) {}
@@ -247,8 +247,8 @@ public abstract class ContextualLaunchAction implements IObjectActionDelegate, I
new MenuItem(menu, SWT.SEPARATOR);
}
IAction action = new OpenLaunchDialogAction(fGroup.getIdentifier());
- ActionContributionItem item = new ActionContributionItem(action);
- item.fill(menu, -1);
+ ActionContributionItem item = new ActionContributionItem(action);
+ item.fill(menu, -1);
} else {
boolean addedSep = false;
for (String category : categories) {
@@ -261,9 +261,9 @@ public abstract class ContextualLaunchAction implements IObjectActionDelegate, I
new MenuItem(menu, SWT.SEPARATOR);
addedSep = true;
}
- IAction action = new OpenLaunchDialogAction(group.getIdentifier());
- ActionContributionItem item= new ActionContributionItem(action);
- item.fill(menu, -1);
+ IAction action = new OpenLaunchDialogAction(group.getIdentifier());
+ ActionContributionItem item= new ActionContributionItem(action);
+ item.fill(menu, -1);
}
}
}
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 641f6beda..c3ce545d2 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
@@ -59,275 +59,275 @@ import org.eclipse.ui.PlatformUI;
*/
public abstract class DebugCommandAction extends Action implements IDebugContextListener {
- private boolean fInitialized = false;
+ 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.
- */
- private IAction fAction;
-
- private IEnabledTarget fEnabledTarget = new IEnabledTarget() {
- @Override
+ 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.
+ */
+ private IAction fAction;
+
+ private IEnabledTarget fEnabledTarget = new IEnabledTarget() {
+ @Override
public void setEnabled(boolean enabled) {
- DebugCommandAction.this.setEnabled(enabled);
- }
- };
-
- /**
- * Constructor
- */
- public DebugCommandAction() {
- super();
- String helpContextId = getHelpContextId();
- if (helpContextId != null) {
+ DebugCommandAction.this.setEnabled(enabled);
+ }
+ };
+
+ /**
+ * Constructor
+ */
+ public DebugCommandAction() {
+ super();
+ String helpContextId = getHelpContextId();
+ if (helpContextId != null) {
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, helpContextId);
}
- setEnabled(false);
- }
+ setEnabled(false);
+ }
/**
- * Sets the current workbench action that is a proxy to an {@link org.eclipse.ui.IActionDelegate}
- * 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) {
- fAction = action;
- fAction.setEnabled(isEnabled());
- }
-
- /**
- * Executes this action on the given target object
- * @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,
- new ICommandParticipant() {
- @Override
+ * Sets the current workbench action that is a proxy to an {@link org.eclipse.ui.IActionDelegate}
+ * 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) {
+ fAction = action;
+ fAction.setEnabled(isEnabled());
+ }
+
+ /**
+ * Executes this action on the given target object
+ * @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,
+ 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
- * 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
- * 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}
- * command handler that type this action executes.
- *
- * @return command class.
- *
- * @see org.eclipse.debug.core.commands.IDebugCommandHandler
- */
+ DebugCommandAction.this.postExecute(request, targets);
+ }
+ });
+ }
+
+ /**
+ * 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
+ * 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}
+ * command handler that type this action executes.
+ *
+ * @return command class.
+ *
+ * @see org.eclipse.debug.core.commands.IDebugCommandHandler
+ */
abstract protected Class<?> getCommandType();
- /**
- * @see org.eclipse.debug.ui.contexts.IDebugContextListener#debugContextChanged(org.eclipse.debug.ui.contexts.DebugContextEvent)
- */
- @Override
+ /**
+ * @see org.eclipse.debug.ui.contexts.IDebugContextListener#debugContextChanged(org.eclipse.debug.ui.contexts.DebugContextEvent)
+ */
+ @Override
public void debugContextChanged(DebugContextEvent event) {
- fUpdateService.postUpdateCommand(getCommandType(), fEnabledTarget);
+ fUpdateService.postUpdateCommand(getCommandType(), fEnabledTarget);
}
- /**
- * @see org.eclipse.jface.action.Action#setEnabled(boolean)
- */
- @Override
+ /**
+ * @see org.eclipse.jface.action.Action#setEnabled(boolean)
+ */
+ @Override
public void setEnabled(boolean enabled) {
- synchronized (this) {
- if (!fInitialized) {
- fInitialized = true;
- notifyAll();
- }
- }
- super.setEnabled(enabled);
- if (fAction != null) {
- fAction.setEnabled(enabled);
- }
- }
-
- /**
- * Initializes this action for a specific part.
- *
- * @param part workbench part
- */
- public void init(IWorkbenchPart part) {
- fInitialized = false;
- fPart = part;
- fWindow = part.getSite().getWorkbenchWindow();
- fUpdateService = DebugCommandService.getService(fWindow);
- IDebugContextService service = getDebugContextService();
+ synchronized (this) {
+ if (!fInitialized) {
+ fInitialized = true;
+ notifyAll();
+ }
+ }
+ super.setEnabled(enabled);
+ if (fAction != null) {
+ fAction.setEnabled(enabled);
+ }
+ }
+
+ /**
+ * Initializes this action for a specific part.
+ *
+ * @param part workbench part
+ */
+ public void init(IWorkbenchPart part) {
+ fInitialized = false;
+ fPart = part;
+ fWindow = part.getSite().getWorkbenchWindow();
+ fUpdateService = DebugCommandService.getService(fWindow);
+ IDebugContextService service = getDebugContextService();
String partId = part.getSite().getId();
service.addDebugContextListener(this, partId);
- ISelection activeContext = service.getActiveContext(partId);
- if (activeContext != null) {
- fUpdateService.updateCommand(getCommandType(), fEnabledTarget);
- } else {
- setEnabled(getInitialEnablement());
- }
- }
-
- /**
- * Initializes this action for a workbench window.
- *
- * @param window the window
- */
- public void init(IWorkbenchWindow window) {
- fInitialized = false;
- fWindow = window;
- fUpdateService = DebugCommandService.getService(fWindow);
- IDebugContextService contextService = getDebugContextService();
+ ISelection activeContext = service.getActiveContext(partId);
+ if (activeContext != null) {
+ fUpdateService.updateCommand(getCommandType(), fEnabledTarget);
+ } else {
+ setEnabled(getInitialEnablement());
+ }
+ }
+
+ /**
+ * Initializes this action for a workbench window.
+ *
+ * @param window the window
+ */
+ public void init(IWorkbenchWindow window) {
+ fInitialized = false;
+ fWindow = window;
+ fUpdateService = DebugCommandService.getService(fWindow);
+ IDebugContextService contextService = getDebugContextService();
contextService.addDebugContextListener(this);
- ISelection activeContext = contextService.getActiveContext();
- if (activeContext != null) {
- fUpdateService.updateCommand(getCommandType(), fEnabledTarget);
- } else {
- 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() {
- return false;
- }
-
- /**
- * 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
- */
- protected ISelection getContext() {
+ ISelection activeContext = contextService.getActiveContext();
+ if (activeContext != null) {
+ fUpdateService.updateCommand(getCommandType(), fEnabledTarget);
+ } else {
+ 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() {
+ return false;
+ }
+
+ /**
+ * 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
+ */
+ protected ISelection getContext() {
if (fPart != null) {
getDebugContextService().getActiveContext(fPart.getSite().getId());
- }
- return getDebugContextService().getActiveContext();
- }
+ }
+ return getDebugContextService().getActiveContext();
+ }
- @Override
+ @Override
public void run() {
- synchronized (this) {
- if (!fInitialized) {
- try {
- wait();
- } catch (InterruptedException e) {
- }
- }
- }
-
- ISelection selection = getContext();
- if (selection instanceof IStructuredSelection && isEnabled()) {
- IStructuredSelection ss = (IStructuredSelection) selection;
- boolean enabled = execute(ss.toArray());
- // disable the action according to the command
- setEnabled(enabled);
- }
- }
-
- @Override
+ synchronized (this) {
+ if (!fInitialized) {
+ try {
+ wait();
+ } catch (InterruptedException e) {
+ }
+ }
+ }
+
+ ISelection selection = getContext();
+ if (selection instanceof IStructuredSelection && isEnabled()) {
+ IStructuredSelection ss = (IStructuredSelection) selection;
+ boolean enabled = execute(ss.toArray());
+ // disable the action according to the command
+ setEnabled(enabled);
+ }
+ }
+
+ @Override
public void runWithEvent(Event event) {
- run();
- }
-
- /**
- * Clean up when removing
- */
- public void dispose() {
- IDebugContextService service = getDebugContextService();
- if (fPart != null) {
- service.removeDebugContextListener(this, fPart.getSite().getId());
- } else {
- service.removeDebugContextListener(this);
- }
- 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() {
- return DebugUITools.getDebugContextManager().getContextService(fWindow);
- }
-
- /**
- * 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();
-
- @Override
+ run();
+ }
+
+ /**
+ * Clean up when removing
+ */
+ public void dispose() {
+ IDebugContextService service = getDebugContextService();
+ if (fPart != null) {
+ service.removeDebugContextListener(this, fPart.getSite().getId());
+ } else {
+ service.removeDebugContextListener(this);
+ }
+ 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() {
+ return DebugUITools.getDebugContextManager().getContextService(fWindow);
+ }
+
+ /**
+ * 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();
+
+ @Override
public abstract String getId();
- @Override
+ @Override
public abstract String getText();
- @Override
+ @Override
public abstract String getToolTipText();
- @Override
+ @Override
public abstract ImageDescriptor getDisabledImageDescriptor();
- @Override
+ @Override
public abstract ImageDescriptor getHoverImageDescriptor();
- @Override
+ @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() {
- return fAction;
- }
+ /**
+ * 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() {
+ return fAction;
+ }
}
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 32a11b7aa..442bbc396 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
@@ -61,228 +61,228 @@ import org.eclipse.ui.handlers.HandlerUtil;
*/
public abstract class DebugCommandHandler extends AbstractHandler {
- /**
- * 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.
- */
- private class EnabledTarget implements IEnabledTarget, IDebugContextListener {
- boolean fEnabled = getInitialEnablement();
- IWorkbenchWindow fWindow;
-
- EnabledTarget(IWorkbenchWindow window) {
- fWindow = window;
+ /**
+ * 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.
+ */
+ private class EnabledTarget implements IEnabledTarget, IDebugContextListener {
+ boolean fEnabled = getInitialEnablement();
+ IWorkbenchWindow fWindow;
+
+ EnabledTarget(IWorkbenchWindow window) {
+ fWindow = window;
}
void init() {
- DebugCommandService.getService(fWindow).updateCommand(getCommandType(), this);
- getContextService(fWindow).addDebugContextListener(this);
+ DebugCommandService.getService(fWindow).updateCommand(getCommandType(), this);
+ getContextService(fWindow).addDebugContextListener(this);
}
- @Override
+ @Override
public void setEnabled(boolean enabled) {
- boolean oldEnabled = fEnabled;
- fEnabled = enabled;
- if (fEnabled != oldEnabled && fCurrentEnabledTarget == this) {
- fireHandlerChanged(new HandlerEvent(DebugCommandHandler.this, true, false));
- }
- }
-
- @Override
+ boolean oldEnabled = fEnabled;
+ fEnabled = enabled;
+ if (fEnabled != oldEnabled && fCurrentEnabledTarget == this) {
+ fireHandlerChanged(new HandlerEvent(DebugCommandHandler.this, true, false));
+ }
+ }
+
+ @Override
public void debugContextChanged(DebugContextEvent event) {
- DebugCommandService.getService(fWindow).postUpdateCommand(getCommandType(), this);
- }
-
- void dispose() {
- if (isDisposed()) {
- return;
- }
- getContextService(fWindow).removeDebugContextListener(this);
- fWindow = null;
- }
-
- boolean isDisposed() {
- return fWindow == null;
- }
- }
-
- /**
- * 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
+ DebugCommandService.getService(fWindow).postUpdateCommand(getCommandType(), this);
+ }
+
+ void dispose() {
+ if (isDisposed()) {
+ return;
+ }
+ getContextService(fWindow).removeDebugContextListener(this);
+ fWindow = null;
+ }
+
+ boolean isDisposed() {
+ return fWindow == null;
+ }
+ }
+
+ /**
+ * 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
+ @Override
public void windowDeactivated(IWorkbenchWindow w) {
- }
+ }
- @Override
+ @Override
public void windowClosed(IWorkbenchWindow w) {
- EnabledTarget enabledTarget = fEnabledTargetsMap.get(w);
- if (enabledTarget != null) {
- enabledTarget.dispose();
- }
- }
+ EnabledTarget enabledTarget = fEnabledTargetsMap.get(w);
+ if (enabledTarget != null) {
+ enabledTarget.dispose();
+ }
+ }
- @Override
+ @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.
- */
- private Map<IWorkbenchWindow, EnabledTarget> fEnabledTargetsMap = new WeakHashMap<>();
-
- /**
- * The current enabled target, based on the active
- * workbench window.
- */
- private EnabledTarget fCurrentEnabledTarget = null;
-
- /**
- * The constructor adds the handler as the
- */
- public DebugCommandHandler() {
- super();
- PlatformUI.getWorkbench().addWindowListener(fWindowListener);
- }
-
- @Override
+ fCurrentEnabledTarget = fEnabledTargetsMap.get(w);
+ fireHandlerChanged(new HandlerEvent(DebugCommandHandler.this, true, false));
+ }
+ };
+
+ /**
+ * Map of enabled targets keyed by workbench window.
+ */
+ private Map<IWorkbenchWindow, EnabledTarget> fEnabledTargetsMap = new WeakHashMap<>();
+
+ /**
+ * The current enabled target, based on the active
+ * workbench window.
+ */
+ private EnabledTarget fCurrentEnabledTarget = null;
+
+ /**
+ * The constructor adds the handler as the
+ */
+ public DebugCommandHandler() {
+ super();
+ PlatformUI.getWorkbench().addWindowListener(fWindowListener);
+ }
+
+ @Override
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
- fCurrentEnabledTarget = null;
-
- if (!(evaluationContext instanceof IEvaluationContext)) {
- return;
- }
- IEvaluationContext context = (IEvaluationContext) evaluationContext;
- Object _window = context.getVariable(ISources.ACTIVE_WORKBENCH_WINDOW_NAME);
- if (_window instanceof IWorkbenchWindow) {
- IWorkbenchWindow window = (IWorkbenchWindow)_window;
- fCurrentEnabledTarget = getEnabledTarget(window);
- }
- }
-
- @Override
+ // 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
+ fCurrentEnabledTarget = null;
+
+ if (!(evaluationContext instanceof IEvaluationContext)) {
+ return;
+ }
+ IEvaluationContext context = (IEvaluationContext) evaluationContext;
+ Object _window = context.getVariable(ISources.ACTIVE_WORKBENCH_WINDOW_NAME);
+ if (_window instanceof IWorkbenchWindow) {
+ IWorkbenchWindow window = (IWorkbenchWindow)_window;
+ fCurrentEnabledTarget = getEnabledTarget(window);
+ }
+ }
+
+ @Override
public boolean isEnabled() {
- if (fCurrentEnabledTarget == null) {
- return false;
- }
- return fCurrentEnabledTarget.fEnabled;
- }
-
- private EnabledTarget getEnabledTarget(IWorkbenchWindow window) {
- EnabledTarget target = fEnabledTargetsMap.get(window);
- if (target == null) {
- target = new EnabledTarget(window);
+ if (fCurrentEnabledTarget == null) {
+ return false;
+ }
+ return fCurrentEnabledTarget.fEnabled;
+ }
+
+ private EnabledTarget getEnabledTarget(IWorkbenchWindow window) {
+ EnabledTarget target = fEnabledTargetsMap.get(window);
+ if (target == null) {
+ target = new EnabledTarget(window);
fEnabledTargetsMap.put(window, target);
target.init();
- }
- return target;
- }
+ }
+ return target;
+ }
- @Override
+ @Override
public Object execute(ExecutionEvent event) throws ExecutionException {
- IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
- if (window == null) {
- throw new ExecutionException("No active workbench window."); //$NON-NLS-1$
- }
- fCurrentEnabledTarget = getEnabledTarget(window);
-
- ISelection selection = getContextService(window).getActiveContext();
- 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 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);
- return service.executeCommand(
- getCommandType(), targets,
- new ICommandParticipant() {
- @Override
+ IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
+ if (window == null) {
+ throw new ExecutionException("No active workbench window."); //$NON-NLS-1$
+ }
+ fCurrentEnabledTarget = getEnabledTarget(window);
+
+ ISelection selection = getContextService(window).getActiveContext();
+ 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 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);
+ return service.executeCommand(
+ 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
- * 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
- * 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}
- * command handler that type this action executes.
- *
- * @return command class.
- *
- * @see org.eclipse.debug.core.commands.IDebugCommandHandler
- */
+ DebugCommandHandler.this.postExecute(request, targets);
+ }
+ });
+ }
+
+ /**
+ * 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
+ * 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}
+ * 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() {
- return false;
- }
+ /**
+ * Returns whether this action should be enabled when initialized
+ * and there is no active debug context.
+ *
+ * @return false, by default
+ */
+ protected boolean getInitialEnablement() {
+ return false;
+ }
- /**
- * Clean up when removing
- */
- @Override
+ /**
+ * Clean up when removing
+ */
+ @Override
public void dispose() {
- PlatformUI.getWorkbench().removeWindowListener(fWindowListener);
- for(EnabledTarget target : fEnabledTargetsMap.values()) {
- if (!target.isDisposed()) {
- target.dispose();
- }
- }
- fEnabledTargetsMap.clear();
- fCurrentEnabledTarget = null;
- }
+ PlatformUI.getWorkbench().removeWindowListener(fWindowListener);
+ for(EnabledTarget target : fEnabledTargetsMap.values()) {
+ if (!target.isDisposed()) {
+ target.dispose();
+ }
+ }
+ fEnabledTargetsMap.clear();
+ fCurrentEnabledTarget = null;
+ }
}
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 6b7a25b79..f86dd4fbb 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
@@ -67,56 +67,56 @@ import org.eclipse.ui.IWorkbenchPart;
* @since 3.5
*/
public interface IToggleBreakpointsTargetFactory {
- /**
- * 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
- * targets, 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
+ * targets, possibly empty
+ */
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.
- *
- * @param part The active part.
- * @param selection The current selection
- * @return a breakpoint toggle target identifier or <code>null</code>
- */
- String getDefaultToggleTarget(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.
+ *
+ * @param part The active part.
+ * @param selection The current selection
+ * @return a breakpoint toggle target identifier or <code>null</code>
+ */
+ 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
- * {@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
- */
- IToggleBreakpointsTarget createToggleTarget(String targetID);
+ /**
+ * 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
+ */
+ IToggleBreakpointsTarget createToggleTarget(String targetID);
- /**
- * 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
- */
- String getToggleTargetName(String targetID);
+ /**
+ * 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
+ */
+ String getToggleTargetName(String targetID);
- /**
- * 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
- */
- String getToggleTargetDescription(String targetID);
+ /**
+ * 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
+ */
+ 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 2f8f9fdb9..7c67cf927 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
@@ -43,65 +43,65 @@ import org.eclipse.ui.IWorkbenchPart;
*/
public interface IToggleBreakpointsTargetManager {
- /**
- * 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.
- * @param part active part
- * @param selection active selection in part
- * @return Set of toggle target IDs or an empty set
- */
+ /**
+ * 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.
+ * @param part active part
+ * @param selection active selection in part
+ * @return Set of toggle target IDs or an empty set
+ */
Set<String> getEnabledToggleBreakpointsTargetIDs(IWorkbenchPart part, ISelection selection);
- /**
- * 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.
- * @param part active part
- * @param selection active selection in part
- * @return The toggle target IDs or null if none.
- */
- String getPreferredToggleBreakpointsTargetID(IWorkbenchPart part, ISelection selection);
+ /**
+ * 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.
+ * @param part active part
+ * @param selection active selection in part
+ * @return The toggle target IDs or null if none.
+ */
+ 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
- * @return The instantiated target or null
- */
- IToggleBreakpointsTarget getToggleBreakpointsTarget(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
+ * @return The instantiated target or null
+ */
+ IToggleBreakpointsTarget getToggleBreakpointsTarget(IWorkbenchPart part, ISelection selection);
- /**
- * 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.
- */
- String getToggleBreakpointsTargetName(String id);
+ /**
+ * 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.
+ */
+ String getToggleBreakpointsTargetName(String id);
- /**
- * 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.
- */
- String getToggleBreakpointsTargetDescription(String id);
+ /**
+ * 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.
+ */
+ 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.
- */
- void addChangedListener(IToggleBreakpointsTargetManagerListener listener);
+ /**
+ * Adds the given listener to the list of listeners notified when the preferred
+ * toggle breakpoints targets change.
+ * @param listener The listener to add.
+ */
+ void addChangedListener(IToggleBreakpointsTargetManagerListener listener);
- /**
- * Removes the given listener from the list of listeners notified when the preferred
- * toggle breakpoints targets change.
- * @param listener The listener to add.
- */
- void removeChangedListener(IToggleBreakpointsTargetManagerListener listener);
+ /**
+ * Removes the given listener from the list of listeners notified when the preferred
+ * toggle breakpoints targets change.
+ * @param listener The listener to add.
+ */
+ void removeChangedListener(IToggleBreakpointsTargetManagerListener listener);
}
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 5d2d44ccf..e358d3545 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
@@ -26,8 +26,8 @@ package org.eclipse.debug.ui.actions;
*/
public interface IToggleBreakpointsTargetManagerListener {
- /**
- * Called when the preferred toggle targets have changed.
- */
- void preferredTargetsChanged();
+ /**
+ * Called when the preferred toggle targets have changed.
+ */
+ void preferredTargetsChanged();
}
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 b6f7c962e..3b5b744f6 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
@@ -47,34 +47,34 @@ import org.eclipse.swt.widgets.Shell;
*/
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
- * @return whether this editor has completed the edit operation for the given variable.
- * <code>true</code> if no more work should be done, <code>false</code> if the debug
- * platform should prompt the user to edit the given variable using the default
- * variable editor
- */
- boolean editVariable(IVariable variable, Shell shell);
+ /**
+ * 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
+ * @return whether this editor has completed the edit operation for the given variable.
+ * <code>true</code> if no more work should be done, <code>false</code> if the debug
+ * platform should prompt the user to edit the given variable using the default
+ * variable editor
+ */
+ 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
- * user. May be <code>null</code> if no active shell could be found.
- * @return whether this editor has completed the save operation for the given variable.
- * <code>true</code> if no more work should be done, <code>false</code> if the debug
- * platform should perform the default save operation
- */
- boolean saveVariable(IVariable variable, String expression, 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
+ * user. May be <code>null</code> if no active shell could be found.
+ * @return whether this editor has completed the save operation for the given variable.
+ * <code>true</code> if no more work should be done, <code>false</code> if the debug
+ * platform should perform the default save operation
+ */
+ boolean saveVariable(IVariable variable, String expression, Shell shell);
}
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 4aed3fad8..604b7d02a 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
@@ -32,18 +32,18 @@ import org.eclipse.core.runtime.CoreException;
*/
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
- * expression
- */
- String createWatchExpression(Object element) throws CoreException;
+ /**
+ * 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
+ * expression
+ */
+ String createWatchExpression(Object element) throws CoreException;
- /**
+ /**
* Returns whether a watch expression can be created for the specified variable.
*
* @param variable the specified variable
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 cc5069538..945cc6422 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
@@ -302,7 +302,7 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress {
*/
private void readAttribute(IMemento memento, Map<String, Object> map) {
String name = memento.getString(IImportExportConstants.IE_NODE_NAME),
- value = memento.getString(IImportExportConstants.IE_NODE_VALUE);
+ value = memento.getString(IImportExportConstants.IE_NODE_VALUE);
if (value != null && name != null) {
if (name.equals(IInternalDebugUIConstants.WORKING_SET_NAME)) {
fCurrentWorkingSetProperty = value;
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 aa905eacb..17dcd129a 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
@@ -183,13 +183,13 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork
String mode = getMode();
try {
ILaunchConfiguration config = getLaunchConfigurationManager().isSharedConfig(getSelection(context));
- if(config != null && config.exists() && config.supportsMode(mode)) {
- IAction action = new LaunchConfigurationAction(config, mode, config.getName(), DebugUITools.getDefaultImageDescriptor(config), accelerator++);
- ActionContributionItem item = new ActionContributionItem(action);
- item.fill(fCreatedMenu, -1);
- if(!filteredShortCuts.isEmpty()) {
- new MenuItem(fCreatedMenu, SWT.SEPARATOR);
- }
+ if(config != null && config.exists() && config.supportsMode(mode)) {
+ IAction action = new LaunchConfigurationAction(config, mode, config.getName(), DebugUITools.getDefaultImageDescriptor(config), accelerator++);
+ ActionContributionItem item = new ActionContributionItem(action);
+ item.fill(fCreatedMenu, -1);
+ if(!filteredShortCuts.isEmpty()) {
+ new MenuItem(fCreatedMenu, SWT.SEPARATOR);
+ }
}
}
catch(CoreException ce) {DebugUIPlugin.log(ce);}
@@ -320,10 +320,10 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork
*/
@Override
public void selectionChanged(IAction action, ISelection selection) {
- if (!fInitialized) {
- action.setEnabled(existsConfigTypesForMode());
- fInitialized = true;
- }
+ if (!fInitialized) {
+ action.setEnabled(existsConfigTypesForMode());
+ fInitialized = true;
+ }
}
/**
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 70a0dcc72..7a92fae36 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
@@ -60,7 +60,7 @@ public abstract class RulerBreakpointAction extends Action {
* @return breakpoint associated with activity in the ruler or <code>null</code>
*/
protected IBreakpoint getBreakpoint() {
- IAnnotationModel annotationModel = fEditor.getDocumentProvider().getAnnotationModel(fEditor.getEditorInput());
+ IAnnotationModel annotationModel = fEditor.getDocumentProvider().getAnnotationModel(fEditor.getEditorInput());
IDocument document = fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput());
if (annotationModel != null) {
Iterator<Annotation> iterator = annotationModel.getAnnotationIterator();
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 8b145bfdf..65bf5a1df 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
@@ -82,172 +82,172 @@ import org.eclipse.ui.texteditor.ITextEditorExtension;
*/
@Deprecated
public class RulerBreakpointTypesActionDelegate implements IEditorActionDelegate, IMenuListener, IMenuCreator {
- private ITextEditor fEditor = null;
- private IAction fCallerAction = null;
- private IVerticalRulerInfo fRulerInfo;
- private ISelection fSelection;
+ private ITextEditor fEditor = null;
+ private IAction fCallerAction = null;
+ private IVerticalRulerInfo fRulerInfo;
+ private ISelection fSelection;
- /**
- * The menu created by this action
- */
- private Menu fMenu;
+ /**
+ * The menu created by this action
+ */
+ private Menu fMenu;
- private class SelectTargetAction extends Action {
+ private class SelectTargetAction extends Action {
private final Set<String> fPossibleIDs;
- private final String fID;
+ private final String fID;
SelectTargetAction(String name, Set<String> possibleIDs, String ID) {
- super(name, AS_RADIO_BUTTON);
- fID = ID;
- fPossibleIDs = possibleIDs;
- }
+ super(name, AS_RADIO_BUTTON);
+ fID = ID;
+ fPossibleIDs = possibleIDs;
+ }
- @Override
+ @Override
public void run() {
- if (isChecked()) {
- ToggleBreakpointsTargetManager.getDefault().setPreferredTarget(fPossibleIDs, fID);
- }
- }
- }
+ if (isChecked()) {
+ ToggleBreakpointsTargetManager.getDefault().setPreferredTarget(fPossibleIDs, fID);
+ }
+ }
+ }
- @Override
+ @Override
public void selectionChanged(IAction action, ISelection selection) {
- // In the editor we're not using the selection.
- }
+ // In the editor we're not using the selection.
+ }
- @Override
+ @Override
public void run(IAction action) {
- // Do nothing, this is a pull-down menu.
- }
+ // Do nothing, this is a pull-down menu.
+ }
- @Override
+ @Override
public void setActiveEditor(IAction callerAction, IEditorPart targetEditor) {
- // Clean up old editor data.
- if (fCallerAction != null) {
- fCallerAction.setMenuCreator(null);
- }
- if (fEditor instanceof ITextEditorExtension) {
- ((ITextEditorExtension) fEditor).removeRulerContextMenuListener(this);
- }
- fRulerInfo = null;
+ // Clean up old editor data.
+ if (fCallerAction != null) {
+ fCallerAction.setMenuCreator(null);
+ }
+ if (fEditor instanceof ITextEditorExtension) {
+ ((ITextEditorExtension) fEditor).removeRulerContextMenuListener(this);
+ }
+ fRulerInfo = null;
- // Set up new editor data.
- fCallerAction = callerAction;
- fCallerAction.setMenuCreator(this);
+ // Set up new editor data.
+ fCallerAction = callerAction;
+ fCallerAction.setMenuCreator(this);
- fEditor= targetEditor == null ? null : targetEditor.getAdapter(ITextEditor.class);
+ fEditor= targetEditor == null ? null : targetEditor.getAdapter(ITextEditor.class);
- if (fEditor != null) {
- if (fEditor instanceof ITextEditorExtension) {
- ((ITextEditorExtension) fEditor).addRulerContextMenuListener(this);
- }
+ if (fEditor != null) {
+ if (fEditor instanceof ITextEditorExtension) {
+ ((ITextEditorExtension) fEditor).addRulerContextMenuListener(this);
+ }
- fRulerInfo= fEditor.getAdapter(IVerticalRulerInfo.class);
- }
+ fRulerInfo= fEditor.getAdapter(IVerticalRulerInfo.class);
+ }
- }
+ }
- @Override
+ @Override
public void dispose() {
- if (fCallerAction != null) {
- fCallerAction.setMenuCreator(null);
- }
- if (fEditor instanceof ITextEditorExtension) {
- ((ITextEditorExtension) fEditor).removeRulerContextMenuListener(this);
- }
- fRulerInfo = null;
- }
-
- @Override
+ if (fCallerAction != null) {
+ fCallerAction.setMenuCreator(null);
+ }
+ if (fEditor instanceof ITextEditorExtension) {
+ ((ITextEditorExtension) fEditor).removeRulerContextMenuListener(this);
+ }
+ fRulerInfo = null;
+ }
+
+ @Override
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());
- int line = fRulerInfo.getLineOfLastMouseButtonActivity();
- if (line > -1) {
- try {
- IRegion region = document.getLineInformation(line);
- fSelection = new TextSelection(document, region.getOffset(), 0);
- } catch (BadLocationException e) {}
- }
- }
- ToggleBreakpointsTargetManager toggleTargetManager = ToggleBreakpointsTargetManager.getDefault();
+ fSelection = StructuredSelection.EMPTY;
+ if (fEditor != null && fRulerInfo != null) {
+
+ IDocumentProvider provider = fEditor.getDocumentProvider();
+ if (provider != null) {
+ IDocument document = provider.getDocument(fEditor.getEditorInput());
+ int line = fRulerInfo.getLineOfLastMouseButtonActivity();
+ if (line > -1) {
+ try {
+ IRegion region = document.getLineInformation(line);
+ fSelection = new TextSelection(document, region.getOffset(), 0);
+ } catch (BadLocationException e) {}
+ }
+ }
+ 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) {
- if (fMenu != null) {
- fMenu.dispose();
- }
- fMenu = menu;
- }
-
- @Override
+ 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) {
+ if (fMenu != null) {
+ fMenu.dispose();
+ }
+ fMenu = menu;
+ }
+
+ @Override
public Menu getMenu(Menu parent) {
- setMenu(new Menu(parent));
- fillMenu(fMenu);
- initMenu();
- return fMenu;
- }
+ setMenu(new Menu(parent));
+ fillMenu(fMenu);
+ initMenu();
+ return fMenu;
+ }
- @Override
+ @Override
public Menu getMenu(Control parent) {
- setMenu(new Menu(parent));
- fillMenu(fMenu);
- 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();
+ setMenu(new Menu(parent));
+ fillMenu(fMenu);
+ 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();
Set<String> enabledIDs = manager.getEnabledToggleBreakpointsTargetIDs(fEditor, fSelection);
- String preferredId = manager.getPreferredToggleBreakpointsTargetID(fEditor, fSelection);
+ String preferredId = manager.getPreferredToggleBreakpointsTargetID(fEditor, fSelection);
for (String id : enabledIDs) {
- SelectTargetAction action= new SelectTargetAction(manager.getToggleBreakpointsTargetName(id), enabledIDs, id);
- if (id.equals(preferredId)){
- action.setChecked(true);
- }
- ActionContributionItem item= new ActionContributionItem(action);
- item.fill(menu, -1);
- }
- }
-
- /**
- * Creates the menu for the action
- */
- private void initMenu() {
- // Add listener to re-populate the menu each time
- // it is shown because of dynamic history list
- fMenu.addMenuListener(new MenuAdapter() {
- @Override
+ SelectTargetAction action= new SelectTargetAction(manager.getToggleBreakpointsTargetName(id), enabledIDs, id);
+ if (id.equals(preferredId)){
+ action.setChecked(true);
+ }
+ ActionContributionItem item= new ActionContributionItem(action);
+ item.fill(menu, -1);
+ }
+ }
+
+ /**
+ * Creates the menu for the action
+ */
+ private void initMenu() {
+ // Add listener to re-populate the menu each time
+ // it is shown because of dynamic history list
+ fMenu.addMenuListener(new MenuAdapter() {
+ @Override
public void menuShown(MenuEvent e) {
- Menu m = (Menu)e.widget;
- MenuItem[] items = m.getItems();
- for (int i=0; i < items.length; i++) {
- items[i].dispose();
- }
- fillMenu(m);
- }
- });
- }
+ Menu m = (Menu)e.widget;
+ MenuItem[] items = m.getItems();
+ for (int i=0; i < items.length; i++) {
+ items[i].dispose();
+ }
+ fillMenu(m);
+ }
+ });
+ }
}
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 0cab974eb..43ab92864 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
@@ -72,8 +72,8 @@ public class RunToLineActionDelegate implements IEditorActionDelegate, IActionDe
if (selection instanceof IStructuredSelection) {
IStructuredSelection ss = (IStructuredSelection) selection;
if (ss.size() == 1) {
- fTargetElement = (ISuspendResume)
- DebugPlugin.getAdapter(ss.getFirstElement(), ISuspendResume.class);
+ fTargetElement = (ISuspendResume)
+ DebugPlugin.getAdapter(ss.getFirstElement(), ISuspendResume.class);
}
}
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 64a419765..8a6b7ad75 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
@@ -47,103 +47,103 @@ import org.eclipse.debug.ui.IDebugUIConstants;
*/
public class RunToLineHandler implements IDebugEventSetListener, IBreakpointManagerListener, IWorkspaceRunnable {
- private IDebugTarget fTarget;
- private ISuspendResume fResumee;
- private IBreakpoint fBreakpoint;
- private boolean fAutoSkip = false;
+ 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
- */
- public RunToLineHandler(IDebugTarget target, ISuspendResume suspendResume, IBreakpoint breakpoint) {
- fResumee = suspendResume;
- fTarget = target;
- fBreakpoint = breakpoint;
- }
+ /**
+ * 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
+ */
+ public RunToLineHandler(IDebugTarget target, ISuspendResume suspendResume, IBreakpoint breakpoint) {
+ fResumee = suspendResume;
+ fTarget = target;
+ fBreakpoint = breakpoint;
+ }
- @Override
+ @Override
public void handleDebugEvents(DebugEvent[] events) {
- for (int i = 0; i < events.length; i++) {
- DebugEvent event= events[i];
- Object source= event.getSource();
- if (source instanceof IThread && event.getKind() == DebugEvent.SUSPEND &&
- event.getDetail() == DebugEvent.BREAKPOINT) {
- IThread thread = (IThread) source;
- IDebugTarget suspendee = thread.getAdapter(IDebugTarget.class);
- if (fTarget.equals(suspendee)) {
- // cleanup if the breakpoint was hit or not
- cancel();
- }
- } else if (source instanceof IDebugTarget && event.getKind() == DebugEvent.TERMINATE) {
- if (source.equals(fTarget)) {
- // Clean up if the debug target terminates without
- // hitting the breakpoint.
- cancel();
- }
- }
- }
+ for (int i = 0; i < events.length; i++) {
+ DebugEvent event= events[i];
+ Object source= event.getSource();
+ if (source instanceof IThread && event.getKind() == DebugEvent.SUSPEND &&
+ event.getDetail() == DebugEvent.BREAKPOINT) {
+ IThread thread = (IThread) source;
+ IDebugTarget suspendee = thread.getAdapter(IDebugTarget.class);
+ if (fTarget.equals(suspendee)) {
+ // cleanup if the breakpoint was hit or not
+ cancel();
+ }
+ } else if (source instanceof IDebugTarget && event.getKind() == DebugEvent.TERMINATE) {
+ if (source.equals(fTarget)) {
+ // Clean up if the debug target terminates without
+ // hitting the breakpoint.
+ cancel();
+ }
+ }
+ }
- }
+ }
- @Override
+ @Override
public void breakpointManagerEnablementChanged(boolean enabled) {
- // if the user changes the breakpoint manager enablement, don't restore it
- fAutoSkip = false;
- }
+ // if the user changes the breakpoint manager enablement, don't restore it
+ fAutoSkip = false;
+ }
- private IBreakpointManager getBreakpointManager() {
- return getDebugPlugin().getBreakpointManager();
- }
+ private IBreakpointManager getBreakpointManager() {
+ return getDebugPlugin().getBreakpointManager();
+ }
- private DebugPlugin getDebugPlugin() {
- return DebugPlugin.getDefault();
- }
+ private DebugPlugin getDebugPlugin() {
+ return DebugPlugin.getDefault();
+ }
- /**
- * Cancels the run to line operation.
- */
- public void cancel() {
- IBreakpointManager manager = getBreakpointManager();
- try {
- getDebugPlugin().removeDebugEventListener(this);
- manager.removeBreakpointManagerListener(this);
- fTarget.breakpointRemoved(fBreakpoint, null);
- } finally {
- if (fAutoSkip) {
- manager.setEnabled(true);
- }
- }
- }
+ /**
+ * Cancels the run to line operation.
+ */
+ public void cancel() {
+ IBreakpointManager manager = getBreakpointManager();
+ try {
+ getDebugPlugin().removeDebugEventListener(this);
+ manager.removeBreakpointManagerListener(this);
+ fTarget.breakpointRemoved(fBreakpoint, null);
+ } finally {
+ if (fAutoSkip) {
+ manager.setEnabled(true);
+ }
+ }
+ }
- @Override
+ @Override
public void run(IProgressMonitor monitor) throws CoreException {
- getDebugPlugin().addDebugEventListener(this);
- IBreakpointManager breakpointManager = getBreakpointManager();
- fAutoSkip = DebugUITools.getPreferenceStore().getBoolean(IDebugUIConstants.PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE) && breakpointManager.isEnabled();
- if (fAutoSkip) {
- getBreakpointManager().setEnabled(false);
- breakpointManager.addBreakpointManagerListener(this);
- }
- Job job = new Job(ActionMessages.RunToLineHandler_0) {
- @Override
+ getDebugPlugin().addDebugEventListener(this);
+ IBreakpointManager breakpointManager = getBreakpointManager();
+ fAutoSkip = DebugUITools.getPreferenceStore().getBoolean(IDebugUIConstants.PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE) && breakpointManager.isEnabled();
+ if (fAutoSkip) {
+ getBreakpointManager().setEnabled(false);
+ breakpointManager.addBreakpointManagerListener(this);
+ }
+ Job job = new Job(ActionMessages.RunToLineHandler_0) {
+ @Override
protected IStatus run(IProgressMonitor jobMonitor) {
- if (!jobMonitor.isCanceled()) {
- fTarget.breakpointAdded(fBreakpoint);
- try {
- fResumee.resume();
- } catch (DebugException e) {
- cancel();
- return e.getStatus();
- }
- }
- return Status.OK_STATUS;
- }
- };
- job.schedule();
- }
+ if (!jobMonitor.isCanceled()) {
+ fTarget.breakpointAdded(fBreakpoint);
+ try {
+ fResumee.resume();
+ } catch (DebugException e) {
+ cancel();
+ return e.getStatus();
+ }
+ }
+ 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 a71280595..5f020524e 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
@@ -53,10 +53,10 @@ public class ToggleBreakpointAction extends Action implements IUpdate {
private IDocument fDocument;
private IVerticalRulerInfo fRulerInfo;
private IToggleBreakpointsTargetManagerListener fListener = new IToggleBreakpointsTargetManagerListener() {
- @Override
+ @Override
public void preferredTargetsChanged() {
- update();
- }
+ update();
+ }
};
/**
@@ -120,7 +120,7 @@ public class ToggleBreakpointAction extends Action implements IUpdate {
}
}
if (target.canToggleLineBreakpoints(fPart, selection)) {
- target.toggleLineBreakpoints(fPart, selection);
+ target.toggleLineBreakpoints(fPart, selection);
} else if (target.canToggleWatchpoints(fPart, selection)) {
target.toggleWatchpoints(fPart, selection);
} else if (target.canToggleMethodBreakpoints(fPart, selection)) {
@@ -193,34 +193,34 @@ public class ToggleBreakpointAction extends Action implements IUpdate {
public void update() {
IDocument document= getDocument();
if (document != null) {
- int line = fRulerInfo.getLineOfLastMouseButtonActivity();
- if (line > -1) {
- try {
- ITextSelection selection = getTextSelection(document, line);
-
- IToggleBreakpointsTarget adapter =
- ToggleBreakpointsTargetManager.getDefault().getToggleBreakpointsTarget(fPart, selection);
- if (adapter == null) {
- setEnabled(false);
- return;
- }
- if (adapter instanceof IToggleBreakpointsTargetExtension) {
- IToggleBreakpointsTargetExtension extension = (IToggleBreakpointsTargetExtension) adapter;
- if (extension.canToggleBreakpoints(fPart, selection)) {
- setEnabled(true);
- return;
- }
- }
- if (adapter.canToggleLineBreakpoints(fPart, selection) ||
- adapter.canToggleWatchpoints(fPart, selection) ||
- adapter.canToggleMethodBreakpoints(fPart, selection))
- {
- setEnabled(true);
- return;
- }
- } catch (BadLocationException e) {
- reportException(e);
- }
+ int line = fRulerInfo.getLineOfLastMouseButtonActivity();
+ if (line > -1) {
+ try {
+ ITextSelection selection = getTextSelection(document, line);
+
+ IToggleBreakpointsTarget adapter =
+ ToggleBreakpointsTargetManager.getDefault().getToggleBreakpointsTarget(fPart, selection);
+ if (adapter == null) {
+ setEnabled(false);
+ return;
+ }
+ if (adapter instanceof IToggleBreakpointsTargetExtension) {
+ IToggleBreakpointsTargetExtension extension = (IToggleBreakpointsTargetExtension) adapter;
+ if (extension.canToggleBreakpoints(fPart, selection)) {
+ setEnabled(true);
+ return;
+ }
+ }
+ if (adapter.canToggleLineBreakpoints(fPart, selection) ||
+ adapter.canToggleWatchpoints(fPart, selection) ||
+ adapter.canToggleMethodBreakpoints(fPart, selection))
+ {
+ setEnabled(true);
+ return;
+ }
+ } catch (BadLocationException e) {
+ reportException(e);
+ }
}
}
setEnabled(false);
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 e10d4e05f..89cb28b9e 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
@@ -101,7 +101,7 @@ public class FileLink implements IConsoleHyperlink {
}
IDocument document = provider.getDocument(input);
try {
- IRegion region= document.getLineInformation(fFileLineNumber - 1);
+ IRegion region= document.getLineInformation(fFileLineNumber - 1);
fFileOffset = region.getOffset();
fFileLength = region.getLength();
} catch (BadLocationException e) {
@@ -144,14 +144,14 @@ public class FileLink implements IConsoleHyperlink {
return fEditorId;
}
- private IContentType getFileContentType() {
- try {
- IContentDescription description= fFile.getContentDescription();
- if (description != null) {
- return description.getContentType();
- }
- } catch (CoreException e) {
- }
- return null;
- }
+ private IContentType getFileContentType() {
+ try {
+ IContentDescription description= fFile.getContentDescription();
+ if (description != null) {
+ return description.getContentType();
+ }
+ } catch (CoreException e) {
+ }
+ return null;
+ }
}
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 c76a9abe1..62bdd0696 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
@@ -123,25 +123,25 @@ public interface IConsole {
/**
* Adds the given pattern match listener to this console. The listener will
- * be connected and receive match notifications.
+ * be connected and receive match notifications.
* @param matchListener the listener to add
* @since 3.1
*/
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.
- * @param matchListener the pattern match listener to remove.
- * @since 3.1
- */
+ /**
+ * Removes the given pattern match listener from this console. The listener will be
+ * disconnected and will no longer receive match notifications.
+ * @param matchListener the pattern match listener to remove.
+ * @since 3.1
+ */
void removePatternMatchListener(IPatternMatchListener matchListener);
/**
* Returns the stream associated with the specified stream identifier.
- * @param streamIdentifier Uniquely identifies the required stream
- * @return The stream or <code>null</code> if none found with matching streamIdentifier
- * @since 3.1
- */
+ * @param streamIdentifier Uniquely identifies the required stream
+ * @return The stream or <code>null</code> if none found with matching streamIdentifier
+ * @since 3.1
+ */
IOConsoleOutputStream getStream(String streamIdentifier);
}
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 a2cbe6256..b2f11f58f 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
@@ -54,8 +54,8 @@ public class DebugContextEvent extends EventObject {
public static final int STATE = 0x10;
/**
- * Generated serial version UID for this class.
- */
+ * Generated serial version UID for this class.
+ */
private static final long serialVersionUID = 3395172504615255524L;
/**
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 7abbc387b..b22b31fed 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
@@ -51,25 +51,25 @@ public interface IDebugContextProvider {
*/
IWorkbenchPart getPart();
- /**
- * Registers the given listener for debug context events.
- *
- * @param listener event listener
- */
+ /**
+ * Registers the given listener for debug context events.
+ *
+ * @param listener event listener
+ */
void addDebugContextListener(IDebugContextListener listener);
- /**
- * Unregisters the given listener for debug context events.
- *
- * @param listener event listener
- */
+ /**
+ * Unregisters the given listener for debug context events.
+ *
+ * @param listener event listener
+ */
void removeDebugContextListener(IDebugContextListener listener);
- /**
- * Returns the currently active context, possibly empty or <code>null</code>.
- *
- * @return active context, possibly empty or <code>null</code>.
- */
+ /**
+ * Returns the currently active context, possibly empty or <code>null</code>.
+ *
+ * @return active context, possibly empty or <code>null</code>.
+ */
ISelection getActiveContext();
}
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 761d477ed..b131209fb 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
@@ -44,18 +44,18 @@ package org.eclipse.debug.ui.contexts;
*/
public interface ISuspendTrigger {
- /**
- * Registers the given listener for suspend notifications.
- *
- * @param listener suspend listener
- */
+ /**
+ * Registers the given listener for suspend notifications.
+ *
+ * @param listener suspend listener
+ */
void addSuspendTriggerListener(ISuspendTriggerListener listener);
- /**
- * Unregisters the given listener for suspend notifications.
- *
- * @param listener suspend listener
- */
+ /**
+ * Unregisters the given listener for suspend notifications.
+ *
+ * @param listener suspend listener
+ */
void removeSuspendTriggerListener(ISuspendTriggerListener listener);
}
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 f62d75687..b4f3ef348 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
@@ -50,8 +50,8 @@ abstract public class AbstractTextRendering extends AbstractTableRendering {
*
* @param renderingId memory rendering type identifier
* @param codePage the name of a supported
- * {@link java.nio.charset.Charset </code>charset<code>}, for
- * example <code>CP1252</code>
+ * {@link java.nio.charset.Charset </code>charset<code>}, for
+ * example <code>CP1252</code>
*/
public AbstractTextRendering(String renderingId, String codePage)
{
@@ -66,7 +66,7 @@ abstract public class AbstractTextRendering extends AbstractTableRendering {
*
* @param codePage the name of a supported
* {@link java.nio.charset.Charset </code>charset<code>}, for
- * example <code>CP1252</code>
+ * example <code>CP1252</code>
*/
public void setCodePage(String codePage)
{
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 72e641812..0681f3170 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
@@ -39,26 +39,26 @@ 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.
- *
+ * 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
* @return a collection of labels to head columns in a <code>AbstractTableRendering</code>
- * rendering, or <code>null</code> if default labels should be used
+ * rendering, or <code>null</code> if default labels should be used
*/
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.
- *
+ * 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
+ * memory block, or <code>null</code> if default rendering should be used
*/
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 67785cc9f..f1fcdaee7 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
@@ -75,111 +75,111 @@ import org.eclipse.swt.widgets.Control;
*/
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
- */
- 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
- * called.
- * <p>
- * Implementors are responsible for ensuring that
- * the created control can be accessed via <code>getControl</code>
- * </p>
- * @param parent the parent composite
- * @return the new top level control
- */
- Control createControl(Composite parent);
-
- /**
- * Returns the top level control for this rendering.
- * <p>
- * May return <code>null</code> if the control
- * has not been created yet.
- * </p>
- * @return the top level control or <code>null</code>
- */
- Control getControl();
-
- /**
- * Disposes this rendering.
- */
- 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.
- */
- void activated();
-
- /**
- * Notification this rendering is no longer the active rendering.
- */
- void deactivated();
-
- /**
- * Notification this rendering has become visible in its container.
- * Note that a rendering does not have to be active to be visible.
- */
- void becomesVisible();
-
- /**
- * Notification this rendering has become hidden in its container.
- */
- void becomesHidden();
-
- /**
- * Returns the memory block displayed by this rendering.
- *
- * @return the memory block displayed by this rendering
- */
- IMemoryBlock getMemoryBlock();
-
- /**
- * Returns the identifier associated with this rendering's type.
- *
- * @return the identifier associated with this rendering's type
- * @see IMemoryRenderingType
- */
- 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
- */
- void addPropertyChangeListener(IPropertyChangeListener listener);
-
- /**
- * Removes the given property change listener from this rendering.
- * Has no effect if the identical listener is not registered.
- *
- * @param listener a property change listener
- */
- 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
- */
- Image getImage();
-
- /**
- * Returns a label for this rendering.
- *
- * @return a label for this rendering
- */
- String getLabel();
+ /**
+ * 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
+ */
+ 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
+ * called.
+ * <p>
+ * Implementors are responsible for ensuring that
+ * the created control can be accessed via <code>getControl</code>
+ * </p>
+ * @param parent the parent composite
+ * @return the new top level control
+ */
+ Control createControl(Composite parent);
+
+ /**
+ * Returns the top level control for this rendering.
+ * <p>
+ * May return <code>null</code> if the control
+ * has not been created yet.
+ * </p>
+ * @return the top level control or <code>null</code>
+ */
+ Control getControl();
+
+ /**
+ * Disposes this rendering.
+ */
+ 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.
+ */
+ void activated();
+
+ /**
+ * Notification this rendering is no longer the active rendering.
+ */
+ void deactivated();
+
+ /**
+ * Notification this rendering has become visible in its container.
+ * Note that a rendering does not have to be active to be visible.
+ */
+ void becomesVisible();
+
+ /**
+ * Notification this rendering has become hidden in its container.
+ */
+ void becomesHidden();
+
+ /**
+ * Returns the memory block displayed by this rendering.
+ *
+ * @return the memory block displayed by this rendering
+ */
+ IMemoryBlock getMemoryBlock();
+
+ /**
+ * Returns the identifier associated with this rendering's type.
+ *
+ * @return the identifier associated with this rendering's type
+ * @see IMemoryRenderingType
+ */
+ 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
+ */
+ void addPropertyChangeListener(IPropertyChangeListener listener);
+
+ /**
+ * Removes the given property change listener from this rendering.
+ * Has no effect if the identical listener is not registered.
+ *
+ * @param listener a property change listener
+ */
+ 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
+ */
+ Image getImage();
+
+ /**
+ * Returns a label for this rendering.
+ *
+ * @return a label for this rendering
+ */
+ String getLabel();
}
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 9c7db76ed..352de6478 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
@@ -33,50 +33,50 @@ import org.eclipse.debug.core.model.IMemoryBlock;
public interface IMemoryRenderingBindingsProvider {
/**
- * Returns all rendering types bound to the given memory block.
- * This includes default and primary rendering types.
- *
- * @param block memory block
+ * 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
*/
IMemoryRenderingType[] getRenderingTypes(IMemoryBlock 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,
- * possibly empty
- */
- IMemoryRenderingType[] getDefaultRenderingTypes(IMemoryBlock 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,
+ * possibly empty
+ */
+ 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
- */
- IMemoryRenderingType getPrimaryRenderingType(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
+ */
+ IMemoryRenderingType getPrimaryRenderingType(IMemoryBlock block);
- /**
- * Adds a listener to this binding provider. The listener will be notified
- * when rendering bindings change.
- * <p>
- * Has no effect if an identical listener is already registered.
- * </p>
- * @param listener listener to add
- */
+ /**
+ * Adds a listener to this binding provider. The listener will be notified
+ * when rendering bindings change.
+ * <p>
+ * Has no effect if an identical listener is already registered.
+ * </p>
+ * @param listener listener to add
+ */
void addListener(IMemoryRenderingBindingsListener listener);
- /**
- * Removes a listener from this binding provider.
- * <p>
- * Has no effect if an identical listener is not already registered.
- * </p>
- * @param listener listener to remove
- */
+ /**
+ * Removes a listener from this binding provider.
+ * <p>
+ * Has no effect if an identical listener is not already registered.
+ * </p>
+ * @param listener listener to remove
+ */
void removeListener(IMemoryRenderingBindingsListener listener);
}
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 299b3e080..a61b11e57 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
@@ -25,26 +25,26 @@ package org.eclipse.debug.ui.memory;
public interface IMemoryRenderingManager extends IMemoryRenderingBindingsProvider {
- /**
- * Returns all contributed memory rendering types.
- *
- * @return all contributed memory rendering types
- */
- 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
- * 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
- */
- IMemoryRenderingType getRenderingType(String id);
+ /**
+ * Returns all contributed memory rendering types.
+ *
+ * @return all contributed memory rendering types
+ */
+ 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
+ * 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
+ */
+ 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 eb27bd922..ce88e7e22 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
@@ -30,37 +30,37 @@ import org.eclipse.ui.IWorkbenchPartSite;
*/
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
- */
- IWorkbenchPartSite getSite();
+ /**
+ * Returns the workbench part site hosting memory renderings for this rendering site.
+ *
+ * @return the view site hosting memory renderings for this rendering site
+ */
+ 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>
- */
- IMemoryRenderingSynchronizationService getSynchronizationService();
+ /**
+ * 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>
+ */
+ IMemoryRenderingSynchronizationService getSynchronizationService();
- /**
- * Returns all the memory rendering containers within this rendering site.
- *
- * @return all the memory rendering containers within this rendering site
- */
- IMemoryRenderingContainer[] getMemoryRenderingContainers();
+ /**
+ * Returns all the memory rendering containers within this rendering site.
+ *
+ * @return all the memory rendering containers within this rendering site
+ */
+ IMemoryRenderingContainer[] getMemoryRenderingContainers();
- /**
- * Returns the rendering container with the given id or <code>null</code>
- * if none.
- *
- * @param id identifier of the container being requested
- * @return the rendering container with the given id or <code>null</code>
- * if none
- */
- IMemoryRenderingContainer getContainer(String id);
+ /**
+ * Returns the rendering container with the given id or <code>null</code>
+ * if none.
+ *
+ * @param id identifier of the container being requested
+ * @return the rendering container with the given id or <code>null</code>
+ * if none
+ */
+ 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 2fefb2d28..e39527813 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
@@ -21,12 +21,12 @@ package org.eclipse.debug.ui.memory;
*/
public interface IMemoryRenderingSite2 extends IMemoryRenderingSite {
- /**
- * 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
- */
- void setContainerVisible(String id, boolean 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
+ */
+ void setContainerVisible(String id, boolean 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 dbcd2e94b..71a261b50 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
@@ -26,50 +26,50 @@ import org.eclipse.jface.util.IPropertyChangeListener;
*/
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
- * 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.
- */
- void addPropertyChangeListener(IPropertyChangeListener listener, String[] properties);
+ /**
+ * Adds a listener for property changes notification for the specified properties.
+ * 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.
+ */
+ void addPropertyChangeListener(IPropertyChangeListener listener, String[] properties);
- /**
- * Removes the given listener for property change notification.
- * Has no effect if the identical listener is not registered.
- *
- * @param listener a property change listener
- */
- void removePropertyChangeListener(IPropertyChangeListener listener);
+ /**
+ * Removes the given listener for property change notification.
+ * Has no effect if the identical listener is not registered.
+ *
+ * @param listener a property change listener
+ */
+ 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>
- */
- Object getProperty(IMemoryBlock block, String property);
+ /**
+ * 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>
+ */
+ 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>
- */
- void setSynchronizationProvider(IMemoryRendering rendering);
+ /**
+ * 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>
+ */
+ 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>
*/
- IMemoryRendering getSynchronizationProvider();
+ 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 6dbae4892..76400be14 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
@@ -30,28 +30,28 @@ import org.eclipse.core.runtime.CoreException;
*/
public interface IMemoryRenderingType {
- /**
- * Returns a label for this type of memory rendering.
- *
- * @return a label for this type of memory rendering
- */
- String getLabel();
+ /**
+ * Returns a label for this type of memory rendering.
+ *
+ * @return a label for this type of memory rendering
+ */
+ String getLabel();
- /**
- * Returns the unique identifier for this rendering type.
- *
- * @return the unique identifier for this rendering type
- */
- String getId();
+ /**
+ * Returns the unique identifier for this rendering type.
+ *
+ * @return the unique identifier for this rendering type
+ */
+ 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
- */
- IMemoryRendering createRendering() throws CoreException;
+ /**
+ * 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
+ */
+ IMemoryRendering createRendering() throws CoreException;
}
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 f38d6f720..210c73856 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
@@ -26,14 +26,14 @@ import org.eclipse.core.runtime.CoreException;
*/
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
- */
- IMemoryRendering createRendering(String id) throws CoreException;
+ /**
+ * 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
+ */
+ IMemoryRendering createRendering(String id) throws CoreException;
}
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 85a9531af..e718db992 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
@@ -111,9 +111,9 @@ public class CommonSourceNotFoundEditor extends EditorPart implements IReusableE
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);
+ 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));
if (getEditorInput() != null) {
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 046fa85dd..992004297 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
@@ -28,37 +28,37 @@ import org.eclipse.ui.IEditorInput;
*/
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
- */
- Object getArtifact();
+ /**
+ * Returns the artifact for which source lookup was performed,
+ * such as a stack frame.
+ *
+ * @return the artifact for which source lookup was performed
+ */
+ 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
- */
- Object getSourceElement();
+ /**
+ * 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
+ */
+ 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
- */
- String getEditorId();
+ /**
+ * 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
+ */
+ 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
- */
- IEditorInput getEditorInput();
+ /**
+ * 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
+ */
+ IEditorInput getEditorInput();
}
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 9cdac51ce..92440853b 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
@@ -61,7 +61,7 @@ public class SourceLookupDialog extends TitleAreaDialog {
*/
public SourceLookupDialog(Shell shell, ISourceLookupDirector director) {
super(shell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
+ setShellStyle(getShellStyle() | SWT.RESIZE);
fDirector = director;
}
@@ -126,13 +126,13 @@ public class SourceLookupDialog extends TitleAreaDialog {
return super.close();
}
- @Override
+ @Override
protected IDialogSettings getDialogBoundsSettings() {
- IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(getClass().getName());
- if (section == null) {
- section = settings.addNewSection(getClass().getName());
- }
- return section;
- }
+ IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
+ 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 6fdc0f877..bea3d6ca1 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
@@ -97,7 +97,7 @@ public class SourceLookupTab extends AbstractLaunchConfigurationTab {
@Override
public String getId() {
- return "org.eclipse.debug.ui.sourceLookupTab"; //$NON-NLS-1$
+ return "org.eclipse.debug.ui.sourceLookupTab"; //$NON-NLS-1$
}
@Override

Back to the top