| Summary: | JavaProjectBasedBuilderParticipant: Enable generation into different project | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Karsten Thoms <karsten.thoms> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | ||
| Version: | 2.0.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
This is beyond the scope of the default implementation. You can always come up with a special implementation for special requirements. |
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); ...