Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Q: Best way to work with an existing CVS tree
Q: Best way to work with an existing CVS tree [message #214024] Sat, 20 March 2004 15:25 Go to next message
Eclipse UserFriend
Originally posted by: igough.istop.com

Our devteam currently uses Netbeans as our Java IDE and I would like to
start using Eclipse as the IDE. Our major barrier seems to be that we
cannot figure out a method to use Eclipse on our existing CVS tree that
doesn't seem clunky. I assume this is just due to a misunderstanding of
the Eclipse model.

Our existing CVS project looks similar to the following :

projMain
C
api
util
...
java
com
company
...

I would like to use Eclipse in a manner that allows me to use the CVS
interface from Eclipse AND to also use Eclipse as the java IDE. To date,
I have only been able to do one or the other.

These are the things I have tried:
1) Create a java project called JTest and do a Check Out as... Existing
project JTest of the projMain CVS project. This results in Eclipse
complaining about the package names being wrong withing the java files
since the packages are of the form "com.company...." but Eclipse
believes the packages should be rooted at projMain.

2) Create a java project at projMain/java. This fixes the package
mismatch issue, but Eclipse does not think the files are under CVS control.

3) A mixture of the 2, where I create a simple project as in 1 above,
and then attempt to create a java project as in 2 above. This doesn't
work as Eclipse disallows a project to be created within projMain and
another one below it in projMain/java.

I'd love to hear from people on how they handle this same scenario. Note
that responses along the line of "create a different CVS project
structure" are not helpful 'cause thats not gonna happen. :-)

