Revert "Bug 464072 - [Search] Refresh on Access ignored during text search"

This reverts commit a01e3b90e52dde30d1f6d10bf3d738240ac288a7.

The change caused team.tests.cvs.core test failures.

Change-Id: I72e579dc104c11777c24cc7282a3c3fe599e0da9
diff --git a/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/IFileStore.java b/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/IFileStore.java
index 8638f23..94f65c7 100644
--- a/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/IFileStore.java
+++ b/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/IFileStore.java
@@ -8,8 +8,7 @@
  * Contributors:
  * 		IBM Corporation - initial API and implementation
  * 		Martin Oberhuber (Wind River) - [170317] add symbolic link support to API
- *      Sergey Prigogin (Google) - [464072] Refresh on Access ignored during text search
-******************************************************************************/
+ *******************************************************************************/
 package org.eclipse.core.filesystem;
 
 import java.io.InputStream;
@@ -400,12 +399,11 @@
 	 * @param monitor a progress monitor, or <code>null</code> if progress
 	 *    reporting and cancellation are not desired
 	 * @return An input stream on the contents of this file.
-	 * @exception CoreException if this method fails. The status code associated with exception
-	 *     reflects the cause of the failure. Reasons include:
+	 * @exception CoreException if this method fails. Reasons include:
 	 * <ul>
-	 * <li>{@link EFS#ERROR_NOT_EXISTS} - This store does not exist.</li>
-	 * <li>{@link EFS#ERROR_WRONG_TYPE} - This store represents a directory.</li>
-	 * <li>{@link EFS#ERROR_READ} - The limit of concurrently opened streams has been exceeded.</li>
+	 * <li>This store does not exist.</li>
+	 * <li>This store represents a directory.</li>
+	 * <li>The limit of concurrently opened streams has been exceeded.</li>
 	 * </ul>
 	 */
 	public InputStream openInputStream(int options, IProgressMonitor monitor) throws CoreException;
@@ -433,16 +431,16 @@
 	 * and the new output will be written from the start of the file.
 	 * </p>
 	 * 
-	 * @param options bit-wise or of option flag constants ({@link EFS#APPEND}).
+	 * @param options bit-wise or of option flag constants (
+	 * {@link EFS#APPEND}).
 	 * @param monitor a progress monitor, or <code>null</code> if progress
 	 *    reporting and cancellation are not desired
 	 * @return An output stream on the contents of this file.
-	 * @exception CoreException if this method fails. The status code associated with exception
-	 *     reflects the cause of the failure. Reasons include:
+	 * @exception CoreException if this method fails. Reasons include:
 	 * <ul>
-	 * <li>{@link EFS#ERROR_NOT_EXISTS} - This store does not exist.</li>
-	 * <li>{@link EFS#ERROR_WRONG_TYPE} - This store represents a directory.</li>
-	 * <li>{@link EFS#ERROR_READ} - The limit of concurrently opened streams has been exceeded.</li>
+	 * <li>This store represents a directory.</li>
+	 * <li>The parent of this store does not exist.</li>
+	 * <li>The limit of concurrently opened streams has been exceeded.</li>
 	 * </ul>
 	 */
 	public OutputStream openOutputStream(int options, IProgressMonitor monitor) throws CoreException;
diff --git a/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFile.java b/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFile.java
index fe79674..a575776 100644
--- a/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFile.java
+++ b/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFile.java
@@ -7,10 +7,9 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- * 	   Martin Oberhuber (Wind River) - [294429] Avoid substring baggage in FileInfo
- * 	   Martin Lippert (VMware) - [394607] Poor performance when using findFilesForLocationURI
- * 	   Sergey Prigogin (Google) - [433061] Deletion of project follows symbolic links
- *                                [464072] Refresh on Access ignored during text search
+ * 	Martin Oberhuber (Wind River) - [294429] Avoid substring baggage in FileInfo
+ * 	Martin Lippert (VMware) - [394607] Poor performance when using findFilesForLocationURI
+ * 	Sergey Prigogin (Google) - Fix for bug 435519
  *******************************************************************************/
 package org.eclipse.core.internal.filesystem.local;
 
@@ -383,16 +382,13 @@
 			return new FileInputStream(file);
 		} catch (FileNotFoundException e) {
 			String message;
-			if (!file.exists()) {
+			if (!file.exists())
 				message = NLS.bind(Messages.fileNotFound, filePath);
-				Policy.error(EFS.ERROR_NOT_EXISTS, message, e);
-			} else if (file.isDirectory()) {
+			else if (file.isDirectory())
 				message = NLS.bind(Messages.notAFile, filePath);
-				Policy.error(EFS.ERROR_WRONG_TYPE, message, e);
-			} else {
+			else
 				message = NLS.bind(Messages.couldNotRead, filePath);
-				Policy.error(EFS.ERROR_READ, message, e);
-			}
+			Policy.error(EFS.ERROR_READ, message, e);
 			return null;
 		} finally {
 			monitor.done();
@@ -409,13 +405,11 @@
 			checkReadOnlyParent(file, e);
 			String message;
 			String path = filePath;
-			if (file.isDirectory()) {
+			if (file.isDirectory())
 				message = NLS.bind(Messages.notAFile, path);
-				Policy.error(EFS.ERROR_WRONG_TYPE, message, e);
-			} else {
+			else
 				message = NLS.bind(Messages.couldNotWrite, path);
-				Policy.error(EFS.ERROR_WRITE, message, e);
-			}
+			Policy.error(EFS.ERROR_WRITE, message, e);
 			return null;
 		} finally {
 			monitor.done();