svn commit: r14978 - branches/gsoc2008/work_criticsprofiles_maurelio1234/src/org/argouml/moduleloader/ModuleLoader2.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: maurelio1234
Date: 2008-06-17 04:54:53-0700
New Revision: 14978

Modified:
   branches/gsoc2008/work_criticsprofiles_maurelio1234/src/org/argouml/moduleloader/ModuleLoader2.java

Log:
allowing profile without model

Modified: branches/gsoc2008/work_criticsprofiles_maurelio1234/src/org/argouml/moduleloader/ModuleLoader2.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2008/work_criticsprofiles_maurelio1234/src/org/argouml/moduleloader/ModuleLoader2.java?view=diff&rev=14978&p1=branches/gsoc2008/work_criticsprofiles_maurelio1234/src/org/argouml/moduleloader/ModuleLoader2.java&p2=branches/gsoc2008/work_criticsprofiles_maurelio1234/src/org/argouml/moduleloader/ModuleLoader2.java&r1=14977&r2=14978
==============================================================================
--- branches/gsoc2008/work_criticsprofiles_maurelio1234/src/org/argouml/moduleloader/ModuleLoader2.java	(original)
+++ branches/gsoc2008/work_criticsprofiles_maurelio1234/src/org/argouml/moduleloader/ModuleLoader2.java	2008-06-17 04:54:53-0700
@@ -641,10 +641,16 @@
                     }
                     Set<CrUML> profiles = loadCritiquesForProfile(attr, classloader);
                     String modelPath = attr.getValue("Model");
+                    URL modelURL = null;
                     
-                    UserDefinedProfile udp = new UserDefinedProfile(new URL(
-                            "jar:file:" + file.getCanonicalPath() + "!"
-                                    + modelPath), profiles);
+                    if (modelPath != null) {
+                        modelURL = new URL(
+                                "jar:file:" + file.getCanonicalPath() + "!"
+                                + modelPath);
+                    }
+                    
+                    UserDefinedProfile udp = new UserDefinedProfile(entryName,
+                            modelURL, profiles);
                     
                     ProfileFacade.getManager().registerProfile(udp);
                     LOG.debug("Registered Profile: " + udp.getDisplayName()
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.