Commit ebc797bf authored by Johannes Eder's avatar Johannes Eder

Merge branch 'master' into 3959

parents 3b70c655 5e8c466a
......@@ -10,61 +10,6 @@
provider="org.fortiss.af3.component.ui.prototypes.PrototypeProvider">
</modelPrototypeProvider>
</extension>
<extension
point="org.fortiss.tooling.kernel.modelConnectionCompositor">
<modelConnectionCompositor
modelConnectionCompositor="org.fortiss.af3.component.ui.compose.ComponentConnectionCompositor">
<source>
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Component">
</modelElementClass>
</source>
<target>
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Component">
</modelElementClass>
</target>
</modelConnectionCompositor>
<modelConnectionCompositor
modelConnectionCompositor="org.fortiss.af3.component.ui.compose.ComponentConnectionCompositor">
<source>
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Port">
</modelElementClass>
</source>
<target>
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Component">
</modelElementClass>
</target>
</modelConnectionCompositor>
<modelConnectionCompositor
modelConnectionCompositor="org.fortiss.af3.component.ui.compose.ComponentConnectionCompositor">
<source>
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Component">
</modelElementClass>
</source>
<target>
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Port">
</modelElementClass>
</target>
</modelConnectionCompositor>
<modelConnectionCompositor
modelConnectionCompositor="org.fortiss.af3.component.ui.compose.ComponentConnectionCompositor">
<source>
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Port">
</modelElementClass>
</source>
<target>
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Port">
</modelElementClass>
</target>
</modelConnectionCompositor>
</extension>
<extension
point="org.fortiss.tooling.kernel.ui.modelElementHandler">
<modelElementHandler
......
ComponentConnectionCompositor.java 1e0f1142c9ea412ecfbdabd769e688930225ad08 GREEN
ComponentControllerFactory.java 57c48af3d6c2d51a9040a8b754a8b19b73525777 GREEN
ComponentModelFactory.java 9141373b9498b8e947ef1ca8921128bdf66ec308 GREEN
ComponentStructureFXEditor.java 2d7c0f40fffb4cfb918b60da5de3d5fc0c067916 GREEN
ComponentStructureFXEditor.java c9016fd1b30ee8ed98cace186615c03ccb894abc 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;
import static javafx.scene.paint.Color.LIGHTGRAY;
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.InputPort;
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 javafx.geometry.Dimension2D;
......
......@@ -15,6 +15,13 @@
+--------------------------------------------------------------------------*/
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.IContentMVCBundle;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IDiagramAnchorageMVCBundle;
......@@ -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.ILinkVisual;
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.
......@@ -76,7 +76,7 @@ public final class ComponentVisualFactory implements IVisualFactory {
public ILinkVisual createLinkVisual(ILinkMVCBundle modelBundle) {
Object linkObj = modelBundle.getModel();
if(linkObj instanceof Channel) {
return new NamedLayoutedLineLinkVisual<>(modelBundle, Channel.class);
return new ChannelVisual(modelBundle);
}
return null;
}
......
ChannelVisual.java 3cdee0047f9ee3f9414488551d471b2e9f74ad67 GREEN
ContentComponentPortVisual.java 6e398120650316a0649173efd70c508efd3b5d09 GREEN
ContentComponentVisual.java 1343052af19542e4860043c0bcfb2b3e997d0422 GREEN
ContentComponentVisual.java 78fb7e6210f1d3fc37b869c18b11f37e73daec04 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 @@
+--------------------------------------------------------------------------*/
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.SUBSTRUCTURE_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.getFXImage;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IContentMVCBundle;
import org.fortiss.tooling.common.ui.javafx.lwfxef.visual.IContentVisual;
import java.util.Collection;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.component.ui.AF3ComponentUIActivator;
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.ImageView;
import javafx.scene.paint.Color;
import javafx.scene.paint.Paint;
......@@ -53,11 +65,44 @@ public final class ContentComponentVisual extends NamedLayoutedRectangularConten
private static final Color WEAKLY_CAUSAL_COLOR =
convertColor(WEAKLY_CAUSAL_COMPONENT_BACKGROUND);
/** Stores the last tooltip for uninstalling */
private Tooltip tooltip;
/** Constructor. */
public ContentComponentVisual(IContentMVCBundle mvcb) {
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} */
@Override
protected Paint getFillColor() {
......
ComponentSpecificationPropertySection.java fb5b6d82090f7ae063a8876b421529075d072939 GREEN
PortDataPropagation.java 9305d9fd7bb52398bdf227ddf7e1b54adac15808 GREEN
PortInitValueSection.java c25ad3fd1998f35c10a541caad3211f1333ae420 GREEN
PortSpecificationPropertySection.java 180ea52f0c50c4fd3d3ee2a7e59d22d0e3e05c75 RED
PortSpecificationPropertySection.java 051d483d1ff4300fc4920de0f2a76eb12ee29fcc RED
TypeLabelProvider.java 5b0fcced122681125f7df55469ea19b3685eb8bd GREEN
......@@ -16,7 +16,6 @@
package org.fortiss.af3.component.ui.properties;
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.expression.utils.ExpressionUtils.getAllVisibleTypes;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy;
......@@ -27,7 +26,6 @@ import java.util.List;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import org.conqat.lib.commons.collections.Pair;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.layout.GridDataFactory;
......@@ -236,9 +234,6 @@ public final class PortSpecificationPropertySection extends PropertySectionBase
IType selectedType = (IType)selection.getFirstElement();
if(!typesAreEqual(selectedType, spec.getType())) {
spec.setType(copy(selectedType));
for(Pair<Channel, Port> c : getPortsToPropagate(port, getPart())) {
c.getSecond().getPortSpecification().setType(copy(selectedType));
}
}
refreshBoundsControls();
......
component.ecore 6487189a39ecf7d7475e92431b3fa5b5e5dc813e GREEN
component.ecore a7528518daf70c14db0076c8311fa66f9a250458 GREEN
<?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"
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">
<details key="documentation" value="This is the root element of the component architecture."/>
</eAnnotations>
......@@ -45,7 +45,7 @@
<eParameters name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eOperations>
</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">
<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>
......
......@@ -309,4 +309,59 @@
</modelElementClass>
</modelElementCompositor>
</extension>
<extension
point="org.fortiss.tooling.kernel.modelConnectionCompositor">
<modelConnectionCompositor
modelConnectionCompositor="org.fortiss.af3.component.compose.ComponentConnectionCompositor">
<source>
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Component">
</modelElementClass>
</source>
<target>
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Component">
</modelElementClass>
</target>
</modelConnectionCompositor>
<modelConnectionCompositor
modelConnectionCompositor="org.fortiss.af3.component.compose.ComponentConnectionCompositor">
<source>
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Port">
</modelElementClass>
</source>
<target>
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Component">
</modelElementClass>
</target>
</modelConnectionCompositor>
<modelConnectionCompositor
modelConnectionCompositor="org.fortiss.af3.component.compose.ComponentConnectionCompositor">
<source>
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Component">
</modelElementClass>
</source>
<target>
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Port">
</modelElementClass>
</target>
</modelConnectionCompositor>
<modelConnectionCompositor
modelConnectionCompositor="org.fortiss.af3.component.compose.ComponentConnectionCompositor">
<source>
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Port">
</modelElementClass>
</source>
<target>
<modelElementClass
modelElementClass="org.fortiss.af3.component.model.Port">
</modelElementClass>
</target>
</modelConnectionCompositor>
</extension>
</plugin>
......@@ -3,5 +3,6 @@ BehaviorComponentCompositorBase.java fb4774202dcb216450b206c6bec17ae0786cf79c GR
ComponentArchitectureCompositor.java 166faf6111d527724d966a734b702650706a20ce GREEN
ComponentArchitectureFileProjectCompositor.java 1b972b98efb662fc0e51b9abd0389ccabf314445 GREEN
ComponentCompositor.java 17115be2194e0a0581bf350f0b0013c270381939 GREEN
ComponentConnectionCompositor.java 3f2f5f557061557792f82c5d93441fde14ed9c44 GREEN
LibraryComponentPackageCompositor.java 0e3dcd3e839e275dd7a23e83388d66ae0cd180df GREEN
LibraryCompositor.java e6a47934d3b561fdde707ca1abeb56b27bb78ea2 GREEN
......@@ -5,7 +5,7 @@ ComponentLibraryModelElementFactory.java b6c854e91d431fa3bc42fafdcf618a2040d23ab
ComponentLibraryUtils.java dd5fb918e37c98c885b59ea1a7915b8cdf149997 GREEN
ComponentModelElementFactory.java 7d73764f4ebc3a45bcd2833c68a06213109784a0 GREEN
ComponentProgramUtils.java 71faad6256159ee2d59843fcde83ac6995dff0fe GREEN
ComponentUtils.java d4aa3db08fafafaa937b976c85762f1009fa8dc7 GREEN
ComponentUtils.java e2ae1c22731f28dfcb6ddfde1518974d819e20f1 GREEN
GeneratorModelElementFactory.java 7fdb75341336fe579d4338a53c99df2f091c2b09 GREEN
IComponentArchitectureTransformation.java da70307771248f1d95e2fcd68e86fd68327f9df0 GREEN
SimulationUtils.java a28590d89ed92d862bf7b657b9dfc4784545e36a GREEN
......@@ -134,7 +134,6 @@ public class ComponentUtils {
/** Keeps only the behavioral specification of the component. */
public static void removeNonBehavior(Component comp) {
comp.getConstraintInstances().clear();
removeSpecs(comp, spec -> spec instanceof IComponentBehaviorDefinitionSpecification);
}
......
mira.ecore 6f65a501f30154def7b0805517153fb4f5516b9c RED
mira.ecore 145ac5dedefbfde9c9cf288eb10cf85e670e1ed9 GREEN
<?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"
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">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return AnalysisStaticImpl.getRequirementsList(this);"/>
......@@ -32,7 +32,7 @@
</eAnnotations>
</eOperations>
</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">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return RequirementStaticImpl.getAnalysis(this);"/>
......@@ -127,7 +127,7 @@
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="text" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</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">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return RequirementsPackageStaticImpl.getRequirementsList(this);"/>
......@@ -150,7 +150,7 @@
</eGenericType>
</eOperations>
</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">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return RequirementsContainerStaticImpl.getRequirementsPackagesList(this);"/>
......
ModeAutomatonControllerFactory.java 3e60fb8432aef914d0c63e8dfeb18b6ac57ddb6f GREEN
ModeAutomatonFXEditor.java 2d70d6f9ad225ebb767d20009f3d7f9f9dda2be2 GREEN
ModeAutomatonControllerFactory.java aa768159a389d90522b275e4481fb2db78669a25 GREEN
ModeAutomatonFXEditor.java 0e772da01045f7dc39c1005735c47e51d8b92a5b GREEN
ModeAutomatonFXEditorBinding.java d3503a20fc9fccc6a8805674bdabaa2135fd28c2 GREEN
ModeAutomatonModelFactory.java 90826e0ff88b73784e41cc71f473c11daa6bc36d GREEN
ModeAutomatonVisualFactory.java a9b82127b572bf9533474bcf22168e79922b2f16 GREEN
......
......@@ -15,22 +15,22 @@
+--------------------------------------------------------------------------*/
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.ModeAutomaton;
import org.fortiss.af3.mode.model.SwitchSegment;
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.CurvedLinkLayoutedDiagramAnchorangeController;
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.LayoutedDiagramAnchorageController;
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.
......@@ -41,33 +41,32 @@ public class ModeAutomatonControllerFactory implements IControllerFactory {
/** {@inheritDoc} */
@Override
public IController createContentController(IContentMVCBundle model) {
return new LayoutedEllipticResizableContentController<Mode>(model, Mode.class);
return new LayoutedEllipticResizableContentController<>(model, Mode.class);
}
/** {@inheritDoc} */
@Override
public IController createDiagramAnchorageController(IDiagramAnchorageMVCBundle modelBundle) {
return new LayoutedDiagramAnchorageController<SwitchSegmentConnector>(modelBundle,
return new CurvedLinkLayoutedDiagramAnchorangeController<>(modelBundle,
SwitchSegmentConnector.class);
}
/** {@inheritDoc} */
@Override
public IController createContentAnchorageController(IContentAnchorageMVCBundle modelBundle) {
return new CurvedLinkLayoutedContentAnchorangeController<SwitchSegmentConnector>(
modelBundle, SwitchSegmentConnector.class);
return new CurvedLinkLayoutedContentAnchorangeController<>(modelBundle,
SwitchSegmentConnector.class);
}
/** {@inheritDoc} */
@Override
public IController createLinkController(ILinkMVCBundle modelBundle) {
return new LayoutedCurveLinkBendPointController<SwitchSegment>(modelBundle,
SwitchSegment.class);
return new LayoutedCurveLinkBendPointController<>(modelBundle, SwitchSegment.class);
}
/** {@inheritDoc} */
@Override
public IController createDiagramController(IDiagramMVCBundle diagramBundle) {
return new EObjectDiagramController<Mode>(diagramBundle, Mode.class);
return new EObjectDiagramController<>(diagramBundle, Mode.class);
}
}
......@@ -18,12 +18,12 @@ package org.fortiss.af3.mode.ui.editor.fx;
import static javafx.scene.paint.Color.LIGHTGRAY;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.tooling.common.ui.javafx.lwfxef.DiagramViewerFeatures;
import org.fortiss.tooling.common.ui.javafx.lwfxef.DiagramViewerFeatures.IndicatorType;
import org.fortiss.af3.mode.model.Mode;
import org.fortiss.af3.mode.model.ModeAutomaton;
import org.fortiss.af3.mode.model.SwitchSegment;
import org.fortiss.af3.mode.model.SwitchSegmentConnector;
import org.fortiss.tooling.common.ui.javafx.lwfxef.DiagramViewerFeatures;
import org.fortiss.tooling.common.ui.javafx.lwfxef.DiagramViewerFeatures.IndicatorType;
import org.fortiss.tooling.kernel.ui.extension.base.LWFXEFEditorBase;
/**
......
ModeVisual.java 68adf9e5fa791a8185b182b8232b4e415c440b56 GREEN
SwitchSegmentContentConnectorVisual.java 20eeb1739a1fbc5449253463916b2fcfdd5b51d5 GREEN
SwitchSegmentContentConnectorVisual.java e32b6ad95ea076aea4e37c7900ab2bfa047cb7b4 GREEN
SwitchSegmentDiagramConnectorVisual.java 501de4255c1e66249eb3d9a023b654d532dbad68 GREEN
......@@ -18,12 +18,12 @@ package org.fortiss.af3.mode.ui.editor.fx.visual;
import static javafx.scene.paint.Color.BLACK;
import static javafx.scene.paint.Color.WHITE;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IContentAnchorageMVCBundle;
import org.fortiss.tooling.common.ui.javafx.lwfxef.visual.IContentVisual;
import org.fortiss.af3.mode.model.Mode;
import org.fortiss.af3.mode.model.SwitchSegmentConnector;
import org.fortiss.af3.state.model.TransitionSegmentEntryConnector;
import org.fortiss.af3.mode.model.SwitchSegmentEntryConnector;
import org.fortiss.tooling.base.ui.editor.fx.visual.NamedLayoutedCircularAnchorageContentVisual;
import org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.IContentAnchorageMVCBundle;
import org.fortiss.tooling.common.ui.javafx.lwfxef.visual.IContentVisual;
import javafx.scene.paint.Paint;
......@@ -44,7 +44,7 @@ public class SwitchSegmentContentConnectorVisual
@Override
protected Paint getFillColor() {
SwitchSegmentConnector c = getModelElement();
if(c instanceof TransitionSegmentEntryConnector) {
if(c instanceof SwitchSegmentEntryConnector) {
return WHITE;
}