1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00
This commit is contained in:
David Inglis 2005-01-18 20:14:39 +00:00
parent 7e265eb12a
commit 7cbf02c426
2 changed files with 17 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2005-01-18 David Inglis
Fixed bug #82705
* src/org/eclipse/cdt/internal/core/CDescriptor.java
2005-01-11 David Inglis 2005-01-11 David Inglis
Fixed NPE bug #82572 Fixed NPE bug #82572

View file

@ -39,8 +39,10 @@ import org.eclipse.cdt.core.ICOwnerInfo;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceRuleFactory;
import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRunnable; import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension; import org.eclipse.core.runtime.IExtension;
@ -51,6 +53,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap; import org.w3c.dom.NamedNodeMap;
@ -306,6 +309,14 @@ public class CDescriptor implements ICDescriptor {
} }
void save() throws CoreException { void save() throws CoreException {
IResourceRuleFactory ruleFactory= ResourcesPlugin.getWorkspace().getRuleFactory();
ISchedulingRule rule;
IFile rscFile = getFile();
if (rscFile.exists()) {
rule = ruleFactory.modifyRule(rscFile);
} else {
rule = ruleFactory.createRule(rscFile);
}
fManager.getWorkspace().run(new IWorkspaceRunnable() { fManager.getWorkspace().run(new IWorkspaceRunnable() {
public void run(IProgressMonitor mon) throws CoreException { public void run(IProgressMonitor mon) throws CoreException {
@ -348,7 +359,7 @@ public class CDescriptor implements ICDescriptor {
} }
fUpdating = false; fUpdating = false;
} }
}, fProject, IWorkspace.AVOID_UPDATE, null); }, rule, IWorkspace.AVOID_UPDATE, null);
} }
boolean isUpdating() { boolean isUpdating() {