Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 2604

Summary: [Import/Export] EC DCR: Zip import should allow prefix to be ignored (1GHOMDZ)
Product: [Eclipse Project] Platform Reporter: Nick Edgar <n.a.edgar>
Component: UIAssignee: Kevin Haaland <Kevin_Haaland>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 Keywords: investigate
Version: 2.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Nick Edgar CLA 2001-10-10 22:39:42 EDT
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".
Comment 1 DJ Houghton CLA 2001-10-29 19:03:58 EST
PRODUCT VERSION:
0.9

Comment 2 Nick Edgar CLA 2002-01-26 22:13:02 EST
Simple workaround.  Defer.
Comment 3 Randy Giffen CLA 2002-08-08 14:50:44 EDT
Reopen to investigate
Comment 4 Tod Creasey CLA 2002-08-26 11:19:55 EDT
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.