Commit ebc797bf authored by Johannes Eder's avatar Johannes Eder
Browse files

Merge branch 'master' into 3959

parents 3b70c655 5e8c466a
...@@ -10,61 +10,6 @@ ...@@ -10,61 +10,6 @@
provider="org.fortiss.af3.component.ui.prototypes.PrototypeProvider"> provider="org.fortiss.af3.component.ui.prototypes.PrototypeProvider">
</modelPrototypeProvider> </modelPrototypeProvider>
</extension> </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 <extension
point="org.fortiss.tooling.kernel.ui.modelElementHandler"> point="org.fortiss.tooling.kernel.ui.modelElementHandler">
<modelElementHandler <modelElementHandler
......
ComponentConnectionCompositor.java 1e0f1142c9ea412ecfbdabd769e688930225ad08 GREEN
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>
......
...@@ -309,4 +309,59 @@ ...@@ -309,4 +309,59 @@
</modelElementClass> </modelElementClass>
</modelElementCompositor> </modelElementCompositor>
</extension> </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> </plugin>
...@@ -3,5 +3,6 @@ BehaviorComponentCompositorBase.java fb4774202dcb216450b206c6bec17ae0786cf79c GR ...@@ -3,5 +3,6 @@ BehaviorComponentCompositorBase.java fb4774202dcb216450b206c6bec17ae0786cf79c GR
ComponentArchitectureCompositor.java 166faf6111d527724d966a734b702650706a20ce GREEN ComponentArchitectureCompositor.java 166faf6111d527724d966a734b702650706a20ce GREEN
ComponentArchitectureFileProjectCompositor.java 1b972b98efb662fc0e51b9abd0389ccabf314445 GREEN ComponentArchitectureFileProjectCompositor.java 1b972b98efb662fc0e51b9abd0389ccabf314445 GREEN
ComponentCompositor.java 17115be2194e0a0581bf350f0b0013c270381939 GREEN ComponentCompositor.java 17115be2194e0a0581bf350f0b0013c270381939 GREEN
ComponentConnectionCompositor.java 3f2f5f557061557792f82c5d93441fde14ed9c44 GREEN
LibraryComponentPackageCompositor.java 0e3dcd3e839e275dd7a23e83388d66ae0cd180df GREEN LibraryComponentPackageCompositor.java 0e3dcd3e839e275dd7a23e83388d66ae0cd180df GREEN
LibraryCompositor.java e6a47934d3b561fdde707ca1abeb56b27bb78ea2 GREEN LibraryCompositor.java e6a47934d3b561fdde707ca1abeb56b27bb78ea2 GREEN
...@@ -13,43 +13,24 @@ ...@@ -13,43 +13,24 @@
| See the License for the specific language governing permissions and | | See the License for the specific language governing permissions and |
| limitations under the License. | | limitations under the License. |
+--------------------------------------------------------------------------*/ +--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui.compose; package org.fortiss.af3.component.compose;
import static org.fortiss.af3.component.utils.ComponentModelElementFactory.createChannel; import static org.fortiss.af3.component.utils.ComponentModelElementFactory.createChannel;
import java.awt.MouseInfo;
import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.dialogs.PopupDialog;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.fortiss.af3.component.model.Channel; import org.fortiss.af3.component.model.Channel;
import org.fortiss.af3.component.model.Component; import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.component.model.ComponentArchitecture;
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.af3.component.model.Port; import org.fortiss.af3.component.model.Port;
import org.fortiss.af3.component.utils.ComponentModelElementFactory;
import org.fortiss.af3.component.utils.ComponentUtils; import org.fortiss.af3.component.utils.ComponentUtils;
import org.fortiss.tooling.base.compose.ConnectionCompositorBase; import org.fortiss.tooling.base.compose.ConnectionCompositorBase;