Search in sources :

Example 1 with EclipsePluginProjectImpl

use of org.eclipse.tycho.core.osgitools.project.EclipsePluginProjectImpl in project tycho by eclipse.

the class OsgiBundleProject method getEclipsePluginProject.

public EclipsePluginProjectImpl getEclipsePluginProject(ReactorProject otherProject) {
    EclipsePluginProjectImpl pdeProject = (EclipsePluginProjectImpl) otherProject.getContextValue(TychoConstants.CTX_ECLIPSE_PLUGIN_PROJECT);
    if (pdeProject == null) {
        try {
            pdeProject = new EclipsePluginProjectImpl(otherProject, buildPropertiesParser);
            otherProject.setContextValue(TychoConstants.CTX_ECLIPSE_PLUGIN_PROJECT, pdeProject);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
    return pdeProject;
}
Also used : EclipsePluginProjectImpl(org.eclipse.tycho.core.osgitools.project.EclipsePluginProjectImpl) IOException(java.io.IOException)

Example 2 with EclipsePluginProjectImpl

use of org.eclipse.tycho.core.osgitools.project.EclipsePluginProjectImpl in project tycho by eclipse.

the class OsgiBundleProject method addPDESourceRoots.

private void addPDESourceRoots(MavenProject project) {
    EclipsePluginProjectImpl eclipsePluginProject = getEclipsePluginProject(DefaultReactorProject.adapt(project));
    for (BuildOutputJar outputJar : eclipsePluginProject.getOutputJars()) {
        for (File sourceFolder : outputJar.getSourceFolders()) {
            removeDuplicateTestCompileRoot(sourceFolder, project.getTestCompileSourceRoots());
            project.addCompileSourceRoot(sourceFolder.getAbsolutePath());
        }
    }
}
Also used : EclipsePluginProjectImpl(org.eclipse.tycho.core.osgitools.project.EclipsePluginProjectImpl) BuildOutputJar(org.eclipse.tycho.core.osgitools.project.BuildOutputJar) File(java.io.File)

Aggregations

EclipsePluginProjectImpl (org.eclipse.tycho.core.osgitools.project.EclipsePluginProjectImpl)2 File (java.io.File)1 IOException (java.io.IOException)1 BuildOutputJar (org.eclipse.tycho.core.osgitools.project.BuildOutputJar)1