Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2015-09-29 05:45:31 +0000
committerEugene Tarassov2015-09-29 05:45:31 +0000
commitdf025ec275be8f378d5dc8abb041959fc112bd36 (patch)
treec97dafb78a87c93a7f87e1c6b5911098d4d77347
parent28086511b9a7a76d6eb320667ecdf0e4685cfc0a (diff)
downloadorg.eclipse.tcf-df025ec275be8f378d5dc8abb041959fc112bd36.tar.gz
org.eclipse.tcf-df025ec275be8f378d5dc8abb041959fc112bd36.tar.xz
org.eclipse.tcf-df025ec275be8f378d5dc8abb041959fc112bd36.zip
TCF Profiler: fixed misspelling in the Profiler view status line
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/profiler/ProfilerView.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/profiler/ProfilerView.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/profiler/ProfilerView.java
index dbfcbacce..107c2314b 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/profiler/ProfilerView.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/profiler/ProfilerView.java
@@ -604,7 +604,7 @@ public class ProfilerView extends ViewPart {
status.setText("Cannot upload profiling data: " + error_msg);
}
else {
- status.setText("Profiler runnning. " + sample_count + " samples");
+ status.setText("Profiler running. " + sample_count + " samples");
}
}
});
@@ -1119,11 +1119,12 @@ public class ProfilerView extends ViewPart {
private String toPercent(float x) {
float f = x * 100 / sample_count;
- if (f >= 100) return "100";
- if (f >= 10) return String.format("%.1f", f);
- if (f >= 1) return String.format("%.2f", f);
String s = String.format("%.3f", f);
- if (s.charAt(0) == '0') s = s.substring(1);
+ int l = s.indexOf('.');
+ if (l >= 3) s = "100";
+ else if (l >= 2) s = s.substring(0, 4);
+ else if (s.charAt(0) == '0') s = s.substring(1);
+ else s = s.substring(0, 4);
return s;
}

Back to the top