Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Maetzel2003-10-06 12:25:03 +0000
committerKai Maetzel2003-10-06 12:25:03 +0000
commit87f4140b6ccf8abb4df86daeddd520734a3f0a7a (patch)
treee9b6c90176f970231265fdde216873c7324ad909 /org.eclipse.core.filebuffers
parent8a766f41b9e780c5fbfdde021f6e923641d27de4 (diff)
downloadeclipse.platform.text-87f4140b6ccf8abb4df86daeddd520734a3f0a7a.tar.gz
eclipse.platform.text-87f4140b6ccf8abb4df86daeddd520734a3f0a7a.tar.xz
eclipse.platform.text-87f4140b6ccf8abb4df86daeddd520734a3f0a7a.zip
bug fixing
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, 14 insertions, 4 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 e169691f3..b248aa72b 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
@@ -52,17 +52,25 @@ public abstract class ResourceFileBuffer extends AbstractFileBuffer {
*/
protected void execute() throws Exception {
}
+
+ /**
+ * Does everything necessary prior to execution.
+ */
+ public void preRun() {
+ fManager.fireStateChanging(ResourceFileBuffer.this);
+ }
/*
* @see java.lang.Runnable#run()
*/
public void run() {
- if (isDisposed())
+ if (isDisposed()) {
+ fManager.fireStateChangeFailed(ResourceFileBuffer.this);
return;
-
+ }
+
try {
- fManager.fireStateChanging(ResourceFileBuffer.this);
execute();
} catch (Exception x) {
FileBuffersPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, "Exception when synchronizing", x)); //$NON-NLS-1$
@@ -155,8 +163,10 @@ public abstract class ResourceFileBuffer extends AbstractFileBuffer {
break;
}
- if (fileChange != null)
+ if (fileChange != null) {
+ fileChange.preRun();
fManager.execute(fileChange, fSynchronizationContextCount > 0);
+ }
}
return true; // because we are sitting on files anyway

Back to the top