// ensure that a scheduling rule is used so that the project description is not modified by another thread while we update it
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=214981
// also ensure that if no change (checkIdentify block returned above) we don't reach here
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=241751
IWorkspace workspace = projectResource.getWorkspace();
ISchedulingRule rule = workspace.getRuleFactory().modifyRule(projectResource); // scheduling rule for modifying the project
IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
IProjectDescription description = projectResource.getDescription();
description.setDynamicReferences(requiredProjectArray);
projectResource.setDescription(description, IResource.AVOID_NATURE_CONFIG, null);