Changeset 102 for trunk/src/org/expeditee/actions/Actions.java
- Timestamp:
- 06/11/08 09:22:56 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/actions/Actions.java
r86 r102 72 72 // Get a File object for the package 73 73 File directory = null; 74 String path = pckgname.replace('.', File.separatorChar); 74 // Must be a forward slash for loading resources 75 String path = pckgname.replace('.', '/'); 76 //System.out.println("Get classes: " + path); 75 77 try { 76 78 ClassLoader cld = Thread.currentThread().getContextClassLoader(); … … 103 105 + ") does not appear to be a valid package"); 104 106 } 105 107 //System.out.println("Path:" + directory.getPath()); 106 108 int splitPoint = directory.getPath().indexOf('!'); 107 109 if (splitPoint > 0) { … … 116 118 jarName = jarName.replace("%20", " "); 117 119 } 118 120 //System.out.println("JarName:" + jarName); 119 121 JarFile jarFile = new JarFile(jarName); 120 122 121 123 Enumeration entries = jarFile.entries(); 124 int classCount = 0; 122 125 while (entries.hasMoreElements()) { 123 126 ZipEntry entry = (ZipEntry) entries.nextElement(); … … 126 129 if (className.endsWith(".class") 127 130 && !className.contains("$")) { 131 classCount++; 132 // The forward slash below is a forwards slash for 133 // both windows and linux 128 134 classes.add(Class.forName(className.substring(0, 129 135 className.length() - 6).replace('/', '.'))); … … 132 138 } 133 139 jarFile.close(); 140 //System.out.println("Loaded " + classCount + " classes from " 141 // + pckgname); 134 142 135 143 } catch (Exception e) { … … 353 361 FrameGraphics.ErrorMessage("Incorrect parameters for " + mname); 354 362 } else { 355 assert (false);363 assert (false); 356 364 FrameGraphics.ErrorMessage(mname + " action not found"); 357 365 }
Note:
See TracChangeset
for help on using the changeset viewer.