Skip to content
Snippets Groups Projects
Commit 91c6857d authored by Kevin Kassin's avatar Kevin Kassin
Browse files

modularized the inter relationship constraints

parent 9ea919c1
No related branches found
No related tags found
No related merge requests found
Showing
with 132 additions and 110 deletions
package org.framed.iorm.ui.pattern.connections.interrelationship; package interRelationshipConstraints;
import java.util.List; import java.util.List;
...@@ -10,19 +10,16 @@ import org.eclipse.graphiti.mm.algorithms.Polyline; ...@@ -10,19 +10,16 @@ import org.eclipse.graphiti.mm.algorithms.Polyline;
import org.eclipse.graphiti.mm.algorithms.styles.LineStyle; import org.eclipse.graphiti.mm.algorithms.styles.LineStyle;
import org.eclipse.graphiti.mm.pictograms.Anchor; import org.eclipse.graphiti.mm.pictograms.Anchor;
import org.eclipse.graphiti.mm.pictograms.Connection; import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.util.IColorConstant;
import org.framed.iorm.model.OrmFactory; import org.framed.iorm.model.OrmFactory;
import org.framed.iorm.model.Relation; import org.framed.iorm.model.Relation;
import org.framed.iorm.model.Type; import org.framed.iorm.model.Type;
import org.framed.iorm.ui.editPolicy.EditPolicyService; import org.framed.iorm.ui.editPolicy.EditPolicyService;
import org.framed.iorm.ui.literals.IdentifierLiterals;
import org.framed.iorm.ui.literals.LayoutLiterals;
import org.framed.iorm.ui.palette.FeaturePaletteDescriptor; import org.framed.iorm.ui.palette.FeaturePaletteDescriptor;
import org.framed.iorm.ui.palette.PaletteCategory; import org.framed.iorm.ui.palette.PaletteCategory;
import org.framed.iorm.ui.palette.PaletteView; import org.framed.iorm.ui.palette.PaletteView;
import org.framed.iorm.ui.palette.ViewVisibility; import org.framed.iorm.ui.palette.ViewVisibility;
import org.framed.iorm.ui.pattern.connections.FRaMEDConnectionPattern; import org.framed.iorm.ui.pattern.connections.FRaMEDConnectionPattern;
import org.framed.iorm.ui.util.ConnectionPatternUtil; import org.framed.iorm.ui.util.UIUtil;
/** /**
* This is the abstract super class of the patterns for inter relationship contraints. It collects similiar operations * This is the abstract super class of the patterns for inter relationship contraints. It collects similiar operations
...@@ -32,6 +29,16 @@ import org.framed.iorm.ui.util.ConnectionPatternUtil; ...@@ -32,6 +29,16 @@ import org.framed.iorm.ui.util.ConnectionPatternUtil;
*/ */
public abstract class AbstractInterRelationshipConstraintPattern extends FRaMEDConnectionPattern { public abstract class AbstractInterRelationshipConstraintPattern extends FRaMEDConnectionPattern {
/**
* the object to get names, ids and so on for this feature
*/
Literals literals = new Literals();
/**
* the object to call utility operations on
*/
Util util = new Util();
/** /**
* the feature palette descriptor manages the palette visibility, see {@link FeaturePaletteDescriptor} * the feature palette descriptor manages the palette visibility, see {@link FeaturePaletteDescriptor}
*/ */
...@@ -43,24 +50,6 @@ public abstract class AbstractInterRelationshipConstraintPattern extends FRaMEDC ...@@ -43,24 +50,6 @@ public abstract class AbstractInterRelationshipConstraintPattern extends FRaMEDC
return framedFeatureNames.contains("Inter_Relationship_Constraints"); return framedFeatureNames.contains("Inter_Relationship_Constraints");
} }; } };
/**
* values for the property shape id gathered from {@link IdentifierLiterals}
*/
protected final String SHAPE_ID_INTER_REL_CON = IdentifierLiterals.SHAPE_ID_INTER_REL_CON,
SHAPE_ID_RELATIONSHIP_ANCHOR_DECORATOR = IdentifierLiterals.SHAPE_ID_RELATIONSHIP_ANCHOR_DECORATOR;
/**
* the layout integers used to layout the arrowhead of the inheritances gathered from {@link LayoutLiterals}
*/
protected final int ARROWHEAD_LENGTH = LayoutLiterals.ARROWHEAD_LENGTH,
ARROWHEAD_HEIGHT = LayoutLiterals.ARROWHEAD_HEIGHT;
/**
* the color values used for the polyline and the arrowhead gathered from {@link LayoutLiterals}
*/
protected final IColorConstant COLOR_CONSTRAINT_CONNECTION = LayoutLiterals.COLOR_CONSTRAINT_CONNECTION,
COLOR_ARROWHEAD = LayoutLiterals.COLOR_ARROWHEAD;
/** /**
* Class constructor * Class constructor
*/ */
...@@ -100,15 +89,15 @@ public abstract class AbstractInterRelationshipConstraintPattern extends FRaMEDC ...@@ -100,15 +89,15 @@ public abstract class AbstractInterRelationshipConstraintPattern extends FRaMEDC
//Step 1 //Step 1
Anchor graphicalSourceAnchor = null, Anchor graphicalSourceAnchor = null,
graphicalTargetAnchor = null; graphicalTargetAnchor = null;
graphicalSourceAnchor = ConnectionPatternUtil.getGraphicalAnchorForBusinessModelAnchor(addConnectionContext.getSourceAnchor()); graphicalSourceAnchor = util.getGraphicalAnchorForBusinessModelAnchor(addConnectionContext.getSourceAnchor());
graphicalTargetAnchor = ConnectionPatternUtil.getGraphicalAnchorForBusinessModelAnchor(addConnectionContext.getTargetAnchor()); graphicalTargetAnchor = util.getGraphicalAnchorForBusinessModelAnchor(addConnectionContext.getTargetAnchor());
if(graphicalSourceAnchor == null || graphicalTargetAnchor == null) return null; if(graphicalSourceAnchor == null || graphicalTargetAnchor == null) return null;
//Step 2 //Step 2
Connection connection = pictogramElementCreateService.createFreeFormConnection(getDiagram()); Connection connection = pictogramElementCreateService.createFreeFormConnection(getDiagram());
connection.setStart(graphicalSourceAnchor); connection.setStart(graphicalSourceAnchor);
connection.setEnd(graphicalTargetAnchor); connection.setEnd(graphicalTargetAnchor);
Polyline polyline = graphicAlgorithmService.createPolyline(connection); Polyline polyline = graphicAlgorithmService.createPolyline(connection);
polyline.setForeground(manageColor(COLOR_CONSTRAINT_CONNECTION)); polyline.setForeground(manageColor(literals.COLOR_INTER_REL_CONNECTIONS));
polyline.setLineStyle(LineStyle.DASH); polyline.setLineStyle(LineStyle.DASH);
polyline.setLineWidth(2); polyline.setLineWidth(2);
return connection; return connection;
...@@ -131,8 +120,8 @@ public abstract class AbstractInterRelationshipConstraintPattern extends FRaMEDC ...@@ -131,8 +120,8 @@ public abstract class AbstractInterRelationshipConstraintPattern extends FRaMEDC
public boolean canCreate(ICreateConnectionContext createContext) { public boolean canCreate(ICreateConnectionContext createContext) {
Anchor sourceAnchor = createContext.getSourceAnchor(); Anchor sourceAnchor = createContext.getSourceAnchor();
Anchor targetAnchor = createContext.getTargetAnchor(); Anchor targetAnchor = createContext.getTargetAnchor();
org.framed.iorm.model.ModelElement sourceConnection = ConnectionPatternUtil.getModelElementForAnchor(sourceAnchor); org.framed.iorm.model.ModelElement sourceConnection = UIUtil.getModelElementForAnchor(sourceAnchor);
org.framed.iorm.model.ModelElement targetConnection = ConnectionPatternUtil.getModelElementForAnchor(targetAnchor); org.framed.iorm.model.ModelElement targetConnection = UIUtil.getModelElementForAnchor(targetAnchor);
if(sourceConnection != null && targetConnection != null) { if(sourceConnection != null && targetConnection != null) {
if(sourceConnection.getContainer() == targetConnection.getContainer() && if(sourceConnection.getContainer() == targetConnection.getContainer() &&
!(sourceConnection.equals(targetConnection))) { !(sourceConnection.equals(targetConnection))) {
...@@ -154,7 +143,7 @@ public abstract class AbstractInterRelationshipConstraintPattern extends FRaMEDC ...@@ -154,7 +143,7 @@ public abstract class AbstractInterRelationshipConstraintPattern extends FRaMEDC
@Override @Override
public boolean canStartConnection(ICreateConnectionContext createContext) { public boolean canStartConnection(ICreateConnectionContext createContext) {
Anchor sourceAnchor = createContext.getSourceAnchor(); Anchor sourceAnchor = createContext.getSourceAnchor();
org.framed.iorm.model.ModelElement sourceConnection = ConnectionPatternUtil.getModelElementForAnchor(sourceAnchor); org.framed.iorm.model.ModelElement sourceConnection = UIUtil.getModelElementForAnchor(sourceAnchor);
if(sourceConnection != null){ if(sourceConnection != null){
if(sourceConnection.getType() == Type.RELATIONSHIP) if(sourceConnection.getType() == Type.RELATIONSHIP)
return true; return true;
...@@ -175,8 +164,8 @@ public abstract class AbstractInterRelationshipConstraintPattern extends FRaMEDC ...@@ -175,8 +164,8 @@ public abstract class AbstractInterRelationshipConstraintPattern extends FRaMEDC
//Step 1 //Step 1
Anchor sourceAnchor = createContext.getSourceAnchor(); Anchor sourceAnchor = createContext.getSourceAnchor();
Anchor targetAnchor = createContext.getTargetAnchor(); Anchor targetAnchor = createContext.getTargetAnchor();
org.framed.iorm.model.ModelElement sourceConnection = ConnectionPatternUtil.getModelElementForAnchor(sourceAnchor); org.framed.iorm.model.ModelElement sourceConnection = UIUtil.getModelElementForAnchor(sourceAnchor);
org.framed.iorm.model.ModelElement targetConnection = ConnectionPatternUtil.getModelElementForAnchor(targetAnchor); org.framed.iorm.model.ModelElement targetConnection = UIUtil.getModelElementForAnchor(targetAnchor);
//Step 2 //Step 2
Relation newInterRelationshipConstraint = OrmFactory.eINSTANCE.createRelation(); Relation newInterRelationshipConstraint = OrmFactory.eINSTANCE.createRelation();
newInterRelationshipConstraint.setType(type); newInterRelationshipConstraint.setType(type);
......
package interRelationshipConstraints;
import org.eclipse.graphiti.util.IColorConstant;
import org.framed.iorm.ui.literals.UILiterals;
public class Literals {
/**
* feature names of the inter relationship constraints
*/
public final String RELATIONSHIP_IMPLICATION_FEATURE_NAME = "Relationship Implication",
RELATIONSHIP_EXCLUSION_FEATURE_NAME = "Relationship Exclusion";
/**
* the id or the path for icon used for palette entry of this feature
*/
public final String RELATIONSHIP_IMPLICATION_ICON_IMG_ID = "org.framed.iorm.ui.modules.intraRelationshipConstraints.relImpl",
RELATIONSHIP_IMPLICATION_ICON_IMG_PATH = "modules/interRelationshipConstraints/icon_relationship_implication.png",
RELATIONSHIP_EXCLUSION_ICON_IMG_ID = "org.framed.iorm.ui.modules.intraRelationshipConstraints.relExcl",
RELATIONSHIP_EXCLUSION_ICON_IMG_PATH = "modules/interRelationshipConstraints/icon_relationship_exclusion.png";
//Layout
//~~~~~~
/**
* the layout integers used to layout the arrowhead of the inter relationship constraint
*/
public final int INTER_REL_ARROWHEAD_LENGTH = UILiterals.ARROWHEAD_LENGTH,
INTER_REL_ARROWHEAD_HEIGHT = UILiterals.ARROWHEAD_HEIGHT;
/**
* identifier used for role constraint connection decorators
*/
public final String SHAPE_ID_INTER_REL_CON = "shape_inter_rel_con";
/**
* the color values used for the polyline and the arrowhead of role constraints
*/
public final IColorConstant COLOR_INTER_REL_CONNECTIONS = UILiterals.COLOR_CONNECTIONS,
COLOR_INTER_REL_ARROWHEAD = UILiterals.COLOR_ARROWHEAD;
}
package org.framed.iorm.ui.pattern.connections.interrelationship; package interRelationshipConstraints;
import org.eclipse.graphiti.features.context.IAddContext; import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.ICreateConnectionContext; import org.eclipse.graphiti.features.context.ICreateConnectionContext;
...@@ -8,9 +8,7 @@ import org.eclipse.graphiti.mm.pictograms.ConnectionDecorator; ...@@ -8,9 +8,7 @@ import org.eclipse.graphiti.mm.pictograms.ConnectionDecorator;
import org.eclipse.graphiti.mm.pictograms.PictogramElement; import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.framed.iorm.model.Relation; import org.framed.iorm.model.Relation;
import org.framed.iorm.model.Type; import org.framed.iorm.model.Type;
import org.framed.iorm.ui.literals.IdentifierLiterals; import org.framed.iorm.ui.util.UIUtil;
import org.framed.iorm.ui.literals.NameLiterals;
import org.framed.iorm.ui.util.PropertyUtil;
/** /**
* This graphiti pattern is used to work with {@link Relation}s * This graphiti pattern is used to work with {@link Relation}s
...@@ -26,38 +24,18 @@ import org.framed.iorm.ui.util.PropertyUtil; ...@@ -26,38 +24,18 @@ import org.framed.iorm.ui.util.PropertyUtil;
public class RelationshipExclusionConstraintPattern extends AbstractInterRelationshipConstraintPattern { public class RelationshipExclusionConstraintPattern extends AbstractInterRelationshipConstraintPattern {
/** /**
* the name of the feature gathered from {@link NameLiterals} * the object to get names, ids and so on for this feature
*/ */
private final String RELATIONSHIP_EXCLUSION_FEATURE_NAME = NameLiterals.RELATIONSHIP_EXCLUSION_FEATURE_NAME; Literals literals = new Literals();
/**
* the identifier for the icon of the create feature gathered from {@link IdentifierLiterals}
*/
private static final String IMG_ID_FEATURE_RELATIONSHIP_EXCLUSION = IdentifierLiterals.IMG_ID_FEATURE_RELATIONSHIP_EXCLUSION;
/** /**
* Class constructor * Class constructor
*/ */
public RelationshipExclusionConstraintPattern() { public RelationshipExclusionConstraintPattern() {
super(); super();
} FEATURE_NAME = literals.RELATIONSHIP_EXCLUSION_FEATURE_NAME;
ICON_IMG_ID = literals.RELATIONSHIP_EXCLUSION_ICON_IMG_ID;
/** ICON_IMG_PATH = literals.RELATIONSHIP_EXCLUSION_ICON_IMG_PATH;
* get method for the features name
* @return the name of the feature
*/
@Override
public String getCreateName() {
return RELATIONSHIP_EXCLUSION_FEATURE_NAME;
}
/**
* get method for the identifier of the icon for the create feature
* @return the id of the icon
*/
@Override
public String getCreateImageId() {
return IMG_ID_FEATURE_RELATIONSHIP_EXCLUSION;
} }
//add feature //add feature
...@@ -90,19 +68,19 @@ public class RelationshipExclusionConstraintPattern extends AbstractInterRelatio ...@@ -90,19 +68,19 @@ public class RelationshipExclusionConstraintPattern extends AbstractInterRelatio
//Step 3 //Step 3
ConnectionDecorator connectionDecoratorTarget = ConnectionDecorator connectionDecoratorTarget =
pictogramElementCreateService.createConnectionDecorator(connection, false, 1.0, true); pictogramElementCreateService.createConnectionDecorator(connection, false, 1.0, true);
int points[] = new int[] { 0, ARROWHEAD_HEIGHT, //Point 1 int points[] = new int[] { 0, literals.INTER_REL_ARROWHEAD_HEIGHT, //Point 1
-1*ARROWHEAD_LENGTH, 0, //P2 -1*literals.INTER_REL_ARROWHEAD_LENGTH, 0, //P2
0, -1*ARROWHEAD_HEIGHT };//P3 0, -1*literals.INTER_REL_ARROWHEAD_HEIGHT };//P3
Polyline polylineTarget = graphicAlgorithmService.createPolyline(connectionDecoratorTarget, points); Polyline polylineTarget = graphicAlgorithmService.createPolyline(connectionDecoratorTarget, points);
polylineTarget.setLineWidth(2); polylineTarget.setLineWidth(2);
polylineTarget.setForeground(manageColor(COLOR_CONSTRAINT_CONNECTION)); polylineTarget.setForeground(manageColor(literals.COLOR_INTER_REL_CONNECTIONS));
PropertyUtil.setShape_IdValue(connectionDecoratorTarget, SHAPE_ID_INTER_REL_CON); UIUtil.setShape_IdValue(connectionDecoratorTarget, literals.SHAPE_ID_INTER_REL_CON);
ConnectionDecorator connectionDecoratorSource = ConnectionDecorator connectionDecoratorSource =
pictogramElementCreateService.createConnectionDecorator(connection, false, 0, true); pictogramElementCreateService.createConnectionDecorator(connection, false, 0, true);
Polyline polylineSource = graphicAlgorithmService.createPolyline(connectionDecoratorSource, points); Polyline polylineSource = graphicAlgorithmService.createPolyline(connectionDecoratorSource, points);
polylineSource.setLineWidth(2); polylineSource.setLineWidth(2);
polylineSource.setForeground(manageColor(COLOR_CONSTRAINT_CONNECTION)); polylineSource.setForeground(manageColor(literals.COLOR_INTER_REL_CONNECTIONS));
PropertyUtil.setShape_IdValue(connectionDecoratorSource, SHAPE_ID_INTER_REL_CON); UIUtil.setShape_IdValue(connectionDecoratorSource, literals.SHAPE_ID_INTER_REL_CON);
//Step 4 //Step 4
link(connection, addedRoleImplication); link(connection, addedRoleImplication);
return connection; return connection;
......
package org.framed.iorm.ui.pattern.connections.interrelationship; package interRelationshipConstraints;
import org.eclipse.graphiti.features.context.IAddContext; import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.ICreateConnectionContext; import org.eclipse.graphiti.features.context.ICreateConnectionContext;
...@@ -8,9 +8,7 @@ import org.eclipse.graphiti.mm.pictograms.ConnectionDecorator; ...@@ -8,9 +8,7 @@ import org.eclipse.graphiti.mm.pictograms.ConnectionDecorator;
import org.eclipse.graphiti.mm.pictograms.PictogramElement; import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.framed.iorm.model.Relation; import org.framed.iorm.model.Relation;
import org.framed.iorm.model.Type; import org.framed.iorm.model.Type;
import org.framed.iorm.ui.literals.IdentifierLiterals; import org.framed.iorm.ui.util.UIUtil;
import org.framed.iorm.ui.literals.NameLiterals;
import org.framed.iorm.ui.util.PropertyUtil;
/** /**
* This graphiti pattern is used to work with {@link Relation}s * This graphiti pattern is used to work with {@link Relation}s
...@@ -25,39 +23,15 @@ import org.framed.iorm.ui.util.PropertyUtil; ...@@ -25,39 +23,15 @@ import org.framed.iorm.ui.util.PropertyUtil;
*/ */
public class RelationshipImplicationConstraintPattern extends AbstractInterRelationshipConstraintPattern { public class RelationshipImplicationConstraintPattern extends AbstractInterRelationshipConstraintPattern {
/**
* the name of the feature gathered from {@link NameLiterals}
*/
private final String RELATIONSHIP_IMPLICATION_FEATURE_NAME = NameLiterals.RELATIONSHIP_IMPLICATION_FEATURE_NAME;
/**
* the identifier for the icon of the create feature gathered from {@link IdentifierLiterals}
*/
private static final String IMG_ID_FEATURE_RELATIONSHIP_IMPLICATION = IdentifierLiterals.IMG_ID_FEATURE_RELATIONSHIP_IMPLICATION;
/** /**
* Class constructor * Class constructor
*/ */
public RelationshipImplicationConstraintPattern() { public RelationshipImplicationConstraintPattern() {
super(); super();
} FEATURE_NAME = literals.RELATIONSHIP_IMPLICATION_FEATURE_NAME;
ICON_IMG_ID = literals.RELATIONSHIP_IMPLICATION_ICON_IMG_ID;
ICON_IMG_PATH = literals.RELATIONSHIP_IMPLICATION_ICON_IMG_PATH;
/**
* get method for the features name
* @return the name of the feature
*/
@Override
public String getCreateName() {
return RELATIONSHIP_IMPLICATION_FEATURE_NAME;
}
/**
* get method for the identifier of the icon for the create feature
* @return the id of the icon
*/
@Override
public String getCreateImageId() {
return IMG_ID_FEATURE_RELATIONSHIP_IMPLICATION;
} }
//add feature //add feature
...@@ -90,13 +64,13 @@ public class RelationshipImplicationConstraintPattern extends AbstractInterRelat ...@@ -90,13 +64,13 @@ public class RelationshipImplicationConstraintPattern extends AbstractInterRelat
//Step 3 //Step 3
ConnectionDecorator connectionDecorator; ConnectionDecorator connectionDecorator;
connectionDecorator = pictogramElementCreateService.createConnectionDecorator(connection, false, 1.0, true); connectionDecorator = pictogramElementCreateService.createConnectionDecorator(connection, false, 1.0, true);
int points[] = new int[] { -1*ARROWHEAD_LENGTH, ARROWHEAD_HEIGHT, //Point 1 int points[] = new int[] { -1*literals.INTER_REL_ARROWHEAD_LENGTH, literals.INTER_REL_ARROWHEAD_HEIGHT, //Point 1
0, 0, //P2 0, 0, //P2
-1*ARROWHEAD_LENGTH, -1*ARROWHEAD_HEIGHT }; //P3 -1*literals.INTER_REL_ARROWHEAD_LENGTH, -1*literals.INTER_REL_ARROWHEAD_HEIGHT }; //P3
Polygon arrowhead = graphicAlgorithmService.createPolygon(connectionDecorator, points); Polygon arrowhead = graphicAlgorithmService.createPolygon(connectionDecorator, points);
arrowhead.setForeground(manageColor(COLOR_CONSTRAINT_CONNECTION)); arrowhead.setForeground(manageColor(literals.COLOR_INTER_REL_CONNECTIONS));
arrowhead.setBackground(manageColor(COLOR_ARROWHEAD)); arrowhead.setBackground(manageColor(literals.COLOR_INTER_REL_ARROWHEAD));
PropertyUtil.setShape_IdValue(connectionDecorator, SHAPE_ID_INTER_REL_CON); UIUtil.setShape_IdValue(connectionDecorator, literals.SHAPE_ID_INTER_REL_CON);
//Step 4 //Step 4
link(connection, addedRoleImplication); link(connection, addedRoleImplication);
return connection; return connection;
......
package interRelationshipConstraints;
import org.eclipse.graphiti.mm.pictograms.Anchor;
import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.mm.pictograms.ConnectionDecorator;
import org.framed.iorm.ui.util.PropertyUtil;
import interRelationshipConstraints.references.RelationshipReference;
public class Util {
RelationshipReference relationshipReference = new RelationshipReference();
/**
* fetches the anchor used for the pictogram model for a given anchor that is used by a business model element
* of a inter relationship constraint uses
* <p>
* See the implementation of the relationship feature for further informations.
* @param businessModelAnchor the anchor a business model element of a inter relationship constraint uses
* @return the equivalent anchor for the pictogram element of the inter relationship constraint
*/
public Anchor getGraphicalAnchorForBusinessModelAnchor(Anchor businessModelAnchor) {
Connection connection = (Connection) businessModelAnchor.getParent();
for(ConnectionDecorator connectionDecorator : connection.getConnectionDecorators()) {
if(PropertyUtil.isShape_IdValue(connectionDecorator, relationshipReference.getShapeIdRelationshipAnchor()))
return connectionDecorator.getAnchors().get(0);
}
return null;
}
}
package interRelationshipConstraints.references;
public class RelationshipReference {
relationship.Literals literals = new relationship.Literals();
/**
* values for the property shape id gathered from {@link IdentifierLiterals}
*/
private final String SHAPE_ID_RELATIONSHIP_ANCHOR_DECORATOR = literals.SHAPE_ID_RELATIONSHIP_ANCHOR_DECORATOR;
public String getShapeIdRelationshipAnchor() {
return SHAPE_ID_RELATIONSHIP_ANCHOR_DECORATOR;
}
}
...@@ -30,7 +30,7 @@ public class Literals { ...@@ -30,7 +30,7 @@ public class Literals {
//Layout //Layout
//~~~~~~ //~~~~~~
/** /**
* the layout integers used to layout the arrowhead of the inheritances * the layout integers used to layout the arrowhead of the role constraints
*/ */
public final int ROLECONSTRAINT_ARROWHEAD_LENGTH = UILiterals.ARROWHEAD_LENGTH, public final int ROLECONSTRAINT_ARROWHEAD_LENGTH = UILiterals.ARROWHEAD_LENGTH,
ROLECONSTRAINT_ARROWHEAD_HEIGHT = UILiterals.ARROWHEAD_HEIGHT; ROLECONSTRAINT_ARROWHEAD_HEIGHT = UILiterals.ARROWHEAD_HEIGHT;
......
...@@ -22,7 +22,6 @@ import org.eclipse.graphiti.pattern.IConnectionPattern; ...@@ -22,7 +22,6 @@ import org.eclipse.graphiti.pattern.IConnectionPattern;
import org.eclipse.graphiti.pattern.IPattern; import org.eclipse.graphiti.pattern.IPattern;
import org.framed.iorm.ui.graphitifeatures.*; import org.framed.iorm.ui.graphitifeatures.*;
import org.framed.iorm.ui.pattern.connections.*; import org.framed.iorm.ui.pattern.connections.*;
import org.framed.iorm.ui.pattern.connections.interrelationship.*;
import org.framed.iorm.ui.pattern.shapes.*; import org.framed.iorm.ui.pattern.shapes.*;
import org.framed.iorm.ui.util.UIUtil; import org.framed.iorm.ui.util.UIUtil;
...@@ -69,9 +68,6 @@ public class FeatureProvider extends DefaultFeatureProviderWithPatterns { ...@@ -69,9 +68,6 @@ public class FeatureProvider extends DefaultFeatureProviderWithPatterns {
addPattern(new CompartmentTypePattern()); addPattern(new CompartmentTypePattern());
addPattern(new GroupPattern()); addPattern(new GroupPattern());
addPattern(new GroupOrCompartmentTypeElementPattern()); addPattern(new GroupOrCompartmentTypeElementPattern());
//Step 2
addConnectionPattern(new RelationshipImplicationConstraintPattern());
addConnectionPattern(new RelationshipExclusionConstraintPattern());
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment