aboutsummaryrefslogtreecommitdiffstats
path: root/traceview/src
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2011-01-04 15:59:49 -0800
committerTor Norbye <tnorbye@google.com>2011-01-04 15:59:49 -0800
commit23da069e4f407df1b06e7db2324e3247496abe3d (patch)
tree0e11dbf1433c406f86e38519a32452f7b010052b /traceview/src
parentcaef2f66bf77fd473b704aaa7f81ddf3405d754a (diff)
downloadsdk-23da069e4f407df1b06e7db2324e3247496abe3d.zip
sdk-23da069e4f407df1b06e7db2324e3247496abe3d.tar.gz
sdk-23da069e4f407df1b06e7db2324e3247496abe3d.tar.bz2
Fix NON-NLS tokens
There were a number of // $NON-NLS-1$ references in the codebase. Eclipse's "Externalize Strings" functionality will not handle these correctly; there must not be a space between the "//" and the "$NON" tokens. (I left AndroidXmlEditor.xml alone; it is the file I discovered the problem in but I fixed those references as part of another pending checkin.) Change-Id: If185c88a667273af614f0bee5959fd2618756c05
Diffstat (limited to 'traceview/src')
-rw-r--r--traceview/src/com/android/traceview/DmTraceReader.java6
-rw-r--r--traceview/src/com/android/traceview/TimeLineView.java46
2 files changed, 26 insertions, 26 deletions
diff --git a/traceview/src/com/android/traceview/DmTraceReader.java b/traceview/src/com/android/traceview/DmTraceReader.java
index 5a19c19..fb881e2 100644
--- a/traceview/src/com/android/traceview/DmTraceReader.java
+++ b/traceview/src/com/android/traceview/DmTraceReader.java
@@ -55,7 +55,7 @@ public class DmTraceReader extends TraceReader {
private byte[] mBytes = new byte[8];
// A regex for matching the thread "id name" lines in the .key file
- private static final Pattern mIdNamePattern = Pattern.compile("(\\d+)\t(.*)"); // $NON-NLS-1$
+ private static final Pattern mIdNamePattern = Pattern.compile("(\\d+)\t(.*)"); //$NON-NLS-1$
DmTraceReader(String traceFileName, boolean regression) {
mTraceFileName = traceFileName;
@@ -110,7 +110,7 @@ public class DmTraceReader extends TraceReader {
methodId = methodId & ~0x03;
MethodData methodData = mMethodMap.get(methodId);
if (methodData == null) {
- String name = String.format("(0x%1$x)", methodId); // $NON-NLS-1$
+ String name = String.format("(0x%1$x)", methodId); //$NON-NLS-1$
methodData = new MethodData(methodId, name);
}
@@ -188,7 +188,7 @@ public class DmTraceReader extends TraceReader {
long prevCallTime = 0;
ThreadData threadData = mThreadMap.get(call.getThreadId());
if (threadData == null) {
- String name = String.format("[%1$d]", call.getThreadId()); // $NON-NLS-1$
+ String name = String.format("[%1$d]", call.getThreadId()); //$NON-NLS-1$
threadData = new ThreadData(call.getThreadId(), name, mTopLevel);
mThreadMap.put(call.getThreadId(), threadData);
}
diff --git a/traceview/src/com/android/traceview/TimeLineView.java b/traceview/src/com/android/traceview/TimeLineView.java
index 67dc97b..875becf 100644
--- a/traceview/src/com/android/traceview/TimeLineView.java
+++ b/traceview/src/com/android/traceview/TimeLineView.java
@@ -153,23 +153,23 @@ public class TimeLineView extends Composite implements Observer {
mColorZoomSelection = new Color(display, 230, 230, 230);
mFontRegistry = new FontRegistry(display);
- mFontRegistry.put("small", // $NON-NLS-1$
- new FontData[] { new FontData("Arial", 8, SWT.NORMAL) }); // $NON-NLS-1$
- mFontRegistry.put("courier8", // $NON-NLS-1$
- new FontData[] { new FontData("Courier New", 8, SWT.BOLD) }); // $NON-NLS-1$
- mFontRegistry.put("medium", // $NON-NLS-1$
- new FontData[] { new FontData("Courier New", 10, SWT.NORMAL) }); // $NON-NLS-1$
+ mFontRegistry.put("small", //$NON-NLS-1$
+ new FontData[] { new FontData("Arial", 8, SWT.NORMAL) }); //$NON-NLS-1$
+ mFontRegistry.put("courier8", //$NON-NLS-1$
+ new FontData[] { new FontData("Courier New", 8, SWT.BOLD) }); //$NON-NLS-1$
+ mFontRegistry.put("medium", //$NON-NLS-1$
+ new FontData[] { new FontData("Courier New", 10, SWT.NORMAL) }); //$NON-NLS-1$
Image image = new Image(display, new Rectangle(100, 100, 100, 100));
GC gc = new GC(image);
if (mSetFonts) {
- gc.setFont(mFontRegistry.get("small")); // $NON-NLS-1$
+ gc.setFont(mFontRegistry.get("small")); //$NON-NLS-1$
}
mSmallFontWidth = gc.getFontMetrics().getAverageCharWidth();
mSmallFontHeight = gc.getFontMetrics().getHeight();
if (mSetFonts) {
- gc.setFont(mFontRegistry.get("medium")); // $NON-NLS-1$
+ gc.setFont(mFontRegistry.get("medium")); //$NON-NLS-1$
}
mMediumFontWidth = gc.getFontMetrics().getAverageCharWidth();
@@ -318,7 +318,7 @@ public class TimeLineView extends Composite implements Observer {
public void update(Observable objservable, Object arg) {
// Ignore updates from myself
- if (arg == "TimeLineView") // $NON-NLS-1$
+ if (arg == "TimeLineView") //$NON-NLS-1$
return;
// System.out.printf("timeline update from %s\n", arg);
boolean foundHighlight = false;
@@ -330,14 +330,14 @@ public class TimeLineView extends Composite implements Observer {
continue;
String name = selection.getName();
// System.out.printf(" timeline highlight %s from %s\n", name, arg);
- if (name == "MethodData") { // $NON-NLS-1$
+ if (name == "MethodData") { //$NON-NLS-1$
foundHighlight = true;
mHighlightMethodData = (MethodData) selection.getValue();
// System.out.printf(" method %s\n",
// highlightMethodData.getName());
mHighlightCall = null;
startHighlighting();
- } else if (name == "Call") { // $NON-NLS-1$
+ } else if (name == "Call") { //$NON-NLS-1$
foundHighlight = true;
mHighlightCall = (Call) selection.getValue();
// System.out.printf(" call %s\n", highlightCall.getName());
@@ -354,13 +354,13 @@ public class TimeLineView extends Composite implements Observer {
records = new ArrayList<Record>();
if (false) {
- System.out.println("TimelineView() list of records:"); // $NON-NLS-1$
+ System.out.println("TimelineView() list of records:"); //$NON-NLS-1$
for (Record r : records) {
- System.out.printf("row '%s' block '%s' [%d, %d]\n", r.row // $NON-NLS-1$
+ System.out.printf("row '%s' block '%s' [%d, %d]\n", r.row //$NON-NLS-1$
.getName(), r.block.getName(), r.block.getStartTime(),
r.block.getEndTime());
if (r.block.getStartTime() > r.block.getEndTime()) {
- System.err.printf("Error: block startTime > endTime\n"); // $NON-NLS-1$
+ System.err.printf("Error: block startTime > endTime\n"); //$NON-NLS-1$
System.exit(1);
}
}
@@ -569,7 +569,7 @@ public class TimeLineView extends Composite implements Observer {
// Set up the off-screen gc
GC gcImage = new GC(image);
if (mSetFonts)
- gcImage.setFont(mFontRegistry.get("medium")); // $NON-NLS-1$
+ gcImage.setFont(mFontRegistry.get("medium")); //$NON-NLS-1$
if (mNumRows > 2) {
// Draw the row background stripes
@@ -702,7 +702,7 @@ public class TimeLineView extends Composite implements Observer {
// Set up the off-screen gc
GC gcImage = new GC(image);
if (mSetFonts)
- gcImage.setFont(mFontRegistry.get("medium")); // $NON-NLS-1$
+ gcImage.setFont(mFontRegistry.get("medium")); //$NON-NLS-1$
if (mSurface.drawingSelection()) {
drawSelection(display, gcImage);
@@ -756,7 +756,7 @@ public class TimeLineView extends Composite implements Observer {
// Display the maximum data value
double maxVal = mScaleInfo.getMaxVal();
info = mUnits.labelledString(maxVal);
- info = String.format(" max %s ", info); // $NON-NLS-1$
+ info = String.format(" max %s ", info); //$NON-NLS-1$
Point extent = gc.stringExtent(info);
Point dim = getSize();
int x1 = dim.x - RightMargin - extent.x;
@@ -930,7 +930,7 @@ public class TimeLineView extends Composite implements Observer {
// Set up the off-screen gc
GC gcImage = new GC(image);
if (mSetFonts)
- gcImage.setFont(mFontRegistry.get("small")); // $NON-NLS-1$
+ gcImage.setFont(mFontRegistry.get("small")); //$NON-NLS-1$
// Draw the background
// gcImage.setBackground(colorBackground);
@@ -1035,14 +1035,14 @@ public class TimeLineView extends Composite implements Observer {
ArrayList<Selection> selections = new ArrayList<Selection>();
// Get the row label
RowData rd = mRows[mMouseRow];
- selections.add(Selection.highlight("Thread", rd.mName)); // $NON-NLS-1$
- selections.add(Selection.highlight("Call", selectBlock)); // $NON-NLS-1$
+ selections.add(Selection.highlight("Thread", rd.mName)); //$NON-NLS-1$
+ selections.add(Selection.highlight("Call", selectBlock)); //$NON-NLS-1$
int mouseX = mMouse.x - LeftMargin;
double mouseXval = mScaleInfo.pixelToValue(mouseX);
- selections.add(Selection.highlight("Time", mouseXval)); // $NON-NLS-1$
+ selections.add(Selection.highlight("Time", mouseXval)); //$NON-NLS-1$
- mSelectionController.change(selections, "TimeLineView"); // $NON-NLS-1$
+ mSelectionController.change(selections, "TimeLineView"); //$NON-NLS-1$
mHighlightMethodData = null;
mHighlightCall = (Call) selectBlock;
startHighlighting();
@@ -1078,7 +1078,7 @@ public class TimeLineView extends Composite implements Observer {
if (md == null && mHighlightCall != null)
md = mHighlightCall.getMethodData();
if (md == null)
- System.out.printf("null highlight?\n"); // $NON-NLS-1$
+ System.out.printf("null highlight?\n"); //$NON-NLS-1$
if (md != null) {
mTimescale.setMethodName(md.getProfileName());
mTimescale.setMethodColor(md.getColor());