protected ISchedulingRule getSchedulingRule() {
if (this.canChangeResources) {
IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory();
return new MultiRule(new ISchedulingRule[] {
// use project modification rule as this is needed to create the .classpath file if it doesn't exist yet, or to update project references
ruleFactory.modifyRule(this.project.getProject()),
// and external project modification rule in case the external folders are modified
ruleFactory.modifyRule(JavaModelManager.getExternalManager().getExternalFoldersProject())
});
}