Bug 2604 - [Import/Export] EC DCR: Zip import should allow prefix to be ignored (1GHOMDZ)
Summary: [Import/Export] EC DCR: Zip import should allow prefix to be ignored (1GHOMDZ)
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Kevin Haaland CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2001-10-10 22:39 EDT by Nick Edgar CLA
Modified: 2002-08-26 11:19 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.