Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/LaunchConfigurationDelegate.java22
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java33
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIAdapterFactory.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java56
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java11
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ExportBreakpoints.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportBreakpoints.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ExportLaunchConfigurationAction.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ProcessPropertyPage.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/RestoreDefaultAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupPanel.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryBlockAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingDialog.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewUtil.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/NewMemoryViewAction.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingViewer.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/CopyTableRenderingToClipboardAction.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressAction.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/PrintTableRenderingAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentInput.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLine.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java11
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointOrganizerDelegate.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPaneFactory.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchShortcut.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ISourcePresentation.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/BreakpointTypesContribution.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IAddMemoryRenderingsTarget.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IVariableValueEditor.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerBreakpointTypesActionDelegate.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/FileLink.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleColorProvider.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTableRendering.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryBlockTablePresentation.java1
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceContainerBrowser.java4
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java29
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java1
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java4
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/actions/TextViewerGotoLineAction.java7
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java14
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java16
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java34
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java6
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java4
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java4
51 files changed, 192 insertions, 182 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/LaunchConfigurationDelegate.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/LaunchConfigurationDelegate.java
index c5585dd4d..142c01828 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/LaunchConfigurationDelegate.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/LaunchConfigurationDelegate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2018 IBM Corporation and others.
+ * Copyright (c) 2004, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -35,7 +35,6 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IBreakpointManager;
import org.eclipse.debug.core.ILaunch;
@@ -117,21 +116,12 @@ public abstract class LaunchConfigurationDelegate implements ILaunchConfiguratio
@Override
public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
- if (monitor != null) {
- monitor.beginTask("", 1); //$NON-NLS-1$
- }
- try {
- IProject[] projects = getBuildOrder(configuration, mode);
- if (projects == null) {
- return true;
- }
- buildProjects(projects, new SubProgressMonitor(monitor, 1));
- return false;
- } finally {
- if (monitor != null) {
- monitor.done();
- }
+ IProject[] projects = getBuildOrder(configuration, mode);
+ if (projects == null) {
+ return true;
}
+ buildProjects(projects, SubMonitor.convert(monitor, 1));
+ return false;
}
/**
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java
index 0a10cb9cb..eece9bb85 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -48,7 +48,6 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.PlatformObject;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
@@ -730,7 +729,7 @@ public class LaunchConfiguration extends PlatformObject implements ILaunchConfig
* - Final launch validation (1)
* - Initialize source locator (1)
* - Launch delegate (10) */
- SubMonitor lmonitor = SubMonitor.convert(monitor, DebugCoreMessages.LaunchConfiguration_9, build ? 23 : 13);
+ SubMonitor lmonitor = SubMonitor.convert(monitor, DebugCoreMessages.LaunchConfiguration_9, 23);
try {
// bug 28245 - force the delegate to load in case it is interested in launch notifications
Set<String> modes = getModes();
@@ -821,42 +820,34 @@ public class LaunchConfiguration extends PlatformObject implements ILaunchConfig
lmonitor.subTask(DebugCoreMessages.LaunchConfiguration_8);
if (delegate2 != null) {
- if (!(delegate2.preLaunchCheck(this, mode, new SubProgressMonitor(lmonitor, 1)))) {
+ if (!(delegate2.preLaunchCheck(this, mode, lmonitor.split(1)))) {
getLaunchManager().removeLaunch(launch);
return launch;
}
}
- else {
- lmonitor.worked(1); /* No pre-launch-check */
- }
+ lmonitor.setWorkRemaining(22);
// perform pre-launch build
if (build) {
- IProgressMonitor buildMonitor = new SubProgressMonitor(lmonitor, 10, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
- buildMonitor.beginTask(DebugCoreMessages.LaunchConfiguration_7, 10);
- buildMonitor.subTask(DebugCoreMessages.LaunchConfiguration_6);
+ lmonitor.subTask(DebugCoreMessages.LaunchConfiguration_7 + DebugCoreMessages.LaunchConfiguration_6);
boolean tempbuild = build;
if (delegate2 != null) {
- tempbuild = delegate2.buildForLaunch(this, mode, new SubProgressMonitor(buildMonitor, 7));
+ tempbuild = delegate2.buildForLaunch(this, mode, lmonitor.split(7));
}
if (tempbuild) {
- buildMonitor.subTask(DebugCoreMessages.LaunchConfiguration_5);
- ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new SubProgressMonitor(buildMonitor, 3));
- }
- else {
- buildMonitor.worked(3); /* No incremental build required */
+ lmonitor.subTask(DebugCoreMessages.LaunchConfiguration_7 + DebugCoreMessages.LaunchConfiguration_5);
+ ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, lmonitor.split(3));
}
}
+ lmonitor.setWorkRemaining(12);
// final validation
lmonitor.subTask(DebugCoreMessages.LaunchConfiguration_4);
if (delegate2 != null) {
- if (!(delegate2.finalLaunchCheck(this, mode, new SubProgressMonitor(lmonitor, 1)))) {
+ if (!(delegate2.finalLaunchCheck(this, mode, lmonitor.split(1)))) {
getLaunchManager().removeLaunch(launch);
return launch;
}
}
- else {
- lmonitor.worked(1); /* No validation */
- }
+ lmonitor.setWorkRemaining(11);
try {
//initialize the source locator
@@ -866,7 +857,7 @@ public class LaunchConfiguration extends PlatformObject implements ILaunchConfig
/* Launch the delegate */
lmonitor.subTask(DebugCoreMessages.LaunchConfiguration_2);
- delegate.launch(this, mode, launch, new SubProgressMonitor(lmonitor, 10));
+ delegate.launch(this, mode, launch, lmonitor.split(10));
} catch (CoreException e) {
// if there was an exception, and the launch is empty, remove it
if (!launch.hasChildren()) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIAdapterFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIAdapterFactory.java
index ad3c95fa5..4518bfbfb 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIAdapterFactory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIAdapterFactory.java
@@ -15,12 +15,10 @@ package org.eclipse.debug.internal.ui;
import org.eclipse.core.runtime.IAdapterFactory;
-
import org.eclipse.debug.core.model.IBreakpoint;
import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainerWorkbenchAdapter;
import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointPersistableElementAdapter;
-
import org.eclipse.ui.IPersistableElement;
import org.eclipse.ui.model.IWorkbenchAdapter;
import org.eclipse.ui.model.IWorkbenchAdapter2;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
index cf4f3b231..d6910cfa9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -42,7 +42,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.IJobChangeListener;
import org.eclipse.core.runtime.jobs.IJobManager;
@@ -1014,18 +1014,7 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener,
public static ILaunch buildAndLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
boolean buildBeforeLaunch = getDefault().getPreferenceStore().getBoolean(IDebugUIConstants.PREF_BUILD_BEFORE_LAUNCH);
- monitor.beginTask(IInternalDebugCoreConstants.EMPTY_STRING, 1);
- try
- {
- return configuration.launch(
- mode,
- new SubProgressMonitor(monitor, 1),
- buildBeforeLaunch);
- }
- finally
- {
- monitor.done();
- }
+ return configuration.launch(mode, SubMonitor.convert(monitor, 1), buildBeforeLaunch);
}
/**
@@ -1067,26 +1056,25 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener,
}
if (wait) {
- IWorkbench workbench = DebugUIPlugin.getDefault().getWorkbench();
+ IWorkbench workbench = PlatformUI.getWorkbench();
IProgressService progressService = workbench.getProgressService();
final IRunnableWithProgress runnable = monitor -> {
/*
* Setup progress monitor - Waiting for jobs to finish (2) -
* Build & launch (98)
*/
- monitor.beginTask(MessageFormat.format(DebugUIMessages.DebugUIPlugin_25, new Object[] {
- configuration.getName() }), 100);
-
+ final SubMonitor subMonitor = SubMonitor.convert(monitor, MessageFormat
+ .format(DebugUIMessages.DebugUIPlugin_25, new Object[] { configuration.getName() }), 100);
try {
- jobManager.join(ResourcesPlugin.FAMILY_MANUAL_BUILD, new SubProgressMonitor(monitor, 1));
- jobManager.join(ResourcesPlugin.FAMILY_AUTO_BUILD, new SubProgressMonitor(monitor, 1));
+ jobManager.join(ResourcesPlugin.FAMILY_MANUAL_BUILD, subMonitor.split(1));
+ jobManager.join(ResourcesPlugin.FAMILY_AUTO_BUILD, subMonitor.split(1));
} catch (InterruptedException e1) {
- /* continue */}
+ /* continue */
+ }
if (!monitor.isCanceled()) {
try {
- buildAndLaunch(configuration, mode, new SubProgressMonitor(monitor, 98));
- }
- catch (CoreException e2) {
+ buildAndLaunch(configuration, mode, subMonitor.split(98));
+ } catch (CoreException e2) {
throw new InvocationTargetException(e2);
}
}
@@ -1103,10 +1091,10 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener,
/*
* Setup progress monitor - Build & launch (1)
*/
- monitor.beginTask(MessageFormat.format(DebugUIMessages.DebugUIPlugin_25, new Object[] {
- configuration.getName() }), 1);
+ final SubMonitor subMonitor = SubMonitor.convert(monitor, MessageFormat
+ .format(DebugUIMessages.DebugUIPlugin_25, new Object[] { configuration.getName() }), 1);
try {
- buildAndLaunch(configuration, mode, new SubProgressMonitor(monitor, 1));
+ buildAndLaunch(configuration, mode, subMonitor);
} catch (CoreException e) {
throw new InvocationTargetException(e);
}
@@ -1190,7 +1178,7 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener,
/* Setup progress monitor
* - Waiting for jobs to finish (2)
* - Build & launch (98) */
- monitor.beginTask(DebugUIMessages.DebugUITools_3, 100);
+ final SubMonitor subMonitor = SubMonitor.convert(monitor, DebugUIMessages.DebugUITools_3, 100);
try {
if(waitInJob) {
StringBuilder buffer = new StringBuilder(configuration.getName());
@@ -1221,17 +1209,15 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener,
};
addJobChangeListener(listener);
try {
- jobManager.join(ResourcesPlugin.FAMILY_MANUAL_BUILD, new SubProgressMonitor(monitor, 1));
- jobManager.join(ResourcesPlugin.FAMILY_AUTO_BUILD, new SubProgressMonitor(monitor, 1));
+ jobManager.join(ResourcesPlugin.FAMILY_MANUAL_BUILD, subMonitor.split(1));
+ jobManager.join(ResourcesPlugin.FAMILY_AUTO_BUILD, subMonitor.split(1));
}
catch (InterruptedException e) {/*just continue.*/}
DebugPlugin.getDefault().getLaunchManager().removeLaunch(pendingLaunch);
}
- else {
- monitor.worked(2); /* don't wait for jobs to finish */
- }
+ subMonitor.setWorkRemaining(98);
if (!monitor.isCanceled()) {
- buildAndLaunch(configuration, mode, new SubProgressMonitor(monitor, 98));
+ buildAndLaunch(configuration, mode, subMonitor.split(98));
}
} catch (CoreException e) {
final IStatus status = e.getStatus();
@@ -1254,7 +1240,7 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener,
}
};
- IWorkbench workbench = DebugUIPlugin.getDefault().getWorkbench();
+ IWorkbench workbench = PlatformUI.getWorkbench();
IProgressService progressService = workbench.getProgressService();
job.setPriority(Job.INTERACTIVE);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java
index aebb39bfd..ab90d0230 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -11,6 +11,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Lars Vogel <Lars.Vogel@gmail.com> - Bug 426110
+ * Alexander Fedorov <alexander.fedorov@arsysop.ru> - Bug 548799
*******************************************************************************/
package org.eclipse.debug.internal.ui.actions.breakpoints;
@@ -20,6 +21,7 @@ import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
import org.eclipse.debug.internal.ui.actions.ActionMessages;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IEditorInput;
@@ -30,7 +32,6 @@ import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.SelectionProviderAction;
import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
public class OpenBreakpointMarkerAction extends SelectionProviderAction {
@@ -41,8 +42,10 @@ public class OpenBreakpointMarkerAction extends SelectionProviderAction {
public OpenBreakpointMarkerAction(ISelectionProvider selectionProvider) {
super(selectionProvider, ActionMessages.OpenBreakpointMarkerAction__Go_to_File_1);
setToolTipText(ActionMessages.OpenBreakpointMarkerAction_Go_to_File_for_Breakpoint_2);
- setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.ui.ide", "icons/full/elcl16/gotoobj_tsk.png")); //$NON-NLS-1$ //$NON-NLS-2$
- setDisabledImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.ui.ide", "icons/full/dlcl16/gotoobj_tsk.png")); //$NON-NLS-1$ //$NON-NLS-2$
+ ResourceLocator.imageDescriptorFromBundle("org.eclipse.ui.ide", "icons/full/elcl16/gotoobj_tsk.png") //$NON-NLS-1$ //$NON-NLS-2$
+ .ifPresent(d -> setImageDescriptor(d));
+ ResourceLocator.imageDescriptorFromBundle("org.eclipse.ui.ide", "icons/full/dlcl16/gotoobj_tsk.png") //$NON-NLS-1$ //$NON-NLS-2$
+ .ifPresent(d -> setDisabledImageDescriptor(d));
PlatformUI.getWorkbench().getHelpSystem().setHelp(
this,
IDebugHelpContextIds.OPEN_BREAKPOINT_ACTION);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java
index 1c4955f02..a667e8d8e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java
@@ -36,6 +36,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.HandlerUtil;
/**
@@ -60,7 +61,7 @@ public class WatchHandler extends AbstractHandler {
private void showExpressionsView() {
- IWorkbenchPage page = DebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IViewPart part = page.findView(IDebugUIConstants.ID_EXPRESSION_VIEW);
if (part == null) {
try {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ExportBreakpoints.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ExportBreakpoints.java
index 5079683e4..dc292f535 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ExportBreakpoints.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ExportBreakpoints.java
@@ -22,6 +22,7 @@ import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.PlatformUI;
/**
* <p>
@@ -31,7 +32,7 @@ import org.eclipse.swt.widgets.Event;
* <p>
* The action simply calls the wizard to export breakpoints.
* </p>
- *
+ *
* @see WizardExportBreakpoints
* @see WizardExportBreakpointsPage
*
@@ -47,7 +48,7 @@ public class ExportBreakpoints extends AbstractDebugActionDelegate {
@Override
public void run(IAction action) {
WizardExportBreakpoints wiz = new WizardExportBreakpoints();
- wiz.init(DebugUIPlugin.getDefault().getWorkbench(), getSelection());
+ wiz.init(PlatformUI.getWorkbench(), getSelection());
WizardDialog wizdialog = new WizardDialog(DebugUIPlugin.getShell(), wiz);
wizdialog.setBlockOnOpen(true);
wizdialog.open();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportBreakpoints.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportBreakpoints.java
index 5719e3b66..a5757b92d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportBreakpoints.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportBreakpoints.java
@@ -21,6 +21,7 @@ import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.PlatformUI;
/**
* This class provides the aciton event for both the context menu in breakpoints view
@@ -44,7 +45,7 @@ public class ImportBreakpoints extends AbstractDebugActionDelegate {
@Override
public void run(IAction action) {
WizardImportBreakpoints wiz = new WizardImportBreakpoints();
- wiz.init(DebugUIPlugin.getDefault().getWorkbench(), null);
+ wiz.init(PlatformUI.getWorkbench(), null);
WizardDialog wizdialog = new WizardDialog(DebugUIPlugin.getShell(), wiz);
wizdialog.setBlockOnOpen(true);
wizdialog.open();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ExportLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ExportLaunchConfigurationAction.java
index 863e656a8..41da22397 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ExportLaunchConfigurationAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ExportLaunchConfigurationAction.java
@@ -22,6 +22,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.PlatformUI;
public class ExportLaunchConfigurationAction extends AbstractLaunchConfigurationAction {
/**
@@ -45,7 +46,7 @@ public class ExportLaunchConfigurationAction extends AbstractLaunchConfiguration
} else {
wizard = new ExportLaunchConfigurationsWizard(selection);
}
- wizard.init(DebugUIPlugin.getDefault().getWorkbench(), null);
+ wizard.init(PlatformUI.getWorkbench(), null);
WizardDialog dialog = new WizardDialog(DebugUIPlugin.getShell(), wizard);
dialog.open();
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
index aec237318..e40a5d078 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
@@ -735,7 +735,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
/*
* @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings()
- *
+ *
* @since 3.2
*/
@Override
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ProcessPropertyPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ProcessPropertyPage.java
index 45e137203..2100fdd96 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ProcessPropertyPage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ProcessPropertyPage.java
@@ -189,7 +189,7 @@ public class ProcessPropertyPage extends PropertyPage {
return tmp;
}
tmp = proc.getLabel();
- int idx = tmp.lastIndexOf('(');
+ int idx = tmp.lastIndexOf('(');
if(idx < 0) {
idx = tmp.length();
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/RestoreDefaultAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/RestoreDefaultAction.java
index 37f02e874..db2757d81 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/RestoreDefaultAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/RestoreDefaultAction.java
@@ -16,7 +16,9 @@ package org.eclipse.debug.internal.ui.sourcelookup;
import org.eclipse.debug.core.sourcelookup.ISourceContainer;
import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
import org.eclipse.debug.core.sourcelookup.containers.DefaultSourceContainer;
+import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.actions.SelectionListenerAction;
/**
* The action for adding the default container to the list.
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupPanel.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupPanel.java
index 9604c2931..4da977d92 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupPanel.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupPanel.java
@@ -39,6 +39,7 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;
+import org.eclipse.ui.PlatformUI;
/**
* The panel that contains the list of source containers.
@@ -123,7 +124,7 @@ public class SourceLookupPanel extends AbstractLaunchConfigurationTab implements
//listen to changes user made to the working sets, if a working set is being removed
//check current list to validate working sets
- IWorkingSetManager workingSetMgr = DebugUIPlugin.getDefault().getWorkbench().getWorkingSetManager();
+ IWorkingSetManager workingSetMgr = PlatformUI.getWorkbench().getWorkingSetManager();
workingSetMgr.addPropertyChangeListener(this);
/*Dialog.applyDialogFont(comp);*/
setControl(comp);
@@ -380,7 +381,7 @@ public class SourceLookupPanel extends AbstractLaunchConfigurationTab implements
super.dispose();
//listen to changes user made to the working sets, if a working set is being removed
//check current list to validate working sets
- IWorkingSetManager workingSetMgr = DebugUIPlugin.getDefault().getWorkbench().getWorkingSetManager();
+ IWorkingSetManager workingSetMgr = PlatformUI.getWorkbench().getWorkingSetManager();
workingSetMgr.removePropertyChangeListener(this);
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java
index 77668b3e8..2c772e184 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java
@@ -615,7 +615,7 @@ public abstract class AsynchronousModel {
@Override
public String toString() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
if (fRoot != null) {
buf.append("ROOT: "); //$NON-NLS-1$
append(buf, fRoot, 0);
@@ -625,7 +625,7 @@ public abstract class AsynchronousModel {
return buf.toString();
}
- private void append(StringBuffer buf, ModelNode node, int level) {
+ private void append(StringBuilder buf, ModelNode node, int level) {
for (int i = 0; i < level; i++) {
buf.append('\t');
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
index cdc5dfd0b..b557dc18f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
@@ -140,7 +140,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
* @param buffer String buffer for copy text.
* @param indent Current indentation in tree text.
*/
- protected void append(VirtualItem item, StringBuffer buffer, int indent) {
+ protected void append(VirtualItem item, StringBuilder buffer, int indent) {
for (int i= 0; i < indent; i++) {
buffer.append(TAB);
}
@@ -302,12 +302,12 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
}
private void copySelectionToClipboard(VirtualTreeModelViewer virtualViewer, Set<VirtualItem> itemsToCopy, int selectionRootDepth) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
writeItemToBuffer (virtualViewer.getTree(), itemsToCopy, buffer, -selectionRootDepth);
writeBufferToClipboard(buffer);
}
- protected void writeItemToBuffer(VirtualItem item, Set<VirtualItem> itemsToCopy, StringBuffer buffer, int indent) {
+ protected void writeItemToBuffer(VirtualItem item, Set<VirtualItem> itemsToCopy, StringBuilder buffer, int indent) {
if (itemsToCopy.contains(item)) {
append(item, buffer, indent);
}
@@ -319,7 +319,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
}
}
- protected void writeBufferToClipboard(StringBuffer buffer) {
+ protected void writeBufferToClipboard(StringBuilder buffer) {
if (buffer.length() == 0) {
return;
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java
index cb147026e..be08f7380 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java
@@ -292,14 +292,14 @@ public class ModelDelta implements IModelDelta {
@Override
public String toString() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append("Model Delta Start\n"); //$NON-NLS-1$
appendDetail(" ", buf, this); //$NON-NLS-1$
buf.append("Model Delta End\n"); //$NON-NLS-1$
return buf.toString();
}
- private void appendDetail(String indent, StringBuffer buf, IModelDelta delta) {
+ private void appendDetail(String indent, StringBuilder buf, IModelDelta delta) {
buf.append(indent);
buf.append("Element: "); //$NON-NLS-1$
buf.append(delta.getElement());
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java
index 0115e8b0a..5f3183eee 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java
@@ -530,12 +530,12 @@ public class VirtualItem {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
toStringItem(buffer, IInternalDebugCoreConstants.EMPTY_STRING);
return buffer.toString();
}
- void toStringItem(StringBuffer buffer, String indent) {
+ void toStringItem(StringBuilder buffer, String indent) {
buffer.append(indent);
buffer.append(toStringElement());
buffer.append("\n"); //$NON-NLS-1$
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryBlockAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryBlockAction.java
index 8b34b0fab..61f3c5c54 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryBlockAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryBlockAction.java
@@ -131,7 +131,7 @@ public class AddMemoryBlockAction extends Action implements IDebugContextListene
return;
}
- Shell shell = DebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
+ Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
// create dialog to ask for expression/address to block
MonitorMemoryBlockDialog dialog = new MonitorMemoryBlockDialog(shell, retrieval, prefillExp, prefillLength);
dialog.open();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingDialog.java
index 05b06559c..add3e0eb9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingDialog.java
@@ -391,7 +391,7 @@ public class AddMemoryRenderingDialog extends SelectionDialog {
selection = selectionProvider.getSelection();
} else {
// otherwise, take selection from selection service
- selection = DebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection(IDebugUIConstants.ID_MEMORY_VIEW);
+ selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection(IDebugUIConstants.ID_MEMORY_VIEW);
}
IMemoryBlock element = getMemoryBlock(selection);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewUtil.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewUtil.java
index 2214c74a4..109b3ea0d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewUtil.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewUtil.java
@@ -28,12 +28,12 @@ import org.eclipse.debug.core.model.IDebugTarget;
import org.eclipse.debug.core.model.IMemoryBlockExtension;
import org.eclipse.debug.core.model.IMemoryBlockRetrieval;
import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.progress.UIJob;
/**
@@ -124,7 +124,7 @@ public class MemoryViewUtil {
if (e != null)
detail = e.getMessage();
- Shell shell = DebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
+ Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
MessageDialog.openError(shell, title, message + "\n" + detail); //$NON-NLS-1$
return Status.OK_STATUS;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/NewMemoryViewAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/NewMemoryViewAction.java
index 04c8de8a7..dd09175bc 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/NewMemoryViewAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/NewMemoryViewAction.java
@@ -26,6 +26,7 @@ import org.eclipse.ui.IViewActionDelegate;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
/**
* Action for opening a new memory view.
@@ -45,7 +46,7 @@ public class NewMemoryViewAction implements IViewActionDelegate {
String secondaryId = MemoryViewIdRegistry.getUniqueSecondaryId(IDebugUIConstants.ID_MEMORY_VIEW);
try {
- IWorkbenchPage page = DebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IViewPart newView = page.showView(IDebugUIConstants.ID_MEMORY_VIEW, secondaryId, IWorkbenchPage.VIEW_ACTIVATE);
// set initial selection for new view
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingViewer.java
index 44c8a5b53..0e3ad4d09 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingViewer.java
@@ -58,6 +58,7 @@ import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.progress.UIJob;
public class AsyncTableRenderingViewer extends AsyncVirtualContentTableViewer {
@@ -576,7 +577,7 @@ public class AsyncTableRenderingViewer extends AsyncVirtualContentTableViewer {
public void showTableCursor(final boolean show)
{
- Display display = DebugUIPlugin.getDefault().getWorkbench().getDisplay();
+ Display display = PlatformUI.getWorkbench().getDisplay();
if (Thread.currentThread() == display.getThread())
{
if (!fTableCursor.isDisposed())
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/CopyTableRenderingToClipboardAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/CopyTableRenderingToClipboardAction.java
index 2a284980c..3decf470e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/CopyTableRenderingToClipboardAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/CopyTableRenderingToClipboardAction.java
@@ -86,7 +86,7 @@ public class CopyTableRenderingToClipboardAction extends Action
//get the column headers and line them up properly
for (int k=0; k < numColumns; k++) {
- StringBuffer columnLabel = new StringBuffer(columns[k].getText());
+ StringBuilder columnLabel = new StringBuilder(columns[k].getText());
int numBytes = 0;
int numChars = 0;
@@ -136,14 +136,14 @@ public class CopyTableRenderingToClipboardAction extends Action
}
tableContents.append(System.getProperty("line.separator")); //$NON-NLS-1$
- StringBuffer temp;
+ StringBuilder temp;
//get the column contents from all the rows
for (int i=0; i < itemList.length; i++) {
for (int j=0; j < numColumns; j++) {
tableContents.append(COLUMN_SEPERATOR);
- temp = new StringBuffer(labelProvider.getColumnText(itemList[i].getData(), j));
+ temp = new StringBuilder(labelProvider.getColumnText(itemList[i].getData(), j));
if (j>0)
{
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressAction.java
index c3e126253..62ab45488 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressAction.java
@@ -25,7 +25,6 @@ import org.eclipse.debug.core.model.IMemoryBlockExtension;
import org.eclipse.debug.core.model.IMemoryBlockRetrieval;
import org.eclipse.debug.core.model.IMemoryBlockRetrievalExtension;
import org.eclipse.debug.internal.ui.DebugUIMessages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.views.memory.MemoryViewUtil;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugUIConstants;
@@ -65,7 +64,7 @@ public class GoToAddressAction extends Action
{
try
{
- Shell shell= DebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
+ Shell shell= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
// create dialog to ask for expression/address to block
GoToAddressDialog dialog = new GoToAddressDialog(shell);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/PrintTableRenderingAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/PrintTableRenderingAction.java
index 11de48e28..6068deb0c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/PrintTableRenderingAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/PrintTableRenderingAction.java
@@ -148,7 +148,7 @@ public class PrintTableRenderingAction extends Action
//get the column headers
for (int k=0; k < numColumns; k++) {
- StringBuffer columnLabel = new StringBuffer(columns[k].getText());
+ StringBuilder columnLabel = new StringBuilder(columns[k].getText());
int numBytes = 0;
if (k > 0)
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentInput.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentInput.java
index ca39fb856..74f21d6d6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentInput.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentInput.java
@@ -16,12 +16,10 @@ package org.eclipse.debug.internal.ui.views.memory.renderings;
import java.math.BigInteger;
import org.eclipse.core.runtime.PlatformObject;
-
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.IMemoryBlock;
import org.eclipse.debug.core.model.IMemoryBlockExtension;
import org.eclipse.debug.internal.ui.memory.provisional.AbstractAsyncTableRendering;
-
import org.eclipse.debug.ui.memory.AbstractTableRendering;
import org.eclipse.debug.ui.memory.IMemoryRendering;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLine.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLine.java
index a2259515a..677bf2714 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLine.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLine.java
@@ -84,7 +84,7 @@ public class TableRenderingLine extends PlatformObject {
{
if (fStrRep == null)
{
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
fStrRep = RenderingsUtil.convertByteArrayToHexString(getByteArray());
fStrRep = fStrRep.toUpperCase();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
index aa9e32b1e..b83d7bbe5 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
@@ -237,7 +237,6 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
public EnvironmentTab() {
super();
setHelpContextId(IDebugHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_ENVIRONMENT_TAB);
-
try {
this.copyKeyStroke = KeyStroke.getInstance("M1+C"); //$NON-NLS-1$
} catch (ParseException e) {
@@ -329,7 +328,6 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
// Create add environment variable menu item
MenuItem miAdd = new MenuItem(menuTable, SWT.NONE);
miAdd.setText(LaunchConfigurationsMessages.EnvironmentTab_Add_4);
-
miAdd.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
@@ -395,7 +393,6 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
}
});
-
// Setup and create Columns
ColumnViewerEditorActivationStrategy actSupport = new ColumnViewerEditorActivationStrategy(environmentTable) {
@Override
@@ -404,10 +401,12 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
|| event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION
|| event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC;
}
+
};
- int feature = ColumnViewerEditor.TABBING_HORIZONTAL | ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR
- | ColumnViewerEditor.TABBING_VERTICAL | ColumnViewerEditor.KEYBOARD_ACTIVATION;
+ int feature = ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR | ColumnViewerEditor.TABBING_HORIZONTAL
+ | ColumnViewerEditor.KEYBOARD_ACTIVATION
+ | ColumnViewerEditor.TABBING_CYCLE_IN_VIEWER;
TableViewerEditor.create(environmentTable, actSupport, feature);
@@ -464,7 +463,6 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
tableComposite.setLayout(tableColumnLayout);
environmentTable.getTable().addKeyListener(new KeyAdapter() {
-
@Override
public void keyReleased(KeyEvent e) {
KeyStroke current = computeKeyStroke(e);
@@ -619,7 +617,6 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
MessageFormat.format(LaunchConfigurationsMessages.EnvironmentTab_13, new Object[] { name })); //
if (!overWrite) {
return false;
-
}
environmentTable.remove(existingVariable);
break;
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 34673c50b..d9ae2d270 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
@@ -30,7 +30,7 @@ import org.eclipse.jface.util.IPropertyChangeListener;
* <p>
* Following is example plug-in XML for contributing a breakpoint organizer.
* </p>
- *
+ *
* <pre>
* &lt;extension point="org.eclipse.debug.ui.breakpointOrganizers"&gt;
* &lt;breakpointOrganizer
@@ -40,7 +40,7 @@ import org.eclipse.jface.util.IPropertyChangeListener;
* icon="icons/full/obj16/example_org.png"/&gt;
* &lt;/extension&gt;
* </pre>
- *
+ *
* The attributes are specified as follows:
* <ul>
* <li><code>class</code> Fully qualified name of a Java class that implements
@@ -55,7 +55,7 @@ import org.eclipse.jface.util.IPropertyChangeListener;
* Clients contributing a breakpoint organizer are intended to implement this
* interface.
* </p>
- *
+ *
* @since 3.1
*/
public interface IBreakpointOrganizerDelegate {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPaneFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPaneFactory.java
index 0d2ebf204..b2a68b98b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPaneFactory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPaneFactory.java
@@ -24,7 +24,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
* <code>org.eclipse.debug.ui.detailPaneFactories</code> extension point.
* Following is an example of a detail pane factory extension:
* </p>
- *
+ *
* <pre>
* &lt;extension point="org.eclipse.debug.ui.detailPaneFactories"&gt;
* &lt;detailFactories
@@ -33,10 +33,10 @@ import org.eclipse.jface.viewers.IStructuredSelection;
* &lt;/detailFactories&gt;
* &lt;/extension&gt;
* </pre>
- *
+ *
* Clients contributing a detail pane factory are intended to implement this
* interface.
- *
+ *
* @see IDetailPane
* @since 3.3
*
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchShortcut.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchShortcut.java
index 9c421cbfc..d539985c0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchShortcut.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchShortcut.java
@@ -33,7 +33,7 @@ import org.eclipse.ui.IEditorPart;
* A launch shortcut extension is defined in <code>plugin.xml</code>. Following
* is an example definition of a launch shortcut extension.
* </p>
- *
+ *
* <pre>
* &lt;extension point="org.eclipse.debug.ui.launchShortcuts"&gt;
* &lt;shortcut
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ISourcePresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ISourcePresentation.java
index 77659434a..2f440f239 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ISourcePresentation.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ISourcePresentation.java
@@ -43,7 +43,7 @@ import org.eclipse.ui.IEditorInput;
* {@link org.eclipse.debug.ui.IDebugModelPresentation} or as an optional
* extension to an {@link org.eclipse.debug.core.model.ISourceLocator}.
* </p>
- *
+ *
* @since 2.0
*/
public interface ISourcePresentation {
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 e652248c1..60f9384ae 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
@@ -47,7 +47,7 @@ import org.eclipse.ui.services.IServiceLocator;
* Following is example plug-in XML used to contribute this action to an
* editor's vertical ruler context menu.
* </p>
- *
+ *
* <pre>
* &lt;extension point="org.eclipse.ui.menus"&gt;
* &lt;menuContribution
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IAddMemoryRenderingsTarget.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IAddMemoryRenderingsTarget.java
index e33c28e1c..37bee0107 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IAddMemoryRenderingsTarget.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IAddMemoryRenderingsTarget.java
@@ -43,7 +43,7 @@ import org.eclipse.ui.IWorkbenchPart;
* <p>
* Clients may implement this interface.
* </p>
- *
+ *
* @since 3.2
* @see AddMemoryRenderingActionDelegate
*/
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 3b5b744f6..acca1d12d 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
@@ -23,7 +23,7 @@ import org.eclipse.swt.widgets.Shell;
* <p>
* Following is example plug-in XML for contributing a variable value editor.
* </p>
- *
+ *
* <pre>
* &lt;extension point="org.eclipse.debug.ui.variableValueEditors"&gt;
* &lt;variableEditor
@@ -31,7 +31,7 @@ import org.eclipse.swt.widgets.Shell;
* class="com.examples.variables.MyVariableValueEditor"/&gt;
* &lt;/extension&gt;
* </pre>
- *
+ *
* The attributes are specified as follows:
* <ul>
* <li><code>modelId</code> the debug model identifier for which the given
@@ -42,7 +42,7 @@ import org.eclipse.swt.widgets.Shell;
* <p>
* Clients may implement this interface.
* </p>
- *
+ *
* @since 3.1
*/
public interface IVariableValueEditor {
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 65bf5a1df..fcf6627e9 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
@@ -54,7 +54,7 @@ import org.eclipse.ui.texteditor.ITextEditorExtension;
* extension point, by referencing the ruler's context menu identifier in the
* <code>targetID</code> attribute.
* </p>
- *
+ *
* <pre>
* &lt;extension point="org.eclipse.ui.popupMenus"&gt;
* &lt;viewerContribution
@@ -72,7 +72,7 @@ import org.eclipse.ui.texteditor.ITextEditorExtension;
* Clients may refer to this class as an action delegate in plug-in XML. This
* class is not intended to be subclassed.
* </p>
- *
+ *
* @see IToggleBreakpointsTargetManager
* @see IToggleBreakpointsTargetFactory
* @noextend This class is not intended to be subclassed by clients.
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 89cb28b9e..04cf4febd 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
@@ -30,6 +30,7 @@ import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.ITextEditor;
@@ -132,7 +133,7 @@ public class FileLink implements IConsoleHyperlink {
private String getEditorId() {
if (fEditorId == null) {
- IWorkbench workbench= DebugUIPlugin.getDefault().getWorkbench();
+ IWorkbench workbench= PlatformUI.getWorkbench();
// If there is a registered editor for the file use it.
IEditorDescriptor desc = workbench.getEditorRegistry().getDefaultEditor(fFile.getName(), getFileContentType());
if (desc == null) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleColorProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleColorProvider.java
index c0531a590..fca86242d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleColorProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleColorProvider.java
@@ -29,7 +29,7 @@ import org.eclipse.swt.graphics.Color;
* A console color provider extension is defined in <code>plugin.xml</code>.
* Following is an example definition of a console color provider extension.
* </p>
- *
+ *
* <pre>
* &lt;extension point="org.eclipse.debug.ui.consoleColorProviders"&gt;
* &lt;consoleColorProvider
@@ -39,7 +39,7 @@ import org.eclipse.swt.graphics.Color;
* &lt;/consoleColorProvider&gt;
* &lt;/extension&gt;
* </pre>
- *
+ *
* The attributes are specified as follows:
* <ul>
* <li><code>id</code> specifies a unique identifier for this color
@@ -53,7 +53,7 @@ import org.eclipse.swt.graphics.Color;
* <p>
* Clients may implement this interface.
* </p>
- *
+ *
* @since 2.1
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTableRendering.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTableRendering.java
index 21e0887d0..122dab8e1 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTableRendering.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTableRendering.java
@@ -3432,7 +3432,7 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering
}
// update UI asynchronously
- Display display = DebugUIPlugin.getDefault().getWorkbench().getDisplay();
+ Display display = PlatformUI.getWorkbench().getDisplay();
display.asyncExec(() -> {
updateLabels();
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 0681f3170..fdfd6a7c5 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
@@ -16,6 +16,7 @@
package org.eclipse.debug.ui.memory;
import java.math.BigInteger;
+
import org.eclipse.debug.core.model.IMemoryBlock;
import org.eclipse.debug.ui.IDebugModelPresentation;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceContainerBrowser.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceContainerBrowser.java
index e6d7be9cb..d45c0930f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceContainerBrowser.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceContainerBrowser.java
@@ -27,7 +27,7 @@ import org.eclipse.swt.widgets.Shell;
* contributes a source container browser via the <code>browserClass</code>
* attribute.
* </p>
- *
+ *
* <pre>
* &lt;extension point=&quot;org.eclipse.debug.ui.sourceContainerPresentations&quot;&gt;
* &lt;sourceContainerPresentation
@@ -38,7 +38,7 @@ import org.eclipse.swt.widgets.Shell;
* &lt;/sourceContainerPresentation&gt;
* &lt;/extension&gt;
* </pre>
- *
+ *
* @since 3.0
*/
public interface ISourceContainerBrowser {
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java
index b43b47544..f55935e5b 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java
@@ -56,6 +56,8 @@ public class ConsolePlugin extends AbstractUIPlugin {
/**
* Returns the singleton instance of the console plug-in.
+ *
+ * @return the singleton instance of this console plug-in
*/
public static ConsolePlugin getDefault() {
return fgPlugin;
@@ -68,6 +70,8 @@ public class ConsolePlugin extends AbstractUIPlugin {
/**
* Convenience method which returns the unique identifier of this plug-in.
+ *
+ * @return this plug-in's unique identifier
*/
public static String getUniqueIdentifier() {
return PI_UI_CONSOLE;
@@ -120,6 +124,8 @@ public class ConsolePlugin extends AbstractUIPlugin {
/**
* Returns the workbench display.
+ *
+ * @return the workbench display
*/
public static Display getStandardDisplay() {
return PlatformUI.getWorkbench().getDisplay();
@@ -127,6 +133,11 @@ public class ConsolePlugin extends AbstractUIPlugin {
/**
* Utility method with conventions
+ *
+ * @param shell the parent shell for the dialog
+ * @param title dialog title
+ * @param message dialog message
+ * @param t error to show in dialog
*/
public static void errorDialog(Shell shell, String title, String message, Throwable t) {
IStatus status;
@@ -146,11 +157,12 @@ public class ConsolePlugin extends AbstractUIPlugin {
}
/**
- * Returns the <code>Image</code> identified by the given key,
- * or <code>null</code> if it does not exist.
+ * Returns the <code>Image</code> identified by the given key, or
+ * <code>null</code> if it does not exist.
*
- * @return the <code>Image</code> identified by the given key,
- * or <code>null</code> if it does not exist
+ * @param key the image's key
+ * @return the <code>Image</code> identified by the given key, or
+ * <code>null</code> if it does not exist
* @since 3.1
*/
public static Image getImage(String key) {
@@ -158,11 +170,12 @@ public class ConsolePlugin extends AbstractUIPlugin {
}
/**
- * Returns the <code>ImageDescriptor</code> identified by the given key,
- * or <code>null</code> if it does not exist.
+ * Returns the <code>ImageDescriptor</code> identified by the given key, or
+ * <code>null</code> if it does not exist.
*
- * @return the <code>ImageDescriptor</code> identified by the given key,
- * or <code>null</code> if it does not exist
+ * @param key the image's key
+ * @return the <code>ImageDescriptor</code> identified by the given key, or
+ * <code>null</code> if it does not exist
* @since 3.1
*/
public static ImageDescriptor getImageDescriptor(String key) {
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java
index dd1a505fb..2faaa3692 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java
@@ -79,6 +79,7 @@ public class IOConsoleOutputStream extends OutputStream {
* Constructs a new output stream on the given console.
*
* @param console I/O console
+ * @param charset the encoding used to write to console
*/
IOConsoleOutputStream(IOConsole console, Charset charset) {
this.decoder = new StreamDecoder(charset);
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java
index da454eb61..be35b2304 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java
@@ -43,7 +43,8 @@ public class MessageConsoleStream extends IOConsoleOutputStream {
private MessageConsole fMessageConsole;
/**
- * Constructs a new stream connected to the given console.
+ * Constructs a new stream connected to the given console with workbench default
+ * encoding.
*
* @param console the console to write messages to
*/
@@ -55,6 +56,7 @@ public class MessageConsoleStream extends IOConsoleOutputStream {
* Constructs a new stream connected to the given console.
*
* @param console the console to write messages to
+ * @param charset encoding used to write to console
* @since 3.7
*/
public MessageConsoleStream(MessageConsole console, Charset charset) {
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/TextViewerGotoLineAction.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/TextViewerGotoLineAction.java
index 6b5fb10fa..00c747e17 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/TextViewerGotoLineAction.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/TextViewerGotoLineAction.java
@@ -64,7 +64,10 @@ public class TextViewerGotoLineAction extends TextViewerAction {
protected ITextViewer fTextViewer;
/**
- * Constructs a goto line action for the viewer using the provided resource bundle
+ * Constructs a goto line action for the viewer using the provided resource
+ * bundle.
+ *
+ * @param viewer the viewer to jump in
*/
public TextViewerGotoLineAction(ITextViewer viewer) {
super(viewer, -1);
@@ -83,6 +86,8 @@ public class TextViewerGotoLineAction extends TextViewerAction {
/**
* Jumps to the line.
+ *
+ * @param line the target line. First line is line <code>0</code>.
*/
protected void gotoLine(int line) {
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java
index 3ad0dc451..d771b217d 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java
@@ -13,23 +13,18 @@
*******************************************************************************/
package org.eclipse.ui.internal.console;
-import java.net.URL;
-
import org.eclipse.core.expressions.EvaluationContext;
import org.eclipse.core.expressions.EvaluationResult;
import org.eclipse.core.expressions.Expression;
import org.eclipse.core.expressions.ExpressionConverter;
import org.eclipse.core.expressions.ExpressionTagNames;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.ui.IPluginContribution;
import org.eclipse.ui.console.ConsolePlugin;
import org.eclipse.ui.console.IConsoleFactory;
-import org.osgi.framework.Bundle;
/**
* @since 3.1
@@ -108,11 +103,8 @@ public class ConsoleFactoryExtension implements IPluginContribution {
if (fImageDescriptor == null) {
String path = fConfig.getAttribute("icon"); //$NON-NLS-1$
if (path != null) {
- Bundle bundle = Platform.getBundle(getPluginId());
- URL url = FileLocator.find(bundle, new Path(path), null);
- if (url != null) {
- fImageDescriptor = ImageDescriptor.createFromURL(url);
- }
+ fImageDescriptor = ResourceLocator.imageDescriptorFromBundle(fConfig.getNamespaceIdentifier(), path)
+ .orElse(null);
}
}
return fImageDescriptor;
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
index 7c27120ae..59ea1d431 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
@@ -338,16 +338,20 @@ public class ConsoleManager implements IConsoleManager {
}
/**
- * Returns whether the given console view should be brought to the top.
- * The view should not be brought to the top if the view is pinned on
- * a console other than the given console.
+ * Returns whether the given console view should be brought to the top. The view
+ * should not be brought to the top if the view is pinned on a console other
+ * than the given console.
+ *
+ * @param console the console to be shown in the view
+ * @param consoleView the view which should be brought to the top
+ * @return whether the given console view should be brought to the top
*/
private boolean shouldBringToTop(IConsole console, IViewPart consoleView) {
- boolean bringToTop= true;
+ boolean bringToTop = true;
if (consoleView instanceof IConsoleView) {
- IConsoleView cView= (IConsoleView)consoleView;
+ IConsoleView cView = (IConsoleView) consoleView;
if (cView.isPinned()) {
- IConsole pinnedConsole= cView.getConsole();
+ IConsole pinnedConsole = cView.getConsole();
bringToTop = console.equals(pinnedConsole);
}
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java
index b299c8140..e4bf0478d 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java
@@ -98,6 +98,8 @@ public class ConsolePluginImages {
/**
* Returns the ImageRegistry.
+ *
+ * @return the ImageRegistry
*/
public static ImageRegistry getImageRegistry() {
if (imageRegistry == null) {
@@ -107,11 +109,12 @@ public class ConsolePluginImages {
}
/**
- * Initialize the image registry by declaring all of the required
- * graphics. This involves creating JFace image descriptors describing
- * how to create/find the image should it be needed.
- * The image is not actually allocated until requested.
+ * Initialize the image registry by declaring all of the required graphics. This
+ * involves creating JFace image descriptors describing how to create/find the
+ * image should it be needed. The image is not actually allocated until
+ * requested.
*
+ * <pre>
* Prefix conventions
* Wizard Banners WIZBAN_
* Preference Banners PREF_BAN_
@@ -132,25 +135,36 @@ public class ConsolePluginImages {
* This may mean the same package directory as the package holding this class.
* The images are declared using this.getClass() to ensure they are looked up via
* this plugin class.
- * @see org.eclipse.jface.resource.ImageRegistry
+ * </pre>
+ *
+ * @return the initialized ImageRegistry
+ * @see org.eclipse.jface.resource.ImageRegistry
*/
public static ImageRegistry initializeImageRegistry() {
- imageRegistry= new ImageRegistry(ConsolePlugin.getStandardDisplay());
+ imageRegistry = new ImageRegistry(ConsolePlugin.getStandardDisplay());
declareImages();
return imageRegistry;
}
/**
- * Returns the <code>Image<code> identified by the given key,
- * or <code>null</code> if it does not exist.
+ * Returns the <code>Image</code> identified by the given key, or
+ * <code>null</code> if it does not exist.
+ *
+ * @param key the image's key
+ * @return the <code>Image</code> identified by the given key, or
+ * <code>null</code> if it does not exist
*/
public static Image getImage(String key) {
return getImageRegistry().get(key);
}
/**
- * Returns the <code>ImageDescriptor<code> identified by the given key,
- * or <code>null</code> if it does not exist.
+ * Returns the <code>ImageDescriptor</code> identified by the given key, or
+ * <code>null</code> if it does not exist.
+ *
+ * @param key the image's key
+ * @return the <code>ImageDescriptor</code> identified by the given key, or
+ * <code>null</code> if it does not exist
*/
public static ImageDescriptor getImageDescriptor(String key) {
return getImageRegistry().getDescriptor(key);
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java
index 393f0ce12..d73caf60d 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java
@@ -40,8 +40,10 @@ public class ConsoleWorkbenchPart implements IWorkbenchPart {
}
/**
- * Constructs a part for the given console that binds to the given
- * site
+ * Constructs a part for the given console that binds to the given site.
+ *
+ * @param console the console which is part of the part
+ * @param site the site to bind the part to
*/
public ConsoleWorkbenchPart(IConsole console, IWorkbenchPartSite site) {
fConsole = console;
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java
index 67a84a3a6..adb455ab3 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java
@@ -28,7 +28,9 @@ public class FollowHyperlinkAction extends Action {
private TextConsoleViewer viewer;
/**
- * Constructs a follow link action
+ * Constructs a follow link action.
+ *
+ * @param consoleViewer the viewer containing the link
*/
public FollowHyperlinkAction(TextConsoleViewer consoleViewer) {
super(ConsoleMessages.FollowHyperlinkAction_0);
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java
index 9c5bfb919..ded7b0875 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java
@@ -27,7 +27,9 @@ public class PinConsoleAction extends Action implements IUpdate {
private IConsoleView fView = null;
/**
- * Constructs a 'pin console' action
+ * Constructs a 'pin console' action.
+ *
+ * @param view the view to pin with this action
*/
public PinConsoleAction(IConsoleView view) {
super(ConsoleMessages.PinConsoleAction_0, IAction.AS_CHECK_BOX);

Back to the top