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

constrain creation of IntraRelationships to RELATIONSHIP

parent b5672f02
No related branches found
No related tags found
No related merge requests found
...@@ -155,10 +155,11 @@ public abstract class AbstractIntraRelationshipConstraintPattern extends FRaMEDS ...@@ -155,10 +155,11 @@ public abstract class AbstractIntraRelationshipConstraintPattern extends FRaMEDS
@Override @Override
public boolean canCreate(ICreateContext createContext) { public boolean canCreate(ICreateContext createContext) {
Connection targetConnection = createContext.getTargetConnection(); Connection targetConnection = createContext.getTargetConnection();
if(targetConnection != null && if(targetConnection != null) {
getBusinessObjectForPictogramElement(targetConnection) instanceof Relation) { Object m = getBusinessObjectForPictogramElement(targetConnection);
Relation relation = (Relation) getBusinessObjectForPictogramElement(targetConnection); if(m instanceof Relation && ((Relation) m).getType() == Type.RELATIONSHIP) { //TODO: Create EditPolicy rule for this case
return EditPolicyService.getHandler(this.getDiagram()).canCreate(createContext, this.getModelType()); return EditPolicyService.getHandler(this.getDiagram()).canCreate(createContext, this.getModelType());
}
} }
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