Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/RoomDiagramEditor.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/RoomDiagramEditor.java b/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/RoomDiagramEditor.java
index bc239c75e..e255919e7 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/RoomDiagramEditor.java
+++ b/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/RoomDiagramEditor.java
@@ -23,6 +23,7 @@ import org.eclipse.graphiti.ui.editor.DiagramEditor;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.xtext.diagnostics.Severity;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.serializer.ISerializer;
import org.eclipse.xtext.util.CancelIndicator;
@@ -105,8 +106,16 @@ public class RoomDiagramEditor extends DiagramEditor {
}
});
if (!result.isEmpty()) {
- MessageDialog.openError(Display.getDefault().getActiveShell(), "ERROR", "Internal error: model is invalid, can't save");
- return;
+ boolean error = false;
+ for (Issue issue : result) {
+ if (issue.isSyntaxError() || issue.getSeverity()==Severity.ERROR) {
+ error = true;
+ }
+ }
+ if (error) {
+ MessageDialog.openError(Display.getDefault().getActiveShell(), "ERROR", "Internal error: model is invalid, can't save");
+ return;
+ }
}
}
}

Back to the top