Commit fe09f731 authored by Tiziano Munaro's avatar Tiziano Munaro

Merge remote-tracking branch 'origin/master' into 3943

parents ee14957d 3c1ec507
DiagramUIActivator.java 953dfd0b2257711d94b5e1a91304fa17fe2fd2db GREEN
DiagramUIActivator.java f5063c69c6d39b8a7da2e725bd1e94b6ff089720 GREEN
......@@ -16,6 +16,8 @@
*******************************************************************************/
package eu.fbk.af3.tools.diagram.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
......@@ -52,6 +54,6 @@ public class DiagramUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
}
AF3AllocationUIActivator.java d0d2f939b1c8a1ba0995a3dc6dfd2c197ab09832 GREEN
AF3AllocationUIActivator.java b7719bf283ba07912c14bacf0a527599f99c6313 GREEN
......@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.allocation.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
......@@ -58,6 +60,6 @@ public class AF3AllocationUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
}
AllocationTableCollectionHandler.java d670d09ac29b35de7cdb12a9391f1c202b8dabe5 GREEN
ManyToOneAllocationEntryHandler.java 0f2b8ecaf7761b672d380b31558b3ca4a86eadce GREEN
OneToManyAllocationEntryHandler.java b8271e7603d4af63e0897b689f06ff9d2f2de28d GREEN
OneToOneAllocationEntryHandler.java 27a868c2b2cc528a119961990bb574ef35c4df51 GREEN
AllocationTableCollectionHandler.java b3467fde3d308511c1695a07f5f39c5375ca24f5 GREEN
ManyToOneAllocationEntryHandler.java 80f3713b188482913f06a25f7c9e35836474d969 GREEN
OneToManyAllocationEntryHandler.java 8eebc2529152bea2399b936486fceec125d07e94 GREEN
OneToOneAllocationEntryHandler.java 6d9ae6bd5512374ed721fbe327de6c65cb6e7a94 GREEN
......@@ -16,13 +16,12 @@
package org.fortiss.af3.allocation.ui.handler;
import static java.util.stream.Collectors.toList;
import static org.fortiss.af3.allocation.ui.AF3AllocationUIActivator.getImageDescriptor;
import static org.fortiss.af3.allocation.ui.AF3AllocationUIActivator.PLUGIN_ID;
import java.util.List;
import java.util.function.Predicate;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.allocation.IAllocationService;
import org.fortiss.af3.allocation.model.AllocationTable;
import org.fortiss.af3.allocation.model.AllocationTableCollection;
......@@ -39,8 +38,14 @@ public class AllocationTableCollectionHandler
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/allocationtablecollection.png");
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(AllocationTableCollection element) {
return "icons/allocationtablecollection.png";
}
/** {@inheritDoc} */
......
......@@ -16,11 +16,11 @@
package org.fortiss.af3.allocation.ui.handler;
import static java.util.stream.Collectors.joining;
import static org.fortiss.af3.allocation.ui.AF3AllocationUIActivator.PLUGIN_ID;
import static org.fortiss.af3.allocation.utils.AllocationModelElementFactory.RIGHT_ARROW;
import java.util.Collection;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.allocation.model.ManyToOneAllocationEntry;
import org.fortiss.tooling.base.model.element.IModelElement;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
......@@ -50,7 +50,13 @@ public class ManyToOneAllocationEntryHandler
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(ManyToOneAllocationEntry element) {
return null;
}
}
......@@ -16,11 +16,11 @@
package org.fortiss.af3.allocation.ui.handler;
import static java.util.stream.Collectors.joining;
import static org.fortiss.af3.allocation.ui.AF3AllocationUIActivator.PLUGIN_ID;
import static org.fortiss.af3.allocation.utils.AllocationModelElementFactory.RIGHT_ARROW;
import java.util.Collection;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.allocation.model.OneToManyAllocationEntry;
import org.fortiss.tooling.base.model.element.IModelElement;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
......@@ -49,7 +49,13 @@ public class OneToManyAllocationEntryHandler
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(OneToManyAllocationEntry element) {
return null;
}
}
......@@ -15,9 +15,9 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.allocation.ui.handler;
import static org.fortiss.af3.allocation.ui.AF3AllocationUIActivator.PLUGIN_ID;
import static org.fortiss.af3.allocation.utils.AllocationModelElementFactory.RIGHT_ARROW;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.allocation.model.OneToOneAllocationEntry;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase;
......@@ -42,7 +42,13 @@ public class OneToOneAllocationEntryHandler
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(OneToOneAllocationEntry element) {
return null;
}
}
......@@ -125,16 +125,6 @@
<extension
point="org.fortiss.tooling.kernel.ui.modelEditorBinding">
<modelEditorBinding
binding="org.fortiss.af3.component.ui.editor.ComponentStructureEditorBinding">
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Component"></modelElementClass>
</modelEditorBinding>
<modelEditorBinding
binding="org.fortiss.af3.component.ui.editor.ComponentArchitectureEditorBinding">
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.ComponentArchitecture"></modelElementClass>
</modelEditorBinding>
<modelEditorBinding
binding="org.fortiss.af3.component.ui.editor.CodeSpecificationEditorBinding">
<modelElementClass
......
AF3ComponentUIActivator.java 64ae4377ecc4975ff42fc3dbe70754dd1775dc07 GREEN
AF3ComponentUIActivator.java e23ad4f3ca4df0befbcf8aad2bb54264e9a3bb29 GREEN
DefaultStyle.java c3b60c89b4917e9d8514812ee1884010d142b616 GREEN
......@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.fortiss.af3.component.ui.simulator.SimulationManager;
......@@ -61,6 +63,6 @@ public class AF3ComponentUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
}
ComponentControllerFactory.java 57c48af3d6c2d51a9040a8b754a8b19b73525777 GREEN
ComponentModelFactory.java 9141373b9498b8e947ef1ca8921128bdf66ec308 GREEN
ComponentStructureFXEditor.java 2d7c0f40fffb4cfb918b60da5de3d5fc0c067916 GREEN
ComponentStructureFXEditorBinding.java 82516f6e6855be6336116f0ea5563f461d163fc5 GREEN
ComponentStructureFXEditorBinding.java 19ca73be6a4ea974994d26db537329878748b20d GREEN
ComponentVisualFactory.java 5422167d12bb5553ed816363d41e0288fe481056 GREEN
......@@ -15,11 +15,11 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.editor.fx;
import org.eclipse.ui.IEditorPart;
import org.fortiss.af3.component.model.Component;
import org.fortiss.tooling.common.ui.javafx.lwfxef.controller.IControllerFactory;
import org.fortiss.tooling.common.ui.javafx.lwfxef.model.IModelFactory;
import org.fortiss.tooling.common.ui.javafx.lwfxef.visual.IVisualFactory;
import org.eclipse.ui.IEditorPart;
import org.fortiss.af3.component.model.Component;
import org.fortiss.tooling.kernel.ui.extension.base.ModelEditorBindingBase;
/**
......@@ -55,12 +55,12 @@ public final class ComponentStructureFXEditorBinding extends ModelEditorBindingB
/** {@inheritDoc} */
@Override
public String getLabel() {
return "Component Structure (FX)";
return "Component Structure";
}
/** {@inheritDoc} */
@Override
public int getPriority() {
return -100;
return 0;
}
}
ChannelHandler.java e7b7a3303855dae79de76dff5e287a7697bd739c GREEN
CodeSpecificationHandler.java 06ab8c446c186376d005ede4acf449d8abc81558 GREEN
ComponentArchitectureHandler.java 8c22890f49e635809b3e6fef0803cf2d694376da GREEN
ComponentHandler.java e3a5b53e14ccaaf3961d842515c30744994e2aa4 GREEN
ComponentSpecificationsContainerHandler.java fe56438006c3b144b2d62c33a2d1bdfde2fb2e6d GREEN
ChannelHandler.java 176f943f87a60c1f3fae0009d629301d62932c61 GREEN
CodeSpecificationHandler.java d4a4a95773d6fd37ffe5785dc0fa19616579cf87 GREEN
ComponentArchitectureHandler.java ca584540b3e7a754f24356f61d4d2744653efc19 GREEN
ComponentHandler.java aa8663371b053ce668b618e506a9314ac6aaa380 GREEN
ComponentSpecificationsContainerHandler.java f20fe325352656c74895dcd400733dec1babf7a3 GREEN
IComponentBehaviorDefinitionHandler.java f7598bc4994fcae7a77be29b51f68fc9fca9d284 GREEN
InputPortHandler.java b1450deb0989b17bded7473ad877a63f8e31a022 GREEN
LibraryComponentHandler.java 714a962035875423ab464bcdb279ba792446fc7b GREEN
LibraryComponentPackageHandler.java 7e92048040f2e8bbdca64378f4ac5971d4e43c21 GREEN
OutputPortHandler.java ba798aa0c56bd89aa74d1a7f5c0c4a860494fed8 GREEN
InputPortHandler.java 60baa521dd501d1e3cf2b864cdf5055207ab84e9 GREEN
LibraryComponentHandler.java 9b07c0d08bb2afc4defebc0a8666b265b2776e22 GREEN
LibraryComponentPackageHandler.java 04678ed7dd2f83967abade2f73e9014f40a20950 GREEN
OutputPortHandler.java 77ad3f443057c3107947d00165857fe49e8ed11a GREEN
......@@ -15,7 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.handler;
import org.eclipse.jface.resource.ImageDescriptor;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.PLUGIN_ID;
import org.fortiss.af3.component.model.Channel;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
......@@ -29,7 +30,13 @@ public class ChannelHandler extends NamedCommentedModelElementHandlerBase<Channe
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(Channel element) {
return null;
}
}
......@@ -15,9 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.handler;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.getImageDescriptor;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.PLUGIN_ID;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.component.model.behavior.code.CodeSpecification;
import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase;
......@@ -31,8 +30,14 @@ public class CodeSpecificationHandler extends ModelElementHandlerBase<CodeSpecif
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/codespec.gif");
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(CodeSpecification element) {
return "icons/codespec.gif";
}
/** {@inheritDoc} */
......
......@@ -15,13 +15,12 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.handler;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.getImageDescriptor;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.PLUGIN_ID;
import static org.fortiss.af3.component.ui.handler.ComponentHandler.getContentElements;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.component.model.ComponentArchitecture;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
......@@ -49,8 +48,14 @@ public class ComponentArchitectureHandler
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/componentarchitecture.gif");
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(ComponentArchitecture element) {
return "icons/componentarchitecture.gif";
}
/** {@inheritDoc} */
......
......@@ -15,13 +15,12 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.handler;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.getImageDescriptor;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.PLUGIN_ID;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.component.model.Component;
import org.fortiss.tooling.base.model.element.IHiddenSpecification;
import org.fortiss.tooling.base.model.element.IModelElement;
......@@ -40,8 +39,14 @@ public class ComponentHandler extends NamedCommentedModelElementHandlerBase<Comp
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/component.gif");
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(Component element) {
return "icons/component.gif";
}
/** {@inheritDoc} */
......
......@@ -15,13 +15,12 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.handler;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.getImageDescriptor;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.PLUGIN_ID;
import static org.fortiss.af3.component.ui.handler.ComponentHandler.getFilteredSpecifications;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.component.model.ComponentArchitecture;
import org.fortiss.af3.component.model.ComponentSpecificationsContainer;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
......@@ -37,8 +36,14 @@ public class ComponentSpecificationsContainerHandler
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/componentspecifications.gif");
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(ComponentSpecificationsContainer element) {
return "icons/componentspecifications.gif";
}
/** {@inheritDoc} */
......
......@@ -15,12 +15,11 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.handler;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.getImageDescriptor;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.PLUGIN_ID;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.component.model.InputPort;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
......@@ -35,8 +34,14 @@ public class InputPortHandler extends NamedCommentedModelElementHandlerBase<Inpu
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/entry_ipoint.png");
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(InputPort element) {
return "icons/entry_ipoint.png";
}
/** {@inheritDoc} */
......
......@@ -15,12 +15,11 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.handler;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.getImageDescriptor;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.PLUGIN_ID;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.component.model.LibraryComponent;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
......@@ -43,8 +42,14 @@ public class LibraryComponentHandler
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/component.gif");
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(LibraryComponent element) {
return "icons/component.gif";
}
/** {@inheritDoc} */
......
......@@ -15,13 +15,12 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.handler;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.getImageDescriptor;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.PLUGIN_ID;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.component.model.LibraryComponent;
import org.fortiss.af3.component.model.LibraryComponentPackage;
import org.fortiss.af3.expression.model.definitions.library.LibraryFunctionDefinition;
......@@ -39,8 +38,14 @@ public class LibraryComponentPackageHandler
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/package.gif");
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(LibraryComponentPackage element) {
return "icons/package.gif";
}
/** {@inheritDoc} */
......
......@@ -15,12 +15,11 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.handler;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.getImageDescriptor;
import static org.fortiss.af3.component.ui.AF3ComponentUIActivator.PLUGIN_ID;