Browse Source

Fix exception when non-selectable edit parts are tried to be selected (#2152)

Thomas Kutz 7 years ago
parent
commit
0fff6a8894

+ 1 - 0
plugins/org.yakindu.sct.model.stext.ui/META-INF/MANIFEST.MF

@@ -46,6 +46,7 @@ Export-Package: org.yakindu.sct.model.stext.ui;
    org.antlr.runtime,
    org.eclipse.xtext.ui.editor.contentassist.antlr.internal,
    org.yakindu.sct.model.stext.services",
+ org.yakindu.sct.model.stext.ui.document,
  org.yakindu.sct.model.stext.ui.help,
  org.yakindu.sct.model.stext.ui.hyperlink,
  org.yakindu.sct.model.stext.ui.internal;uses:="org.eclipse.ui.plugin,org.osgi.framework,com.google.inject",

+ 3 - 1
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/partitioning/DiagramPartitioningUtil.java

@@ -212,7 +212,9 @@ public class DiagramPartitioningUtil {
 		EditPart firstPrimary = null;
 		for (Iterator<EditPart> it = editParts.iterator(); it.hasNext();) {
 			EditPart nextPart = it.next();
-			diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
+			if (nextPart.isSelectable()) {
+				diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
+			}
 			if (firstPrimary == null && nextPart instanceof IPrimaryEditPart) {
 				firstPrimary = nextPart;
 			}