Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2007-05-18 19:06:21 -0400
committeratikhomirov2007-05-18 19:06:21 -0400
commitf8426f23085dff4cca130259c1558ba7f5e94a47 (patch)
treeb73592b438643d13adc5f9262ed1c95b3fa941b7
parent2da01a097abb91efb54ca69d1dc463d88f21d1c6 (diff)
downloadorg.eclipse.gmf-tooling-f8426f23085dff4cca130259c1558ba7f5e94a47.tar.gz
org.eclipse.gmf-tooling-f8426f23085dff4cca130259c1558ba7f5e94a47.tar.xz
org.eclipse.gmf-tooling-f8426f23085dff4cca130259c1558ba7f5e94a47.zip
do not report warnings in UI
-rw-r--r--plugins/org.eclipse.gmf.common/src/org/eclipse/gmf/internal/common/migrate/ModelLoadHelper.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/org.eclipse.gmf.common/src/org/eclipse/gmf/internal/common/migrate/ModelLoadHelper.java b/plugins/org.eclipse.gmf.common/src/org/eclipse/gmf/internal/common/migrate/ModelLoadHelper.java
index 096236c2b..fb6a3618e 100644
--- a/plugins/org.eclipse.gmf.common/src/org/eclipse/gmf/internal/common/migrate/ModelLoadHelper.java
+++ b/plugins/org.eclipse.gmf.common/src/org/eclipse/gmf/internal/common/migrate/ModelLoadHelper.java
@@ -16,6 +16,7 @@ import java.text.MessageFormat;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.common.util.WrappedException;
import org.eclipse.emf.ecore.EObject;
@@ -144,8 +145,11 @@ public class ModelLoadHelper {
EcorePlugin.INSTANCE.getPluginLogger().log(e);
resource.getErrors().add(ModelLoadHelper.createDiagnostic(resource, e));
}
-
- if(!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) {
+ EList<Resource.Diagnostic> warnings = resource.getWarnings();
+ if (warnings.size() == 1 && warnings.get(0) instanceof MigrationResource.Diagnostic) {
+ return diagnostic;
+ }
+ if(!resource.getErrors().isEmpty() || !warnings.isEmpty()) {
Diagnostic resourceDiagnostic = EcoreUtil.computeDiagnostic(resource, true);
Integer severityOpt = new Integer(resourceDiagnostic.getSeverity() == Diagnostic.ERROR ? 0 : 1);
String message = MessageFormat.format(Messages.modelLoadedWithProblems,

Back to the top