Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshminarayana Nekkanti2019-07-10 09:42:34 -0400
committerSarika Sinha2019-07-25 01:44:45 -0400
commitdf5d045bdf1f0057d5b80909e0bc1d0c51b28ccd (patch)
tree9df9f0234c6e4c706e1502fea5a2304fae0c2a5e
parent0bc30667ae33f52913c51adcd66a178a26bb52d6 (diff)
downloadeclipse.platform.debug-I20190730-1800.tar.gz
eclipse.platform.debug-I20190730-1800.tar.xz
eclipse.platform.debug-I20190730-1800.zip
should handle platform icons Change-Id: I3c51bceb0ba1ecc045b978b5f49f4cccd8cc96b5 Signed-off-by: Lakshminarayana Nekkanti <narayana.nekkanti@gmail.com>
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java14
1 files changed, 3 insertions, 11 deletions
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;

Back to the top