Skip to main content
summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAnton Leherbauer2011-06-30 04:01:54 -0400
committerAnton Leherbauer2011-06-30 05:03:33 -0400
commita9f41ac547a5e95b79a324273f269d268de508ef (patch)
tree69c8cebb33670298d8db9e80124a419155c92005 /core
parent6eff5311d773391e672943e636335dc091101be0 (diff)
downloadorg.eclipse.cdt-a9f41ac547a5e95b79a324273f269d268de508ef.tar.gz
org.eclipse.cdt-a9f41ac547a5e95b79a324273f269d268de508ef.tar.xz
org.eclipse.cdt-a9f41ac547a5e95b79a324273f269d268de508ef.zip
Bug 348569 - Ever growing resource tree with cyclic symbolic links
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/Bug311189.java7
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ResourceChangeHandler.java14
2 files changed, 14 insertions, 7 deletions
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/Bug311189.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/Bug311189.java
index ac95765236..3949ba4330 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/Bug311189.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/Bug311189.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Broadcom Corporation and others.
+ * Copyright (c) 2010, 2011 Broadcom Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* James Blackburn (Broadcom Corp) - initial API and implementation
+ * Wind River Systems - Bug 348569
*******************************************************************************/
package org.eclipse.cdt.core.model.tests;
@@ -57,7 +58,7 @@ public class Bug311189 extends BaseTestCase {
final IPathEntry sourceEntry = new SourceEntry(srcFolder.getFullPath(), new IPath[0]);
// create a source folder and set it as a source entry
- srcFolder.create(true, false, null);
+ srcFolder.create(true, true, null);
CoreModel.setRawPathEntries(CoreModel.getDefault().create(project), new IPathEntry[] {sourceEntry}, null);
IPathEntry[] rawEntries = CoreModel.getPathEntryStore(project).getRawPathEntries();
assertTrue ("Path entry unset!", Arrays.asList(rawEntries).contains(sourceEntry));
@@ -69,7 +70,7 @@ public class Bug311189 extends BaseTestCase {
Job.getJobManager().beginRule(project, null);
// Delete the source folder, and re-recreate it
srcFolder.delete(true, null);
- srcFolder.create(true, false, null);
+ srcFolder.create(true, true, null);
} finally {
Job.getJobManager().endRule(project);
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ResourceChangeHandler.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ResourceChangeHandler.java
index fc0841e672..6368438415 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ResourceChangeHandler.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/ResourceChangeHandler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 Intel Corporation and others.
+ * Copyright (c) 2007, 2011 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,9 +8,11 @@
* Contributors:
* Intel Corporation - Initial API and implementation
* Broadcom Corporation - Bug 311189 and clean-up
+ * Wind River Systems - Bug 348569
*******************************************************************************/
package org.eclipse.cdt.internal.core.settings.model;
+import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -30,6 +32,7 @@ import org.eclipse.cdt.core.settings.model.ICSourceEntry;
import org.eclipse.cdt.core.settings.model.WriteAccessException;
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
import org.eclipse.cdt.core.settings.model.util.ResourceChangeHandlerBase;
+import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -204,11 +207,14 @@ public class ResourceChangeHandler extends ResourceChangeHandlerBase implements
// Bug 311189 -- if the resource still exists now, don't treat as a remove!
if (to == null) {
- // Workaround for platform Bug 317783
- if (from.getWorkspace().validateFiltered(from).isOK())
- from.refreshLocal(IResource.DEPTH_ZERO, null);
if (from.exists())
continue;
+ // Workaround for platform Bug 317783
+ if (from.getWorkspace().validateFiltered(from).isOK()) {
+ URI uri = from.getLocationURI();
+ if (uri != null && EFS.getStore(uri).fetchInfo().exists())
+ continue;
+ }
}
ICProjectDescription prjDesc = getProjectDescription(from);

Back to the top