Stuart McCulloch | d00f971 | 2009-07-13 10:06:47 +0000 | [diff] [blame] | 1 | package aQute.bnd.build; |
| 2 | |
| 3 | import aQute.lib.osgi.*; |
| 4 | |
| 5 | @SuppressWarnings("unchecked") |
| 6 | public class ProjectBuilder extends Builder { |
| 7 | Project project; |
| 8 | |
| 9 | public ProjectBuilder(Project project) { |
| 10 | super(project); |
| 11 | this.project = project; |
| 12 | } |
| 13 | |
| 14 | public ProjectBuilder(ProjectBuilder builder) { |
| 15 | super(builder); |
| 16 | this.project = builder.project; |
| 17 | } |
| 18 | |
| 19 | |
| 20 | /** |
| 21 | * We put our project and our workspace on the macro path. |
| 22 | */ |
| 23 | protected Object [] getMacroDomains() { |
| 24 | return new Object[] {project, project.getWorkspace()}; |
| 25 | } |
| 26 | |
| 27 | public Builder getSubBuilder() throws Exception { |
| 28 | return project.getBuilder(this); |
| 29 | } |
| 30 | |
| 31 | public Project getProject() { |
| 32 | return project; |
| 33 | } |
| 34 | } |