Bug 100508 - Add support to IClasspathContainer to associate CPE_SOURCE entries
Summary: Add support to IClasspathContainer to associate CPE_SOURCE entries
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC All
: P3 enhancement with 6 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2005-06-17 00:34 EDT by Eugene Kuleshov CLA
Modified: 2007-06-20 07:26 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Kuleshov CLA 2005-06-17 00:34:28 EDT
I'm trying to implement a classpath container that will represent an externally
managed project (it could be anything, starting from Netbeans or IDEA projects
to Ant's file). My code is pulling out all information about project and trying
to add sources and libraries into the classpath container.

I managed to create libraries, but source folders cause problems. I can see
these source folders within my container/library in Package Explorer but java
builder is complaining about build path issues (saying that my container is
invalid or there is a circular dependencies. 

Another issue is that "Open Type" dialog can see classes from those source
folders, but then I trying to jump into the code it is saying that can't map
resource showing a correct path to the .java file.

I'm running this on Eclipse 3.1RC2
Comment 1 Eugene Kuleshov CLA 2005-09-21 21:55:31 EDT
I wonder if it is possible to address this issue in 3.1 stream or maybe in 3.2?
Comment 2 Philipe Mulet CLA 2005-09-22 03:15:32 EDT
Wouldn't it be possible for you to construct a true project for the externally
managed project ? This would allow you to express more settings etc... on it. 

The change you are asking is quite involving, unclear we will have the resource
to  do it for 3.2.
Comment 3 Eugene Kuleshov CLA 2005-09-22 08:49:18 EDT
(In reply to comment #2)
> Wouldn't it be possible for you to construct a true project for the externally
> managed project ? This would allow you to express more settings etc... on it. 

In this case it will be necessary to synchronize between external project and
this current one all the time, which I'm trying to avoid.

One of the most interesting applications for this is to use Maven's project
descriptor to manage all dependencies and source folders (it can be quite
advanced, when nested projects are used), so it would be quite difficult to keep
it in sync because it will be necessary to implement bidirectional
synchonization (changes in a .classpath should be propagated back to Maven
projects, but it is not 0ne-to-one mapping because .classpath is flat, but Maven
is working with hierarchical project structure and sub-project descriptors).

> The change you are asking is quite involving, unclear we will have the resource
> to  do it for 3.2.

If you think about this feature, it can actually make import from 3rd party
projects much easier and more dynamic (in a way that it will be picking up all
the changes after import).

So, I believe it is quite important feature.
Comment 4 Eugene Kuleshov CLA 2005-09-24 23:41:41 EDT
I come across another use case for this feature. There are number of plugins
that may generate source code that need to be compiled (preferrable by Eclipse
compiler). The list includes XDocled (used by WTP), some of the ORM data binding
tools and even APT tool in Java5.

Usually target folders where these sources are generated are not comitted to
version control, so the only way to find out if there are additional sources is
to look into configuration of the external tool and explicitly add these folders
into the project. That leads into the situation when the same path specified in
two places (if not more) and it would be really great to avoid this.

I believe WTP project will benefit from this feature too.
Comment 5 Eugene Kuleshov CLA 2006-02-14 18:59:00 EST
Any chance this could be resolved for 3.2?
Comment 6 Eugene Kuleshov CLA 2007-01-10 12:59:09 EST
Any chance this can be supported in Eclipse 3.3?