Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] Problem with top level package names, Java, and sourceforge

Jonathan, when you asked this question on the jdt-dev mailing list, I
believe you were directed to ask your question on the eclipse newsgroup.
The mailing lists are for use by the developers of Eclipse itself.  Please
redirect to the newsgroup:

                      "Jonathan Trevor"                                                                         
                      <trevor@xxxxxxxxx>         To:      <eclipse-dev@xxxxxxxxxxx>                             
                      Sent by:                   cc:                                                            
                      eclipse-dev-admin@         Subject: [eclipse-dev] Problem with top level package names,   
                            Java, and sourceforge                                          
                      06/04/2002 06:09                                                                          
                      Please respond to                                                                         


After getting some agreement that this was a problem I was recommended
to highlight this problem at a more general level (I was just in the
java devel list)

I have two closely inter-related (simple?) problems with packages and
CVS which seem to make Eclipse unsuable for me currently :-(

I had an existing package stucture in a directory d:\projects\swapdv The
classes in that directory have "package swapdv" as their first lines, as

I cannot work out how to get Eclipse to allow me to simply specify this
directory as my Java project and get the classpaths correct. All the top
level classes have this error: "Package declaration does not match
folder. Expected folder is "swapdv/swapdv". It appears you cannot have
the "project" folder be the "package" that the Java classes are in.

Can this be fixed? I worked around this problem by putting the swapdv
directory INTO a swapdv directory (e.g. now the package sources are in
d:\projects\swapdv\swapdv and the project is d:\projecys\swapdv)

That all sort-of worked (albeit with a workaround) but unfortunately I
*really* wanted to use the built in CVS functions to work with a
sourceforge project. So, starting from scratch, I specified the
sourceforge repository (/cvsroot/swapdv) and created a new project
"d:\projects\swapdv". Now I can ONLY manage to "catch up" (or sync
stream) if I specify the root of the project workspace (swapdv) (it
fails if I create an empty package called "swapdv" in that workspace and
try to sync that) and when it does sync with the workspace I've got all
the folders directly under the swapdv workspace folder - and Eclipse
doesn't like the package specifications again (see above).

Can anyone offer me any advice?



Well heres some stuff I've discovered after wasting another few hours on

Eclipse R1: You can solve the problem with a nasty trick: Create a
Simple project in d:\projects\swapdv\swapdv, check out the CVS
repository into that project Create a Java project in d:\projects\swapdv
and then sync the project with local contents - and voila - you have the
java packages and Eclipse doesn't complain about them. Use the Java
project to compile and run (I CANNOT debug at all in R1 - a dialog pops
up and vanishes before I can read it - any ideas?) Use the Simple
project to manage CVS stuff

Eclipse 2 (Jun2): You can't use the same hack as above because someone
has stopped projects containing projects. Thanks to that "improvement"
there is no work around I can see to the CVS sourceforge problem.
eclipse-dev mailing list

Back to the top