Ian
Re: Best way to work with an existing CVS tree [message #214175 is a reply to message #214024] Sun, 21 March 2004 10:42 Go to previous messageGo to next message
Eclipse UserFriend
Here's what I would do (this isn't the only way to set up the project,
probably not even the best way but this is how I've always done it)...

Check out from CVS in exactly the current structure, so you would have a
directory named projMain.
Create a new java project in projMain directory.

When you create the new Java project Eclipse is pretty good about
discovering those folders with .java files in them and adding those folders
to your project. When you tried your approach # 2 it sounds like you got
this far. At this point you should be able to build your .java files. If
not then go to the Resources perpective and right click on the root folder
and choose 'Properties'. Then go to the 'Java Build Path' section then go
to the 'Source' tab. On this tab you can set up the source directory with
your .java files and you can set the directory to which the .class files are
generated.

Now to get Eclipse to recognise your CVS info. Go to the Resources
perpective and right click on the root folder and choose Team | Share
Project. Eclipse should pop up a dialog that will inform you that it has
found existing CVS information. Just accept the defaults (Eclipse will
prompt you for your CVS password) and your project will now be connected to
your CVS repository.

hope that helps.
ted stockwell

"Ian Gough" <igough@istop.com> wrote in message
news:c3i930$71f$1@eclipse.org...
> Our devteam currently uses Netbeans as our Java IDE and I would like to
> start using Eclipse as the IDE. Our major barrier seems to be that we
> cannot figure out a method to use Eclipse on our existing CVS tree that
> doesn't seem clunky. I assume this is just due to a misunderstanding of
> the Eclipse model.
>
> Our existing CVS project looks similar to the following :
>
> projMain
> C
> api
> util
> ...
> java
> com
> company
> ...
>
> I would like to use Eclipse in a manner that allows me to use the CVS
> interface from Eclipse AND to also use Eclipse as the java IDE. To date,
> I have only been able to do one or the other.
>
> These are the things I have tried:
> 1) Create a java project called JTest and do a Check Out as... Existing
> project JTest of the projMain CVS project. This results in Eclipse
> complaining about the package names being wrong withing the java files
> since the packages are of the form "com.company...." but Eclipse
> believes the packages should be rooted at projMain.
>
> 2) Create a java project at projMain/java. This fixes the package
> mismatch issue, but Eclipse does not think the files are under CVS
control.
>
> 3) A mixture of the 2, where I create a simple project as in 1 above,
> and then attempt to create a java project as in 2 above. This doesn't
> work as Eclipse disallows a project to be created within projMain and
> another one below it in projMain/java.
>
> I'd love to hear from people on how they handle this same scenario. Note
> that responses along the line of "create a different CVS project
> structure" are not helpful 'cause thats not gonna happen. :-)
>
> Ian
Re: Q: Best way to work with an existing CVS tree [message #214248 is a reply to message #214024] Sun, 21 March 2004 20:42 Go to previous messageGo to next message
Eclipse UserFriend
This is what you should do:
1. Checkout projMain from the CVS repo. Initialy since it has never been
created as a java project in Eclipse, the checkout wizard should prompt
you for configuring the project as a java project. See the doc for
instructions on how to checkout projects from a CVS repo.
2. The java project should be configured with java/ as the source folder
and you should also decide what to use as an output folder.
3. If you are using CDT to edit the C sources, then you could manually
add the CDT nature to the project by hand (see the CDT newsgroups for
more details on using mixed java/C projects).
4. Once the projMain is in the workspace you are set and can use the
synchronize view to sync resources with the cvs server.
Jean-Michel


> Our devteam currently uses Netbeans as our Java IDE and I would like to
> start using Eclipse as the IDE. Our major barrier seems to be that we
> cannot figure out a method to use Eclipse on our existing CVS tree that
> doesn't seem clunky. I assume this is just due to a misunderstanding of
> the Eclipse model.
>
> Our existing CVS project looks similar to the following :
>
> projMain
> C
> api
> util
> ...
> java
> com
> company
> ...
>
> I would like to use Eclipse in a manner that allows me to use the CVS
> interface from Eclipse AND to also use Eclipse as the java IDE. To date,
> I have only been able to do one or the other.
>
> These are the things I have tried:
> 1) Create a java project called JTest and do a Check Out as... Existing
> project JTest of the projMain CVS project. This results in Eclipse
> complaining about the package names being wrong withing the java files
> since the packages are of the form "com.company...." but Eclipse
> believes the packages should be rooted at projMain.
>
> 2) Create a java project at projMain/java. This fixes the package
> mismatch issue, but Eclipse does not think the files are under CVS control.
>
> 3) A mixture of the 2, where I create a simple project as in 1 above,
> and then attempt to create a java project as in 2 above. This doesn't
> work as Eclipse disallows a project to be created within projMain and
> another one below it in projMain/java.
>
> I'd love to hear from people on how they handle this same scenario. Note
> that responses along the line of "create a different CVS project
> structure" are not helpful 'cause thats not gonna happen. :-)
>
> Ian
Re: Q: Best way to work with an existing CVS tree [message #214440 is a reply to message #214024] Mon, 22 March 2004 12:08 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-user.jibeinc.com

Ian Gough wrote:
> Our existing CVS project looks similar to the following :
>
> projMain
> C
> api
> util
> ...
> java
> com
> company
> ...
>
> I would like to use Eclipse in a manner that allows me to use the CVS
> interface from Eclipse AND to also use Eclipse as the java IDE. To date,
> I have only been able to do one or the other.
>
> These are the things I have tried:
> 1) Create a java project called JTest and do a Check Out as... Existing
> project JTest of the projMain CVS project. This results in Eclipse
> complaining about the package names being wrong withing the java files
> since the packages are of the form "com.company...." but Eclipse
> believes the packages should be rooted at projMain.

I'm not sure if this is clear from the other responses, so I'm going to
state it simply: it appears the key you have missed is that you must
tell the Eclipse project where its Java source folder is rooted at. In
your case, it is the directory named "java" under the root of the project.
To do this, select the project and choose Properties from the
right-click pop-up menu, then choose Java Build Path - once you specify
the source folder I'm betting it will behave just as you expect.

HTH,
Eric


--
Eric Rizzo
Software Architect
Jibe, Inc.
http://www.jibeinc.com
Previous Topic:Which method to call on eclipse shutdown?
Next Topic:How to chang LaunchConfiguration inside LaunchConfigurationDelegate?
Goto Forum:
  


Current Time: Sun Jul 06 06:40:57 EDT 2025

Powered by FUDForum. Page generated in 0.03124 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top