Runnable runnable = new Runnable() {
public void run() {
List<ProjectDiff> projectDiffs = new ArrayList<ProjectDiff>();
projectDiffs.add(new ProjectDiff(project, diffs));
ReleaseHelper.initializeProjectDiffs(projectDiffs);
WorkspaceReleaseDialog dialog = new WorkspaceReleaseDialog(shell, projectDiffs, true);
if (dialog.open() == WorkspaceReleaseDialog.OK) {
boolean runJob = false;
for (ProjectDiff diff : projectDiffs) {
if (diff.isRelease()) {
runJob = true;
break;
}
}
if (!runJob) {
return;
}
WorkspaceReleaseJob releaseJob = new WorkspaceReleaseJob(
projectDiffs, dialog.getReleaseOption(), dialog.isShowMessage());
releaseJob.setRule(ResourcesPlugin.getWorkspace().getRoot());
releaseJob.schedule();
}
}
};