Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratischenko2015-09-07 04:54:19 -0400
committerMichael Golubev2015-09-07 18:16:22 -0400
commit53057f1b89dac6cf89cf36becd968e5c4c012d6d (patch)
treed17858eafb6662ff88cc20848768286a1b13af06
parent2a14ff43193e78a07b7cb46f4ff4138ef3938aa3 (diff)
downloadorg.eclipse.gmf-tooling-53057f1b89dac6cf89cf36becd968e5c4c012d6d.tar.gz
org.eclipse.gmf-tooling-53057f1b89dac6cf89cf36becd968e5c4c012d6d.tar.xz
org.eclipse.gmf-tooling-53057f1b89dac6cf89cf36becd968e5c4c012d6d.zip
LinkLF - fix NPE while move affixed node with connected link
Change-Id: I701dfcb104e168880360f71ebf6ea0887e8e1862 Signed-off-by: atischenko <tischenko@montages.com>
-rw-r--r--plugins/org.eclipse.gmf.tooling.runtime/src/org/eclipse/gmf/tooling/runtime/linklf/policies/AdjustBorderItemAnchorsEditPolicy.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/org.eclipse.gmf.tooling.runtime/src/org/eclipse/gmf/tooling/runtime/linklf/policies/AdjustBorderItemAnchorsEditPolicy.java b/plugins/org.eclipse.gmf.tooling.runtime/src/org/eclipse/gmf/tooling/runtime/linklf/policies/AdjustBorderItemAnchorsEditPolicy.java
index eeb9ab2bd..905d24e08 100644
--- a/plugins/org.eclipse.gmf.tooling.runtime/src/org/eclipse/gmf/tooling/runtime/linklf/policies/AdjustBorderItemAnchorsEditPolicy.java
+++ b/plugins/org.eclipse.gmf.tooling.runtime/src/org/eclipse/gmf/tooling/runtime/linklf/policies/AdjustBorderItemAnchorsEditPolicy.java
@@ -189,8 +189,13 @@ public class AdjustBorderItemAnchorsEditPolicy extends
protected PrecisionPoint rotateAnchorLocation(ConnectionAnchor anchor,
int quarters) {
String terminal = ((BaseSlidableAnchor) anchor).getTerminal();
- PrecisionPoint result = BaseSlidableAnchor
+ PrecisionPoint result;
+ if (terminal.length() == 0) {
+ result = new PrecisionPoint(0.5, 0.5);
+ } else {
+ result = BaseSlidableAnchor
.parseTerminalString(terminal);
+ }
for (int i = 0; i < quarters; i++) {
double newX = 1. - result.preciseY();
double newY = result.preciseX();

Back to the top