Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2008 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2009 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 10-18
Link Here
|
10 |
*******************************************************************************/ |
10 |
*******************************************************************************/ |
11 |
package org.eclipse.jdt.internal.core; |
11 |
package org.eclipse.jdt.internal.core; |
12 |
|
12 |
|
|
|
13 |
import org.eclipse.core.resources.IResourceRuleFactory; |
13 |
import org.eclipse.core.resources.ResourcesPlugin; |
14 |
import org.eclipse.core.resources.ResourcesPlugin; |
14 |
import org.eclipse.core.runtime.CoreException; |
15 |
import org.eclipse.core.runtime.CoreException; |
15 |
import org.eclipse.core.runtime.IPath; |
16 |
import org.eclipse.core.runtime.IPath; |
|
|
17 |
import org.eclipse.core.runtime.jobs.ISchedulingRule; |
18 |
import org.eclipse.core.runtime.jobs.MultiRule; |
16 |
import org.eclipse.jdt.core.IClasspathContainer; |
19 |
import org.eclipse.jdt.core.IClasspathContainer; |
17 |
import org.eclipse.jdt.core.IClasspathEntry; |
20 |
import org.eclipse.jdt.core.IClasspathEntry; |
18 |
import org.eclipse.jdt.core.IJavaElement; |
21 |
import org.eclipse.jdt.core.IJavaElement; |
Lines 140-145
Link Here
|
140 |
} |
143 |
} |
141 |
} |
144 |
} |
142 |
|
145 |
|
|
|
146 |
protected ISchedulingRule getSchedulingRule() { |
147 |
if (this.canChangeResources) { |
148 |
int length = this.affectedProjects.length; |
149 |
IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory(); |
150 |
ISchedulingRule[] rules = new ISchedulingRule[length + 1]; |
151 |
|
152 |
for (int index = 0; index < length; index++) { |
153 |
rules[index] = ruleFactory.modifyRule(this.affectedProjects[index].getProject()); |
154 |
} |
155 |
// External folders might get changed inside ChangeClasspathOperation.classpathChanged(ClasspathChange) |
156 |
rules[length] = ruleFactory.modifyRule(JavaModelManager.getExternalManager().getExternalFoldersProject()); |
157 |
|
158 |
return new MultiRule(rules); |
159 |
} |
160 |
return super.getSchedulingRule(); |
161 |
} |
162 |
|
143 |
private void verbose_failure(CoreException e) { |
163 |
private void verbose_failure(CoreException e) { |
144 |
Util.verbose( |
164 |
Util.verbose( |
145 |
"CPContainer SET - FAILED DUE TO EXCEPTION\n" + //$NON-NLS-1$ |
165 |
"CPContainer SET - FAILED DUE TO EXCEPTION\n" + //$NON-NLS-1$ |