Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2010-06-14 13:12:35 +0000
committerMarkus Keller2010-06-14 13:12:35 +0000
commit19ba8c548668faacc89ea7512a8e2897e06beaa0 (patch)
tree25f88df06913f75e0eb87254b51c9f23f5ffd255 /org.eclipse.core.filebuffers
parentb6a05b8e82e448974e02f11eba7b5228a9dec199 (diff)
downloadeclipse.platform.text-19ba8c548668faacc89ea7512a8e2897e06beaa0.tar.gz
eclipse.platform.text-19ba8c548668faacc89ea7512a8e2897e06beaa0.tar.xz
eclipse.platform.text-19ba8c548668faacc89ea7512a8e2897e06beaa0.zip
use API from Bug 105914: Add recursive isDerived convenience method
Diffstat (limited to 'org.eclipse.core.filebuffers')
-rw-r--r--org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceFileBuffer.java18
1 files changed, 2 insertions, 16 deletions
diff --git a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceFileBuffer.java b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceFileBuffer.java
index 6c3dc3374..7eb982494 100644
--- a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceFileBuffer.java
+++ b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceFileBuffer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 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
@@ -405,7 +405,7 @@ public abstract class ResourceFileBuffer extends AbstractFileBuffer {
handleFileContentChanged(false, false);
}
- if (isDerived(fFile)) {
+ if (fFile.isDerived(IResource.CHECK_ANCESTORS)) {
IStatus status= new Status(IStatus.WARNING, FileBuffersPlugin.PLUGIN_ID, IFileBufferStatusCodes.DERIVED_FILE, FileBuffersMessages.ResourceFileBuffer_warning_fileIsDerived, null);
if (fStatus == null || fStatus.isOK())
fStatus= status;
@@ -424,20 +424,6 @@ public abstract class ResourceFileBuffer extends AbstractFileBuffer {
}
/*
- *
- * @see IResource#isDerived()
- * @since 3.3
- */
- private boolean isDerived(IResource resource) {
- while (resource != null) {
- if (resource.isDerived())
- return true;
- resource= resource.getParent();
- }
- return false;
- }
-
- /*
* @see org.eclipse.core.filebuffers.IFileBuffer#isStateValidated()
*/
public boolean isStateValidated() {

Back to the top