Skip to content
Snippets Groups Projects
Commit 980ef22a authored by Alexander Diewald's avatar Alexander Diewald
Browse files

Merge branch '3977' into 'master'

3977

See merge request !97
parents 624d96a4 514192f4
No related branches found
No related tags found
1 merge request!973977
Showing
with 4 additions and 177 deletions
......@@ -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
......@@ -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);
}
......
......@@ -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);
}
......
ActionUtils.java 4553e487264e3d1f86f4767da4a7400cce4b9a5d GREEN
CopyPasteUtils.java bbc5cf9c9dc03ebf8dc75d42c919fe6eb60b388e GREEN
CopyPasteUtils.java 62ac1094c1d56c83251b01ce7b52c2217625a79c GREEN
DataBindingUtils.java 631c47881caa13fc567679a7e4416eb777af0713 GREEN
DragAndDropUtils.java 7aab91518aa12d76533a345bf6ed0be9ac7ff0e5 GREEN
EObjectSelectionUtils.java 128cf8f96c6b9478171dff3deda662d5934f5f44 GREEN
......
......@@ -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();
......
......@@ -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,
......
kernel.ecore 4a3d1961b1e127d034898770d2899ac722d690a7 GREEN
kernel.ecore 0b76d12b66f6d7f045a547bb1775428075c82ced GREEN
......@@ -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 &quot;instance&quot;: 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 &quot;Success&quot;, &quot;Fail&quot;, &quot;Outdated&quot; or &quot;Error&quot; 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>
......@@ -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>
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment