Connector endConnector = null;
if (endTerminal != null) {
- endConnector = createConnectorForNode(graph, attachToConnection, endTerminal, EdgeEnd.End, judgment);
+ endConnector = createConnectorForNode(graph, attachToConnection, endTerminal, flagType == FlagClass.Type.In ? EdgeEnd.Begin : EdgeEnd.End, judgment);
} else if (createFlags) {
EdgeEnd end = flagType == FlagClass.Type.In ? EdgeEnd.Begin : EdgeEnd.End;
IElement endFlag = createFlag(graph, attachToConnection, end, controlPoints.getLast(), flagType, null);
EdgeEnd end, ConnectionJudgement judgment) throws DatabaseException {
IConnectionPoint cp = ConnectionUtil.toConnectionPoint(graph, element, terminal);
CPTerminal cpt = (cp instanceof CPTerminal) ? (CPTerminal) cp : null;
- Resource attachment = judgment.attachmentRelations.get(graph, cpt);
+ Resource attachment = null;
+ if (judgment.attachmentRelations != null)
+ attachment = judgment.attachmentRelations.get(graph, cpt);
if (attachment == null)
attachment = cu.toHasConnectorRelation(end);
Resource connector = cu.getOrCreateConnector(connection, element, terminal, end, attachment);