Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » nested projects in eclipse?
nested projects in eclipse? [message #330108] Tue, 15 July 2008 13:21 Go to next message
Michael Moser is currently offline Michael MoserFriend
Messages: 914
Registered: July 2009
Senior Member
I just checked out a project from a repository and to my astonishment
that project contains nested projects, i.e. there is a .project and
..classfile in the main directory, but there are a couple of
subdirectories that also contain .project and .classpath.

I always thought, that eclipse does not allow to do that and for me,
these currently do not build, either, i.e. I get lots of "package ...
not found" messages for imports and references and in the subprojects I
see "declared package ... does not match the expected package ..." error
messages.

What is the trick to get these nested projects all built automatically,
because (I guess at least...) these projects built fine before they were
archived to the repository. Is there some procedure, setup or an
additional plugin that supports such nested projects and their automatic
(re-)builds?

Michael
Re: nested projects in eclipse? [message #330109 is a reply to message #330108] Tue, 15 July 2008 13:25 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Eclipse doesn't support nested projects, although that is a feature that
they are working on for 4.0

It might just be storage. Some eclipse projects (at least the top level
ones in the repository) are simply holders ... when I work with them, I
select the sub-folders that contains .projects and check them out (they
then become top level workspace projects). But that's really because of
how they're stored in CVS, not anything that eclipse decided to do.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm


Re: nested projects in eclipse? [message #330110 is a reply to message #330109] Tue, 15 July 2008 14:13 Go to previous messageGo to next message
Michael Moser is currently offline Michael MoserFriend
Messages: 914
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_000E_01C8E695.AB5AA860
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Paul Webster wrote:
> Eclipse doesn't support nested projects, although that is a feature
> that they are working on for 4.0
>=20
> It might just be storage. Some eclipse projects (at least the top
> level ones in the repository) are simply holders ... when I work with
> them, I select the sub-folders that contains .projects and check them
> out (they then become top level workspace projects). But that's
> really because of how they're stored in CVS, not anything that
> eclipse decided to do.=20
>=20
> PW


Nope - I believe there must be somehow different here.
The projects are store as sketched below (you may want to look this =
using a fixed spaced font):

The subprojects are under the src tree of the main project, i.e.

+ Main
+-+ bin
| + ...
| |=20
+-+ src
| + .project
| | .classpath
| +-+ com
| | +-+ foo
| | | +-+ bar
| | | +- couple of .java files here
| | | +- referencing package yyy(under "SomeDirectory")
| | | ...
| | |
| | + SomeDirectory
| | +-+ .project
| | +-+ .classpath
| | | +-+ bin
| | | | +...
| | | |=20
| | | +-+ src
| | | | +-+ com
| | | | | +-+ xxx
| | | | | | +-+ yyy
| | | | | | +- couple of .java files here=20
| | | | | | +- referencing package bar (in "main" src-directory)
| | | | | | ...

The thing puzzling me is, that there are references between the projects =
*going in both directions*.
I doubt, that the people that had created these projects just stored =
things in the (admittedly rather odd) way. I think (although I can't =
prove it) that they actually built it that way.

Could it be, they had used some other eclipse based product (IBM RAD or =
something else) that allows to structure (sub)projects in this way? I am =
trying to recreate that environment to continue from there. Any ideas or =
comments?

Michael

------=_NextPart_000_000E_01C8E695.AB5AA860
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><LINK href=3D"C:\Program Files\OE-QuoteFix\styles.css" =
rel=3Dstylesheet>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16674" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff background=3D"">
<DIV><FONT face=3DCourier size=3D2>Paul Webster wrote:<BR>&gt; Eclipse =
doesn't=20
support nested projects, although that is a feature<BR>&gt; that they =
are=20
working on for 4.0<BR>&gt; <BR>&gt; It might just be storage.&nbsp; Some =
eclipse=20
projects (at least the top<BR>&gt; level ones in the repository) are =
simply=20
holders ... when I work with<BR>&gt; them, I select the sub-folders that =

contains .projects and check them<BR>&gt; out (they then become top =
level=20
workspace projects).&nbsp; But that's<BR>&gt; really because of how =
they're=20
stored in CVS, not anything that<BR>&gt; eclipse decided to do. <BR>&gt; =

<BR>&gt; PW<BR><BR><BR>Nope - I believe there must be somehow different=20
here.<BR>The projects are store as sketched below (you may want to look =
this=20
using a fixed spaced font):<BR><BR>The subprojects are under the src =
tree of the=20
main project, i.e.<BR><BR>+ Main<BR>+-+ bin<BR>| + =
....<BR>&nbsp;|&nbsp;&nbsp; |=20
<BR>+-+ src<BR>| + .project<BR>| | .classpath<BR>| +-+ com<BR>| | +-+ =
foo<BR>| |=20
| +-+ bar<BR>| | |&nbsp;&nbsp; +- couple of .java files here<BR>| |=20
|&nbsp;&nbsp; +- referencing package yyy(under "SomeDirectory")<BR>| |=20
|&nbsp;&nbsp; ...<BR>| | |<BR>| | + SomeDirectory<BR>| | +-+ =
..project<BR>| | +-+=20
..classpath<BR>| | | +-+ bin<BR>| | | | +...<BR>| | | | <BR>| | | +-+ =
src<BR>| |=20
| | +-+ com<BR>| | | | | +-+ xxx<BR>| | | | | | +-+ yyy<BR>| | | | |=20
|&nbsp;&nbsp; +- couple of .java files here <BR>| | | | | |&nbsp;&nbsp; =
+-=20
referencing package bar (in "main" src-directory)<BR>| | | | | =
|&nbsp;&nbsp;=20
....<BR><BR>The thing puzzling me is, that there are references between =
the=20
projects *going in both directions*.<BR>I doubt, that the people that =
had=20
created these projects just stored things in the (admittedly rather odd) =
way. I=20
think (although I can't prove it) that they actually built it that=20
way.</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>Could it be, they had used some other =
eclipse=20
based product (IBM RAD or something else) that allows to structure =
(sub)projects=20
in this way? I am trying to recreate that environment to continue from =
there.=20
</FONT><FONT face=3DCourier size=3D2>Any ideas or comments?</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>Michael</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_000E_01C8E695.AB5AA860--
Re: nested projects in eclipse? [message #330111 is a reply to message #330110] Tue, 15 July 2008 15:05 Go to previous messageGo to next message
Walter Harley is currently offline Walter HarleyFriend
Messages: 847
Registered: July 2009
Senior Member
"Michael Moser" <mmo@zurich.ibm.com> wrote in message
news:g5ib9m$v2c$1@build.eclipse.org...
> Nope - I believe there must be somehow different here.
> The projects are store as sketched below (you may want to look this using
> a fixed spaced font):
>
> The subprojects are under the src tree of the main project, [...]

Is it possible that the subprojects are "one-time-use" projects, perhaps
used manually to create jar files or other resources used by the outermost
project? It's not uncommon to check binaries directly into a project, but
you still need somewhere to put the project that generated the binary.
Re: nested projects in eclipse? [message #330114 is a reply to message #330111] Tue, 15 July 2008 15:23 Go to previous messageGo to next message
Michael Moser is currently offline Michael MoserFriend
Messages: 914
Registered: July 2009
Senior Member
Walter Harley wrote:
>> ...
> Is it possible that the subprojects are "one-time-use" projects,
> perhaps used manually to create jar files or other resources used by
> the outermost project? It's not uncommon to check binaries directly
> into a project, but you still need somewhere to put the project that
> generated the binary.

You mean, that there was some manual step in between? I.e. the projects
didn't get all rebuilt "in one go" (like after a "build clean") but
required a couple of manual steps every time? Hm, that might be - I
hadn't thought about that. Very tedious! I myself would never have done
it that way...

What puzzles me most at the moment are these references that go both
ways. If one really declares that in eclipse one gets "build circles"
and eclipse (IMHO quite righteous) refuses to build something like that.
But if one packs stuff up into .jar files and copies those over, then
how can one then ever be sure, that all these projects remain consistent
among themselves?

Probably one can't and has to take care of that manually... Very odd
setup anyway!

Thanks,
Michael
Re: nested projects in eclipse? [message #330116 is a reply to message #330114] Tue, 15 July 2008 16:33 Go to previous messageGo to next message
Walter Harley is currently offline Walter HarleyFriend
Messages: 847
Registered: July 2009
Senior Member
"Michael Moser" <mmo@zurich.ibm.com> wrote in message
news:g5ife4$8b9$1@build.eclipse.org...
> Walter Harley wrote:
>
> You mean, that there was some manual step in between? I.e. the projects
> didn't get all rebuilt "in one go" (like after a "build clean") but
> required a couple of manual steps every time? Hm, that might be - I hadn't
> thought about that. Very tedious! I myself would never have done it that
> way...

You might have done it that way if, for instance, it were a bureaucratic
process to get approval for a new top-level directory. E.g., in the Eclipse
organization, I can put more or less whatever I want to in my own plugin
project, but if I want to create a new sibling project, I need to get
approval from a bunch of other people, get the new project created by the
webmaster, add it to the releng scripts, and so forth. For something that's
only going to get built once in a rare while, it's not worth the effort; and
for that matter, the hierarchical organization is the right one anyway, it's
just that the Eclipse editor doesn't support it. (There is an effort afoot
to change that, but it's a big architectural change.)


> What puzzles me most at the moment are these references that go both ways.
> If one really declares that in eclipse one gets "build circles" and
> eclipse (IMHO quite righteous) refuses to build something like that.

It is possible to have project dependency cycles in Eclipse - I think by
default it's forbidden but that can be switched off. Switching it off does
create some challenges for the build, obviously.


> But if one packs stuff up into .jar files and copies those over, then how
> can one then ever be sure, that all these projects remain consistent among
> themselves?
>
> Probably one can't and has to take care of that manually... Very odd setup
> anyway!

I can think of two examples off the top of my head, one being the fact that
the JDT compiler uses a parser generator to generate some source files which
are then checked into version control (not literally a nested Eclipse
project, but still an example of a manual build step that is rarely
necessary) and the other being one of the test files in the APT test
scripts, a jar file that we need to test the ability to load stuff from a
jar - if I recall correctly, somewhere in the APT test project, there's an
archived mini-project to build that jar.
Re: nested projects in eclipse? [message #330119 is a reply to message #330108] Tue, 15 July 2008 17:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Michael Moser wrote:
> I just checked out a project from a repository and to my astonishment
> that project contains nested projects, i.e. there is a .project and
> .classfile in the main directory, but there are a couple of
> subdirectories that also contain .project and .classpath.

I don't suppose this is a public repository/project that we can look at...?

Eric
Re: nested projects in eclipse? [message #330122 is a reply to message #330110] Tue, 15 July 2008 18:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

"Michael Moser" <mmo@zurich.ibm.com> wrote in message
news:g5ib9m$v2c$1@build.eclipse.org...
Paul Webster wrote:
> Eclipse doesn't support nested projects, although that is a feature
> that they are working on for 4.0
>
> It might just be storage. Some eclipse projects (at least the top
> level ones in the repository) are simply holders ... when I work with
> them, I select the sub-folders that contains .projects and check them
> out (they then become top level workspace projects). But that's
> really because of how they're stored in CVS, not anything that
> eclipse decided to do.
>
> PW


Nope - I believe there must be somehow different here.
The projects are store as sketched below (you may want to look this using a
fixed spaced font):

The subprojects are under the src tree of the main project, i.e.

+ Main
+-+ bin
| + ...
| |
+-+ src
| + .project
| | .classpath
| +-+ com
| | +-+ foo
| | | +-+ bar
| | | +- couple of .java files here
| | | +- referencing package yyy(under "SomeDirectory")
| | | ...
| | |
| | + SomeDirectory
| | +-+ .project
| | +-+ .classpath
| | | +-+ bin
| | | | +...
| | | |
| | | +-+ src
| | | | +-+ com
| | | | | +-+ xxx
| | | | | | +-+ yyy
| | | | | | +- couple of .java files here
| | | | | | +- referencing package bar (in "main" src-directory)
| | | | | | ...

The thing puzzling me is, that there are references between the projects
*going in both directions*.
I doubt, that the people that had created these projects just stored things
in the (admittedly rather odd) way. I think (although I can't prove it) that
they actually built it that way.

Could it be, they had used some other eclipse based product (IBM RAD or
something else) that allows to structure (sub)projects in this way? I am
trying to recreate that environment to continue from there. Any ideas or
comments?

Michael

Is it possible that the projects are not supposed to be checked out into a
single directory hierarchy? Can you check SomeDirectory out into a location
that isn't inside of the location where Main is checked out?
Re: nested projects in eclipse? [message #330130 is a reply to message #330122] Wed, 16 July 2008 00:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

Dave Wegener wrote:
> "Michael Moser" <mmo@zurich.ibm.com> wrote in message
> news:g5ib9m$v2c$1@build.eclipse.org...
> Paul Webster wrote:
>> Eclipse doesn't support nested projects, although that is a feature
>> that they are working on for 4.0
>>
>> It might just be storage. Some eclipse projects (at least the top
>> level ones in the repository) are simply holders ... when I work with
>> them, I select the sub-folders that contains .projects and check them
>> out (they then become top level workspace projects). But that's
>> really because of how they're stored in CVS, not anything that
>> eclipse decided to do.
>>
>> PW
>
>
> Nope - I believe there must be somehow different here.
> The projects are store as sketched below (you may want to look this using a
> fixed spaced font):
>
> The subprojects are under the src tree of the main project, i.e.
>
> + Main
> +-+ bin
> | + ...
> | |
> +-+ src
> | + .project
> | | .classpath
> | +-+ com
> | | +-+ foo
> | | | +-+ bar
> | | | +- couple of .java files here
> | | | +- referencing package yyy(under "SomeDirectory")
> | | | ...
> | | |
> | | + SomeDirectory
> | | +-+ .project
> | | +-+ .classpath
> | | | +-+ bin
> | | | | +...
> | | | |
> | | | +-+ src
> | | | | +-+ com
> | | | | | +-+ xxx
> | | | | | | +-+ yyy
> | | | | | | +- couple of .java files here
> | | | | | | +- referencing package bar (in "main" src-directory)
> | | | | | | ...
>
> The thing puzzling me is, that there are references between the projects
> *going in both directions*.
> I doubt, that the people that had created these projects just stored things
> in the (admittedly rather odd) way. I think (although I can't prove it) that
> they actually built it that way.
>

Could it be, they had used some other eclipse based product (IBM RAD or
something else) that allows to structure (sub)projects in this way? I am
trying to recreate that environment to continue from there. Any ideas or
comments?

Sorry about my last post. My news reader didn't indent the previous
post and my comment got lost.
>
> Michael
>
> Is it possible that the projects are not supposed to be checked out into a
> single directory hierarchy? Can you check SomeDirectory out into a location
> that isn't inside of the location where Main is checked out?
>
>
Re: nested projects in eclipse? [message #330133 is a reply to message #330119] Wed, 16 July 2008 09:42 Go to previous messageGo to next message
Michael Moser is currently offline Michael MoserFriend
Messages: 914
Registered: July 2009
Senior Member
Eric Rizzo wrote:
> Michael Moser wrote:
>> I just checked out a project from a repository and to my astonishment
>> that project contains nested projects, i.e. there is a .project and
>> .classfile in the main directory, but there are a couple of
>> subdirectories that also contain .project and .classpath.
>
> I don't suppose this is a public repository/project that we can look
> at...?

You are right in not supposing this. :-)
Alas, it's a major product's code of which we got a copy "as-is" to add
a few features as part of our research project, but we are disconnected
from the folks who created this and contacting them and getting some of
their time to explain things to us would be a major bureaucratic
stepdance. So, if somehow possible I am trying to avoid that...

Michael
Re: nested projects in eclipse? [message #330201 is a reply to message #330110] Sat, 19 July 2008 17:58 Go to previous message
Eclipse UserFriend
Originally posted by: igor.ifedorenko.com

This structure looks somewhat similar to multi-module Maven project
imported into eclipse workspace by m2e. I am not sure if you can do this
from UI, but it works programmatically on eclipse 3.2+. I can show you
the code we use, if you're interested.


Michael Moser wrote:
> Paul Webster wrote:
> > Eclipse doesn't support nested projects, although that is a feature
> > that they are working on for 4.0
> >
> > It might just be storage. Some eclipse projects (at least the top
> > level ones in the repository) are simply holders ... when I work with
> > them, I select the sub-folders that contains .projects and check them
> > out (they then become top level workspace projects). But that's
> > really because of how they're stored in CVS, not anything that
> > eclipse decided to do.
> >
> > PW
>
>
> Nope - I believe there must be somehow different here.
> The projects are store as sketched below (you may want to look this
> using a fixed spaced font):
>
> The subprojects are under the src tree of the main project, i.e.
>
> + Main
> +-+ bin
> | + ...
> | |
> +-+ src
> | + .project
> | | .classpath
> | +-+ com
> | | +-+ foo
> | | | +-+ bar
> | | | +- couple of .java files here
> | | | +- referencing package yyy(under "SomeDirectory")
> | | | ...
> | | |
> | | + SomeDirectory
> | | +-+ .project
> | | +-+ .classpath
> | | | +-+ bin
> | | | | +...
> | | | |
> | | | +-+ src
> | | | | +-+ com
> | | | | | +-+ xxx
> | | | | | | +-+ yyy
> | | | | | | +- couple of .java files here
> | | | | | | +- referencing package bar (in "main" src-directory)
> | | | | | | ...
>
> The thing puzzling me is, that there are references between the projects
> *going in both directions*.
> I doubt, that the people that had created these projects just stored
> things in the (admittedly rather odd) way. I think (although I can't
> prove it) that they actually built it that way.
>
> Could it be, they had used some other eclipse based product (IBM RAD or
> something else) that allows to structure (sub)projects in this way? I am
> trying to recreate that environment to continue from there. Any ideas or
> comments?
>
> Michael
>
Previous Topic:Attach Editor Plugin to RCP
Next Topic:Open files always in external editor instead of in-place editor
Goto Forum:
  


Current Time: Thu Dec 26 09:51:30 GMT 2024

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

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

Back to the top