Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2019-03-09 01:28:55 -0500
committerJonah Graham2019-03-20 19:13:33 -0400
commit084288dee990df2a961a62d46bd68d6452044920 (patch)
tree981fdddcd43068e21d40b8bc2a3613f21b486d83
parentc21d3f553e10792c1519f56450cab6100f0d9ee3 (diff)
downloadorg.eclipse.cdt-084288dee990df2a961a62d46bd68d6452044920.tar.gz
org.eclipse.cdt-084288dee990df2a961a62d46bd68d6452044920.tar.xz
org.eclipse.cdt-084288dee990df2a961a62d46bd68d6452044920.zip
Remove warning of illegally extending ImageRegistry
Delegate to an instance of ImageRegistry instead, which is legal. Change-Id: Ife10b526c54483143a9ef5599c4571844a60604d Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/AbstractImageRegistry.java20
2 files changed, 10 insertions, 12 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF
index e86a69c1a7..edeeaddf00 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.cdt.dsf.gdb.ui;singleton:=true
-Bundle-Version: 2.6.100.qualifier
+Bundle-Version: 2.6.200.qualifier
Bundle-Activator: org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/AbstractImageRegistry.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/AbstractImageRegistry.java
index 599e0e20d8..baf8fc75a1 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/AbstractImageRegistry.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/AbstractImageRegistry.java
@@ -34,13 +34,15 @@ import org.osgi.framework.Bundle;
*
* @since 2.1
*/
-public abstract class AbstractImageRegistry extends ImageRegistry {
+public abstract class AbstractImageRegistry {
private HashMap<String, String> fPlugins = new HashMap<>();
private HashMap<String, String[]> fLocations = new HashMap<>();
private URL fBaseUrl;
+ private ImageRegistry fImageRegistry;
protected AbstractImageRegistry(Plugin plugin) {
fBaseUrl = plugin.getBundle().getEntry("/"); //$NON-NLS-1$
+ fImageRegistry = new ImageRegistry();
}
/**
@@ -83,33 +85,29 @@ public abstract class AbstractImageRegistry extends ImageRegistry {
fLocations.put(key, locations);
}
- // overrider
- @Override
final public Image get(String key) {
- Image i = super.get(key);
+ Image i = fImageRegistry.get(key);
if (i != null) {
return i;
}
ImageDescriptor d = createFileImageDescriptor(key);
if (d != null) {
- put(key, d);
- return super.get(key);
+ fImageRegistry.put(key, d);
+ return fImageRegistry.get(key);
}
return null;
}
- // overrider
- @Override
final public ImageDescriptor getDescriptor(String key) {
- ImageDescriptor d = super.getDescriptor(key);
+ ImageDescriptor d = fImageRegistry.getDescriptor(key);
if (d != null) {
return d;
}
d = createFileImageDescriptor(key);
if (d != null) {
- put(key, d);
+ fImageRegistry.put(key, d);
return d;
}
return null;
@@ -132,7 +130,7 @@ public abstract class AbstractImageRegistry extends ImageRegistry {
try {
full = new URL(url, loc);
ImageDescriptor candidate = ImageDescriptor.createFromURL(full);
- if (candidate != null && candidate.getImageData() != null) {
+ if (candidate != null && candidate.getImageData(100) != null) {
return candidate;
}
} catch (MalformedURLException e) {

Back to the top