mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 278685 - Incorrect scheduling rule used if working copy resource doesn't exist
This commit is contained in:
parent
e868cbb696
commit
c6f7acc9b2
1 changed files with 1 additions and 6 deletions
|
@ -21,8 +21,6 @@ import org.eclipse.core.filebuffers.ITextFileBuffer;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IMarker;
|
import org.eclipse.core.resources.IMarker;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.resources.IResourceRuleFactory;
|
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IAdaptable;
|
import org.eclipse.core.runtime.IAdaptable;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
|
@ -1019,10 +1017,7 @@ public class CDocumentProvider extends TextFileDocumentProvider {
|
||||||
public ISchedulingRule getSchedulingRule() {
|
public ISchedulingRule getSchedulingRule() {
|
||||||
if (info.fElement instanceof IFileEditorInput) {
|
if (info.fElement instanceof IFileEditorInput) {
|
||||||
IFile file= ((IFileEditorInput) info.fElement).getFile();
|
IFile file= ((IFileEditorInput) info.fElement).getFile();
|
||||||
IResourceRuleFactory ruleFactory= ResourcesPlugin.getWorkspace().getRuleFactory();
|
return computeSchedulingRule(file);
|
||||||
if (file == null || !file.exists())
|
|
||||||
return ruleFactory.createRule(file);
|
|
||||||
return ruleFactory.modifyRule(file);
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue