svn commit: r15081 - trunk/src/argouml-app/src/org/argouml/moduleloader/ModuleLoader2.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: maurelio1234
Date: 2008-06-25 07:03:03-0700
New Revision: 15081

Modified:
   trunk/src/argouml-app/src/org/argouml/moduleloader/ModuleLoader2.java

Log:
removing unstable code put on the repository for loading profiles

Modified: trunk/src/argouml-app/src/org/argouml/moduleloader/ModuleLoader2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/moduleloader/ModuleLoader2.java?view=diff&rev=15081&p1=trunk/src/argouml-app/src/org/argouml/moduleloader/ModuleLoader2.java&p2=trunk/src/argouml-app/src/org/argouml/moduleloader/ModuleLoader2.java&r1=15080&r2=15081
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/moduleloader/ModuleLoader2.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/moduleloader/ModuleLoader2.java	2008-06-25 07:03:03-0700
@@ -51,9 +51,6 @@
 import org.argouml.application.api.AbstractArgoJPanel;
 import org.argouml.application.api.Argo;
 import org.argouml.i18n.Translator;
-import org.argouml.profile.ProfileException;
-import org.argouml.profile.ProfileFacade;
-import org.argouml.profile.UserDefinedProfile;
 
 
 /**
@@ -586,7 +583,6 @@
             return;
 	}
 
-        
         Manifest manifest;
         try {
             manifest = jarfile.getManifest();
@@ -620,9 +616,6 @@
         if (loadedClass) {
             // Add this to search list for I18N properties
             Translator.addClassLoader(classloader);
-            
-            LOG.info("Reading profiles...");
-            loadProfilesFromJarFile(jarfile, file);
         } else {
             LOG.error("Failed to find any loadable ArgoUML modules in jar "
                     + file);
@@ -630,37 +623,6 @@
     }
 
     /**
-     * Searches for Profiles models (*.xmi) files in the directory "
-     * 
-     * @param jarfile the jarfile
-     * @param file 
-     */
-    private void loadProfilesFromJarFile(JarFile jarfile, File file) {       
-        Enumeration<JarEntry> entries = jarfile.entries();
-        // TODO: This should ask the module for its profiles rather than just
-        // assuming that any .xmi file is a profile.  The module may have 
-        // bundled .xmi files for other reasons.
-        for (JarEntry entry = entries.nextElement(); entries.hasMoreElements(); 
-                entry = entries.nextElement()) {
-            if (entry.getName().toLowerCase().endsWith(".xmi")) {
-                try {
-                    URL url = new URL("jar:file:" + file.getCanonicalPath()
-                            + "!/" + entry.getName());
-                    UserDefinedProfile udp = new UserDefinedProfile(url);
-                    ProfileFacade.getManager().registerProfile(udp);
-                    
-                    LOG.debug("Registered Profile: " + udp.getDisplayName()
-                            + "...");
-                } catch (ProfileException e) {
-                    LOG.error("Exception", e);
-                } catch (IOException e) {
-                    LOG.error("Exception", e);
-                }
-            }
-        }
-    }
-
-    /**
      * Process a JAR file entry, attempting to load anything that looks like a
      * Java class.
      *
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.