Search in sources :

Example 1 with ReleaseContext

use of bndtools.release.api.ReleaseContext in project bndtools by bndtools.

the class WorkspaceReleaseJob method run.

@Override
protected IStatus run(IProgressMonitor monitor) {
    monitor.beginTask(Messages.releasingProjects, projectDiffs.size());
    for (ProjectDiff projectDiff : projectDiffs) {
        if (projectDiff.isRelease()) {
            RepositoryPlugin release = null;
            if (projectDiff.getReleaseRepository() != null) {
                release = Activator.getRepositoryPlugin(projectDiff.getReleaseRepository());
            }
            ReleaseContext context = new ReleaseContext(projectDiff.getProject(), projectDiff.getBaselines(), release, releaseOption);
            ReleaseJob job = new ReleaseJob(context, showMessage);
            job.setRule(ResourcesPlugin.getWorkspace().getRoot());
            job.run(new SubProgressMonitor(monitor, 1));
        }
        monitor.worked(1);
    }
    monitor.done();
    return Status.OK_STATUS;
}
Also used : ReleaseContext(bndtools.release.api.ReleaseContext) RepositoryPlugin(aQute.bnd.service.RepositoryPlugin) SubProgressMonitor(org.eclipse.core.runtime.SubProgressMonitor)

Aggregations

RepositoryPlugin (aQute.bnd.service.RepositoryPlugin)1 ReleaseContext (bndtools.release.api.ReleaseContext)1 SubProgressMonitor (org.eclipse.core.runtime.SubProgressMonitor)1