Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.codegen.ecore/templates/editor/Editor.javajet')
-rw-r--r--plugins/org.eclipse.emf.codegen.ecore/templates/editor/Editor.javajet5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.codegen.ecore/templates/editor/Editor.javajet b/plugins/org.eclipse.emf.codegen.ecore/templates/editor/Editor.javajet
index 14c6b76ea..e4dc4b4cf 100644
--- a/plugins/org.eclipse.emf.codegen.ecore/templates/editor/Editor.javajet
+++ b/plugins/org.eclipse.emf.codegen.ecore/templates/editor/Editor.javajet
@@ -1305,11 +1305,12 @@ public class <%=genPackage.getEditorClassName()%>
*/
public Diagnostic analyzeResourceProblems(Resource resource, Exception exception)
{
- if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty())
+ boolean hasErrors = !resource.getErrors().isEmpty();
+ if (hasErrors || !resource.getWarnings().isEmpty())
{
BasicDiagnostic basicDiagnostic =
new BasicDiagnostic
- (Diagnostic.ERROR,
+ (hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING,
"<%=genPackage.getGenModel().getEditorPluginID()%>",<%=genModel.getNonNLS()%>
0,
getString("_UI_CreateModelError_message", resource.getURI()),<%=genModel.getNonNLS()%>

Back to the top