Home » Newcomers » Newcomers » Importing an existing project - how to organise
Importing an existing project - how to organise [message #245504] |
Mon, 14 January 2008 08:56  |
Eclipse User |
|
|
|
Originally posted by: joaho.statoilhydro.com
Hello,
I am just in the process of starting to use Eclipse on an existing code
base. The situation is as follows:
My code consists of several libraries, libA , libB, libC, .... There are
dependencies between the libraries, but there is no common low level
makefile, i.e. they are built independently, and the dependencies between
them is handled manually be myself - that is OK.
Currently everything is organized as follows in the filesystem:
common_root/libA
common_root/libA/src
common_root/libA/include
common_root/libA/lib
common_root/libB
common_root/libB/src
.....
I am using svn for version control, and the directories listed above are
actually svn working copies, with .svn directories with svn metadata.
As I have understood the Eclipse documentation there are many ways to
import the existing code into the Eclipse workspace - and I am seeking the
advice of this newsgroup to make the best choice. I have two (independent)
principal questions:
Import from filesystem (working copy) || checkout:
--------------------------------------------------
As I understand I can either just import the existing filesystem layout
into the Eclipse workspace - that seems the easiest, however in that case
I will get lots of stale source files, object files +++ (yes I know I can
clean up the source directory).
Furthermore I would like to start using svn from Eclipse - will that be
possible just based on importing the workspace, or will have to do an svn
checkout first?
Import everything as one project || one project pr. library:
------------------------------------------------------------
I have planned to import each directory common_root/libA,
common_root/libB, ... as separate Eclipse projects. This will most closely
mimick the way I am working with the code at present. However, it is
important that autocompletion+++ works across libraries, i.e. when working
with code in common_root/libA/src I want Eclipse to help me jump to
declarations+++ in e.g. common_root/libB/src - is that possible when the
src directories are in different Eclipse projects?
Comments / answers to these questions highly appreciated.
Best Regards
Joakim Hove
|
|
|
Re: Importing an existing project - how to organise [message #245511 is a reply to message #245504] |
Mon, 14 January 2008 10:37   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Joakim,
I'm sure most everyone will agree that you should consider libA libB to
be projects. You should be able to check each out as a project. Some
additional files will be needed, such as the .project and .classpath
files in and you'll want to commit those to your repository. You'll
have to install the SVN plugins to support it and I'm only familiar with
CVS, but you should be able to locate the folder in the SVN view and
then check it out as a project.
In my opinion, it's much easier to manage dependencies by making your
projects be plugins, even if you don't intend to use them as plugins.
So you can right click on the project and use "PDE Tools->Convert
Projects to Plugin Projects" for that. Then you can edit the
MANIFEST.MF to create dependencies between the projects rather than
editing the project properties to specify dependencies. Of course using
project dependencies is fine too, this is just my opinion...
Joakim Hove wrote:
> Hello,
>
> I am just in the process of starting to use Eclipse on an existing
> code base. The situation is as follows:
>
> My code consists of several libraries, libA , libB, libC, .... There
> are dependencies between the libraries, but there is no common low
> level makefile, i.e. they are built independently, and the
> dependencies between them is handled manually be myself - that is OK.
>
> Currently everything is organized as follows in the filesystem:
>
> common_root/libA
> common_root/libA/src
> common_root/libA/include
> common_root/libA/lib
> common_root/libB
> common_root/libB/src
> ....
>
> I am using svn for version control, and the directories listed above
> are actually svn working copies, with .svn directories with svn metadata.
>
> As I have understood the Eclipse documentation there are many ways to
> import the existing code into the Eclipse workspace - and I am seeking
> the advice of this newsgroup to make the best choice. I have two
> (independent) principal questions:
>
> Import from filesystem (working copy) || checkout:
> --------------------------------------------------
> As I understand I can either just import the existing filesystem
> layout into the Eclipse workspace - that seems the easiest, however in
> that case I will get lots of stale source files, object files +++ (yes
> I know I can clean up the source directory).
> Furthermore I would like to start using svn from Eclipse - will that
> be possible just based on importing the workspace, or will have to do
> an svn checkout first?
>
>
> Import everything as one project || one project pr. library:
> ------------------------------------------------------------
> I have planned to import each directory common_root/libA,
> common_root/libB, ... as separate Eclipse projects. This will most
> closely mimick the way I am working with the code at present. However,
> it is important that autocompletion+++ works across libraries, i.e.
> when working with code in common_root/libA/src I want Eclipse to help
> me jump to declarations+++ in e.g. common_root/libB/src - is that
> possible when the src directories are in different Eclipse projects?
>
>
> Comments / answers to these questions highly appreciated.
>
> Best Regards
>
> Joakim Hove
>
>
>
>
>
>
>
|
|
|
Re: Importing an existing project - how to organise [message #245551 is a reply to message #245504] |
Mon, 14 January 2008 14:12  |
Eclipse User |
|
|
|
Originally posted by: wegener.cboenospam.com
"Joakim Hove" <joaho@statoilhydro.com> wrote in message
news:86529757378308f815ed5d6ad3261e02$1@www.eclipse.org...
> Hello,
>
> I am just in the process of starting to use Eclipse on an existing code
> base. The situation is as follows:
>
> My code consists of several libraries, libA , libB, libC, .... There are
> dependencies between the libraries, but there is no common low level
> makefile, i.e. they are built independently, and the dependencies between
> them is handled manually be myself - that is OK.
>
> Currently everything is organized as follows in the filesystem:
>
> common_root/libA
> common_root/libA/src
> common_root/libA/include
> common_root/libA/lib
> common_root/libB
> common_root/libB/src
> ....
Leave the projects were they are on your filesystem and don't physically
import them into the workspace. When creating the project select the Create
project from existing source option. Browse to the libA directory for
project A, libB for project B, etc. This will allow you to have separate
projects for liba, libb, and libc. The project files will only appear once
on your filesystem. It sounds like you are working on C++ projects. I'm
not sure how the C++ plugins handle project dependencies, you should check
the documentation or ask on the CDT newsgroup. Svn plugins should be able
to manage the files in this configuration as well.
>
> I am using svn for version control, and the directories listed above are
> actually svn working copies, with .svn directories with svn metadata.
>
> As I have understood the Eclipse documentation there are many ways to
> import the existing code into the Eclipse workspace - and I am seeking the
> advice of this newsgroup to make the best choice. I have two (independent)
> principal questions:
>
> Import from filesystem (working copy) || checkout:
> --------------------------------------------------
> As I understand I can either just import the existing filesystem layout
> into the Eclipse workspace - that seems the easiest, however in that case
> I will get lots of stale source files, object files +++ (yes I know I can
> clean up the source directory).
> Furthermore I would like to start using svn from Eclipse - will that be
> possible just based on importing the workspace, or will have to do an svn
> checkout first?
>
>
> Import everything as one project || one project pr. library:
> ------------------------------------------------------------
> I have planned to import each directory common_root/libA,
> common_root/libB, ... as separate Eclipse projects. This will most closely
> mimick the way I am working with the code at present. However, it is
> important that autocompletion+++ works across libraries, i.e. when working
> with code in common_root/libA/src I want Eclipse to help me jump to
> declarations+++ in e.g. common_root/libB/src - is that possible when the
> src directories are in different Eclipse projects?
>
>
> Comments / answers to these questions highly appreciated.
>
> Best Regards
>
> Joakim Hove
>
>
>
>
>
>
>
>
|
|
|
Goto Forum:
Current Time: Sun Jun 01 05:04:56 EDT 2025
Powered by FUDForum. Page generated in 0.08768 seconds
|