Bug 21864 - Associate package hierarchy with top-level source directory
Summary: Associate package hierarchy with top-level source directory
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.1 M3   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-24 13:55 EDT by Scott Leschke CLA
Modified: 2002-11-13 04:05 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Leschke CLA 2002-07-24 13:55:38 EDT
When you create a Java project and identify your top level source directories, 
it would be nice to be able to associate an implied package hierarchy (ex. 
com.mycompany.myproject) with the folder. JDT seems to demand that the source 
structure mirrors the build structure. While this certainly isn't fatal, having 
2 or 3 levels of empty directories just to satisfy the compiler is a pain.

Please correct me if there is some way to acheive this effect that I'm unaware 
of.
Comment 1 Kent Johnson CLA 2002-07-24 14:20:36 EDT
Sorry I'm not sure I'm following you... do you want to say the source 
folder 'src' is equal to 'a.b.c'? A subfolder 'd' should be interpreted as a 
package 'a.b.c.d'?
Comment 2 Scott Leschke CLA 2002-07-24 14:32:28 EDT
Yes, that's exactly what I mean.
Comment 3 Philipe Mulet CLA 2002-07-25 05:10:09 EDT
I am not fan of the proposal. I think you simply need a better UI to 
hide/collapse these uninteresting packages.

If you use the package explorer, it does hide them though. Why are these 
folders bothering you ?

Note that other compilers have the same behavior (e.g. try to compile X.java 
against a bunch of sources on your classpath. The bunch of sources has to be 
organized properly as well).

Comment 4 Scott Leschke CLA 2002-07-25 13:13:38 EDT
I agree it's a minor issue and that yes, the Package Explorer does show them 
collapsed, which is what makes this tolerable, but it just seems silly to have 
to have 3 levels of nothing just to satify the IDE. Sun's compiler doesn't 
really care as long as your compiling into a different destination from the 
source, which we're doing.

No big deal though. Just a minor annoyance. I will admit to that. We've already 
broken down and added the layers of nothing. I just thought I'd throw it out 
there as a possible enhancement.
Comment 5 Philipe Mulet CLA 2002-11-13 04:05:24 EST
Your request makes sense, but in the light of an incremental compiler, we need 
things to be located at guessable locations to perform correctly.

Javac or other compiler tools will not care about file locations if you pass 
them all onto the command line, but as soon as these sources are to be found 
through the classpath, they'd better be nested in package directory structures.

We are no different in enforcing this rule everywhere.
As per your last comment, I will close this defect, since it works as designed.