Commit 2ddd373f authored by Simon Barner's avatar Simon Barner

Remove FX icon image getter methods in Activators

* Directly handled in model element handlers
* Alternatively, use GraphicsUtils::getFXImage()

Issue-Ref: 3939
Issue-Url: https://af3-developer.fortiss.org/issues/3939Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent db2bc652
AF3ExpressionUIActivator.java 992a38d73b306c4fb9dc5186fc39e494ab9a9fd8 YELLOW
AF3ExpressionUIActivator.java df5def90459f62c86f424a93f096599eb5afc71e YELLOW
......@@ -17,7 +17,6 @@ package org.fortiss.af3.expression.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.expression.ui.tutorial.DataDictionaryTutorialRootStepProvider.DATA_DICTIONARY_TUTORIAL;
import static org.fortiss.tooling.common.ui.javafx.util.GraphicUtils.getURIString;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
......@@ -68,9 +67,4 @@ public class AF3ExpressionUIActivator extends AbstractUIPlugin {
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
/** Returns the FX image URI for the given icon file. */
public static String getFXImageURI(String path) {
return getURIString(PLUGIN_ID, path);
}
}
......@@ -2,5 +2,5 @@ DataDictionaryFXEditor.java 225c54161a107a8f17caa1f3ffdaee607ba19cfd GREEN
DataDictionaryFXEditorBinding.java 8c2d41b5ec9ea8564cad6a1d7c25a2839e1d071e GREEN
DataDictionaryFXEditorContentProvider.java 855cde53505172d1bf5743b9b4f53aaa50548962 GREEN
DataDictionaryFXEditorUIProvider.java 8d274efce83461d51a705938bc3dcd93bbf38107 GREEN
DataDictionaryFXEvaluator.java cf2f12de4f7e01b41de62e8e5841786ed9891cb5 GREEN
DataDictionaryFXEvaluator.java 55cbb923079b04ff66a7679904ec1c77a5a0b917 YELLOW
DataDictionaryFXEvaluatorBinding.java a15f93c5fb7cd292460aa5bea0a57a9fea42d315 GREEN
......@@ -15,8 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.expression.ui.editor.fx;
import static org.fortiss.af3.expression.ui.AF3ExpressionUIActivator.getFXImageURI;
import static org.fortiss.tooling.common.ui.javafx.util.GraphicUtils.getFXImageFromURI;
import static org.fortiss.af3.expression.ui.AF3ExpressionUIActivator.PLUGIN_ID;
import static org.fortiss.tooling.common.ui.javafx.util.GraphicUtils.getFXImage;
import java.util.LinkedList;
......@@ -71,11 +71,9 @@ public final class DataDictionaryFXEvaluator extends FXEditorBase<DataDictionary
private int stackPointer = 0;
/** Stores the error image. */
private static ImageView ERROR =
new ImageView(getFXImageFromURI(getFXImageURI("icons/error.gif")));
private static ImageView ERROR = new ImageView(getFXImage(PLUGIN_ID, "icons/error.gif"));
/** Stores the info image. */
private static ImageView INFO =
new ImageView(getFXImageFromURI(getFXImageURI("icons/info.gif")));
private static ImageView INFO = new ImageView(getFXImage(PLUGIN_ID, "icons/info.gif"));
/** The flag if return is activated, i.e., parsing and type check succeed for current input. */
private boolean canExecute = false;
......
AF3MiraUIActivator.java d23c22cc1450cd21377b8b2ad65c9c70f776c89f GREEN
AF3MiraUIActivator.java 751323d4a666c98a9aae2a29aaef81c808bd113b YELLOW
......@@ -17,8 +17,6 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.mira.ui;
import static org.fortiss.tooling.common.ui.javafx.util.GraphicUtils.getURIString;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
......@@ -58,9 +56,4 @@ public class AF3MiraUIActivator extends AbstractUIPlugin {
public static AF3MiraUIActivator getDefault() {
return plugin;
}
/** Returns the FX image URI for the given icon file. */
public static String getFXImageURI(String path) {
return getURIString(PLUGIN_ID, path);
}
}
AF3OperatorpanelUIActivator.java beddfbba351aa4a6e8686af95e99c4ffd2a0648e YELLOW
AF3OperatorpanelUIActivator.java 27154ea3588840af619ad769ea7c1f33546ad13d YELLOW
......@@ -16,7 +16,6 @@
package org.fortiss.af3.operatorpanel.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.tooling.common.ui.javafx.util.GraphicUtils.getURIString;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.jface.resource.ImageDescriptor;
......@@ -58,9 +57,4 @@ public class AF3OperatorpanelUIActivator extends Plugin {
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
/** Returns the FX image URI for the given icon file. */
public static String getFXImageURI(String path) {
return getURIString(PLUGIN_ID, path);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment