Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-10-11 01:09:46 -0400
committerAlexander Kurtakov2019-10-11 01:57:51 -0400
commitd0d6f57a50ffa1688ede261adb1ef46d423deaaf (patch)
treee078780b9942ab8d330df683b7b635b2b31ab1ed
parent4477ea013a31691c3d378a01bcdf5436132de0c3 (diff)
downloadorg.eclipse.cdt-d0d6f57a50ffa1688ede261adb1ef46d423deaaf.tar.gz
org.eclipse.cdt-d0d6f57a50ffa1688ede261adb1ef46d423deaaf.tar.xz
org.eclipse.cdt-d0d6f57a50ffa1688ede261adb1ef46d423deaaf.zip
Move away of deprecated imageDescriptorFromPlugin.
Change-Id: I855682065fe6b40deeedc6cd7b5cb419848caac0 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/ControlFlowGraphPlugin.java5
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIActivator.java15
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/build/NewToolChainWizardSelectionPage.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/IndexedFilesLabelProvider.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java8
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/META-INF/MANIFEST.MF2
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/Activator.java3
-rw-r--r--debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/Activator.java12
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java5
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbUIPlugin.java3
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/actions/ConsoleSaveAction.java5
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceVarDetailsDialog.java6
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AddressBarContributionItem.java6
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/internal/ui/DsfUIPlugin.java3
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/DsfExamplesPlugin.java22
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/docker/launcher/DockerLaunchUIPlugin.java3
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowserPlugin.java3
-rw-r--r--qt/org.eclipse.cdt.qt.ui/META-INF/MANIFEST.MF2
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/Activator.java3
-rw-r--r--toolchains/arduino/org.eclipse.cdt.arduino.ui/src/org/eclipse/cdt/arduino/ui/internal/Activator.java10
21 files changed, 56 insertions, 78 deletions
diff --git a/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/ControlFlowGraphPlugin.java b/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/ControlFlowGraphPlugin.java
index e451bc9ac8..f0e4ca5df6 100644
--- a/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/ControlFlowGraphPlugin.java
+++ b/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/ControlFlowGraphPlugin.java
@@ -15,6 +15,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -66,7 +67,7 @@ public class ControlFlowGraphPlugin extends AbstractUIPlugin {
ImageRegistry registry = getImageRegistry();
ImageDescriptor descriptor = registry.getDescriptor(key);
if (descriptor == null) {
- descriptor = imageDescriptorFromPlugin(PLUGIN_ID, key);
+ descriptor = ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, key).get();
registry.put(key, descriptor);
}
return descriptor;
@@ -76,7 +77,7 @@ public class ControlFlowGraphPlugin extends AbstractUIPlugin {
ImageRegistry registry = getImageRegistry();
Image image = registry.get(key);
if (image == null) {
- ImageDescriptor descriptor = imageDescriptorFromPlugin(PLUGIN_ID, key);
+ ImageDescriptor descriptor = ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, key).get();
registry.put(key, descriptor);
image = registry.get(key);
}
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIActivator.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIActivator.java
index 2807af5cf1..c66c5f2847 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIActivator.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanUIActivator.java
@@ -23,6 +23,7 @@ import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
@@ -68,18 +69,6 @@ public class CodanUIActivator extends AbstractUIPlugin {
}
/**
- * Returns an image descriptor for the image file at the given plug-in
- * relative path
- *
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- /**
*
* @param key - key is usually plug-in relative path to image like icons/xxx.gif
* @return Image loaded from key location or from registry cache, it will be stored in plug-in registry and disposed when plug-in unloads
@@ -88,7 +77,7 @@ public class CodanUIActivator extends AbstractUIPlugin {
ImageRegistry registry = getImageRegistry();
Image image = registry.get(key);
if (image == null) {
- ImageDescriptor descriptor = imageDescriptorFromPlugin(PLUGIN_ID, key);
+ ImageDescriptor descriptor = ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, key).get();
if (descriptor == null) {
ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
return sharedImages.getImage(key);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/build/NewToolChainWizardSelectionPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/build/NewToolChainWizardSelectionPage.java
index 0c6b8ccfd9..1f5229102e 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/build/NewToolChainWizardSelectionPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/build/NewToolChainWizardSelectionPage.java
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardPage;
@@ -30,7 +31,6 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
public class NewToolChainWizardSelectionPage extends WizardPage {
@@ -62,8 +62,8 @@ public class NewToolChainWizardSelectionPage extends WizardPage {
String iconFile = element.getAttribute("icon"); //$NON-NLS-1$
if (iconFile != null) {
- ImageDescriptor desc = CUIPlugin.imageDescriptorFromPlugin(element.getNamespaceIdentifier(),
- iconFile);
+ ImageDescriptor desc = ResourceLocator
+ .imageDescriptorFromBundle(element.getNamespaceIdentifier(), iconFile).get();
if (desc != null) {
item.setImage(desc.createImage());
}
@@ -107,7 +107,7 @@ public class NewToolChainWizardSelectionPage extends WizardPage {
if (descImage == null) {
return null;
}
- return AbstractUIPlugin.imageDescriptorFromPlugin(element.getNamespaceIdentifier(), descImage);
+ return ResourceLocator.imageDescriptorFromBundle(element.getNamespaceIdentifier(), descImage).get();
}
@Override
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/IndexedFilesLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/IndexedFilesLabelProvider.java
index 9e9197f23f..9b5470dad1 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/IndexedFilesLabelProvider.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/IndexedFilesLabelProvider.java
@@ -24,17 +24,17 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.jface.viewers.IDecoration;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ILightweightLabelDecorator;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
/**
* A label provider that marks all translation units that are currently part of the index.
*/
public class IndexedFilesLabelProvider implements ILightweightLabelDecorator {
- private static final ImageDescriptor INDEXED = AbstractUIPlugin.imageDescriptorFromPlugin(CUIPlugin.PLUGIN_ID,
- "$nl$/icons/ovr16/indexedFile.gif"); //$NON-NLS-1$
+ private static final ImageDescriptor INDEXED = ResourceLocator
+ .imageDescriptorFromBundle(CUIPlugin.PLUGIN_ID, "$nl$/icons/ovr16/indexedFile.gif").get(); //$NON-NLS-1$
public IndexedFilesLabelProvider() {
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java
index 4afc24e5cf..7d04e8e287 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java
@@ -71,6 +71,7 @@ import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.preference.IPreferencePageContainer;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
@@ -100,7 +101,6 @@ import org.eclipse.ui.IWorkbenchPartReference;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation;
import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
/**
* It is a parent for all standard CDT property pages
@@ -567,7 +567,7 @@ public abstract class AbstractPage extends PropertyPage implements IPreferencePa
* which do not share ICProjectDescription instance.
* But some changes may be saved wrong if they are affected
* by data from another property pages (Discovery options etc).
-
+
* To enable 2nd mode, just create the following file:
* <workspace>/.metadata/.plugins/org.eclipse.cdt.ui/apply_mode
*/
@@ -1199,9 +1199,9 @@ public abstract class AbstractPage extends PropertyPage implements IPreferencePa
URL url = null;
String iconName = config.getAttribute(IMAGE_NAME);
if (iconName != null) {
- idesc = AbstractUIPlugin.imageDescriptorFromPlugin(
+ idesc = ResourceLocator.imageDescriptorFromBundle(
Platform.getBundle(config.getDeclaringExtension().getContributor().getName()).getSymbolicName(),
- iconName);
+ iconName).get();
}
if (idesc == null)
return null;
diff --git a/cross/org.eclipse.cdt.launch.serial.ui/META-INF/MANIFEST.MF b/cross/org.eclipse.cdt.launch.serial.ui/META-INF/MANIFEST.MF
index 56d71eb1df..a4df1d0052 100644
--- a/cross/org.eclipse.cdt.launch.serial.ui/META-INF/MANIFEST.MF
+++ b/cross/org.eclipse.cdt.launch.serial.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Ui
Bundle-SymbolicName: org.eclipse.cdt.launch.serial.ui;singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.200.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.13.0",
org.eclipse.ui;bundle-version="3.109.0",
diff --git a/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/Activator.java b/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/Activator.java
index cbde06a7d4..e89756f4ec 100644
--- a/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/Activator.java
+++ b/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/Activator.java
@@ -12,6 +12,7 @@ package org.eclipse.cdt.launch.serial.ui.internal;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -35,7 +36,7 @@ public class Activator extends AbstractUIPlugin {
protected void initializeImageRegistry(ImageRegistry reg) {
super.initializeImageRegistry(reg);
- reg.put(IMG_CDT_LOGO, imageDescriptorFromPlugin(PLUGIN_ID, "icons/cdt_logo_16.png")); //$NON-NLS-1$
+ reg.put(IMG_CDT_LOGO, ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, "icons/cdt_logo_16.png").get()); //$NON-NLS-1$
}
public static Image getImage(String key) {
diff --git a/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/Activator.java b/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/Activator.java
index 162b23516c..fc47043d20 100644
--- a/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/Activator.java
+++ b/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/Activator.java
@@ -13,7 +13,6 @@
*******************************************************************************/
package org.eclipse.cdt.debug.application;
-import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -54,15 +53,4 @@ public class Activator extends AbstractUIPlugin {
public static Activator getDefault() {
return plugin;
}
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java
index 05e442819a..84b7163ced 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java
@@ -48,6 +48,7 @@ import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.jface.text.source.ISharedTextColors;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.graphics.Color;
@@ -362,7 +363,7 @@ public class CDebugUIPlugin extends AbstractUIPlugin {
* @return the image descriptor
*/
public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ return ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, path).get();
}
/**
@@ -374,7 +375,7 @@ public class CDebugUIPlugin extends AbstractUIPlugin {
ImageRegistry registry = getImageRegistry();
Image image = registry.get(key);
if (image == null) {
- ImageDescriptor descriptor = imageDescriptorFromPlugin(PLUGIN_ID, key);
+ ImageDescriptor descriptor = ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, key).get();
if (descriptor == null) {
ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
return sharedImages.getImage(key);
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbUIPlugin.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbUIPlugin.java
index 6520f9c888..44d8be2b0f 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbUIPlugin.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbUIPlugin.java
@@ -29,6 +29,7 @@ import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchPage;
@@ -265,7 +266,7 @@ public class GdbUIPlugin extends AbstractUIPlugin {
* @return the image descriptor
*/
public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ return ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, path).get();
}
public static Image getImage(String key) {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/actions/ConsoleSaveAction.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/actions/ConsoleSaveAction.java
index 82857bcf6c..b1801cab9d 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/actions/ConsoleSaveAction.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/actions/ConsoleSaveAction.java
@@ -23,6 +23,7 @@ import org.eclipse.cdt.dsf.gdb.internal.ui.console.ConsoleMessages;
import org.eclipse.cdt.dsf.gdb.internal.ui.console.IConsoleImagesConst;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.widgets.Display;
@@ -40,8 +41,8 @@ public class ConsoleSaveAction extends Action {
public ConsoleSaveAction(TextConsole console) {
super();
setToolTipText(ConsoleMessages.ConsoleMessages_save_action_tooltip);
- setImageDescriptor(
- GdbUIPlugin.imageDescriptorFromPlugin(GdbUIPlugin.PLUGIN_ID, IConsoleImagesConst.IMG_SAVE_CONSOLE));
+ setImageDescriptor(ResourceLocator
+ .imageDescriptorFromBundle(GdbUIPlugin.PLUGIN_ID, IConsoleImagesConst.IMG_SAVE_CONSOLE).get());
fConsole = console;
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceVarDetailsDialog.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceVarDetailsDialog.java
index 0fe82058e9..bb39befe8e 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceVarDetailsDialog.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceVarDetailsDialog.java
@@ -22,6 +22,7 @@ import org.eclipse.cdt.dsf.gdb.internal.ui.tracepoints.TraceControlView.FailedTr
import org.eclipse.cdt.dsf.gdb.service.IGDBTraceControl.ITraceVariableDMData;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
@@ -43,7 +44,6 @@ import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
public final class TraceVarDetailsDialog extends Dialog {
@@ -163,8 +163,8 @@ public final class TraceVarDetailsDialog extends Dialog {
warningIconLabel = new Label(createButtonComposite, SWT.NONE);
warningIconLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
- warningImage = AbstractUIPlugin.imageDescriptorFromPlugin(GdbUIPlugin.PLUGIN_ID, "icons/full/obj16/warning.gif") //$NON-NLS-1$
- .createImage();
+ warningImage = ResourceLocator.imageDescriptorFromBundle(GdbUIPlugin.PLUGIN_ID, "icons/full/obj16/warning.gif") //$NON-NLS-1$
+ .get().createImage();
warningIconLabel.setImage(warningImage);
warningIconLabel.setVisible(false);
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
index fd8393f60f..e40499ca0a 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
@@ -106,6 +106,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.BadPositionCategoryException;
import org.eclipse.jface.text.IFindReplaceTarget;
@@ -175,7 +176,6 @@ import org.eclipse.ui.handlers.IHandlerActivation;
import org.eclipse.ui.handlers.IHandlerService;
import org.eclipse.ui.ide.IGotoMarker;
import org.eclipse.ui.part.WorkbenchPart;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
import org.eclipse.ui.texteditor.AnnotationPreference;
import org.eclipse.ui.texteditor.ChainedPreferenceStore;
@@ -1340,7 +1340,7 @@ public abstract class DisassemblyPart extends WorkbenchPart
fActionToggleSource = new ActionToggleSource();
fStateDependentActions.add(fActionToggleSource);
fActionToggleSource.setImageDescriptor(
- AbstractUIPlugin.imageDescriptorFromPlugin(DsfUIPlugin.PLUGIN_ID, "icons/source.gif")); //$NON-NLS-1$
+ ResourceLocator.imageDescriptorFromBundle(DsfUIPlugin.PLUGIN_ID, "icons/source.gif").get()); //$NON-NLS-1$
fVerticalRuler.getControl().addMouseListener(new MouseAdapter() {
@Override
public void mouseDoubleClick(final MouseEvent e) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AddressBarContributionItem.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AddressBarContributionItem.java
index 62659c39ac..95fe4a8df2 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AddressBarContributionItem.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AddressBarContributionItem.java
@@ -17,6 +17,7 @@ package org.eclipse.cdt.dsf.debug.internal.ui.disassembly.actions;
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
import org.eclipse.jface.action.ContributionItem;
import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.dnd.TextTransfer;
@@ -42,7 +43,6 @@ import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
public class AddressBarContributionItem extends ContributionItem {
private Combo addressBox;
@@ -185,8 +185,8 @@ public class AddressBarContributionItem extends ContributionItem {
warningLabel = new Label(top, SWT.NONE);
- warningImage = AbstractUIPlugin.imageDescriptorFromPlugin(DsfUIPlugin.PLUGIN_ID, "icons/address_warning.gif") //$NON-NLS-1$
- .createImage();
+ warningImage = ResourceLocator.imageDescriptorFromBundle(DsfUIPlugin.PLUGIN_ID, "icons/address_warning.gif") //$NON-NLS-1$
+ .get().createImage();
warningLabel.setImage(warningImage);
warningLabel.setToolTipText(warningText);
setWarningIconVisible(false);
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/internal/ui/DsfUIPlugin.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/internal/ui/DsfUIPlugin.java
index fa792ab919..94951fb8ac 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/internal/ui/DsfUIPlugin.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/internal/ui/DsfUIPlugin.java
@@ -26,6 +26,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -106,7 +107,7 @@ public class DsfUIPlugin extends AbstractUIPlugin {
* @return the image descriptor
*/
public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ return ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, path).get();
}
public static SourceDocumentProvider getSourceDocumentProvider() {
diff --git a/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/DsfExamplesPlugin.java b/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/DsfExamplesPlugin.java
index 5e8fc07aa4..5482e630c9 100644
--- a/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/DsfExamplesPlugin.java
+++ b/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/DsfExamplesPlugin.java
@@ -13,7 +13,7 @@
*******************************************************************************/
package org.eclipse.cdt.examples.dsf;
-import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -47,10 +47,11 @@ public class DsfExamplesPlugin extends AbstractUIPlugin {
public void start(BundleContext context) throws Exception {
fgBundleContext = context;
super.start(context);
- getImageRegistry().put(IMG_ALARM, imageDescriptorFromPlugin(PLUGIN_ID, IMG_ALARM));
- getImageRegistry().put(IMG_ALARM_TRIGGERED, imageDescriptorFromPlugin(PLUGIN_ID, IMG_ALARM_TRIGGERED));
- getImageRegistry().put(IMG_TIMER, imageDescriptorFromPlugin(PLUGIN_ID, IMG_TIMER));
- getImageRegistry().put(IMG_REMOVE, imageDescriptorFromPlugin(PLUGIN_ID, IMG_REMOVE));
+ getImageRegistry().put(IMG_ALARM, ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, IMG_ALARM).get());
+ getImageRegistry().put(IMG_ALARM_TRIGGERED,
+ ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, IMG_ALARM_TRIGGERED).get());
+ getImageRegistry().put(IMG_TIMER, ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, IMG_TIMER).get());
+ getImageRegistry().put(IMG_REMOVE, ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, IMG_REMOVE).get());
}
@Override
@@ -73,15 +74,4 @@ public class DsfExamplesPlugin extends AbstractUIPlugin {
return fgBundleContext;
}
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
}
diff --git a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/docker/launcher/DockerLaunchUIPlugin.java b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/docker/launcher/DockerLaunchUIPlugin.java
index 886d30b155..e68f5c48a7 100644
--- a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/docker/launcher/DockerLaunchUIPlugin.java
+++ b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/docker/launcher/DockerLaunchUIPlugin.java
@@ -17,6 +17,7 @@ import org.eclipse.cdt.internal.docker.launcher.ConnectionListener;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -143,6 +144,6 @@ public class DockerLaunchUIPlugin extends AbstractUIPlugin {
* @return the image descriptor
*/
public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ return ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, path).get();
}
}
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowserPlugin.java b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowserPlugin.java
index 2f364f1fd7..ddc5090a6e 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowserPlugin.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowserPlugin.java
@@ -18,6 +18,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -67,7 +68,7 @@ public class MemoryBrowserPlugin extends AbstractUIPlugin {
* @return the image descriptor
*/
public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ return ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, path).get();
}
/**
diff --git a/qt/org.eclipse.cdt.qt.ui/META-INF/MANIFEST.MF b/qt/org.eclipse.cdt.qt.ui/META-INF/MANIFEST.MF
index 1bd5dc033c..405d02ca0e 100644
--- a/qt/org.eclipse.cdt.qt.ui/META-INF/MANIFEST.MF
+++ b/qt/org.eclipse.cdt.qt.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.qt.ui;singleton:=true
-Bundle-Version: 2.0.1.qualifier
+Bundle-Version: 2.0.100.qualifier
Bundle-Activator: org.eclipse.cdt.internal.qt.ui.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/Activator.java b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/Activator.java
index 82624ad150..4eb9bfe641 100644
--- a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/Activator.java
+++ b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/Activator.java
@@ -20,6 +20,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -52,7 +53,7 @@ public class Activator extends AbstractUIPlugin {
plugin = this;
ImageRegistry imageRegistry = getImageRegistry();
- imageRegistry.put(IMG_QT_16, imageDescriptorFromPlugin(PLUGIN_ID, "icons/qt16.png")); //$NON-NLS-1$
+ imageRegistry.put(IMG_QT_16, ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, "icons/qt16.png").get()); //$NON-NLS-1$
// Use a save participant to grab any changed resources while this
// plugin was inactive
diff --git a/toolchains/arduino/org.eclipse.cdt.arduino.ui/src/org/eclipse/cdt/arduino/ui/internal/Activator.java b/toolchains/arduino/org.eclipse.cdt.arduino.ui/src/org/eclipse/cdt/arduino/ui/internal/Activator.java
index 824c5a712d..805e136a6a 100644
--- a/toolchains/arduino/org.eclipse.cdt.arduino.ui/src/org/eclipse/cdt/arduino/ui/internal/Activator.java
+++ b/toolchains/arduino/org.eclipse.cdt.arduino.ui/src/org/eclipse/cdt/arduino/ui/internal/Activator.java
@@ -14,6 +14,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
@@ -49,10 +50,11 @@ public class Activator extends AbstractUIPlugin {
@Override
protected ImageRegistry createImageRegistry() {
ImageRegistry registry = super.createImageRegistry();
- registry.put(IMG_ARDUINO, imageDescriptorFromPlugin(PLUGIN_ID, "icons/cprojects.gif")); //$NON-NLS-1$
- registry.put(IMG_CONNECTION_TYPE, imageDescriptorFromPlugin(PLUGIN_ID, "icons/arduino.png")); //$NON-NLS-1$
- registry.put(IMG_ADD, imageDescriptorFromPlugin(PLUGIN_ID, "icons/list-add.gif")); //$NON-NLS-1$
- registry.put(IMG_DELETE, imageDescriptorFromPlugin(PLUGIN_ID, "icons/list-delete.gif")); //$NON-NLS-1$
+ registry.put(IMG_ARDUINO, ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, "icons/cprojects.gif").get()); //$NON-NLS-1$
+ registry.put(IMG_CONNECTION_TYPE,
+ ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, "icons/arduino.png").get()); //$NON-NLS-1$
+ registry.put(IMG_ADD, ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, "icons/list-add.gif").get()); //$NON-NLS-1$
+ registry.put(IMG_DELETE, ResourceLocator.imageDescriptorFromBundle(PLUGIN_ID, "icons/list-delete.gif").get()); //$NON-NLS-1$
return registry;
}

Back to the top