Community
Participate
Working Groups
EC post "Import source from jar file" on 7/30/2001 by DW: > I was importing .java files from a .jar file that had a directory structure > in it. The directory structure was a/b/c/d, but the package statements in > the .java files were "package b.c.d;". Yet Eclipse created packages names > "a.b.c.d" after import. It is apparently using the directory structure of > the jar file to determine package names rather than looking at the source > files themselves. I don't believe VAME worked this way. Is this a known > issue, or am I doing something silly? > NOTES: NE (7/30/01 10:57:13 AM) The import wizard does not parse the .java files. This is mainly because the Zip import functionality (which also handles Jars), is not specifically tied to the Java support in JDT. It's a general workbench feature, which would be there even if you didn't have JDT installed. It just imports the files with no parsing. VAME was smarter because its import was Java-specific. It would help to have an option in the Zip import for specifying a prefix to ignore; "a" in your case. I've filed a PR for this. This would be similar to how you can specify a prefix when associating a source zip with your jar for debugging. In the mean time, your only recourse is to import it, allowing "a" to be created, then move "b" up one level and delete the empty "a".
PRODUCT VERSION: 0.9
Simple workaround. Defer.
Reopen to investigate
This can actually be done by deselecting and reeselecting the top value and then the top item gets grayed out and not imported (only white checked items get imported). I realize that this not an optimal solution but there is not currently a java aware import wizard.