summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2013-03-22 07:27:55 (EDT)
committer Sven Rottstock2013-03-22 07:27:55 (EDT)
commita42d68aec4251d84572ed73d039197e4f636240b (patch)
tree1457cbf70a97ae4f536f63f3426026d756fdd758
parent093454c5f443fb6b0f3781fdc3ac3e9368ddba3c (diff)
downloadorg.eclipse.stardust.ide-a42d68aec4251d84572ed73d039197e4f636240b.zip
org.eclipse.stardust.ide-a42d68aec4251d84572ed73d039197e4f636240b.tar.gz
org.eclipse.stardust.ide-a42d68aec4251d84572ed73d039197e4f636240b.tar.bz2
Jira-ID: CRNT-28488
Eclipse Modeler: Unable to import model elements git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@63902 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/carnot/util/WorkflowModelManager.java34
1 files changed, 17 insertions, 17 deletions
diff --git a/model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/carnot/util/WorkflowModelManager.java b/model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/carnot/util/WorkflowModelManager.java
index d220169..a63fd7d 100644
--- a/model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/carnot/util/WorkflowModelManager.java
+++ b/model/org.eclipse.stardust.model.xpdl/src/org/eclipse/stardust/model/xpdl/carnot/util/WorkflowModelManager.java
@@ -66,7 +66,7 @@ public class WorkflowModelManager
protected ModelType model = null;
private ModelOidUtil modelOidUtil;
-
+
public ModelOidUtil getModelOidUtil()
{
return modelOidUtil;
@@ -122,7 +122,7 @@ public class WorkflowModelManager
// this will cascade the initialization of all dependent packages
// and is a noop of the package was already initialized
CarnotWorkflowModelPackageImpl.init();
-
+
Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
Map<String, Object> extensionMap = reg.getExtensionToFactoryMap();
if (!extensionMap.containsKey(EXT_CWM))
@@ -149,8 +149,8 @@ public class WorkflowModelManager
static public CarnotWorkflowModelFactory getFactory()
{
if (cwmFactory == null)
- {
- cwmFactory = CarnotWorkflowModelFactory.eINSTANCE;
+ {
+ cwmFactory = CarnotWorkflowModelFactory.eINSTANCE;
}
return cwmFactory;
}
@@ -175,7 +175,7 @@ public class WorkflowModelManager
/**
* Loads the content of the model from the file.
- *
+ *
* @param uri
*/
public void load(URI uri) throws IOException
@@ -186,7 +186,7 @@ public class WorkflowModelManager
/**
* Loads the content of the model from the file.
- *
+ *
* @param path
*/
public void load(File file) throws IOException
@@ -194,13 +194,13 @@ public class WorkflowModelManager
getResource(URI.createFileURI(file.getAbsolutePath()), false);
doLoad(null);
}
-
+
public void load(URI uri, InputStream is) throws IOException
{
getResource(uri, false);
doLoad(is);
}
-
+
private void doLoad(InputStream is) throws IOException
{
Map<String, Object> options = CollectionUtils.newMap();
@@ -281,7 +281,7 @@ public class WorkflowModelManager
/**
* reloads the content of the model from the file.
- *
+ *
* @param path
*/
public void reload(URI uri) throws IOException
@@ -292,18 +292,18 @@ public class WorkflowModelManager
/**
* Saves the content of the model to the file.
- *
+ *
* @param path
*/
public void save(URI uri) throws IOException
{
getResource(uri, false);
-
+
if ((null != resource) && !CompareHelper.areEqual(resource.getURI(), uri))
{
resource.setURI(uri);
}
-
+
Map<String, Object> options = CollectionUtils.newMap();
// options.put(XMLResource.OPTION_DECLARE_XML, Boolean.TRUE);
options.put(XMLResource.OPTION_ENCODING, XMLConstants.ENCODING_ISO_8859_1);
@@ -341,7 +341,7 @@ public class WorkflowModelManager
StreamResult target = new StreamResult(
((CarnotWorkflowModelResourceImpl) resource).getNewOutputStream());
-
+
TransformerFactory transformerFactory = XmlUtils.newTransformerFactory();
Transformer xpdlTrans = transformerFactory.newTransformer(xsltSource);
@@ -389,13 +389,13 @@ public class WorkflowModelManager
}
return model;
}
-
+
public void resolve(ModelType model)
{
- long maxUsedOid = ModelUtils.getMaxUsedOid(model);
- ModelOidUtil.register(model, maxUsedOid, resource);
+ long maxUsedOid = ModelUtils.getMaxUsedOid(model);
+ modelOidUtil = ModelOidUtil.register(model, maxUsedOid, resource);
// resolve string-id references in attributes
- ModelUtils.resolve(model, model);
+ ModelUtils.resolve(model, model);
}
} \ No newline at end of file