Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2006-05-03 13:45:54 +0000
committeratikhomirov2006-05-03 13:45:54 +0000
commit75752bc1b043c1a765f20ee2b62b3424b2d2c537 (patch)
tree1da70c4dacabdf97b8a4a9b509d2a955f2d0edc8 /plugins/org.eclipse.gmf.codegen.edit
parentf3d28b75a5e3fc2146e416213a521aae541c3c22 (diff)
downloadorg.eclipse.gmf-tooling-75752bc1b043c1a765f20ee2b62b3424b2d2c537.tar.gz
org.eclipse.gmf-tooling-75752bc1b043c1a765f20ee2b62b3424b2d2c537.tar.xz
org.eclipse.gmf-tooling-75752bc1b043c1a765f20ee2b62b3424b2d2c537.zip
regenerated with EMF RC2, check for (outdated) top-level genDiagram removed
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen.edit')
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenEditor.java28
1 files changed, 18 insertions, 10 deletions
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenEditor.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenEditor.java
index faa000f46..8a80bad7c 100644
--- a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenEditor.java
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenEditor.java
@@ -846,29 +846,37 @@ public class GMFGenEditor
* @generated NOT
*/
public void createModel() {
- // I assume that the input is a file object.
+ // Assumes that the input is a file object.
//
IFileEditorInput modelFile = (IFileEditorInput)getEditorInput();
-
+ URI resourceURI = URI.createPlatformResourceURI(modelFile.getFile().getFullPath().toString());;
+ Exception exception = null;
+ Resource resource = null;
try {
// Load the resource through the editing domain.
//
- // [vano] reconcile genModel for domain
- Resource res = editingDomain.loadResource(URI.createPlatformResourceURI(modelFile.getFile().getFullPath().toString()).toString());
- Object o = res.getContents().get(0);
+ resource = editingDomain.getResourceSet().getResource(resourceURI, true);
+ // [vano] reconcile genModel for domain --start
+ Object o = resource.getContents().get(0);
GenModel toReload = null;
- if (o instanceof GenDiagram) {
- toReload = ((GenDiagram) o).getEditorGen().getDomainGenModel();
- } else if (o instanceof GenEditorGenerator) {
+ if (o instanceof GenEditorGenerator) {
toReload = ((GenEditorGenerator) o).getDomainGenModel();
}
if (toReload != null) {
toReload.reconcile();
}
+ // reconcile -end
}
- catch (Exception exception) {
- EditorPlugin.INSTANCE.log(exception);
+ catch (Exception e) {
+ exception = e;
+ resource = editingDomain.getResourceSet().getResource(resourceURI, false);
+ }
+
+ Diagnostic diagnostic = analyzeResourceProblems(resource, exception);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
+ editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);
}
/**

Back to the top