[160299] Automatically saving migrated models.
diff --git a/plugins/org.eclipse.uml2.uml.editor/src/org/eclipse/uml2/uml/editor/presentation/UMLEditor.java b/plugins/org.eclipse.uml2.uml.editor/src/org/eclipse/uml2/uml/editor/presentation/UMLEditor.java
index 8c69d9a..9a1095c 100644
--- a/plugins/org.eclipse.uml2.uml.editor/src/org/eclipse/uml2/uml/editor/presentation/UMLEditor.java
+++ b/plugins/org.eclipse.uml2.uml.editor/src/org/eclipse/uml2/uml/editor/presentation/UMLEditor.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
*
- * $Id: UMLEditor.java,v 1.24.2.1 2006/08/24 18:08:46 khussey Exp $
+ * $Id: UMLEditor.java,v 1.24.2.2 2006/10/10 17:44:26 khussey Exp $
*/
package org.eclipse.uml2.uml.editor.presentation;
@@ -911,6 +911,7 @@
createModelGen();
+ boolean saveNeeded = false;
Map resourceToURIMap = new HashMap();
EList resources = resourceSet.getResources();
@@ -939,6 +940,8 @@
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
+
+ saveNeeded = true;
}
}
@@ -954,6 +957,14 @@
Map.Entry entry = (Map.Entry) entries.next();
((Resource) entry.getKey()).setURI((URI) entry.getValue());
}
+
+ if (saveNeeded) {
+ IProgressMonitor progressMonitor = getActionBars()
+ .getStatusLineManager() != null
+ ? getActionBars().getStatusLineManager().getProgressMonitor()
+ : new NullProgressMonitor();
+ doSave(progressMonitor);
+ }
}
/**