Skip to content
Snippets Groups Projects
Commit 68ca102e authored by Simon Barner's avatar Simon Barner
Browse files

Use org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle

* Instead of deprecated method in AbstractUIPlugin

Issue-Ref: 3939
Issue-Url: https://af3-developer.fortiss.org/issues/3939



Signed-off-by: default avatarSimon Barner <barner@fortiss.org>
parent b21543ae
No related branches found
No related tags found
1 merge request!933939: FX Icon
Showing with 15 additions and 8 deletions
ToolingBaseUIActivator.java 42fa7691bceec500b4e08cb28ef7fc69b9f8f658 GREEN ToolingBaseUIActivator.java dbb6f64b87a553ffbcfeb92160d84b63073dfd89 YELLOW
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/ +--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.ui; package org.fortiss.tooling.base.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin; import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext; import org.osgi.framework.BundleContext;
...@@ -53,6 +55,6 @@ public class ToolingBaseUIActivator extends AbstractUIPlugin { ...@@ -53,6 +55,6 @@ public class ToolingBaseUIActivator extends AbstractUIPlugin {
/** Returns image descriptor of the image in the kernel plugin. */ /** Returns image descriptor of the image in the kernel plugin. */
public static ImageDescriptor getImageDescriptor(String iconPath) { public static ImageDescriptor getImageDescriptor(String iconPath) {
return imageDescriptorFromPlugin(PLUGIN_ID, iconPath); return imageDescriptorFromBundle(PLUGIN_ID, iconPath).orElse(null);
} }
} }
ToolingCommonUIActivator.java cce1178fb9941ee2d4d97cfdbe6af8cf94170fd3 GREEN ToolingCommonUIActivator.java 0e00121865e18435bb9f130e23eea6e07b43af46 YELLOW
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/ +--------------------------------------------------------------------------*/
package org.fortiss.tooling.common.ui; package org.fortiss.tooling.common.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin; import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext; import org.osgi.framework.BundleContext;
...@@ -53,6 +55,6 @@ public class ToolingCommonUIActivator extends AbstractUIPlugin { ...@@ -53,6 +55,6 @@ public class ToolingCommonUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */ /** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) { public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path); return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
} }
} }
ToolingGraphicsGLUIActivator.java 278f2896961a12211d7b48daf6ec6e685e105dc8 GREEN ToolingGraphicsGLUIActivator.java d8e45ba22affcad57dc7f194004aa110f11590fc YELLOW
...@@ -17,6 +17,7 @@ package org.fortiss.tooling.graphicsGL.ui; ...@@ -17,6 +17,7 @@ package org.fortiss.tooling.graphicsGL.ui;
import static java.lang.System.mapLibraryName; import static java.lang.System.mapLibraryName;
import static org.eclipse.core.runtime.FileLocator.toFileURL; import static org.eclipse.core.runtime.FileLocator.toFileURL;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.tooling.base.utils.SystemUtils.isOs64BitArch; import static org.fortiss.tooling.base.utils.SystemUtils.isOs64BitArch;
import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageDescriptor;
...@@ -93,6 +94,6 @@ public class ToolingGraphicsGLUIActivator extends AbstractUIPlugin { ...@@ -93,6 +94,6 @@ public class ToolingGraphicsGLUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */ /** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) { public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path); return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
} }
} }
ESharedImages.java dd65be1d1ee807db8460064d9b970847e6303ff0 GREEN ESharedImages.java dd65be1d1ee807db8460064d9b970847e6303ff0 GREEN
ToolingKernelUI.java 250e5dde230272e286aa8d327fd597cf542774fe GREEN ToolingKernelUI.java 250e5dde230272e286aa8d327fd597cf542774fe GREEN
ToolingKernelUIActivator.java 1c6ac50477a78cd77d9e4daf36f423d4b4dbdf63 GREEN ToolingKernelUIActivator.java fc281e60592e54bd606d0b6667168afdfde8389e YELLOW
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/ +--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.ui; package org.fortiss.tooling.kernel.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry; import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.ui.plugin.AbstractUIPlugin; import org.eclipse.ui.plugin.AbstractUIPlugin;
...@@ -81,7 +83,7 @@ public class ToolingKernelUIActivator extends AbstractUIPlugin { ...@@ -81,7 +83,7 @@ public class ToolingKernelUIActivator extends AbstractUIPlugin {
/** Returns image descriptor of the image in the kernel plugin. */ /** Returns image descriptor of the image in the kernel plugin. */
public static ImageDescriptor getImageDescriptor(String iconPath) { public static ImageDescriptor getImageDescriptor(String iconPath) {
return imageDescriptorFromPlugin(PLUGIN_ID, iconPath); return imageDescriptorFromBundle(PLUGIN_ID, iconPath).orElse(null);
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment