diff options
author | Lars Vogel | 2015-10-11 18:03:08 +0000 |
---|---|---|
committer | Lars Vogel | 2015-12-11 06:51:37 +0000 |
commit | 39962f1bdb7aa3001ae908f0e6e0bea00b9b3e78 (patch) | |
tree | ca36de3b638b2564d6c629366bd38506a54a6206 /org.eclipse.core.filebuffers | |
parent | 166aadc5b779bb368a00801a61339989165355df (diff) | |
download | eclipse.platform.text-39962f1bdb7aa3001ae908f0e6e0bea00b9b3e78.tar.gz eclipse.platform.text-39962f1bdb7aa3001ae908f0e6e0bea00b9b3e78.tar.xz eclipse.platform.text-39962f1bdb7aa3001ae908f0e6e0bea00b9b3e78.zip |
Bug 479525 - Inline helper method Progress#getMonitorI20151215-0800
Method is only called once and has only one statement, can be inlined.
Change-Id: I595c381a070c6a6e27878cfa7d2c46cde393fe79
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'org.eclipse.core.filebuffers')
2 files changed, 4 insertions, 6 deletions
diff --git a/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/GenericFileBufferOperationRunner.java b/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/GenericFileBufferOperationRunner.java index b141a8849..d49c1346c 100644 --- a/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/GenericFileBufferOperationRunner.java +++ b/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/manipulation/GenericFileBufferOperationRunner.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2009 IBM Corporation and others. + * Copyright (c) 2007, 2015 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,6 +20,7 @@ import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.ISafeRunnable; import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.SafeRunner; import org.eclipse.core.runtime.Status; @@ -231,7 +232,7 @@ public class GenericFileBufferOperationRunner { } catch (CoreException x) { try { - releaseFileBuffers(locations, Progress.getMonitor()); + releaseFileBuffers(locations, new NullProgressMonitor()); } catch (CoreException e) { } throw x; diff --git a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/Progress.java b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/Progress.java index 693c3bd3b..a56ed1e23 100644 --- a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/Progress.java +++ b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/Progress.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. + * Copyright (c) 2000, 2015 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 @@ -28,7 +28,4 @@ public class Progress { return new SubProgressMonitor(getMonitor(parent), ticks, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK); } - public static IProgressMonitor getMonitor() { - return new NullProgressMonitor(); - } } |