aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2010-12-16 13:29:01 -0800
committerTor Norbye <tnorbye@google.com>2010-12-16 13:30:13 -0800
commit2f70fafe0bc1cf6d14cb35241ca252ca3cbe5674 (patch)
tree312bea374e59b4c2fa0f385d0b44935a98ca5db3 /eclipse/plugins
parentb629a5b1a40bde693613f74265ca4fd22f35e89a (diff)
downloadsdk-2f70fafe0bc1cf6d14cb35241ca252ca3cbe5674.zip
sdk-2f70fafe0bc1cf6d14cb35241ca252ca3cbe5674.tar.gz
sdk-2f70fafe0bc1cf6d14cb35241ca252ca3cbe5674.tar.bz2
Fix non-externalized-string references
I had accidentally used //NON-NLS- instead of //$NON-NLS- in some code. That explains why Eclipse would sometimes insert a space between the // and the NON part... This changeset replaces these with proper //$NON-NLS- entries. Change-Id: Icf4251a352895293ebe82d8207a4dbfe7d8126d5
Diffstat (limited to 'eclipse/plugins')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java12
-rw-r--r--[-rwxr-xr-x]eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/DynamicContextMenu.java2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GestureManager.java2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/IncludeFinder.java16
-rw-r--r--[-rwxr-xr-x]eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PropertySheetPage.java2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/xml/Hyperlinks.java34
7 files changed, 35 insertions, 35 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java
index 4ce6675..f3da152 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java
@@ -427,7 +427,7 @@ public class AdtPlugin extends AbstractUIPlugin implements ILogger {
contents.close();
}
} catch (IOException e) {
- AdtPlugin.log(e, "Can't read file %1$s", file); //NON-NLS-1$
+ AdtPlugin.log(e, "Can't read file %1$s", file); //$NON-NLS-1$
}
}
@@ -448,7 +448,7 @@ public class AdtPlugin extends AbstractUIPlugin implements ILogger {
String charset = file.getCharset();
return streamContains(new InputStreamReader(contents, charset), string);
} catch (Exception e) {
- AdtPlugin.log(e, "Can't read file %1$s", file); //NON-NLS-1$
+ AdtPlugin.log(e, "Can't read file %1$s", file); //$NON-NLS-1$
}
return false;
@@ -493,14 +493,14 @@ public class AdtPlugin extends AbstractUIPlugin implements ILogger {
}
}
} catch (Exception e) {
- AdtPlugin.log(e, "Can't read stream"); //NON-NLS-1$
+ AdtPlugin.log(e, "Can't read stream"); //$NON-NLS-1$
} finally {
try {
if (reader != null) {
reader.close();
}
} catch (IOException e) {
- AdtPlugin.log(e, "Can't read stream"); //NON-NLS-1$
+ AdtPlugin.log(e, "Can't read stream"); //$NON-NLS-1$
}
}
@@ -598,7 +598,7 @@ public class AdtPlugin extends AbstractUIPlugin implements ILogger {
contents.close();
}
} catch (IOException e) {
- AdtPlugin.log(e, "Can't read layout file"); //NON-NLS-1$
+ AdtPlugin.log(e, "Can't read layout file"); //$NON-NLS-1$
}
}
@@ -632,7 +632,7 @@ public class AdtPlugin extends AbstractUIPlugin implements ILogger {
reader.close();
}
} catch (IOException e) {
- AdtPlugin.log(e, "Can't read input stream"); //NON-NLS-1$
+ AdtPlugin.log(e, "Can't read input stream"); //$NON-NLS-1$
}
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/DynamicContextMenu.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/DynamicContextMenu.java
index b707034..3f58df1 100755..100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/DynamicContextMenu.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/DynamicContextMenu.java
@@ -209,7 +209,7 @@ import java.util.regex.Pattern;
// Not yet enabled because we need to backport layoutlib changes to Android 2.0, 2.1, 2.2
// first:
- if (System.getenv("ADT_TEST") != null) { //NON-NLS-1$
+ if (System.getenv("ADT_TEST") != null) { //$NON-NLS-1$
insertShowIncludedMenu(endId);
}
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GestureManager.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GestureManager.java
index 6cc65bb..bbd62fe 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GestureManager.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GestureManager.java
@@ -50,7 +50,7 @@ import java.util.List;
*/
public class GestureManager {
/** Drag source data key */
- private static String KEY_DRAG_PREVIEW = "dragpreview"; //NON-NLS-1$
+ private static String KEY_DRAG_PREVIEW = "dragpreview"; //$NON-NLS-1$
/** The canvas which owns this GestureManager. */
private final LayoutCanvas mCanvas;
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java
index 920a8e4..a964c13 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java
@@ -1515,7 +1515,7 @@ public class GraphicalEditorPart extends EditorPart
topParser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
topParser.setInput(new FileReader(layoutFile));
} catch (XmlPullParserException e) {
- AdtPlugin.log(e, ""); //NON-NLS-1$
+ AdtPlugin.log(e, ""); //$NON-NLS-1$
} catch (FileNotFoundException e) {
// this will not happen since we check above.
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/IncludeFinder.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/IncludeFinder.java
index 07c52fe..f064c14 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/IncludeFinder.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/IncludeFinder.java
@@ -487,7 +487,7 @@ public class IncludeFinder {
* if it detects the string &lt;include in the file.
*/
private List<String> findIncludes(String xml) {
- int index = xml.indexOf("<include"); //NON-NLS-1$
+ int index = xml.indexOf("<include"); //$NON-NLS-1$
if (index != -1) {
return findIncludesInXml(xml);
}
@@ -569,7 +569,7 @@ public class IncludeFinder {
}
typeBegin = colon + 1;
- assert "layout".equals(url.substring(typeBegin, typeEnd)); //NON-NLS-1$
+ assert "layout".equals(url.substring(typeBegin, typeEnd)); //$NON-NLS-1$
}
return url.substring(nameBegin);
@@ -720,7 +720,7 @@ public class IncludeFinder {
}
/** Format to chain include cycles in: a=>b=>c=>d etc */
- private final String CHAIN_FORMAT = "%1$s=>%2$s"; //NON-NLS-1$
+ private final String CHAIN_FORMAT = "%1$s=>%2$s"; //$NON-NLS-1$
private String dfs(String from, Set<String> seen) {
seen.add(from);
@@ -881,7 +881,7 @@ public class IncludeFinder {
* given reference
*/
public static String getProjectRelativePath(String reference) {
- if (!reference.contains(WS_SEP)) { //NON-NLS-1$
+ if (!reference.contains(WS_SEP)) { //$NON-NLS-1$
reference = SdkConstants.FD_LAYOUT + WS_SEP + reference;
}
return SdkConstants.FD_RESOURCES + WS_SEP + reference + '.' + EXT_XML;
@@ -995,10 +995,10 @@ public class IncludeFinder {
@Override
public String toString() {
- return "Reference [getId()=" + getId() // NON-NLS-1$
- + ", getDisplayName()=" + getDisplayName() // NON-NLS-1$
- + ", getName()=" + getName() // NON-NLS-1$
- + ", getFile()=" + getFile() + "]"; // NON-NLS-1$
+ return "Reference [getId()=" + getId() //$NON-NLS-1$
+ + ", getDisplayName()=" + getDisplayName() //$NON-NLS-1$
+ + ", getName()=" + getName() //$NON-NLS-1$
+ + ", getFile()=" + getFile() + "]"; //$NON-NLS-1$
}
/**
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PropertySheetPage.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PropertySheetPage.java
index c786695..d33fffc 100755..100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PropertySheetPage.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PropertySheetPage.java
@@ -85,7 +85,7 @@ public class PropertySheetPage extends org.eclipse.ui.views.properties.PropertyS
// Strip out newlines to make this a single line entry
help = help.replace('\n', ' ');
// Remove repeated spaces in case there were trailing spaces
- help = help.replaceAll(" ", " "); //NON-NLS-1$ //NON-NLS-2$
+ help = help.replaceAll(" ", " "); //$NON-NLS-1$ //$NON-NLS-2$
IActionBars actionBars = getSite().getActionBars();
IStatusLineManager status = actionBars.getStatusLineManager();
status.setMessage(help);
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/xml/Hyperlinks.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/xml/Hyperlinks.java
index 2cb1bb7..4c6945f 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/xml/Hyperlinks.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/xml/Hyperlinks.java
@@ -127,7 +127,7 @@ public class Hyperlinks {
/** Regular expression matching a FQCN for a view class */
@VisibleForTesting
/* package */ static final Pattern CLASS_PATTERN = Pattern.compile(
- "(([a-zA-Z_\\$][a-zA-Z0-9_\\$]*)+\\.)+[a-zA-Z_\\$][a-zA-Z0-9_\\$]*"); //NON-NLS-1$
+ "(([a-zA-Z_\\$][a-zA-Z0-9_\\$]*)+\\.)+[a-zA-Z_\\$][a-zA-Z0-9_\\$]*"); //$NON-NLS-1$
/** Determines whether the given attribute <b>name</b> is linkable */
private static boolean isAttributeNameLink(@SuppressWarnings("unused") XmlContext context) {
@@ -158,7 +158,7 @@ public class Hyperlinks {
}
String value = attribute.getValue();
- if (value.startsWith("@+")) { //NON-NLS-1$
+ if (value.startsWith("@+")) { //$NON-NLS-1$
// It's a value -declaration-, nowhere else to jump
// (though we could consider jumping to the R-file; would that
// be helpful?)
@@ -494,7 +494,7 @@ public class Hyperlinks {
if (valueStr.startsWith("?")) { //$NON-NLS-1$
// FIXME: It's a reference. We should resolve this properly.
return false;
- } else if (valueStr.startsWith("@")) { //NON-NLS-1$
+ } else if (valueStr.startsWith("@")) { //$NON-NLS-1$
// Refers to a different resource; resolve it iteratively
if (seen.contains(valueStr)) {
return false;
@@ -534,7 +534,7 @@ public class Hyperlinks {
// Handle inner classes
if (fqcn.indexOf('$') != -1) {
- fqcn = fqcn.replaceAll("\\$", "."); //NON-NLS-1$ //NON-NLS-2$
+ fqcn = fqcn.replaceAll("\\$", "."); //$NON-NLS-1$ //$NON-NLS-2$
}
try {
@@ -546,7 +546,7 @@ public class Hyperlinks {
}
}
} catch (Throwable e) {
- AdtPlugin.log(e, "Can't open class %1$s", fqcn); //NON-NLS-1$
+ AdtPlugin.log(e, "Can't open class %1$s", fqcn); //$NON-NLS-1$
}
return false;
@@ -616,7 +616,7 @@ public class Hyperlinks {
}
}
} catch (CoreException e) {
- AdtPlugin.log(e, ""); //NON-NLS-1$
+ AdtPlugin.log(e, ""); //$NON-NLS-1$
}
return null;
@@ -651,7 +651,7 @@ public class Hyperlinks {
}
}
} catch (CoreException e) {
- AdtPlugin.log(e, ""); //NON-NLS-1$
+ AdtPlugin.log(e, ""); //$NON-NLS-1$
}
}
@@ -689,7 +689,7 @@ public class Hyperlinks {
}
}
} catch (CoreException e) {
- AdtPlugin.log(e, ""); //NON-NLS-1$
+ AdtPlugin.log(e, ""); //$NON-NLS-1$
}
}
return null;
@@ -715,9 +715,9 @@ public class Hyperlinks {
return findValueInDocument(type, name, file, document);
}
} catch (IOException e) {
- AdtPlugin.log(e, "Can't parse %1$s", file); //NON-NLS-1$
+ AdtPlugin.log(e, "Can't parse %1$s", file); //$NON-NLS-1$
} catch (CoreException e) {
- AdtPlugin.log(e, "Can't parse %1$s", file); //NON-NLS-1$
+ AdtPlugin.log(e, "Can't parse %1$s", file); //$NON-NLS-1$
} finally {
if (model != null) {
model.releaseFromRead();
@@ -733,7 +733,7 @@ public class Hyperlinks {
String targetTag = type.getName();
if (type == ResourceType.ID) {
// Ids are recorded in <item> tags instead of <id> tags
- targetTag = "item"; //NON-NLS-1$
+ targetTag = "item"; //$NON-NLS-1$
}
Element root = document.getDocumentElement();
if (root.getTagName().equals(ROOT_ELEMENT)) {
@@ -782,9 +782,9 @@ public class Hyperlinks {
return findIdInDocument(id, file, document);
}
} catch (IOException e) {
- AdtPlugin.log(e, "Can't parse %1$s", file); //NON-NLS-1$
+ AdtPlugin.log(e, "Can't parse %1$s", file); //$NON-NLS-1$
} catch (CoreException e) {
- AdtPlugin.log(e, "Can't parse %1$s", file); //NON-NLS-1$
+ AdtPlugin.log(e, "Can't parse %1$s", file); //$NON-NLS-1$
} finally {
if (model != null) {
model.releaseFromRead();
@@ -797,7 +797,7 @@ public class Hyperlinks {
/** Looks within an XML DOM document for the given resource name and returns it */
private static Pair<IFile, IRegion> findIdInDocument(String id, IFile file,
Document document) {
- String targetAttribute = "@+id/" + id; //NON-NLS-1$
+ String targetAttribute = "@+id/" + id; //$NON-NLS-1$
return findIdInElement(document.getDocumentElement(), file, targetAttribute);
}
@@ -852,7 +852,7 @@ public class Hyperlinks {
int nameBegin = typeEnd + 1;
// Skip @ and @+
- int typeBegin = url.startsWith("@+") ? 2 : 1; //NON-NLS-1$
+ int typeBegin = url.startsWith("@+") ? 2 : 1; //$NON-NLS-1$
int colon = url.lastIndexOf(':', typeEnd);
if (colon != -1) {
@@ -955,7 +955,7 @@ public class Hyperlinks {
IJavaElement element = elements[0];
if (element.getElementType() == IJavaElement.FIELD) {
IJavaElement unit = element.getAncestor(IJavaElement.COMPILATION_UNIT);
- if ("R.java".equals(unit.getElementName())) { // NON-NLS-1$
+ if ("R.java".equals(unit.getElementName())) { //$NON-NLS-1$
// Yes, we're in an R class. Offer hyperlink navigation to XML
// resource
// files for the various definitions
@@ -1141,7 +1141,7 @@ public class Hyperlinks {
}
}
} catch (BadLocationException e) {
- AdtPlugin.log(e, ""); //NON-NLS-1$
+ AdtPlugin.log(e, ""); //$NON-NLS-1$
}
return new Region(start, length);
}