Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2014-10-31 15:13:05 +0000
committerDani Megert2014-10-31 15:13:05 +0000
commit9bb8cccc90883337123649fca6e37807f2589ff8 (patch)
treec20481e0e4997c92515accf88f256cd0ec0ea862 /org.eclipse.search
parent1be15476ed99918ea8a9674d8ceb7884a430fc69 (diff)
downloadeclipse.platform.text-9bb8cccc90883337123649fca6e37807f2589ff8.tar.gz
eclipse.platform.text-9bb8cccc90883337123649fca6e37807f2589ff8.tar.xz
eclipse.platform.text-9bb8cccc90883337123649fca6e37807f2589ff8.zip
Fixed bug 448863: [Search] Refresh on Access ignored during text searchI20141118-0830I20141118-0800I20141111-0830I20141111-0800I20141104-0800
Diffstat (limited to 'org.eclipse.search')
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileSearchQuery.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileSearchQuery.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileSearchQuery.java
index be3e5c1bf..b3b425091 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileSearchQuery.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileSearchQuery.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM 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
@@ -20,9 +20,11 @@ import java.util.regex.Pattern;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.search.core.text.TextSearchEngine;
import org.eclipse.search.core.text.TextSearchMatchAccess;
@@ -44,16 +46,22 @@ public class FileSearchQuery implements ISearchQuery {
private final AbstractTextSearchResult fResult;
private final boolean fIsFileSearchOnly;
private final boolean fSearchInBinaries;
+
+ private final boolean fIsLightweightAutoRefresh;
private ArrayList fCachedMatches;
private TextSearchResultCollector(AbstractTextSearchResult result, boolean isFileSearchOnly, boolean searchInBinaries) {
fResult= result;
fIsFileSearchOnly= isFileSearchOnly;
fSearchInBinaries= searchInBinaries;
+ fIsLightweightAutoRefresh= Platform.getPreferencesService().getBoolean(ResourcesPlugin.PI_RESOURCES, ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH, false, null);
}
public boolean acceptFile(IFile file) throws CoreException {
+ if (fIsLightweightAutoRefresh && !file.exists())
+ return false;
+
if (fIsFileSearchOnly) {
fResult.addMatch(new FileMatch(file));
}

Back to the top