Author: sflanigan
Date: 2009-07-27 03:39:51 -0400 (Mon, 27 Jul 2009)
New Revision: 16807
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogContentProposalProvider.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/DefaultDropCommandRunner.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPContentOutlineConfiguration.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3557 Externalize English strings
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogContentProposalProvider.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogContentProposalProvider.java 2009-07-27
07:38:57 UTC (rev 16806)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogContentProposalProvider.java 2009-07-27
07:39:51 UTC (rev 16807)
@@ -72,8 +72,8 @@
if(valueHelper == null) {
valueHelper = new ValueHelper();
}
- pageContext = (IPageContext)context.get("pageContext");
- processor = (JspContentAssistProcessor)context.get("processor");
+ pageContext = (IPageContext)context.get("pageContext"); //$NON-NLS-1$
+ processor = (JspContentAssistProcessor)context.get("processor");
//$NON-NLS-1$
if(processor == null) {
processor = valueHelper.createContentAssistProcessor();
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java 2009-07-27
07:38:57 UTC (rev 16806)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java 2009-07-27
07:39:51 UTC (rev 16807)
@@ -362,7 +362,7 @@
if (image == null) {
image =
XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC);
}
- String displayString = closingTag; //$NON-NLS-1$
+ String displayString = closingTag;
IContextInformation contextInformation = null;
String additionalProposalInfo = textProposal.getContextInfo();
int relevance = textProposal.getRelevance();
@@ -427,7 +427,7 @@
image =
XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC);
}
- String displayString = closingTag; //$NON-NLS-1$
+ String displayString = closingTag;
IContextInformation contextInformation = null;
String additionalProposalInfo = textProposal.getContextInfo();
int relevance = textProposal.getRelevance();
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2009-07-27
07:38:57 UTC (rev 16806)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2009-07-27
07:39:51 UTC (rev 16807)
@@ -788,8 +788,8 @@
public void initContext(Properties context) {
if(context != null) {
- context.put("processor", processor);
- context.put("pageContext", pageContext);
+ context.put("processor", processor); //$NON-NLS-1$
+ context.put("pageContext", pageContext); //$NON-NLS-1$
}
}
public IPageContext getPageContext() {
@@ -801,7 +801,7 @@
if(c == null) return null;
String prefix = getPrefix(query);
if(prefix == null) return c.getName();
- return prefix + ":" + c.getName();
+ return prefix + ":" + c.getName(); //$NON-NLS-1$
}
public boolean canHaveBody() {
@@ -815,7 +815,7 @@
KbQuery createQuery(TagProposal proposal) {
KbQuery kbQuery = new KbQuery();
- String name = proposal.getPrefix() + ":" + proposal.getName();
+ String name = proposal.getPrefix() + ":" + proposal.getName();
//$NON-NLS-1$
kbQuery.setPrefix(proposal.getPrefix());
kbQuery.setUri(proposal.getUri());
kbQuery.setParentTags(new String[]{name});
@@ -823,8 +823,8 @@
kbQuery.setMask(false);
kbQuery.setType(Type.ATTRIBUTE_NAME);
kbQuery.setOffset(JSPTextEditor.this.getTextViewer().getTextWidget().getCaretOffset());
- kbQuery.setValue("");
- kbQuery.setStringQuery("");
+ kbQuery.setValue(""); //$NON-NLS-1$
+ kbQuery.setStringQuery(""); //$NON-NLS-1$
return kbQuery;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/DefaultDropCommandRunner.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/DefaultDropCommandRunner.java 2009-07-27
07:38:57 UTC (rev 16806)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/DefaultDropCommandRunner.java 2009-07-27
07:39:51 UTC (rev 16807)
@@ -65,7 +65,7 @@
if(!(editor instanceof AbstractTextEditor)) return null;
AbstractTextEditor ae = (AbstractTextEditor)editor;
try {
- Method m = AbstractTextEditor.class.getDeclaredMethod("getSourceViewer", new
Class[0]);
+ Method m = AbstractTextEditor.class.getDeclaredMethod("getSourceViewer", new
Class[0]); //$NON-NLS-1$
m.setAccessible(true);
return (ISourceViewer)m.invoke(ae, new Object[0]);
} catch (NoSuchMethodException e1) {
@@ -84,9 +84,9 @@
public void setObject(Object object) {
Properties p = (Properties)object;
- flavor = p.getProperty("flavor");
- data = p.getProperty("data");
- textEditor = (ITextEditor)p.get("textEditor");
+ flavor = p.getProperty("flavor"); //$NON-NLS-1$
+ data = p.getProperty("data"); //$NON-NLS-1$
+ textEditor = (ITextEditor)p.get("textEditor"); //$NON-NLS-1$
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPContentOutlineConfiguration.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPContentOutlineConfiguration.java 2009-07-27
07:38:57 UTC (rev 16806)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPContentOutlineConfiguration.java 2009-07-27
07:39:51 UTC (rev 16807)
@@ -235,8 +235,8 @@
kbQuery.setMask(false);
kbQuery.setType(Type.ATTRIBUTE_NAME);
kbQuery.setOffset(offset);
- kbQuery.setValue("");
- kbQuery.setStringQuery("");
+ kbQuery.setValue(""); //$NON-NLS-1$
+ kbQuery.setStringQuery(""); //$NON-NLS-1$
return kbQuery;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java 2009-07-27
07:38:57 UTC (rev 16806)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java 2009-07-27
07:39:51 UTC (rev 16807)
@@ -190,8 +190,8 @@
if (namesLow.contains(attrName.toLowerCase())) continue;
}
if(valueHelper.isAvailable(pageContext, getQuery(attrName))
- || attrName.equals("style")
- || attrName.equals("class")) {
+ || attrName.equals("style") //$NON-NLS-1$
+ || attrName.equals("class")) { //$NON-NLS-1$
descriptor = createJSPPropertyDescriptor(d, attrName, false);
} else {
descriptor = createTextPropertyDescriptor(attrName, CATEGORY_ATTRIBUTES, 0);
@@ -331,8 +331,8 @@
kbQuery.setMask(false);
kbQuery.setType(Type.ATTRIBUTE_NAME);
kbQuery.setOffset(offset);
- kbQuery.setValue("");
- kbQuery.setStringQuery("");
+ kbQuery.setValue(""); //$NON-NLS-1$
+ kbQuery.setStringQuery(""); //$NON-NLS-1$
return kbQuery;
}
@@ -351,8 +351,8 @@
private String getCategory(CMAttributeDeclaration attrDecl) {
if (attrDecl != null) {
- if (attrDecl.supports("category")) {
- return (String) attrDecl.getProperty("category");
+ if (attrDecl.supports("category")) { //$NON-NLS-1$
+ return (String) attrDecl.getProperty("category"); //$NON-NLS-1$
}
}
return CATEGORY_ATTRIBUTES;
@@ -398,12 +398,12 @@
else sorter.setWeight(attributeName, 0);
}
Properties context = new Properties();
- context.put("node", fNode);
- context.setProperty("nodeName", fNode.getNodeName());
- context.setProperty("attributeName", attributeName);
- context.put("valueHelper", valueHelper);
- context.put("pageContext", pageContext);
- context.put("processor", processor);
+ context.put("node", fNode); //$NON-NLS-1$
+ context.setProperty("nodeName", fNode.getNodeName()); //$NON-NLS-1$
+ context.setProperty("attributeName", attributeName); //$NON-NLS-1$
+ context.put("valueHelper", valueHelper); //$NON-NLS-1$
+ context.put("pageContext", pageContext); //$NON-NLS-1$
+ context.put("processor", processor); //$NON-NLS-1$
JSPPropertyDescriptor descriptor = new JSPPropertyDescriptor(context, attributeName,
attributeName);
descriptor.setCategory(getCategory(null));
descriptor.setDescription(attributeName);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java 2009-07-27
07:38:57 UTC (rev 16806)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java 2009-07-27
07:39:51 UTC (rev 16807)
@@ -59,7 +59,7 @@
public static IPromptingProvider seamPromptingProvider;
static {
- Object o =
ModelFeatureFactory.getInstance().createFeatureInstance("org.jboss.tools.seam.internal.core.el.SeamPromptingProvider");
+ Object o =
ModelFeatureFactory.getInstance().createFeatureInstance("org.jboss.tools.seam.internal.core.el.SeamPromptingProvider");
//$NON-NLS-1$
if(o instanceof IPromptingProvider) {
seamPromptingProvider = (IPromptingProvider)o;
}
@@ -119,7 +119,7 @@
public ModelElement getInitalInput(IPageContext pageContext, KbQuery kbQuery) {
IAttribute[] as = PageProcessor.getInstance().getAttributes(kbQuery, pageContext);
- if(as == null || as.length == 0) return new RootElement("root", new
ArrayList<AttributeValueResource>());
+ if(as == null || as.length == 0) return new RootElement("root", new
ArrayList<AttributeValueResource>()); //$NON-NLS-1$
CustomTagLibAttribute ca = null;
for (IAttribute a: as) {
if(a instanceof CustomTagLibAttribute) {
@@ -129,7 +129,7 @@
}
CustomProposalType[] proposals = ca != null ? ca.getProposals() : new
CustomProposalType[0];
List<AttributeValueResource> elements = new
ArrayList<AttributeValueResource>();
- ModelElement root = new RootElement("root", elements);
+ ModelElement root = new RootElement("root", elements); //$NON-NLS-1$
for (int i = 0; i < proposals.length; i++) {
AttributeValueResource resource =
AttributeValueResourceFactory.getInstance().createResource(getEditorInput(), pageContext,
root, proposals[i].getType());
resource.setParams(proposals[i].getParams());
@@ -138,10 +138,10 @@
}
if(seamPromptingProvider != null && getFile() != null) {
Properties p = new Properties();
- p.put("file", getFile());
- List list = seamPromptingProvider.getList(null, "seam.is_seam_project",
null, p);
+ p.put("file", getFile()); //$NON-NLS-1$
+ List list = seamPromptingProvider.getList(null, "seam.is_seam_project",
null, p); //$NON-NLS-1$
if(list != null) {
- AttributeValueResource resource =
AttributeValueResourceFactory.getInstance().createResource(getEditorInput(), pageContext,
root, "seamVariables");
+ AttributeValueResource resource =
AttributeValueResourceFactory.getInstance().createResource(getEditorInput(), pageContext,
root, "seamVariables"); //$NON-NLS-1$
resource.setQuery(kbQuery, this);
elements.add(resource);
}
@@ -237,7 +237,7 @@
if (editor == null) return null;
if(editor instanceof AbstractTextEditor) {
try {
- Method m = AbstractTextEditor.class.getDeclaredMethod("getSourceViewer",
new Class[0]);
+ Method m = AbstractTextEditor.class.getDeclaredMethod("getSourceViewer",
new Class[0]); //$NON-NLS-1$
m.setAccessible(true);
return (ISourceViewer)m.invoke(editor, new Object[0]);
} catch (Exception e) {