Skip to content
Snippets Groups Projects
Commit 6b45f227 authored by kevin's avatar kevin
Browse files

Interrelationship constraint can now be created for rels in role groups

also role groups can be played role of fulfillment
parent f3f33300
No related branches found
No related tags found
No related merge requests found
......@@ -111,15 +111,17 @@ public class EditFulfillmentDialog extends Dialog {
* @return all role types of the fulfillments target shape
*/
private List<Shape> getAllRolesofTarget() {
List<Shape> allRoles = new ArrayList<Shape>();
List<Shape> RoleTypesAndGroups = new ArrayList<Shape>();
EList<ModelElement> elementsOfTarget =
((Shape) businessObject.getTarget()).getModel().getElements();
for(ModelElement element : elementsOfTarget) {
if(element instanceof Shape &&
((Shape) element).getType() == Type.ROLE_TYPE)
allRoles.add((Shape) element);
}
return allRoles;
if(element instanceof Shape) {
Shape shape = (Shape) element;
if(shape.getType() == Type.ROLE_TYPE ||
shape.getType() == Type.ROLE_GROUP)
RoleTypesAndGroups.add(shape);
} }
return RoleTypesAndGroups;
}
/**
......
......@@ -83,8 +83,7 @@ public abstract class AbstractInterRelationshipConstraintPattern extends FRaMEDC
@Override
public void postReconnect(IReconnectionContext context) {
Connection connection = context.getConnection();
Anchor graphicalNewAnchor = null;
graphicalNewAnchor = util.getGraphicalAnchorForBusinessModelAnchor(context.getNewAnchor());
Anchor graphicalNewAnchor = util.getGraphicalAnchorForBusinessModelAnchor(context.getNewAnchor());
if(graphicalNewAnchor == null) return;
if(context.getReconnectType() == ReconnectionContext.RECONNECT_SOURCE)
connection.setStart(graphicalNewAnchor);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment