JavaProject javaProject = (JavaProject)delta.getElement();
projectsToTouch[i] = javaProject.getProject();
}
if (projectsToTouch.length > 0) {
if (asynchronous){
WorkspaceJob touchJob = new WorkspaceJob(Messages.updating_external_archives_jobName) {
public IStatus runInWorkspace(IProgressMonitor progressMonitor) throws CoreException {
try {
if (progressMonitor != null)
progressMonitor.beginTask("", projectsToTouch.length); //$NON-NLS-1$
touchProjects(projectsToTouch, progressMonitor);
}
finally {
if (progressMonitor != null)
progressMonitor.done();
}
return Status.OK_STATUS;
}
public boolean belongsTo(Object family) {
return ResourcesPlugin.FAMILY_MANUAL_REFRESH == family;
}
};
touchJob.schedule();
}
else {
// touch the projects to force them to be recompiled while taking the workspace lock
// so that there is no concurrency with the Java builder
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=96575