Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2007-05-18 18:42:56 -0400
committeratikhomirov2007-05-18 18:42:56 -0400
commit6625df8d83831c324543be634b0211e1baf70ca1 (patch)
treed92b5d964a242fb6f8e96a764c55e492416259bd
parenta2dd34864ffe73c522410722270f2c1598f4d1b7 (diff)
downloadorg.eclipse.gmf-tooling-6625df8d83831c324543be634b0211e1baf70ca1.tar.gz
org.eclipse.gmf-tooling-6625df8d83831c324543be634b0211e1baf70ca1.tar.xz
org.eclipse.gmf-tooling-6625df8d83831c324543be634b0211e1baf70ca1.zip
do not process up-to-date versions of the model, consult delegate only when old version was detected
-rw-r--r--plugins/org.eclipse.gmf.common/src/org/eclipse/gmf/internal/common/migrate/MigrationResource.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/org.eclipse.gmf.common/src/org/eclipse/gmf/internal/common/migrate/MigrationResource.java b/plugins/org.eclipse.gmf.common/src/org/eclipse/gmf/internal/common/migrate/MigrationResource.java
index 5f494b1fa..401a813c3 100644
--- a/plugins/org.eclipse.gmf.common/src/org/eclipse/gmf/internal/common/migrate/MigrationResource.java
+++ b/plugins/org.eclipse.gmf.common/src/org/eclipse/gmf/internal/common/migrate/MigrationResource.java
@@ -29,6 +29,7 @@ import org.xml.sax.helpers.DefaultHandler;
public abstract class MigrationResource extends ToolResource {
private boolean isOldVersionDetected;
+ private MigrationHelper myMigrationHelper;
protected MigrationResource(URI uri) {
super(uri);
@@ -71,6 +72,9 @@ public abstract class MigrationResource extends ToolResource {
}
private void handleOldVersionDetected() {
+ if (myMigrationHelper != null) {
+ myMigrationHelper.enableDelegate(true);
+ }
isOldVersionDetected = true;
}
@@ -90,7 +94,8 @@ public abstract class MigrationResource extends ToolResource {
protected XMLHelper createXMLHelper() {
MigrationHelperDelegate delegate = createDelegate();
assert delegate != null;
- return new MigrationHelper(this, delegate);
+ myMigrationHelper = new MigrationHelper(this, delegate);
+ return myMigrationHelper;
}
protected abstract Collection<String> getBackwardSupportedURIs();

Back to the top