Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schuetz2012-01-31 16:27:01 -0500
committerThomas Schuetz2012-01-31 16:27:01 -0500
commit488cba1972de3ffff229cd754a774931045a2b04 (patch)
treec5c2198307b4fce243caaa21952ec06852e1a588
parent01de373df4a524f266ad4250ea54d9aa30299920 (diff)
parentdfcce1ed22bce75524328a6ce76eb23729423dab (diff)
downloadorg.eclipse.etrice-488cba1972de3ffff229cd754a774931045a2b04.tar.gz
org.eclipse.etrice-488cba1972de3ffff229cd754a774931045a2b04.tar.xz
org.eclipse.etrice-488cba1972de3ffff229cd754a774931045a2b04.zip
Merge branch 'master' of ssh://git.eclipse.org/gitroot/etrice/org.eclipse.etrice
-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