Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2021-01-06 12:01:34 +0000
committerLars Vogel2021-01-08 14:46:53 +0000
commite6ab58692fec21bc19285781eb4ee1128802d686 (patch)
tree6bdb238a31a02af137daedac48666f7bb5d494ec
parentb96fcfc37a331a1bc0fd512428c9e179c83aaa08 (diff)
downloadeclipse.platform.ua-I20210112-0850.tar.gz
eclipse.platform.ua-I20210112-0850.tar.xz
eclipse.platform.ua-I20210112-0850.zip
org.eclipse.ui.internal Any time code is looking for its own Bundle should use FrameworkUtil as FrameworkUtil.getBundle lookup by class is simpler than the Bundle lookup by symbolic name. Change-Id: I52abbfe155def69b95e4fb2a1f5b15f64763ebda Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/ImageUtil.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/ImageUtil.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/ImageUtil.java
index e4d8fb3a0..bf06796f1 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/ImageUtil.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/ImageUtil.java
@@ -18,13 +18,12 @@ import java.net.URL;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.internal.intro.impl.IIntroConstants;
import org.eclipse.ui.internal.intro.impl.IntroPlugin;
import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
/**
* Convenience class for Images.
@@ -64,8 +63,7 @@ public final class ImageUtil {
* append that directory name for "imageName".
*/
public static ImageDescriptor createImageDescriptor(String imageName) {
- return createImageDescriptor(Platform
- .getBundle(IIntroConstants.PLUGIN_ID), ICONS_PATH + imageName);
+ return createImageDescriptor(FrameworkUtil.getBundle(ImageUtil.class), ICONS_PATH + imageName);
}
/**

Back to the top