Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351816 - JavaProjectBasedBuilderParticipant: Enable generation into different project
Summary: JavaProjectBasedBuilderParticipant: Enable generation into different project
Status: CLOSED WONTFIX
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-12 07:00 EDT by Karsten Thoms CLA
Modified: 2012-11-22 07:40 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karsten Thoms CLA 2011-07-12 07:00:00 EDT
The build() method of JavaProjectBasedBuilderParticipant assumes that model and generated code resist in the same project. This might be different depending on project requirements, where models should be maintained in a seperate project. The target project must be derivable from the built (model) project somehow.

I would like to have a mapping method to calculate the target project from the BuildContext. By default, it returns the built project.

protected IProject getTargetProject (IBuildContext context) {
  return context.getBuiltProject());
}

public void build(IBuildContext context, IProgressMonitor monitor) throws CoreException {
   final IProject targetProject = getTargetProject(context);
   IJavaProject javaProject = JavaCore.create(targetProject);
   ...
Comment 1 Sven Efftinge CLA 2012-11-22 07:40:21 EST
This is beyond the scope of the default implementation. You can always come up with a special implementation for special requirements.