Commit f8ad4e5c authored by Jesper Öqvist's avatar Jesper Öqvist
Browse files

Refactoring ZipFilePart

parent 55aeaefc
......@@ -494,26 +494,7 @@ aspect ClassPath {
}
public ZipFilePart(ZipFile file) {
zipPath = file.getName();
this.file = file;
// process all entries in the zip file
for (Enumeration e = file.entries() ; e.hasMoreElements() ;) {
ZipEntry entry = (ZipEntry)e.nextElement();
String pathName = new File(entry.getName()).getParent();
if(pathName != null)
pathName = pathName.replace(File.separatorChar, '.');
if(!set.contains(pathName)) {
int pos = 0;
while(pathName != null && -1 != (pos = pathName.indexOf('.', pos + 1))) {
String n = pathName.substring(0, pos);
if(!set.contains(n)) {
set.add(n);
}
}
set.add(pathName);
}
set.add(entry.getName());
}
this(file, file.getName());
}
public boolean selectCompilationUnit(String canonicalName) throws IOException {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment