Lines 24-35
Link Here
|
24 |
|
24 |
|
25 |
public static boolean isExternal(DiagramLabel diagramLabel) { |
25 |
public static boolean isExternal(DiagramLabel diagramLabel) { |
26 |
FigureHandle figure = diagramLabel.getFigure(); |
26 |
FigureHandle figure = diagramLabel.getFigure(); |
|
|
27 |
if (figure == null){ |
28 |
throw new NullPointerException("FigureHandler is null for: " + diagramLabel); |
29 |
} |
30 |
|
27 |
if (figure instanceof Figure) { |
31 |
if (figure instanceof Figure) { |
28 |
return ((Figure) figure).getParent() == null; |
32 |
return ((Figure) figure).getParent() == null; |
29 |
} else if (figure instanceof FigureAccessor) { |
33 |
} else if (figure instanceof FigureAccessor) { |
30 |
return false; |
34 |
return false; |
31 |
} |
35 |
} |
32 |
throw new IllegalStateException("No more known subclasses of FigureHandle"); |
36 |
throw new IllegalStateException("No more known subclasses of FigureHandle: " + figure); |
33 |
} |
37 |
} |
34 |
|
38 |
|
35 |
} |
39 |
} |