1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Bug 278685 - Incorrect scheduling rule used if working copy resource doesn't exist

This commit is contained in:
Anton Leherbauer 2009-06-03 15:06:23 +00:00
parent e868cbb696
commit c6f7acc9b2

View file

@ -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;
} }