Commit a405d7dd authored by Liana Soima's avatar Liana Soima
Browse files

Merge branch 'master' of https://git.fortiss.org/af3/af3.git into 3976

parents d64b0d1f 38a6f48a
ComponentControllerFactory.java 57c48af3d6c2d51a9040a8b754a8b19b73525777 GREEN ComponentControllerFactory.java 57c48af3d6c2d51a9040a8b754a8b19b73525777 GREEN
ComponentModelFactory.java 9141373b9498b8e947ef1ca8921128bdf66ec308 GREEN ComponentModelFactory.java 9141373b9498b8e947ef1ca8921128bdf66ec308 GREEN
ComponentStructureFXEditor.java 2d7c0f40fffb4cfb918b60da5de3d5fc0c067916 GREEN ComponentStructureFXEditor.java c9016fd1b30ee8ed98cace186615c03ccb894abc GREEN
ComponentStructureFXEditorBinding.java 19ca73be6a4ea974994d26db537329878748b20d GREEN ComponentStructureFXEditorBinding.java 19ca73be6a4ea974994d26db537329878748b20d GREEN
ComponentVisualFactory.java 5422167d12bb5553ed816363d41e0288fe481056 GREEN ComponentVisualFactory.java c784b5e87c08abc9a3e201c11bc08b93fce20f6a GREEN
...@@ -18,10 +18,10 @@ package org.fortiss.af3.component.ui.editor.fx; ...@@ -18,10 +18,10 @@ package org.fortiss.af3.component.ui.editor.fx;
import static javafx.scene.paint.Color.LIGHTGRAY; import static javafx.scene.paint.Color.LIGHTGRAY;
import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EObject;
import org.fortiss.tooling.common.ui.javafx.lwfxef.DiagramViewerFeatures;
import org.fortiss.af3.component.model.Component; import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.component.model.InputPort; import org.fortiss.af3.component.model.InputPort;
import org.fortiss.af3.component.model.OutputPort; import org.fortiss.af3.component.model.OutputPort;
import org.fortiss.tooling.common.ui.javafx.lwfxef.DiagramViewerFeatures;
import org.fortiss.tooling.kernel.ui.extension.base.LWFXEFEditorBase; import org.fortiss.tooling.kernel.ui.extension.base.LWFXEFEditorBase;
import javafx.geometry.Dimension2D; import javafx.geometry.Dimension2D;
......
...@@ -15,6 +15,13 @@ ...@@ -15,6 +15,13 @@
+--------------------------------------------------------------------------*/ +--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.editor.fx; package org.fortiss.af3.component.ui.editor.fx;
import org.fortiss.af3.component.model.Channel;
import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.component.model.Port;
import org.fortiss.af3.component.ui.editor.fx.visual.ChannelVisual;
import org.fortiss.af3.component.ui.editor.fx.visual.ContentComponentPortVisual;
import org.fortiss.af3.component.ui.editor.fx.visual.ContentComponentVisual;
import org.fortiss.af3.component.ui.editor.fx.visual.DiagramComponentPortVisual;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IContentAnchorageMVCBundle; import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IContentAnchorageMVCBundle;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IContentMVCBundle; import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IContentMVCBundle;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IDiagramAnchorageMVCBundle; import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IDiagramAnchorageMVCBundle;
...@@ -24,13 +31,6 @@ import org.fortiss.tooling.common.ui.javafx.lwfxef.visual.IContentVisual; ...@@ -24,13 +31,6 @@ import org.fortiss.tooling.common.ui.javafx.lwfxef.visual.IContentVisual;
import org.fortiss.tooling.common.ui.javafx.lwfxef.visual.IDiagramAnchorageVisual; import org.fortiss.tooling.common.ui.javafx.lwfxef.visual.IDiagramAnchorageVisual;
import org.fortiss.tooling.common.ui.javafx.lwfxef.visual.ILinkVisual; import org.fortiss.tooling.common.ui.javafx.lwfxef.visual.ILinkVisual;
import org.fortiss.tooling.common.ui.javafx.lwfxef.visual.IVisualFactory; import org.fortiss.tooling.common.ui.javafx.lwfxef.visual.IVisualFactory;
import org.fortiss.af3.component.model.Channel;
import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.component.model.Port;
import org.fortiss.af3.component.ui.editor.fx.visual.ContentComponentPortVisual;
import org.fortiss.af3.component.ui.editor.fx.visual.ContentComponentVisual;
import org.fortiss.af3.component.ui.editor.fx.visual.DiagramComponentPortVisual;
import org.fortiss.tooling.base.ui.editor.fx.visual.NamedLayoutedLineLinkVisual;
/** /**
* The implementation of the {@link IVisualFactory} for the component editor. * The implementation of the {@link IVisualFactory} for the component editor.
...@@ -76,7 +76,7 @@ public final class ComponentVisualFactory implements IVisualFactory { ...@@ -76,7 +76,7 @@ public final class ComponentVisualFactory implements IVisualFactory {
public ILinkVisual createLinkVisual(ILinkMVCBundle modelBundle) { public ILinkVisual createLinkVisual(ILinkMVCBundle modelBundle) {
Object linkObj = modelBundle.getModel(); Object linkObj = modelBundle.getModel();
if(linkObj instanceof Channel) { if(linkObj instanceof Channel) {
return new NamedLayoutedLineLinkVisual<>(modelBundle, Channel.class); return new ChannelVisual(modelBundle);
} }
return null; return null;
} }
......
ChannelVisual.java 3cdee0047f9ee3f9414488551d471b2e9f74ad67 GREEN
ContentComponentPortVisual.java 6e398120650316a0649173efd70c508efd3b5d09 GREEN ContentComponentPortVisual.java 6e398120650316a0649173efd70c508efd3b5d09 GREEN
ContentComponentVisual.java 1343052af19542e4860043c0bcfb2b3e997d0422 GREEN ContentComponentVisual.java 78fb7e6210f1d3fc37b869c18b11f37e73daec04 GREEN
DiagramComponentPortVisual.java 918915c5801064ebfb2bb6028f4e588256b1aefe GREEN DiagramComponentPortVisual.java 918915c5801064ebfb2bb6028f4e588256b1aefe GREEN
/*-------------------------------------------------------------------------+
| Copyright 2020 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.editor.fx.visual;
import static javafx.scene.control.Tooltip.install;
import static org.fortiss.tooling.common.ui.javafx.util.GraphicUtils.getFXImage;
import java.util.Collection;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.component.model.Channel;
import org.fortiss.tooling.base.ui.editor.fx.visual.NamedLayoutedLineLinkVisual;
import org.fortiss.tooling.common.ui.javafx.lwfxef.DiagramCoordinate;
import org.fortiss.tooling.common.ui.javafx.lwfxef.DiagramLayers;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.ILinkMVCBundle;
import org.fortiss.tooling.common.ui.javafx.lwfxef.visual.IVisual;
import org.fortiss.tooling.kernel.extension.data.IConstraintViolation;
import org.fortiss.tooling.kernel.extension.data.IConstraintViolation.ESeverity;
import org.fortiss.tooling.kernel.ui.ToolingKernelUIActivator;
import org.fortiss.tooling.kernel.ui.service.IMarkerService;
import javafx.scene.control.Label;
import javafx.scene.control.Tooltip;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
/**
* {@link IVisual} for {@link Channel}.
*
* @author hoelzl
*/
public class ChannelVisual extends NamedLayoutedLineLinkVisual<Channel> {
/** The label to show errors/warnings. */
private Label errorWarning = null;
/** Constructor. */
public ChannelVisual(ILinkMVCBundle mvcb) {
super(mvcb, Channel.class);
}
/** {@inheritDoc} */
@Override
public void updateNodes(DiagramLayers layers) {
super.updateNodes(layers);
if(errorWarning != null) {
layers.getVisualFeedbackLayer().remove(errorWarning);
errorWarning = null;
}
IMarkerService markerService = IMarkerService.getInstance();
Channel modelElement = getModelElement();
ESeverity highest = markerService.getHighestViolationSeverity(modelElement);
if(highest == null) {
return;
}
if(highest != ESeverity.ERROR && highest != ESeverity.WARNING) {
return;
}
Collection<IConstraintViolation<? extends EObject>> violations =
markerService.getAllViolationsWithSeverity(highest);
if(violations.isEmpty()) { // sanity check: never true, since highest != null
return;
}
String imgFile = (highest == ESeverity.WARNING) ? "warning.png" : "error.png";
Image img = getFXImage(ToolingKernelUIActivator.PLUGIN_ID, "icons/" + imgFile);
errorWarning = new Label("");
errorWarning.setGraphic(new ImageView(img));
DiagramCoordinate sp = getStartAnchorPoint();
DiagramCoordinate ep = getEndAnchorPoint();
if(getNumberOfBendPoints() > 0) {
ep = getBendPointLocation(0);
}
double x = sp.getX() + (ep.getX() - sp.getX()) / 2;
double y = sp.getY() + (ep.getY() - sp.getY()) / 2 - img.getHeight();
errorWarning.setTranslateX(x);
errorWarning.setTranslateY(y);
layers.getVisualFeedbackLayer().add(errorWarning, getMVCBundle());
// unset mouse listeners to make tooltip work
errorWarning.setOnMouseEntered(null);
errorWarning.setOnMouseExited(null);
Tooltip tooltip = new Tooltip(violations.iterator().next().getExplanation());
tooltip.setGraphic(new ImageView(img));
install(errorWarning, tooltip);
}
}
...@@ -15,19 +15,31 @@ ...@@ -15,19 +15,31 @@
+--------------------------------------------------------------------------*/ +--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.editor.fx.visual; package org.fortiss.af3.component.ui.editor.fx.visual;
import static javafx.scene.control.Tooltip.install;
import static javafx.scene.control.Tooltip.uninstall;
import static org.fortiss.af3.component.ui.DefaultStyle.STRONGLY_CAUSAL_COMPONENT_BACKGROUND; import static org.fortiss.af3.component.ui.DefaultStyle.STRONGLY_CAUSAL_COMPONENT_BACKGROUND;
import static org.fortiss.af3.component.ui.DefaultStyle.SUBSTRUCTURE_COMPONENT_BACKGROUND; import static org.fortiss.af3.component.ui.DefaultStyle.SUBSTRUCTURE_COMPONENT_BACKGROUND;
import static org.fortiss.af3.component.ui.DefaultStyle.WEAKLY_CAUSAL_COMPONENT_BACKGROUND; import static org.fortiss.af3.component.ui.DefaultStyle.WEAKLY_CAUSAL_COMPONENT_BACKGROUND;
import static org.fortiss.tooling.common.ui.javafx.util.GraphicUtils.convertColor; import static org.fortiss.tooling.common.ui.javafx.util.GraphicUtils.convertColor;
import static org.fortiss.tooling.common.ui.javafx.util.GraphicUtils.getFXImage; import static org.fortiss.tooling.common.ui.javafx.util.GraphicUtils.getFXImage;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IContentMVCBundle; import java.util.Collection;
import org.fortiss.tooling.common.ui.javafx.lwfxef.visual.IContentVisual;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.component.model.Component; import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.component.ui.AF3ComponentUIActivator; import org.fortiss.af3.component.ui.AF3ComponentUIActivator;
import org.fortiss.tooling.base.ui.editor.fx.visual.NamedLayoutedRectangularContentVisual; import org.fortiss.tooling.base.ui.editor.fx.visual.NamedLayoutedRectangularContentVisual;
import org.fortiss.tooling.common.ui.javafx.lwfxef.DiagramLayers;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IContentMVCBundle;
import org.fortiss.tooling.common.ui.javafx.lwfxef.visual.IContentVisual;
import org.fortiss.tooling.kernel.extension.data.IConstraintViolation;
import org.fortiss.tooling.kernel.extension.data.IConstraintViolation.ESeverity;
import org.fortiss.tooling.kernel.ui.ToolingKernelUIActivator;
import org.fortiss.tooling.kernel.ui.service.IMarkerService;
import javafx.scene.control.Tooltip;
import javafx.scene.image.Image; import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
import javafx.scene.paint.Paint; import javafx.scene.paint.Paint;
...@@ -53,11 +65,44 @@ public final class ContentComponentVisual extends NamedLayoutedRectangularConten ...@@ -53,11 +65,44 @@ public final class ContentComponentVisual extends NamedLayoutedRectangularConten
private static final Color WEAKLY_CAUSAL_COLOR = private static final Color WEAKLY_CAUSAL_COLOR =
convertColor(WEAKLY_CAUSAL_COMPONENT_BACKGROUND); convertColor(WEAKLY_CAUSAL_COMPONENT_BACKGROUND);
/** Stores the last tooltip for uninstalling */
private Tooltip tooltip;
/** Constructor. */ /** Constructor. */
public ContentComponentVisual(IContentMVCBundle mvcb) { public ContentComponentVisual(IContentMVCBundle mvcb) {
super(mvcb, Component.class); super(mvcb, Component.class);
} }
/** {@inheritDoc} */
@Override
public void updateNodes(DiagramLayers layers) {
super.updateNodes(layers);
IMarkerService markerService = IMarkerService.getInstance();
ESeverity highest = markerService.getHighestViolationSeverity(getModelElement());
if(tooltip != null) {
uninstall(getHitAreaRectangleShape(), tooltip);
}
if(highest == null) {
return;
}
if(highest == ESeverity.WARNING || highest == ESeverity.ERROR) {
Collection<IConstraintViolation<? extends EObject>> violations =
markerService.getAllViolationsWithSeverity(highest);
if(violations.isEmpty()) { // sanity check: never true, since highest != null
return;
}
String imgFile = (highest == ESeverity.WARNING) ? "warning.png" : "error.png";
Image img = getFXImage(ToolingKernelUIActivator.PLUGIN_ID, "icons/" + imgFile);
icon.setImage(img);
String explanation = violations.iterator().next().getExplanation();
tooltip = new Tooltip(explanation);
tooltip.setGraphic(new ImageView(img));
install(getHitAreaRectangleShape(), tooltip);
}
}
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
protected Paint getFillColor() { protected Paint getFillColor() {
......
ComponentSpecificationPropertySection.java fb5b6d82090f7ae063a8876b421529075d072939 GREEN ComponentSpecificationPropertySection.java fb5b6d82090f7ae063a8876b421529075d072939 GREEN
PortDataPropagation.java 9305d9fd7bb52398bdf227ddf7e1b54adac15808 GREEN PortDataPropagation.java 9305d9fd7bb52398bdf227ddf7e1b54adac15808 GREEN
PortInitValueSection.java c25ad3fd1998f35c10a541caad3211f1333ae420 GREEN PortInitValueSection.java c25ad3fd1998f35c10a541caad3211f1333ae420 GREEN
PortSpecificationPropertySection.java 180ea52f0c50c4fd3d3ee2a7e59d22d0e3e05c75 RED PortSpecificationPropertySection.java 051d483d1ff4300fc4920de0f2a76eb12ee29fcc RED
TypeLabelProvider.java 5b0fcced122681125f7df55469ea19b3685eb8bd GREEN TypeLabelProvider.java 5b0fcced122681125f7df55469ea19b3685eb8bd GREEN
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.fortiss.af3.component.ui.properties; package org.fortiss.af3.component.ui.properties;
import static org.fortiss.af3.component.AF3ComponentActivator.getDefault; import static org.fortiss.af3.component.AF3ComponentActivator.getDefault;
import static org.fortiss.af3.component.ui.properties.PortDataPropagation.getPortsToPropagate;
import static org.fortiss.af3.component.utils.ComponentArchitectureUtils.hasReadOnlyBehaviorSpecification; import static org.fortiss.af3.component.utils.ComponentArchitectureUtils.hasReadOnlyBehaviorSpecification;
import static org.fortiss.af3.expression.utils.ExpressionUtils.getAllVisibleTypes; import static org.fortiss.af3.expression.utils.ExpressionUtils.getAllVisibleTypes;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy; import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy;
...@@ -27,7 +26,6 @@ import java.util.List; ...@@ -27,7 +26,6 @@ import java.util.List;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.conqat.lib.commons.collections.Pair;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.layout.GridDataFactory;
...@@ -236,9 +234,6 @@ public final class PortSpecificationPropertySection extends PropertySectionBase ...@@ -236,9 +234,6 @@ public final class PortSpecificationPropertySection extends PropertySectionBase
IType selectedType = (IType)selection.getFirstElement(); IType selectedType = (IType)selection.getFirstElement();
if(!typesAreEqual(selectedType, spec.getType())) { if(!typesAreEqual(selectedType, spec.getType())) {
spec.setType(copy(selectedType)); spec.setType(copy(selectedType));
for(Pair<Channel, Port> c : getPortsToPropagate(port, getPart())) {
c.getSecond().getPortSpecification().setType(copy(selectedType));
}
} }
refreshBoundsControls(); refreshBoundsControls();
......
component.ecore 6487189a39ecf7d7475e92431b3fa5b5e5dc813e GREEN component.ecore a7528518daf70c14db0076c8311fa66f9a250458 GREEN
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model" nsURI="http://www.fortiss.org/af3/component" nsPrefix="org-fortiss-af3-component"> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model" nsURI="http://www.fortiss.org/af3/component" nsPrefix="org-fortiss-af3-component">
<eClassifiers xsi:type="ecore:EClass" name="ComponentArchitecture" eSuperTypes="platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//IProjectRootElement platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IHierarchicElement platform:/resource/org.fortiss.af3.project/model/project.ecore#//typesystem/IFunctionScope platform:/resource/org.fortiss.af3.project/model/project.ecore#//typesystem/ITypeScope platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//constraints/IConstrained"> <eClassifiers xsi:type="ecore:EClass" name="ComponentArchitecture" eSuperTypes="platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//IProjectRootElement platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IHierarchicElement platform:/resource/org.fortiss.af3.project/model/project.ecore#//typesystem/IFunctionScope platform:/resource/org.fortiss.af3.project/model/project.ecore#//typesystem/ITypeScope">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="This is the root element of the component architecture."/> <details key="documentation" value="This is the root element of the component architecture."/>
</eAnnotations> </eAnnotations>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<eParameters name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> <eParameters name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eOperations> </eOperations>
</eClassifiers> </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Component" eSuperTypes="platform:/resource/org.fortiss.tooling.base/model/base.ecore#//base/HierarchicElementBase platform:/resource/org.fortiss.af3.project/model/project.ecore#//typesystem/IVariableScope platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//ISpeciallyCopyiable platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//constraints/IConstrained platform:/resource/org.fortiss.af3.project/model/project.ecore#//ITraceableArtifact"> <eClassifiers xsi:type="ecore:EClass" name="Component" eSuperTypes="platform:/resource/org.fortiss.tooling.base/model/base.ecore#//base/HierarchicElementBase platform:/resource/org.fortiss.af3.project/model/project.ecore#//typesystem/IVariableScope platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//ISpeciallyCopyiable platform:/resource/org.fortiss.af3.project/model/project.ecore#//ITraceableArtifact">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="This is the main concept to encapsulate behaviors. A component can be atomic - implementing a behavior by means of code specification or state automaton specification, or hierarchical - containing subcomponents with behaviors. "/> <details key="documentation" value="This is the main concept to encapsulate behaviors. A component can be atomic - implementing a behavior by means of code specification or state automaton specification, or hierarchical - containing subcomponents with behaviors. "/>
</eAnnotations> </eAnnotations>
......
...@@ -5,7 +5,7 @@ ComponentLibraryModelElementFactory.java b6c854e91d431fa3bc42fafdcf618a2040d23ab ...@@ -5,7 +5,7 @@ ComponentLibraryModelElementFactory.java b6c854e91d431fa3bc42fafdcf618a2040d23ab
ComponentLibraryUtils.java dd5fb918e37c98c885b59ea1a7915b8cdf149997 GREEN ComponentLibraryUtils.java dd5fb918e37c98c885b59ea1a7915b8cdf149997 GREEN
ComponentModelElementFactory.java 7d73764f4ebc3a45bcd2833c68a06213109784a0 GREEN ComponentModelElementFactory.java 7d73764f4ebc3a45bcd2833c68a06213109784a0 GREEN
ComponentProgramUtils.java 71faad6256159ee2d59843fcde83ac6995dff0fe GREEN ComponentProgramUtils.java 71faad6256159ee2d59843fcde83ac6995dff0fe GREEN
ComponentUtils.java d4aa3db08fafafaa937b976c85762f1009fa8dc7 GREEN ComponentUtils.java e2ae1c22731f28dfcb6ddfde1518974d819e20f1 GREEN
GeneratorModelElementFactory.java 7fdb75341336fe579d4338a53c99df2f091c2b09 GREEN GeneratorModelElementFactory.java 7fdb75341336fe579d4338a53c99df2f091c2b09 GREEN
IComponentArchitectureTransformation.java da70307771248f1d95e2fcd68e86fd68327f9df0 GREEN IComponentArchitectureTransformation.java da70307771248f1d95e2fcd68e86fd68327f9df0 GREEN
SimulationUtils.java a28590d89ed92d862bf7b657b9dfc4784545e36a GREEN SimulationUtils.java a28590d89ed92d862bf7b657b9dfc4784545e36a GREEN
...@@ -134,7 +134,6 @@ public class ComponentUtils { ...@@ -134,7 +134,6 @@ public class ComponentUtils {
/** Keeps only the behavioral specification of the component. */ /** Keeps only the behavioral specification of the component. */
public static void removeNonBehavior(Component comp) { public static void removeNonBehavior(Component comp) {
comp.getConstraintInstances().clear();
removeSpecs(comp, spec -> spec instanceof IComponentBehaviorDefinitionSpecification); removeSpecs(comp, spec -> spec instanceof IComponentBehaviorDefinitionSpecification);
} }
......
mira.ecore 6f65a501f30154def7b0805517153fb4f5516b9c RED mira.ecore 145ac5dedefbfde9c9cf288eb10cf85e670e1ed9 GREEN
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model" nsURI="http://www.fortiss.org/af3/mira" nsPrefix="org-fortiss-af3-mira"> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model" nsURI="http://www.fortiss.org/af3/mira" nsPrefix="org-fortiss-af3-mira">
<eClassifiers xsi:type="ecore:EClass" name="Analysis" eSuperTypes="platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//INamedCommentedElement platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//IProjectRootElement platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IHierarchicElement platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//constraints/IConstrained"> <eClassifiers xsi:type="ecore:EClass" name="Analysis" eSuperTypes="platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//INamedCommentedElement platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//IProjectRootElement platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IHierarchicElement">
<eOperations name="getRequirementsList"> <eOperations name="getRequirementsList">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return AnalysisStaticImpl.getRequirementsList(this);"/> <details key="body" value="return AnalysisStaticImpl.getRequirementsList(this);"/>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</eAnnotations> </eAnnotations>
</eOperations> </eOperations>
</eClassifiers> </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Requirement" eSuperTypes="platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//INamedCommentedElement platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IHierarchicElement #//IImageContainer platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//constraints/IConstrained"> <eClassifiers xsi:type="ecore:EClass" name="Requirement" eSuperTypes="platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//INamedCommentedElement platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IHierarchicElement #//IImageContainer">
<eOperations name="getAnalysis" eType="#//Analysis"> <eOperations name="getAnalysis" eType="#//Analysis">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return RequirementStaticImpl.getAnalysis(this);"/> <details key="body" value="return RequirementStaticImpl.getAnalysis(this);"/>
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
</eOperations> </eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="text" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="text" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers> </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="RequirementsPackage" eSuperTypes="platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//INamedCommentedElement platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IHierarchicElement platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//constraints/IConstrained"> <eClassifiers xsi:type="ecore:EClass" name="RequirementsPackage" eSuperTypes="platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//INamedCommentedElement platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IHierarchicElement">
<eOperations name="getRequirementsList"> <eOperations name="getRequirementsList">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return RequirementsPackageStaticImpl.getRequirementsList(this);"/> <details key="body" value="return RequirementsPackageStaticImpl.getRequirementsList(this);"/>
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
</eGenericType> </eGenericType>
</eOperations> </eOperations>
</eClassifiers> </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="RequirementsContainer" eSuperTypes="platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//INamedCommentedElement platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IHierarchicElement platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//constraints/IConstrained"> <eClassifiers xsi:type="ecore:EClass" name="RequirementsContainer" eSuperTypes="platform:/resource/org.fortiss.tooling.kernel/model/kernel.ecore#//INamedCommentedElement platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IHierarchicElement">
<eOperations name="getRequirementsPackagesList"> <eOperations name="getRequirementsPackagesList">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return RequirementsContainerStaticImpl.getRequirementsPackagesList(this);"/> <details key="body" value="return RequirementsContainerStaticImpl.getRequirementsPackagesList(this);"/>
......
...@@ -38,6 +38,12 @@ ...@@ -38,6 +38,12 @@
<modelElementCompositor compositor="org.fortiss.af3.mira.compose.GlossaryCompositor"> <modelElementCompositor compositor="org.fortiss.af3.mira.compose.GlossaryCompositor">
<modelElementClass modelElementClass="org.fortiss.af3.mira.model.glossary.Glossary"/> <modelElementClass modelElementClass="org.fortiss.af3.mira.model.glossary.Glossary"/>
</modelElementCompositor> </modelElementCompositor>
<modelElementCompositor
compositor="org.fortiss.af3.mira.compose.AnalysisFileProjectCompositor">
<modelElementClass
modelElementClass="org.fortiss.af3.project.model.FileProject">
</modelElementClass>
</modelElementCompositor>
</extension> </extension>
<extension point="org.fortiss.tooling.kernel.modelElementConstraintChecker"> <extension point="org.fortiss.tooling.kernel.modelElementConstraintChecker">
......
ModeAutomatonControllerFactory.java 3e60fb8432aef914d0c63e8dfeb18b6ac57ddb6f GREEN ModeAutomatonControllerFactory.java aa768159a389d90522b275e4481fb2db78669a25 GREEN
ModeAutomatonFXEditor.java 2d70d6f9ad225ebb767d20009f3d7f9f9dda2be2 GREEN ModeAutomatonFXEditor.java 0e772da01045f7dc39c1005735c47e51d8b92a5b GREEN
ModeAutomatonFXEditorBinding.java d3503a20fc9fccc6a8805674bdabaa2135fd28c2 GREEN ModeAutomatonFXEditorBinding.java d3503a20fc9fccc6a8805674bdabaa2135fd28c2 GREEN
ModeAutomatonModelFactory.java 90826e0ff88b73784e41cc71f473c11daa6bc36d GREEN ModeAutomatonModelFactory.java 90826e0ff88b73784e41cc71f473c11daa6bc36d GREEN
ModeAutomatonVisualFactory.java a9b82127b572bf9533474bcf22168e79922b2f16 GREEN ModeAutomatonVisualFactory.java a9b82127b572bf9533474bcf22168e79922b2f16 GREEN
......
...@@ -15,22 +15,22 @@ ...@@ -15,22 +15,22 @@
+--------------------------------------------------------------------------*/ +--------------------------------------------------------------------------*/
package org.fortiss.af3.mode.ui.editor.fx; package org.fortiss.af3.mode.ui.editor.fx;
import org.fortiss.tooling.common.ui.javafx.lwfxef.controller.IController;
import org.fortiss.tooling.common.ui.javafx.lwfxef.controller.IControllerFactory;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IContentAnchorageMVCBundle;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IContentMVCBundle;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IDiagramAnchorageMVCBundle;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IDiagramMVCBundle;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.ILinkMVCBundle;
import org.fortiss.af3.mode.model.Mode; import org.fortiss.af3.mode.model.Mode;
import org.fortiss.af3.mode.model.ModeAutomaton; import org.fortiss.af3.mode.model.ModeAutomaton;
import org.fortiss.af3.mode.model.SwitchSegment; import org.fortiss.af3.mode.model.SwitchSegment;
import org.fortiss.af3.mode.model.SwitchSegmentConnector; import org.fortiss.af3.mode.model.SwitchSegmentConnector;
import org.fortiss.tooling.base.ui.editor.fx.controller.CurvedLinkLayoutedContentAnchorangeController; import org.fortiss.tooling.base.ui.editor.fx.controller.CurvedLinkLayoutedContentAnchorangeController;
import org.fortiss.tooling.base.ui.editor.fx.controller.CurvedLinkLayoutedDiagramAnchorangeController;
import org.fortiss.tooling.base.ui.editor.fx.controller.EObjectDiagramController; import org.fortiss.tooling.base.ui.editor.fx.controller.EObjectDiagramController;
import org.fortiss.tooling.base.ui.editor.fx.controller.LayoutedCurveLinkBendPointController; import org.fortiss.tooling.base.ui.editor.fx.controller.LayoutedCurveLinkBendPointController;
import org.fortiss.tooling.base.ui.editor.fx.controller.LayoutedDiagramAnchorageController;
import org.fortiss.tooling.base.ui.editor.fx.controller.LayoutedEllipticResizableContentController; import org.fortiss.tooling.base.ui.editor.fx.controller.LayoutedEllipticResizableContentController;
import org.fortiss.tooling.common.ui.javafx.lwfxef.controller.IController;
import org.fortiss.tooling.common.ui.javafx.lwfxef.controller.IControllerFactory;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IContentAnchorageMVCBundle;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IContentMVCBundle;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IDiagramAnchorageMVCBundle;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IDiagramMVCBundle;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.ILinkMVCBundle;
/** /**
* Implementation of the {@link IControllerFactory} for the {@link ModeAutomaton} editor. * Implementation of the {@link IControllerFactory} for the {@link ModeAutomaton} editor.
...@@ -41,33 +41,32 @@ public class ModeAutomatonControllerFactory implements IControllerFactory { ...@@ -41,33 +41,32 @@ public class ModeAutomatonControllerFactory implements IControllerFactory {
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public IController createContentController(IContentMVCBundle model) { public IController createContentController(IContentMVCBundle model) {
return new LayoutedEllipticResizableContentController<Mode>(model, Mode.class); return new LayoutedEllipticResizableContentController<>(model, Mode.class);
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public IController createDiagramAnchorageController(IDiagramAnchorageMVCBundle modelBundle) { public IController createDiagramAnchorageController(IDiagramAnchorageMVCBundle modelBundle) {
return new LayoutedDiagramAnchorageController<SwitchSegmentConnector>(modelBundle, return new CurvedLinkLayoutedDiagramAnchorangeController<>(modelBundle,
SwitchSegmentConnector.class); SwitchSegmentConnector.class);
} }