Skip to content
Snippets Groups Projects
Commit ba9b092e authored by nullsub's avatar nullsub
Browse files

fix error in RelationshipPattern

parent ca1c75ef
Branches
No related tags found
No related merge requests found
...@@ -32,6 +32,10 @@ ...@@ -32,6 +32,10 @@
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/> <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/> <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies> </policies>
<policies action="Execute" actionType="CompartmentType">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies>
<policies action="Execute" actionType="Relationship"> <policies action="Execute" actionType="Relationship">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/> <featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/> <constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
......
...@@ -81,7 +81,7 @@ public class FulfillmentPattern extends FRaMEDConnectionPattern { ...@@ -81,7 +81,7 @@ public class FulfillmentPattern extends FRaMEDConnectionPattern {
Anchor newAnchor = context.getNewAnchor(); Anchor newAnchor = context.getNewAnchor();
org.framed.iorm.model.ModelElement newShape = UIUtil.getModelElementForAnchor(newAnchor); org.framed.iorm.model.ModelElement newShape = UIUtil.getModelElementForAnchor(newAnchor);
if(newShape != null) { if(newShape != null) {
return EditPolicyService.getHandler(this.getDiagram()).canReconnect(context, newShape.getType()); return EditPolicyService.getHandler(this.getDiagram()).canReconnect(context, this.modelType);
} }
return false; return false;
} }
......
...@@ -92,7 +92,7 @@ public class InheritancePattern extends FRaMEDConnectionPattern { ...@@ -92,7 +92,7 @@ public class InheritancePattern extends FRaMEDConnectionPattern {
if(oldShape != null && newShape != null) { if(oldShape != null && newShape != null) {
if(oldShape.getContainer() == newShape.getContainer()) { if(oldShape.getContainer() == newShape.getContainer()) {
if(newShape.getType() == oldShape.getType()) { if(newShape.getType() == oldShape.getType()) {
return true; //TODO: Handle by the EditPolicyHandler return EditPolicyService.getHandler(this.getDiagram()).canReconnect(context, this.modelType);
} } } } } } } } } }
return false; return false;
} }
......
...@@ -96,7 +96,7 @@ public class RelationshipPattern extends FRaMEDConnectionPattern { ...@@ -96,7 +96,7 @@ public class RelationshipPattern extends FRaMEDConnectionPattern {
Anchor newAnchor = context.getNewAnchor(); Anchor newAnchor = context.getNewAnchor();
org.framed.iorm.model.ModelElement newShape = UIUtil.getModelElementForAnchor(newAnchor); org.framed.iorm.model.ModelElement newShape = UIUtil.getModelElementForAnchor(newAnchor);
if(newShape != null) { if(newShape != null) {
return EditPolicyService.getHandler(this.getDiagram()).canReconnect(context, newShape.getType()); return EditPolicyService.getHandler(this.getDiagram()).canReconnect(context, this.modelType);
} }
return false; return false;
} }
...@@ -302,7 +302,7 @@ public class RelationshipPattern extends FRaMEDConnectionPattern { ...@@ -302,7 +302,7 @@ public class RelationshipPattern extends FRaMEDConnectionPattern {
Anchor sourceAnchor = createContext.getSourceAnchor(); Anchor sourceAnchor = createContext.getSourceAnchor();
org.framed.iorm.model.ModelElement sourceShape = UIUtil.getModelElementForAnchor(sourceAnchor); org.framed.iorm.model.ModelElement sourceShape = UIUtil.getModelElementForAnchor(sourceAnchor);
if(sourceShape != null){ if(sourceShape != null){
return EditPolicyService.getHandler(this.getDiagram()).canStart(createContext, sourceShape.getType()); return EditPolicyService.getHandler(this.getDiagram()).canStart(createContext, this.modelType);
} }
return false; return false;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment