From 8bfb8707f020f37bb6fd0fcc459cd7124e716925 Mon Sep 17 00:00:00 2001 From: Bogdan Gheorghe Date: Mon, 14 Jun 2004 18:55:45 +0000 Subject: [PATCH] Fix for Bug 66748: Added a _cdtsrchlink_ label to all imports brought in by search and ensure that we don't delete any local files. --- core/org.eclipse.cdt.ui/ChangeLog | 6 +++--- .../cdt/internal/ui/search/NewSearchResultCollector.java | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/org.eclipse.cdt.ui/ChangeLog b/core/org.eclipse.cdt.ui/ChangeLog index 866d7828a44..58313988bd6 100644 --- a/core/org.eclipse.cdt.ui/ChangeLog +++ b/core/org.eclipse.cdt.ui/ChangeLog @@ -1,6 +1,6 @@ -2004-06-14 Hoda Amer - Fix for PR 61043: Accessibility: Code Templates: New Template Pattern field accesskey broken - Fix for PR 63388: [Refactoring] items of an enumeration not working +2004-06-14 Bogdan Gheorghe + Fix for Bug 66748: Fixed in head - we now add a _cdtsrchlink_ label to all + imports brought in by search and ensure that we don't delete any local files. 2004-06-11 Bogdan Gheorghe Fix for Bug 66016: Moved search related items from work in progress to search page diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/NewSearchResultCollector.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/NewSearchResultCollector.java index b628c44a1d6..d0e0f353d3d 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/NewSearchResultCollector.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/NewSearchResultCollector.java @@ -87,9 +87,10 @@ public class NewSearchResultCollector extends BasicSearchResultCollector { IFile refFile = CCorePlugin.getWorkspace().getRoot().getFileForLocation(refLocation); IProject refProject = refFile.getProject(); IPath externalMatchLocation = searchMatch.getLocation(); - IFile linksFile = refProject.getFile(externalMatchLocation.lastSegment()); - //Delete links file to keep up to date with latest prefs - if (linksFile.exists()) + IFile linksFile = refProject.getFile("_cdtsrchlnk_" + externalMatchLocation.lastSegment()); //$NON-NLS-1$ + //Delete links file to keep up to date with latest prefs + if (linksFile.exists() && + linksFile.isLinked()) linksFile.delete(true,null); //Check to see if the file already exists - create if doesn't, mark team private