diff --git a/org.fortiss.tooling.base/src/org/fortiss/tooling/base/compose/.ratings b/org.fortiss.tooling.base/src/org/fortiss/tooling/base/compose/.ratings index c4e75d1473fa12a68837768868d2bedadd947d2c..ff2e522a03fc37676486e55c65dafe04b28011ce 100644 --- a/org.fortiss.tooling.base/src/org/fortiss/tooling/base/compose/.ratings +++ b/org.fortiss.tooling.base/src/org/fortiss/tooling/base/compose/.ratings @@ -2,10 +2,9 @@ ConnectionCompositorBase.java 692689b535d7136acab2ab67a015f70809e64b6b GREEN ConnectorCompositorBase.java 0264edd4034da7187d1dbdf35a674c7067adf3cd GREEN ConnectorConnectionCompositorBase.java eed310a4710492b7ce3bc302c3db4e5c40f4d817 GREEN ConnectorHierarchicElementConnectionCompositorBase.java 7a8e4acf235d5eb006c859056cce89fbb0aac05d GREEN -ConstraintInstanceContainerCompositor.java 9cb23f13c6cddba18ac7f9dcfd1afd9e7bce4d77 GREEN -HierarchicElementCompositorBase.java eed5112371a5819843d65ab8463ec385e50ed1e4 GREEN +HierarchicElementCompositorBase.java 79381013dcbce69031523221e9fe5ba1224580df GREEN HierarchicElementConnectionCompositorBase.java c5c4914d01f96a8f564f9a3c9bf4685e0f1e9155 GREEN HierarchicElementConnectorConnectionCompositorBase.java 0dfbe483e893be9c97d681a2610549d73e5adebc GREEN LogMessageUserInteractionContext.java b145045589fba08b67a12b5d41c51729aa4ae94e GREEN -ModelElementCompositorBase.java 0c69a61e750fc67cb71093f077eb749d248da924 GREEN +ModelElementCompositorBase.java 7cf2c62b70258f3b0e7e2a2979078e4fce7c9856 GREEN ModelElementWithRefCopyMessage.java 486c90c5896d7fe4a4595c6dbe602838a044ad14 GREEN diff --git a/org.fortiss.tooling.base/src/org/fortiss/tooling/base/compose/HierarchicElementCompositorBase.java b/org.fortiss.tooling.base/src/org/fortiss/tooling/base/compose/HierarchicElementCompositorBase.java index eed5112371a5819843d65ab8463ec385e50ed1e4..79381013dcbce69031523221e9fe5ba1224580df 100644 --- a/org.fortiss.tooling.base/src/org/fortiss/tooling/base/compose/HierarchicElementCompositorBase.java +++ b/org.fortiss.tooling.base/src/org/fortiss/tooling/base/compose/HierarchicElementCompositorBase.java @@ -26,7 +26,6 @@ import org.fortiss.tooling.base.model.element.IConnection; import org.fortiss.tooling.base.model.element.IConnector; import org.fortiss.tooling.base.model.element.IHierarchicElement; import org.fortiss.tooling.base.model.element.IHierarchicElementContainer; -import org.fortiss.tooling.kernel.model.constraints.IConstrained; import org.fortiss.tooling.kernel.service.IConnectionCompositorService; import org.fortiss.tooling.kernel.service.IElementCompositorService; @@ -44,11 +43,6 @@ public abstract class HierarchicElementCompositorBase<HE extends IHierarchicElem */ @Override public final boolean decompose(EObject contained) { - // If there exist any constraints, remove them first to avoid verification launches due to - // EMF notifications when the container is removed. - if(contained instanceof IConstrained) { - ((IConstrained)contained).getConstraintInstances().clear(); - } return iterateDecompose(contained) && decomposeSpecific(contained); } diff --git a/org.fortiss.tooling.base/src/org/fortiss/tooling/base/compose/ModelElementCompositorBase.java b/org.fortiss.tooling.base/src/org/fortiss/tooling/base/compose/ModelElementCompositorBase.java index 0c69a61e750fc67cb71093f077eb749d248da924..7cf2c62b70258f3b0e7e2a2979078e4fce7c9856 100644 --- a/org.fortiss.tooling.base/src/org/fortiss/tooling/base/compose/ModelElementCompositorBase.java +++ b/org.fortiss.tooling.base/src/org/fortiss/tooling/base/compose/ModelElementCompositorBase.java @@ -31,8 +31,6 @@ import org.fortiss.tooling.kernel.extension.IElementCompositor; import org.fortiss.tooling.kernel.extension.data.IElementCompositionContext; import org.fortiss.tooling.kernel.extension.data.ITopLevelElement; import org.fortiss.tooling.kernel.model.INamedElement; -import org.fortiss.tooling.kernel.model.constraints.ConstraintInstance; -import org.fortiss.tooling.kernel.model.constraints.IConstrained; import org.fortiss.tooling.kernel.service.IElementCompositorService; import org.fortiss.tooling.kernel.service.IPersistencyService; @@ -88,15 +86,6 @@ public abstract class ModelElementCompositorBase<C extends EObject> extends Obse */ @Override public boolean decompose(EObject contained) { - // Removes first the constraints - if(contained instanceof IConstrained) { - for(ConstraintInstance ci : ((IConstrained)contained).getConstraintInstances()) { - for(IConstrained c : ci.getConstraineds()) { - c.getConstraintInstances().remove(ci); - } - EcoreUtil.delete(ci, true); - } - } return iterateDecompose(contained) && decomposeSpecific(contained); } diff --git a/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/util/.ratings b/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/util/.ratings index fd2078b766355261bbefb4db4293b6e65ecb2c06..049538585ec8e7a8318542312273964530838a66 100644 --- a/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/util/.ratings +++ b/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/util/.ratings @@ -1,5 +1,5 @@ ActionUtils.java 4553e487264e3d1f86f4767da4a7400cce4b9a5d GREEN -CopyPasteUtils.java bbc5cf9c9dc03ebf8dc75d42c919fe6eb60b388e GREEN +CopyPasteUtils.java 62ac1094c1d56c83251b01ce7b52c2217625a79c GREEN DataBindingUtils.java 631c47881caa13fc567679a7e4416eb777af0713 GREEN DragAndDropUtils.java 7aab91518aa12d76533a345bf6ed0be9ac7ff0e5 GREEN EObjectSelectionUtils.java 128cf8f96c6b9478171dff3deda662d5934f5f44 GREEN diff --git a/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/util/CopyPasteUtils.java b/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/util/CopyPasteUtils.java index bbc5cf9c9dc03ebf8dc75d42c919fe6eb60b388e..62ac1094c1d56c83251b01ce7b52c2217625a79c 100644 --- a/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/util/CopyPasteUtils.java +++ b/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/util/CopyPasteUtils.java @@ -23,7 +23,6 @@ import java.util.Collection; import org.eclipse.emf.common.util.BasicEList; import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.TreeIterator; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.swt.dnd.Clipboard; @@ -36,7 +35,6 @@ import org.eclipse.ui.PlatformUI; import org.fortiss.tooling.kernel.extension.data.IElementCompositionContext; import org.fortiss.tooling.kernel.model.INamedElement; import org.fortiss.tooling.kernel.model.ISpeciallyCopyiable; -import org.fortiss.tooling.kernel.model.constraints.IConstrained; import org.fortiss.tooling.kernel.service.IElementCompositorService; import org.fortiss.tooling.kernel.ui.dnd.CompositionServiceLocalCopyPasteTransfer; import org.fortiss.tooling.kernel.ui.internal.editor.ExtendableMultiPageEditor; @@ -65,15 +63,6 @@ public class CopyPasteUtils { EcoreUtil.Copier copier = new EcoreUtil.Copier(true, true); for(EObject obj : sel) { content[i] = copier.copy(obj); - // Remove constraint instances: these are specific to their original elements and - // should not be copied. - TreeIterator<EObject> it = content[i].eAllContents(); - while(it.hasNext()) { - EObject subObj = it.next(); - if(subObj instanceof IConstrained) { - ((IConstrained)subObj).getConstraintInstances().clear(); - } - } i++; } copier.copyReferences(); diff --git a/org.fortiss.tooling.kernel/META-INF/MANIFEST.MF b/org.fortiss.tooling.kernel/META-INF/MANIFEST.MF index 8871b532b24149913f7120ba6d5d03f9bcadd9c7..dd8e11900cc82c37aad26f0107afd74c32e94978 100644 --- a/org.fortiss.tooling.kernel/META-INF/MANIFEST.MF +++ b/org.fortiss.tooling.kernel/META-INF/MANIFEST.MF @@ -24,9 +24,6 @@ Export-Package: org.fortiss.tooling.kernel;uses:="org.eclipse.core.runtime, org.fortiss.tooling.kernel.introspection, org.fortiss.tooling.kernel.introspection.items, org.fortiss.tooling.kernel.model;uses:=org.eclipse.emf.ecore, - org.fortiss.tooling.kernel.model.constraints, - org.fortiss.tooling.kernel.model.constraints.impl, - org.fortiss.tooling.kernel.model.constraints.util, org.fortiss.tooling.kernel.model.impl;uses:=org.fortiss.tooling.kernel.model, org.fortiss.tooling.kernel.model.util;uses:="org.eclipse.emf.ecore, org.fortiss.tooling.kernel.model, diff --git a/org.fortiss.tooling.kernel/model/.ratings b/org.fortiss.tooling.kernel/model/.ratings index 998f10420429ee306ca747ef85893ad6df52b2dd..0870aefed834e97bdae25b330d3dc135717932a4 100644 --- a/org.fortiss.tooling.kernel/model/.ratings +++ b/org.fortiss.tooling.kernel/model/.ratings @@ -1 +1 @@ -kernel.ecore 4a3d1961b1e127d034898770d2899ac722d690a7 GREEN +kernel.ecore 0b76d12b66f6d7f045a547bb1775428075c82ced GREEN diff --git a/org.fortiss.tooling.kernel/model/kernel.ecore b/org.fortiss.tooling.kernel/model/kernel.ecore index 4a3d1961b1e127d034898770d2899ac722d690a7..0b76d12b66f6d7f045a547bb1775428075c82ced 100644 --- a/org.fortiss.tooling.kernel/model/kernel.ecore +++ b/org.fortiss.tooling.kernel/model/kernel.ecore @@ -144,109 +144,4 @@ <eParameters name="target" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/> </eOperations> </eClassifiers> - <eSubpackages name="constraints" nsURI="http://www.fortiss.org/tooling/base/model/element/constraints" - nsPrefix="org-fortiss-tooling-kernel-constraints"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="TODO: Consolidate with constraint metaclasses in tooling.base."/> - </eAnnotations> - <eClassifiers xsi:type="ecore:EClass" name="IConstrained" abstract="true" interface="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Element which can be constrained. Keeps track of all the constraints which apply to it."/> - </eAnnotations> - <eStructuralFeatures xsi:type="ecore:EReference" name="constraintInstances" - upperBound="-1" eType="#//constraints/ConstraintInstance"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="TODO: write documentation (in the model!)"/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EReference" name="checksumsPerConstraintName" - upperBound="-1" eType="#//constraints/ConstraintNameToChecksum" containment="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="TODO: write documentation (in the model!)"/> - </eAnnotations> - </eStructuralFeatures> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ConstraintInstance"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Constraint "instance": link between the constrained element(s) and the constraint. Explicitly represented in the model in order to store the status and the checksum(s) of the constrained element(s)"/> - </eAnnotations> - <eStructuralFeatures xsi:type="ecore:EReference" name="constraineds" upperBound="-1" - eType="#//constraints/IConstrained"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="TODO: write documentation (in the model!)"/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EReference" name="status" eType="#//constraints/IConstraintInstanceStatus" - containment="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="TODO: write documentation (in the model!)"/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="constraintName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="TODO: write documentation (in the model!)"/> - </eAnnotations> - </eStructuralFeatures> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="IConstraintInstanceStatus" abstract="true" - interface="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Status of verification of a constraint. Typically, should denote "Success", "Fail", "Outdated" or "Error" with possible specializations depending on the particular constraints."/> - </eAnnotations> - <eOperations name="getConstraint" eType="#//constraints/ConstraintInstance"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="body" value="return (ConstraintInstance)this.eContainer();"/> - <details key="documentation" value="TODO: write documentation (in the model!)"/> - </eAnnotations> - </eOperations> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="OutdatedConstraintInstanceStatus" - eSuperTypes="#//constraints/IConstraintInstanceStatus"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Status that indicates that the verification of a constraint is outdated."/> - </eAnnotations> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="FailedConstraintInstanceStatus" eSuperTypes="#//constraints/IConstraintInstanceStatus"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Status that indicates that the verification of a constraint has failed."/> - </eAnnotations> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ErrorConstraintInstanceStatus" eSuperTypes="#//constraints/IConstraintInstanceStatus"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Status that indicates that an error has occurred during the verification of a constraint."/> - </eAnnotations> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="SuccessConstraintInstanceStatus" eSuperTypes="#//constraints/IConstraintInstanceStatus"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Status that indicates that a constraint has succesfully been verified."/> - </eAnnotations> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="IConstraintInstanceContainer" abstract="true" - interface="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Container to group multiple constraint instances."/> - </eAnnotations> - <eStructuralFeatures xsi:type="ecore:EReference" name="constraintInstances" - upperBound="-1" eType="#//constraints/ConstraintInstance" containment="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="TODO: write documentation (in the model!)"/> - </eAnnotations> - </eStructuralFeatures> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ConstraintNameToChecksum" instanceClassName="java.util.Map$Entry"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Map type to map constraint names to checksum values."/> - </eAnnotations> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="key" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="TODO: write documentation (in the model!)"/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBigInteger"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="TODO: write documentation (in the model!)"/> - </eAnnotations> - </eStructuralFeatures> - </eClassifiers> - </eSubpackages> </ecore:EPackage> diff --git a/org.fortiss.tooling.kernel/model/kernel.genmodel b/org.fortiss.tooling.kernel/model/kernel.genmodel index b19daa9d047f5ab8061073e5f9c5d021f7aa6d51..d9c1a57ec0fd3ba5a598e1d83e3c8abc805de23c 100644 --- a/org.fortiss.tooling.kernel/model/kernel.genmodel +++ b/org.fortiss.tooling.kernel/model/kernel.genmodel @@ -54,33 +54,5 @@ <genParameters ecoreParameter="kernel.ecore#//ISpeciallyCopyiable/canPaste/target"/> </genOperations> </genClasses> - <nestedGenPackages prefix="Constraints" basePackage="org.fortiss.tooling.kernel.model" - disposableProviderFactory="true" ecorePackage="kernel.ecore#//constraints"> - <genClasses image="false" ecoreClass="kernel.ecore#//constraints/IConstrained"> - <genFeatures notify="false" createChild="false" propertySortChoices="true" - ecoreFeature="ecore:EReference kernel.ecore#//constraints/IConstrained/constraintInstances"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference kernel.ecore#//constraints/IConstrained/checksumsPerConstraintName"/> - </genClasses> - <genClasses ecoreClass="kernel.ecore#//constraints/ConstraintInstance"> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference kernel.ecore#//constraints/ConstraintInstance/constraineds"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference kernel.ecore#//constraints/ConstraintInstance/status"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute kernel.ecore#//constraints/ConstraintInstance/constraintName"/> - </genClasses> - <genClasses image="false" ecoreClass="kernel.ecore#//constraints/IConstraintInstanceStatus"> - <genOperations ecoreOperation="kernel.ecore#//constraints/IConstraintInstanceStatus/getConstraint" - body="return (ConstraintInstance)this.eContainer();"/> - </genClasses> - <genClasses ecoreClass="kernel.ecore#//constraints/OutdatedConstraintInstanceStatus"/> - <genClasses ecoreClass="kernel.ecore#//constraints/FailedConstraintInstanceStatus"/> - <genClasses ecoreClass="kernel.ecore#//constraints/ErrorConstraintInstanceStatus"/> - <genClasses ecoreClass="kernel.ecore#//constraints/SuccessConstraintInstanceStatus"/> - <genClasses image="false" ecoreClass="kernel.ecore#//constraints/IConstraintInstanceContainer"> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference kernel.ecore#//constraints/IConstraintInstanceContainer/constraintInstances"/> - </genClasses> - <genClasses ecoreClass="kernel.ecore#//constraints/ConstraintNameToChecksum"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute kernel.ecore#//constraints/ConstraintNameToChecksum/key"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute kernel.ecore#//constraints/ConstraintNameToChecksum/value"/> - </genClasses> - </nestedGenPackages> </genPackages> </genmodel:GenModel> diff --git a/org.fortiss.tooling.kernel/plugin.xml b/org.fortiss.tooling.kernel/plugin.xml index cd3685f0954639e7be5284c8b4772cba11cdc4f4..1633cc75ac6ee359dc13c0e7485c372d0749f0be 100644 --- a/org.fortiss.tooling.kernel/plugin.xml +++ b/org.fortiss.tooling.kernel/plugin.xml @@ -22,14 +22,6 @@ </package> </extension> - <extension point="org.eclipse.emf.ecore.generated_package"> - <!-- @generated kernel --> - <package - uri="http://www.fortiss.org/tooling/base/model/element/constraints" - class="org.fortiss.tooling.kernel.model.constraints.ConstraintsPackage" - genModel="model/kernel.genmodel"/> - </extension> - <extension point="org.fortiss.tooling.kernel.modelPrototypeProvider"> <modelPrototypeProvider