Commit ba2405c0 authored by Simon Barner's avatar Simon Barner

Make getIconImageDescriptor(), getIcon(), and getFXIcon() final

Issue-Ref: 3939
Issue-Url: https://af3-developer.fortiss.org/issues/3939Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent dd1c5566
......@@ -8,7 +8,7 @@ FXEditorBase.java 40caf638c7b4c02da5aece0d9d58883bce630e76 GREEN
IListPropertySection.java 8bb00fe7959583e794ff9437b7a77404c9a9e70f GREEN
LWFXEFEditorBase.java f6b160b700a0287021402b5702beb2bfdce3dc2e GREEN
ModelEditorBindingBase.java b9b1a1c5a48a6e677d1f57ad55a6126d9703c4b5 GREEN
ModelElementHandlerBase.java 5352e6f3e62430bbfabaf4a82b450ca58db1786e YELLOW
ModelElementHandlerBase.java d0efc1e9ca2fbbefb861f1ae8176ad9ec08a08a8 YELLOW
MultiEObjectActionBase.java 9e237d8ea640c4194e4877af4a9cfce88698e543 GREEN
NamedCommentedModelElementHandlerBase.java 681b98b50b362f01abb7a36f108f4f11b9e51829 GREEN
PropertySectionBase.java 20fb1daea544123ea941743aafeb9ac59daf5356 GREEN
......
......@@ -38,10 +38,12 @@ import javafx.scene.image.ImageView;
/**
* Base implementation for {@link IModelElementHandler}s.
*
* <br>
* {@link ModelEditorBindingBase} retrieves model element icons from file resources in the plugins.
* Sub-classes must implement {@link #getPluginId()} and {@link #getIconPath(EObject)} and may
* override the other non-final methods of {@link IModelElementHandler}. By default the base
* implementation returns empty lists for the respective methods. Open editor
* override the other non-final methods of {@link IModelElementHandler}.
* <br>
* By default the base implementation returns empty lists for the respective methods. Open editor
* requests are handled by returning the model element itself.
*
* @author hoelzl
......@@ -66,9 +68,9 @@ public abstract class ModelElementHandlerBase<T extends EObject>
/** Returns the plugin-relative path of the icon to be displayed for the given element. */
protected abstract String getIconPath(T element);
/** The default implementation forwards the request by ignoring the model element. */
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor(T element) {
public final ImageDescriptor getIconImageDescriptor(T element) {
String pluginId = getPluginId();
String iconPath = getIconPath(element);
if(pluginId == null || iconPath == null) {
......@@ -86,7 +88,7 @@ public abstract class ModelElementHandlerBase<T extends EObject>
/** {@inheritDoc} */
@Override
public Image getIcon(T element) {
public final Image getIcon(T element) {
ImageDescriptor descr = getIconImageDescriptor(element);
if(descr == null) {
return null;
......@@ -112,7 +114,7 @@ public abstract class ModelElementHandlerBase<T extends EObject>
/** {@inheritDoc} */
@Override
public Node getFXIcon(T element) {
public final Node getFXIcon(T element) {
String uri;
String pluginId = getPluginId();
String iconPath = getIconPath(element);
......
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