Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-ui-dev] Packages in Eclipse

This is an interesting issue...

In a file system based Java IDE one question is "where do packages come
from?
In JDT the packages of a project  are derived from the project's build
class path.
The build class path defines the package fragment roots and all folders
inside
a package fragment root become packages.

As you point out this approach has the problem with empty "inner" packages.
The packages view filters them out by default, but the class creation
wizard
doesn't, so you can still create new types in empty inner folders.

A feature we have discussed but that isn't currently considered for 2.0 is
a way
to define that  a folder inside a package fragment root isn't a Java
package
and shouldn't be considered by the Java core infrastructure. This would
address the empty inner packages problem. The user could tag
them as non-packages to get them out of the way.

FYI, we are also experimenting with "flat packages list" browsing and have
a
prototype. The plan is to make it available for discussion on this list
soon.

--erich



                                                                                                
                    "Johan Compagner"                                                           
                    <jcompagner@j-com.        To:     "jdt-ui" <jdt-ui-dev@xxxxxxxxxxx>         
                    nl>                       cc:                                               
                    Sent by:                  Subject:     [jdt-ui-dev] Packages in Eclipse     
                    jdt-ui-dev-admin@e                                                          
                    clipse.org                                                                  
                                                                                                
                                                                                                
                    11/16/2001 02:09                                                            
                    PM                                                                          
                    Please respond to                                                           
                    jdt-ui-dev                                                                  
                                                                                                
                                                                                                



Hi,

I have a discussion with Eric C. about there Plugin for Eclipse about
packages.
It is eclipse fault so i hope eclipse can do something about it:

Here is a portion of our discussion:

___________________________________________________
> >But as i said, this is not specific your fault but Eclipse.
>
> Correct. We are trying to match the standard Eclipse semantic here (e.g.,
> packages are only shown if they are either non-empty or are a leaf
> package). We could easily add an option to show empty, non-leaf packages
in
> the flat list. What do you think?

This is again very annoying because if i make this package:

nl.jcom.servlet.mywebbapp

then i have suddenly
nl
nl.jcom
nl.jcom.servlet
nl.jcom.servlet.mywebbapp

as packages?
That is not what anybody wants trust me :-)

This is just a big problem of eclipse. You can't make a Package unit.
Eclise or JTD should do something about this. They shoud store
what the packages are and what normal dirs are for the resources.
___________________________________________________

Now is my Feature request this:

Please make i so that a package is not just a directory structure but a
real unit
like it is in VAJ.
Can't you store inside one of the projects files (like .classpath or
.vcm_meta data)
What the real packages are?

If i create now for example a package in the Java perspective like this:
nl.jcom.servlet.webapp

Then i see that one.
But i can't create nl.jcom.serlvet anymore! It won't come up.

So there is only one solution: Store in a file what the real packages are.
With an import of code. Alle the directory's that contains a class are auto
added
to that file. Then when you create youre self a package it's also created
into that.
I think this is really the only solution.

Johan






Back to the top