- Common ways to obtain MActivity
private void myMethod () {MActivity m =
new MActivity()
List list;(MActivity) list.get(location)
- Smart code suggestions by Codota
}
/** * Helper method disconnecting this edge. */ public void disconnect() { if (this.source != null) { this.source.removeOutgoingSequenceEdge(this); } if (this.target != null) { this.target.removeIncomingSequenceEdge(this); } this.source = null; this.target = null; }
/** * Helper method connecting two activities using this edge. * The previous connection is removed. * * @param source New source of the edge. * @param target New target of the edge. */ public void connect(MActivity source, MActivity target) { if (this.source != null) { this.source.removeOutgoingSequenceEdge(this); } if (this.target != null) { this.target.removeIncomingSequenceEdge(this); } this.source = source; this.target = target; source.addOutgoingSequenceEdge(this); target.addIncomingSequenceEdge(this); }
entry.getValue().getSource().removeOutgoingSequenceEdge((MSequenceEdge) entry.getValue()); if (entry.getValue().getTarget() != null) entry.getValue().getTarget().removeIncomingSequenceEdge((MSequenceEdge) entry.getValue());
/** * Sets the target. */ public void setTarget(mxICell target) { if (getBpmnElement() != null) { MSequenceEdge medge = (MSequenceEdge) getBpmnElement(); if (getTarget() != null) { ((MActivity) ((VActivity) getTarget()).getBpmnElement()).removeIncomingSequenceEdge(medge); medge.setTarget(null); } if (target != null) { MActivity mtarget = (MActivity) ((VActivity) target).getBpmnElement(); mtarget.addIncomingSequenceEdge(medge); medge.setTarget(mtarget); } } super.setTarget(target); } }
medge.getTarget().removeIncomingSequenceEdge(medge); modelcontainer.setDirty(true);