public void create(WriteGraph graph, ConnectionJudgement judgment, Deque<ControlPoint> controlPoints,\r
TerminalInfo startTerminal, TerminalInfo endTerminal) throws DatabaseException {\r
\r
- if(startTerminal == null) return;\r
- if(endTerminal == null) return;\r
- \r
graph.markUndoPoint();\r
\r
// If needs a valve, we will create two separate connections\r
createConnection(graph, judgment, controlPoints, startTerminal, endTerminal, false);\r
}\r
\r
- String startElementName = startTerminal.e.getHint(ElementHints.KEY_TEXT);\r
- String endElementName = endTerminal.e.getHint(ElementHints.KEY_TEXT);\r
\r
- String startElementResource = startTerminal.e.getHint(ElementHints.KEY_OBJECT).toString();\r
- String endElementResource = endTerminal.e.getHint(ElementHints.KEY_OBJECT).toString();\r
+ String startElementName = startTerminal != null ? startTerminal.e.getHint(ElementHints.KEY_TEXT).toString() : "null";\r
+ String endElementName = endTerminal != null ? endTerminal.e.getHint(ElementHints.KEY_TEXT).toString() : "null";\r
+ \r
+ String startElementResource = startTerminal != null ? startTerminal.e.getHint(ElementHints.KEY_OBJECT).toString() : "null";\r
+ String endElementResource = endTerminal != null ? endTerminal.e.getHint(ElementHints.KEY_OBJECT).toString() : "null";\r
\r
Layer0Utils.addCommentMetadata(graph, "Created dependency starting from " + startElementName + " " + startElementResource + " and ending to " + endElementName + " " + endElementResource);\r
}\r