svn commit: r19356 - trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: thn
Date: 2011-05-06 05:44:28-0700
New Revision: 19356

Modified:
   trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java

Log:
fix loading of standard profiles (whatever made it not working anymore)

Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java?view=diff&pathrev=19356&r1=19355&r2=19356
==============================================================================
--- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java	(original)
+++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java	2011-05-06 05:44:28-0700
@@ -728,9 +728,10 @@
             // trying to get a built-in standard profile from eclipse UML2
             try {
                 URI uri = URI.createURI(extentName);
-                Resource res = UMLUtil.getResource(modelImpl, uri, true);
-                return res.getContents();
-            } catch (IllegalArgumentException ex) {
+                Resource r = modelImpl.getEditingDomain().getResourceSet().getResource(uri, true);
+                modelImpl.getReadOnlyMap().put(r, Boolean.TRUE);
+                return r.getContents();
+            } catch (Exception ex) {
                 LOG.warn("failed to get resource: " + extentName); //$NON-NLS-1$
             }
         }

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2732092

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.