Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2017-10-12 11:51:34 -0400
committerLars Vogel2017-10-12 11:51:34 -0400
commitefdae76c60bd8a92d001e8c32f79f0d438f5adcc (patch)
tree2dbbe50c7297e0031d915e486cc537f370b85f7a /bundles
parentd68d32713fb03a70ceee0a998d00d9b516725a56 (diff)
downloadeclipse.platform.team-efdae76c60bd8a92d001e8c32f79f0d438f5adcc.tar.gz
eclipse.platform.team-efdae76c60bd8a92d001e8c32f79f0d438f5adcc.tar.xz
eclipse.platform.team-efdae76c60bd8a92d001e8c32f79f0d438f5adcc.zip
Bug 525944 - Use StringBuilder instead of StringBuffer in
org.eclipse.team.ui Change-Id: I13a9bb41f94ecd71fd79c0cf8c0836c61b50c8cd Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/CopyToClipboardAction.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java2
7 files changed, 9 insertions, 9 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
index b9df04c27..7910f13fd 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
@@ -784,7 +784,7 @@ public class Utils {
}
public static String convertSelection(IResource[] resources) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for (int i = 0; i < resources.length; i++) {
IResource resource = resources[i];
if(i > 0) buffer.append(", "); //$NON-NLS-1$
@@ -810,7 +810,7 @@ public class Utils {
int subStrLen = (maxWidth - ellipsis.length()) / 2;
int addtl = (maxWidth - ellipsis.length()) % 2;
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(textValue.substring(0, subStrLen));
sb.append(ellipsis);
sb.append(textValue.substring(length - subStrLen - addtl));
@@ -991,7 +991,7 @@ public class Utils {
}
public static String convertSelection(ResourceMapping[] mappings) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
boolean hadOne = false;
for (int i = 0; i < mappings.length; i++) {
ResourceMapping resourceMapping = mappings[i];
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java
index 7b9ceb4be..cb9875057 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java
@@ -97,7 +97,7 @@ public abstract class RegistryReader {
*/
protected void logError(IConfigurationElement element, String text) {
IExtension extension = element.getDeclaringExtension();
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append("Plugin " + extension.getNamespaceIdentifier() + ", extension " + extension.getExtensionPointUniqueIdentifier()); //$NON-NLS-2$//$NON-NLS-1$
buf.append("\n" + text); //$NON-NLS-1$
TeamUIPlugin.log(IStatus.ERROR, buf.toString(), null);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java
index 62735946f..8ce6c057d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java
@@ -352,7 +352,7 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
}
private String makeWorkingSetLabel() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for (int i = 0; i < workingSets.length; i++) {
IWorkingSet set = workingSets[i];
if (i != 0)
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java
index 5ecd8147d..46eccec10 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java
@@ -394,7 +394,7 @@ public abstract class RefreshParticipantJob extends Job {
}
private IStatus calculateStatus(IRefreshEvent event) {
- StringBuffer text = new StringBuffer();
+ StringBuilder text = new StringBuilder();
int code = IStatus.OK;
int changeCount = event.getChangeDescription().getChangeCount();
int numChanges = getChangeCount();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java
index ebe759b1e..b671d9080 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java
@@ -217,7 +217,7 @@ public class SubscriberRefreshSchedule {
return TeamUIMessages.SyncViewPreferencePage_lastRefreshRunNever;
}
long stopMills = event.getStopTime();
- StringBuffer text = new StringBuffer();
+ StringBuilder text = new StringBuilder();
if(stopMills <= 0) {
text.append(TeamUIMessages.SyncViewPreferencePage_lastRefreshRunNever);
} else {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/CopyToClipboardAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/CopyToClipboardAction.java
index 50f0d83a1..3cbaa71c3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/CopyToClipboardAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/CopyToClipboardAction.java
@@ -69,7 +69,7 @@ class CopyToClipboardAction extends SelectionListenerAction {
* matches what appears in the tree.
*/
private String getTextualClipboardContents() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
int i = 0;
IStructuredSelection structuredSelection = getStructuredSelection();
if (structuredSelection instanceof TreeSelection) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java
index 4892ced72..65882fa50 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java
@@ -72,7 +72,7 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper
if (sets.length == 0) {
return TeamUIMessages.WorkingSetScope_0;
}
- StringBuffer name = new StringBuffer();
+ StringBuilder name = new StringBuilder();
for (int i = 0; i < sets.length; i++) {
IWorkingSet set = sets[i];
name.append(set.getName());

Back to the top