Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2016-10-24 14:01:38 +0000
committerLars Vogel2016-10-24 14:03:07 +0000
commitc54a6055d460951ecdbcf51eaba19c346370a783 (patch)
treeff1e0622a5ce0a511a0f574650cb23d5de86d86f
parent7461919cc2732e4c0ba59a92309f1279ae832f08 (diff)
downloadeclipse.platform.text-c54a6055d460951ecdbcf51eaba19c346370a783.tar.gz
eclipse.platform.text-c54a6055d460951ecdbcf51eaba19c346370a783.tar.xz
eclipse.platform.text-c54a6055d460951ecdbcf51eaba19c346370a783.zip
Bug 506446 - Removed usage of SubMonitor.step() in eclipse.platform.textY20161103-1000I20161101-0800
Change-Id: I56725277aa7683705054c0be515d1c07d9b3fb55 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/ContainerCreator.java2
-rw-r--r--org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/ConvertLineDelimitersOperation.java3
-rw-r--r--org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/RemoveTrailingWhitespaceOperation.java3
-rw-r--r--org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceFileBuffer.java2
-rw-r--r--org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceTextFileBuffer.java2
5 files changed, 7 insertions, 5 deletions
diff --git a/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/ContainerCreator.java b/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/ContainerCreator.java
index 8045b48be..b8393c843 100644
--- a/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/ContainerCreator.java
+++ b/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/ContainerCreator.java
@@ -91,7 +91,7 @@ public class ContainerCreator {
if (resource != null) {
if (resource instanceof IContainer) {
fContainer= (IContainer) resource;
- subMonitor.step(1);
+ subMonitor.split(1);
} else {
// fContainerFullPath specifies a file as directory
throw new CoreException(new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, NLSUtility.format(FileBuffersMessages.ContainerCreator_destinationMustBeAContainer, resource.getFullPath()), null));
diff --git a/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/ConvertLineDelimitersOperation.java b/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/ConvertLineDelimitersOperation.java
index b491edd92..914161fb9 100644
--- a/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/ConvertLineDelimitersOperation.java
+++ b/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/ConvertLineDelimitersOperation.java
@@ -11,6 +11,7 @@
package org.eclipse.core.filebuffers.manipulation;
import org.eclipse.core.internal.filebuffers.FileBuffersPlugin;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -64,7 +65,7 @@ public class ConvertLineDelimitersOperation extends TextFileBufferOperation {
IRegion region= document.getLineInformation(i);
multiEdit.addChild(new ReplaceEdit(region.getOffset() + region.getLength(), delimiter.length(), fLineDelimiter));
}
- subMonitor.step(1);
+ subMonitor.split(1);
}
return multiEdit.getChildrenSize() <= 0 ? null : multiEdit;
diff --git a/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/RemoveTrailingWhitespaceOperation.java b/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/RemoveTrailingWhitespaceOperation.java
index 026b51790..90cb739e4 100644
--- a/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/RemoveTrailingWhitespaceOperation.java
+++ b/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/RemoveTrailingWhitespaceOperation.java
@@ -11,6 +11,7 @@
package org.eclipse.core.filebuffers.manipulation;
import org.eclipse.core.internal.filebuffers.FileBuffersPlugin;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -63,7 +64,7 @@ public class RemoveTrailingWhitespaceOperation extends TextFileBufferOperation {
++j;
if (j < lineExclusiveEnd)
multiEdit.addChild(new DeleteEdit(j, lineExclusiveEnd - j));
- subMonitor.step(1);
+ subMonitor.split(1);
}
return multiEdit.getChildrenSize() <= 0 ? null : multiEdit;
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 351bd4139..ecf413965 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
@@ -246,7 +246,7 @@ public abstract class ResourceFileBuffer extends AbstractFileBuffer {
fSynchronizationStamp= fFile.getModificationStamp();
addFileBufferContentListeners();
- subMonitor.step(1);
+ subMonitor.split(1);
}
diff --git a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceTextFileBuffer.java b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceTextFileBuffer.java
index d09ea9261..95618a437 100644
--- a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceTextFileBuffer.java
+++ b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceTextFileBuffer.java
@@ -387,7 +387,7 @@ public class ResourceTextFileBuffer extends ResourceFileBuffer implements ITextF
// set synchronization stamp to know whether the file synchronizer must become active
fSynchronizationStamp= fFile.getModificationStamp();
- subMonitor.step(1);
+ subMonitor.split(1);
// TODO commit persistable annotation model
}

Back to the top