Skip to content
Snippets Groups Projects
Commit bdfd6f9c authored by Simon Barner's avatar Simon Barner
Browse files

AutoLayoutMenu: Avoid class cast exception

* Not all IConnectors are necessarily ILayoutedModelElements

Issue-Ref: 3813
Issue-Url: https://af3-developer.fortiss.org/issues/3813



Signed-off-by: default avatarSimon Barner <barner@fortiss.org>
parent a5537087
No related branches found
No related tags found
1 merge request!643813: Context menu contributors: Fix class cast exception
AutoLayoutMenu.java bca7986c209678ed937548a37db494430877d80e GREEN
AutoLayoutMenu.java 67dc2d04a6f39ec72ea640b745997baa8ff63a49 YELLOW
DiagramTapeMeasure.java 72454e6fe5225dab11d3d691baad93aab7a171c0 GREEN
IAutoLayouter.java de1b11d9e202c7e23352ad85684dbf8a3fd17c7d GREEN
IAutoLayouterTapeMeasure.java df186e0ba505e0ecda211b1df76cf12f3245b47e GREEN
......
......@@ -82,8 +82,10 @@ public class AutoLayoutMenu implements IContextMenuContributor {
* outgoing {@link IConnection}.
*/
private boolean hasConnectedConnectorWithAngle(IHierarchicElement element) {
for(IConnector connector : element.getConnectors()) {
if(getAngle((ILayoutedModelElement)connector, CONNECTOR_ANGLE) != null) {
for(ILayoutedModelElement conLayouted : pickInstanceOf(ILayoutedModelElement.class,
element.getConnectors())) {
if(getAngle(conLayouted, CONNECTOR_ANGLE) != null) {
IConnector connector = (IConnector)conLayouted;
return !connector.getIncoming().isEmpty() || !connector.getOutgoing().isEmpty();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment