Author: sflanigan
Date: 2009-05-25 01:22:00 -0400 (Mon, 25 May 2009)
New Revision: 15477
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/.settings/
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/.settings/org.eclipse.jdt.core.prefs
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/Activator.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/SharedImages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLCorrectionAssistantProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLEditorConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLOutlineConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/proposals/internal/ConvertNodeToXPathDialogOutlineMenuItemProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/NewMBeanWizard.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/NewSessionBeanWizard.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/pages/NewMessageDrivenBeanWizardPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/pages/NewSessionBeanWizardPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/util/PackageTypeSearcher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/util/ServiceXMLEditorUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3557 Externalise English Strings
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/.settings/org.eclipse.jdt.core.prefs 2009-05-25
05:22:00 UTC (rev 15477)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/Activator.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/Activator.java 2009-05-25
04:47:33 UTC (rev 15476)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/Activator.java 2009-05-25
05:22:00 UTC (rev 15477)
@@ -30,7 +30,7 @@
public class Activator extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.ide.eclipse.as.ui.mbeans";
+ public static final String PLUGIN_ID = "org.jboss.ide.eclipse.as.ui.mbeans";
//$NON-NLS-1$
// The shared instance
private static Activator plugin;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/Messages.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/Messages.java 2009-05-25
04:47:33 UTC (rev 15476)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/Messages.java 2009-05-25
05:22:00 UTC (rev 15477)
@@ -25,9 +25,19 @@
public class Messages extends NLS {
+ private static final String BUNDLE_NAME =
"org.jboss.ide.eclipse.as.ui.mbeans.Messages"; //$NON-NLS-1$
+
+ public static String ConvertNodeToXPathDialogOutlineMenuItemProvider_AddToXPathsAction;
+
+ public static String
ConvertNodeToXPathDialogOutlineMenuItemProvider_AddToXPathsDescription;
+
/* XML service editor */
public static String ServiceXMLAddAttributeTags;
+ public static String ServiceXMLEditorConfiguration_OccurrenceNameWithAttributes;
+
+ public static String ServiceXMLEditorConfiguration_UnableToDisplayInEditor;
+
/* MBean Wizard */
public static String NewMBeanInterface;
@@ -38,6 +48,8 @@
public static String MBeanClassDescription;
public static String MBeanServiceXML;
+ public static String NewSessionBeanWizard_WindowTitle;
+
public static String NewSessionBeanWizardTitle;
public static String NewSessionBeanWizardBeanTypeLabel;
public static String NewSessionBeanWizardStatefulButtonLabel;
@@ -49,12 +61,16 @@
public static String NewSessionBeanWizardRemoteInterfaceNameLabel;
public static String NewSessionBeanWizardMessage;
public static String NewSessionBeanWizardDescription;
+ public static String NewMBeanWizard_CreatingTaskName;
+ public static String NewMBeanWizard_WindowTitle;
+ public static String NewMBeanWizard_XMLTaskName;
public static String NewMessageBeanWizardMessage;
public static String NewMessageBeanWizardDescription;
+
+ public static String NewMessageDrivenBeanWizardPage_Name;
static {
- NLS.initializeMessages("org.jboss.ide.eclipse.as.ui.mbeans.Messages",
- Messages.class);
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/Messages.properties
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/Messages.properties 2009-05-25
04:47:33 UTC (rev 15476)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/Messages.properties 2009-05-25
05:22:00 UTC (rev 15477)
@@ -1,5 +1,7 @@
+ConvertNodeToXPathDialogOutlineMenuItemProvider_AddToXPathsDescription=Add this element
to the list of xpaths you can edit from the properties view.
#Mbean wizard
+ConvertNodeToXPathDialogOutlineMenuItemProvider_AddToXPathsAction=Add to XPaths
NewMBeanInterface=New MBean Interface
NewMBeanInterfaceDesc=Create the interface for the MBean
NewMBeanName=MBean Name
@@ -10,9 +12,12 @@
# service xml
ServiceXMLAddAttributeTags=Add missing attribute tags
+ServiceXMLEditorConfiguration_OccurrenceNameWithAttributes={0} (with attributes)
+ServiceXMLEditorConfiguration_UnableToDisplayInEditor=Unable to display element in
editor.
+NewSessionBeanWizard_WindowTitle=New Session Bean
NewSessionBeanWizardTitle=Session Bean Wizard
NewSessionBeanWizardBeanTypeLabel=Session Bean Type:
NewSessionBeanWizardStatefulButtonLabel=Stateful
@@ -26,3 +31,7 @@
NewSessionBeanWizardDescription=Create a new EJB3 Session Bean
NewMessageBeanWizardMessage=Create a new Message-Driven Bean
NewMessageBeanWizardDescription=Create a new Message-Driven Bean
+NewMessageDrivenBeanWizardPage_Name=New Message Driven Bean Page
+NewMBeanWizard_CreatingTaskName=Creating Files
+NewMBeanWizard_WindowTitle=New MBean Wizard
+NewMBeanWizard_XMLTaskName=XMLDescriptor
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/SharedImages.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/SharedImages.java 2009-05-25
04:47:33 UTC (rev 15476)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/SharedImages.java 2009-05-25
05:22:00 UTC (rev 15477)
@@ -33,7 +33,7 @@
* @author rob.stryker(a)jboss.com
*/
public class SharedImages {
- public static final String IMG_MBEAN = "mbean16";
+ public static final String IMG_MBEAN = "mbean16"; //$NON-NLS-1$
private static SharedImages instance;
@@ -46,7 +46,7 @@
Bundle pluginBundle = Activator.getDefault().getBundle();
- descriptors.put(IMG_MBEAN, createImageDescriptor(pluginBundle,
"icons/mbean16"));
+ descriptors.put(IMG_MBEAN, createImageDescriptor(pluginBundle,
"icons/mbean16")); //$NON-NLS-1$
Iterator iter = descriptors.keySet().iterator();
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLCorrectionAssistantProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLCorrectionAssistantProvider.java 2009-05-25
04:47:33 UTC (rev 15476)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLCorrectionAssistantProvider.java 2009-05-25
05:22:00 UTC (rev 15477)
@@ -70,10 +70,10 @@
if( providers == null ) {
ArrayList list = new ArrayList();
IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(Activator.PLUGIN_ID,
"ServiceXMLQuickFixProvider");
+ IConfigurationElement[] cf = registry.getConfigurationElementsFor(Activator.PLUGIN_ID,
"ServiceXMLQuickFixProvider"); //$NON-NLS-1$
for( int i = 0; i < cf.length; i++ ) {
try {
- list.add((IServiceXMLQuickFixProposalProvider)cf[i].createExecutableExtension("class"));
+ list.add((IServiceXMLQuickFixProposalProvider)cf[i].createExecutableExtension("class"));
//$NON-NLS-1$
} catch( CoreException ce ) {
// don't even log
}
@@ -151,24 +151,24 @@
private String[] mbeanGetMissingAttributes( IDOMNode node ) {
Node parentNode = node.getParentNode();
- if( node.getNodeName().equals("mbean") ||
(node.getNodeName().equals("#text") &&
parentNode.getNodeName().equals("mbean"))) {
- Node mbeanNode = node.getNodeName().equals("mbean") ? node : parentNode;
+ if( node.getNodeName().equals("mbean") ||
(node.getNodeName().equals("#text") &&
parentNode.getNodeName().equals("mbean"))) { //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$
+ Node mbeanNode = node.getNodeName().equals("mbean") ? node : parentNode;
//$NON-NLS-1$
NamedNodeMap attributes = mbeanNode.getAttributes();
for( int i = 0; i < attributes.getLength(); i++ ) {
- if( attributes.item(i).getNodeName().equals("code")) {
+ if( attributes.item(i).getNodeName().equals("code")) { //$NON-NLS-1$
// we found our code element, now lets get the IType.
String codeClass = attributes.item(i).getNodeValue();
IType type = ServiceXMLEditorUtil.findType(codeClass);
if( type != null ) {
IMethod[] methods = ServiceXMLEditorUtil.getAllMethods(type);
- ArrayList attributeNames = new
ArrayList(Arrays.asList(ServiceXMLEditorUtil.findAttributesFromMethods(methods,
"")));
+ ArrayList attributeNames = new
ArrayList(Arrays.asList(ServiceXMLEditorUtil.findAttributesFromMethods(methods,
""))); //$NON-NLS-1$
NodeList mbeanChildren = mbeanNode.getChildNodes();
// count children named 'attribute'
for( int j = 0; j < mbeanChildren.getLength(); j++ ) {
- if( mbeanChildren.item(j).getNodeName().equals("attribute")) {
+ if( mbeanChildren.item(j).getNodeName().equals("attribute")) {
//$NON-NLS-1$
try {
- Node t = mbeanChildren.item(j).getAttributes().getNamedItem("name");
+ Node t = mbeanChildren.item(j).getAttributes().getNamedItem("name");
//$NON-NLS-1$
String attName = t.getNodeValue();
attributeNames.remove(attName);
} catch( Exception e ) {
@@ -210,7 +210,7 @@
if( missing.length == 0 ) return;
Node parentNode = node.getParentNode();
- Node mbeanNode = node.getNodeName().equals("mbean") ? node : parentNode;
+ Node mbeanNode = node.getNodeName().equals("mbean") ? node : parentNode;
//$NON-NLS-1$
// how many tabs?
@@ -218,24 +218,24 @@
StringBuffer attributeIndent = new StringBuffer();
StringBuffer mbeanClosingIndent = new StringBuffer();
boolean starting = true;
- attributeIndent.append("\n");
- mbeanClosingIndent.append("\n");
+ attributeIndent.append("\n"); //$NON-NLS-1$
+ mbeanClosingIndent.append("\n"); //$NON-NLS-1$
while( newParent != null && !(newParent instanceof DocumentImpl)) {
newParent = newParent.getParentNode();
- attributeIndent.append("\t");
+ attributeIndent.append("\t"); //$NON-NLS-1$
if( starting )
starting = false;
else
- mbeanClosingIndent.append("\t");
+ mbeanClosingIndent.append("\t"); //$NON-NLS-1$
}
StringBuffer buf = new StringBuffer();
for( int i = 0; i < missing.length; i++ ) {
buf.append(attributeIndent);
- buf.append("<attribute name=\"");
+ buf.append("<attribute name=\""); //$NON-NLS-1$
buf.append(missing[i]);
- buf.append("\"></attribute>");
+ buf.append("\"></attribute>"); //$NON-NLS-1$
}
buf.append(mbeanClosingIndent);
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLEditorConfiguration.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLEditorConfiguration.java 2009-05-25
04:47:33 UTC (rev 15476)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLEditorConfiguration.java 2009-05-25
05:22:00 UTC (rev 15477)
@@ -21,6 +21,7 @@
*/
package org.jboss.ide.eclipse.as.ui.mbeans.editors;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@@ -67,6 +68,7 @@
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
import org.jboss.ide.eclipse.as.ui.mbeans.Activator;
+import org.jboss.ide.eclipse.as.ui.mbeans.Messages;
import org.jboss.ide.eclipse.as.ui.util.BaseXMLHyperlinkUtil;
import org.jboss.ide.eclipse.as.ui.util.PackageTypeSearcher;
import org.jboss.ide.eclipse.as.ui.util.ServiceXMLEditorUtil;
@@ -115,10 +117,10 @@
}
private class ChildOccurances {
- public static final String ZERO_OR_ONE = "_ZERO_OR_ONE_";
- public static final String ONE = "_ONE_";
- public static final String ZERO_TO_INFINITY = "_ZERO_TO_INFINITY_";
- public static final String ONE_TO_INFINITY = "_ONE_TO_INFINITY_";
+ public static final String ZERO_OR_ONE = "_ZERO_OR_ONE_"; //$NON-NLS-1$
+ public static final String ONE = "_ONE_"; //$NON-NLS-1$
+ public static final String ZERO_TO_INFINITY = "_ZERO_TO_INFINITY_";
//$NON-NLS-1$
+ public static final String ONE_TO_INFINITY = "_ONE_TO_INFINITY_";
//$NON-NLS-1$
public String name;
public String numOccurances;
@@ -155,76 +157,76 @@
this.enumOptions = enumOptions;
this.mandatory = mandatory;
this.dataType = dataType;
- this.defaultValue = defaultValue == null ? "" : defaultValue;
+ this.defaultValue = defaultValue == null ? "" : defaultValue;
//$NON-NLS-1$
}
}
private void fillChildren() {
ArrayList<ChildOccurances> list = new ArrayList<ChildOccurances>();
- list.add(new ChildOccurances("loader-repository",
ChildOccurances.ZERO_OR_ONE));
- list.add(new ChildOccurances("local-directory",
ChildOccurances.ZERO_TO_INFINITY));
- list.add(new ChildOccurances("classpath",
ChildOccurances.ZERO_TO_INFINITY));
- list.add(new ChildOccurances("mbean", ChildOccurances.ZERO_TO_INFINITY));
- children.put("server", list);
+ list.add(new ChildOccurances("loader-repository",
ChildOccurances.ZERO_OR_ONE)); //$NON-NLS-1$
+ list.add(new ChildOccurances("local-directory",
ChildOccurances.ZERO_TO_INFINITY)); //$NON-NLS-1$
+ list.add(new ChildOccurances("classpath",
ChildOccurances.ZERO_TO_INFINITY)); //$NON-NLS-1$
+ list.add(new ChildOccurances("mbean", ChildOccurances.ZERO_TO_INFINITY));
//$NON-NLS-1$
+ children.put("server", list); //$NON-NLS-1$
list = new ArrayList<ChildOccurances>();
- list.add(new ChildOccurances("loader-repository-config",
ChildOccurances.ZERO_TO_INFINITY));
- children.put("loader-repository", list);
+ list.add(new ChildOccurances("loader-repository-config",
ChildOccurances.ZERO_TO_INFINITY)); //$NON-NLS-1$
+ children.put("loader-repository", list); //$NON-NLS-1$
- children.put("loader-repository-config", new
ArrayList<ChildOccurances>());
- children.put("local-directory", new ArrayList<ChildOccurances>());
- children.put("classpath", new ArrayList<ChildOccurances>());
+ children.put("loader-repository-config", new
ArrayList<ChildOccurances>()); //$NON-NLS-1$
+ children.put("local-directory", new ArrayList<ChildOccurances>());
//$NON-NLS-1$
+ children.put("classpath", new ArrayList<ChildOccurances>());
//$NON-NLS-1$
list = new ArrayList<ChildOccurances>();
- list.add(new ChildOccurances("constructor", ChildOccurances.ZERO_OR_ONE));
- list.add(new ChildOccurances("xmbean", ChildOccurances.ZERO_OR_ONE));
- list.add(new ChildOccurances("attribute",
ChildOccurances.ZERO_TO_INFINITY));
- list.add(new ChildOccurances("depends", ChildOccurances.ZERO_TO_INFINITY));
- list.add(new ChildOccurances("depends-list",
ChildOccurances.ZERO_TO_INFINITY));
- children.put("mbean", list);
+ list.add(new ChildOccurances("constructor", ChildOccurances.ZERO_OR_ONE));
//$NON-NLS-1$
+ list.add(new ChildOccurances("xmbean", ChildOccurances.ZERO_OR_ONE));
//$NON-NLS-1$
+ list.add(new ChildOccurances("attribute",
ChildOccurances.ZERO_TO_INFINITY)); //$NON-NLS-1$
+ list.add(new ChildOccurances("depends", ChildOccurances.ZERO_TO_INFINITY));
//$NON-NLS-1$
+ list.add(new ChildOccurances("depends-list",
ChildOccurances.ZERO_TO_INFINITY)); //$NON-NLS-1$
+ children.put("mbean", list); //$NON-NLS-1$
- children.put("xmbean", new ArrayList<ChildOccurances>());
+ children.put("xmbean", new ArrayList<ChildOccurances>());
//$NON-NLS-1$
list = new ArrayList<ChildOccurances>();
- list.add(new ChildOccurances("arg", ChildOccurances.ZERO_TO_INFINITY));
- children.put("constructor", list);
+ list.add(new ChildOccurances("arg", ChildOccurances.ZERO_TO_INFINITY));
//$NON-NLS-1$
+ children.put("constructor", list); //$NON-NLS-1$
- children.put("arg", new ArrayList<ChildOccurances>());
- children.put("attribute", new ArrayList<ChildOccurances>());
- children.put("property", new ArrayList<ChildOccurances>());
+ children.put("arg", new ArrayList<ChildOccurances>()); //$NON-NLS-1$
+ children.put("attribute", new ArrayList<ChildOccurances>());
//$NON-NLS-1$
+ children.put("property", new ArrayList<ChildOccurances>());
//$NON-NLS-1$
list = new ArrayList<ChildOccurances>();
- list.add(new ChildOccurances("mbean", ChildOccurances.ZERO_TO_INFINITY));
- children.put("depends", list);
+ list.add(new ChildOccurances("mbean", ChildOccurances.ZERO_TO_INFINITY));
//$NON-NLS-1$
+ children.put("depends", list); //$NON-NLS-1$
list = new ArrayList<ChildOccurances>();
- list.add(new ChildOccurances("depends-list-element",
ChildOccurances.ONE_TO_INFINITY));
- children.put("depends-list", list);
+ list.add(new ChildOccurances("depends-list-element",
ChildOccurances.ONE_TO_INFINITY)); //$NON-NLS-1$
+ children.put("depends-list", list); //$NON-NLS-1$
list = new ArrayList<ChildOccurances>();
- list.add(new ChildOccurances("mbean", ChildOccurances.ZERO_TO_INFINITY));
- children.put("depends-list-element", list);
+ list.add(new ChildOccurances("mbean", ChildOccurances.ZERO_TO_INFINITY));
//$NON-NLS-1$
+ children.put("depends-list-element", list); //$NON-NLS-1$
}
private void fillAttributes() {
- attributes.put("server", new ArrayList());
+ attributes.put("server", new ArrayList()); //$NON-NLS-1$
/*
* <!ELEMENT loader-repository (#PCDATA | loader-repository-config)*>
* <!ATTLIST loader-repository loaderRepositoryClass CDATA #IMPLIED>
*/
- attributes.put("loader-repository", Arrays.asList(new DTDAttributes[] {
- new DTDAttributes("loaderRepositoryClass", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED)
+ attributes.put("loader-repository", Arrays.asList(new DTDAttributes[] {
//$NON-NLS-1$
+ new DTDAttributes("loaderRepositoryClass", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED) //$NON-NLS-1$
}));
/*
* <!ELEMENT loader-repository-config (#PCDATA)>
* <!ATTLIST loader-repository-config configParserClass CDATA #IMPLIED>
*/
- attributes.put("loader-repository-config", Arrays.asList(new DTDAttributes[]
{
- new DTDAttributes("configParserClass", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED)
+ attributes.put("loader-repository-config", Arrays.asList(new DTDAttributes[]
{ //$NON-NLS-1$
+ new DTDAttributes("configParserClass", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED) //$NON-NLS-1$
}));
@@ -232,8 +234,8 @@
* <!ELEMENT local-directory EMPTY>
* <!ATTLIST local-directory path CDATA #IMPLIED>
*/
- attributes.put("local-directory", Arrays.asList(new DTDAttributes[] {
- new DTDAttributes("path", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED)
+ attributes.put("local-directory", Arrays.asList(new DTDAttributes[] {
//$NON-NLS-1$
+ new DTDAttributes("path", DTDAttributes.CDATA_TYPE, DTDAttributes.IMPLIED)
//$NON-NLS-1$
}));
/*
@@ -242,9 +244,9 @@
<!ATTLIST classpath archives CDATA #IMPLIED>
*/
- attributes.put("classpath", Arrays.asList(new DTDAttributes[] {
- new DTDAttributes("codebase", DTDAttributes.CDATA_TYPE,
DTDAttributes.REQUIRED),
- new DTDAttributes("archives", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED)
+ attributes.put("classpath", Arrays.asList(new DTDAttributes[] {
//$NON-NLS-1$
+ new DTDAttributes("codebase", DTDAttributes.CDATA_TYPE,
DTDAttributes.REQUIRED), //$NON-NLS-1$
+ new DTDAttributes("archives", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED) //$NON-NLS-1$
}));
@@ -256,13 +258,13 @@
<!ATTLIST mbean xmbean-dd CDATA #IMPLIED>
<!ATTLIST mbean xmbean-code CDATA #IMPLIED>
*/
- attributes.put("mbean", Arrays.asList(new DTDAttributes[] {
- new DTDAttributes("code", DTDAttributes.CDATA_TYPE,
DTDAttributes.REQUIRED),
- new DTDAttributes("name", DTDAttributes.CDATA_TYPE,
DTDAttributes.REQUIRED),
+ attributes.put("mbean", Arrays.asList(new DTDAttributes[] { //$NON-NLS-1$
+ new DTDAttributes("code", DTDAttributes.CDATA_TYPE,
DTDAttributes.REQUIRED), //$NON-NLS-1$
+ new DTDAttributes("name", DTDAttributes.CDATA_TYPE,
DTDAttributes.REQUIRED), //$NON-NLS-1$
- new DTDAttributes("interface", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED),
- new DTDAttributes("xmbean-dd", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED),
- new DTDAttributes("xmbean-code", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED)
+ new DTDAttributes("interface", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED), //$NON-NLS-1$
+ new DTDAttributes("xmbean-dd", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED), //$NON-NLS-1$
+ new DTDAttributes("xmbean-code", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED) //$NON-NLS-1$
}));
@@ -272,9 +274,9 @@
<!ATTLIST arg type CDATA #IMPLIED>
<!ATTLIST arg value CDATA #REQUIRED>
*/
- attributes.put("arg", Arrays.asList(new DTDAttributes[] {
- new DTDAttributes("type", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED),
- new DTDAttributes("value", DTDAttributes.CDATA_TYPE,
DTDAttributes.REQUIRED)
+ attributes.put("arg", Arrays.asList(new DTDAttributes[] { //$NON-NLS-1$
+ new DTDAttributes("type", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED), //$NON-NLS-1$
+ new DTDAttributes("value", DTDAttributes.CDATA_TYPE,
DTDAttributes.REQUIRED) //$NON-NLS-1$
}));
@@ -287,19 +289,19 @@
<!ATTLIST attribute attributeClass CDATA #IMPLIED>
<!ATTLIST attribute serialDataType (text | javaBean | jbxb) 'text'>
*/
- attributes.put("attribute", Arrays.asList(new DTDAttributes[] {
- new DTDAttributes("name", DTDAttributes.CDATA_TYPE,
DTDAttributes.REQUIRED),
+ attributes.put("attribute", Arrays.asList(new DTDAttributes[] {
//$NON-NLS-1$
+ new DTDAttributes("name", DTDAttributes.CDATA_TYPE,
DTDAttributes.REQUIRED), //$NON-NLS-1$
- new DTDAttributes("replace", DTDAttributes.ENUM_TYPE,
- DTDAttributes.IMPLIED, "true", new String[] { "true",
"false" }),
+ new DTDAttributes("replace", DTDAttributes.ENUM_TYPE, //$NON-NLS-1$
+ DTDAttributes.IMPLIED, "true", new String[] { "true",
"false" }), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- new DTDAttributes("trim", DTDAttributes.ENUM_TYPE,
- DTDAttributes.IMPLIED, "true", new String[] { "true",
"false" }),
+ new DTDAttributes("trim", DTDAttributes.ENUM_TYPE, //$NON-NLS-1$
+ DTDAttributes.IMPLIED, "true", new String[] { "true",
"false" }), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- new DTDAttributes("attributeClass", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED),
+ new DTDAttributes("attributeClass", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED), //$NON-NLS-1$
- new DTDAttributes("serialDataType", DTDAttributes.ENUM_TYPE,
- DTDAttributes.IMPLIED, "text", new String[] { "text",
"javaBean", "jbxb"})
+ new DTDAttributes("serialDataType", DTDAttributes.ENUM_TYPE,
//$NON-NLS-1$
+ DTDAttributes.IMPLIED, "text", new String[] { "text",
"javaBean", "jbxb"}) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$
}));
@@ -307,8 +309,8 @@
<!ELEMENT property (#PCDATA)>
<!ATTLIST property name CDATA #REQUIRED>
*/
- attributes.put("property", Arrays.asList(new DTDAttributes[] {
- new DTDAttributes("name", DTDAttributes.CDATA_TYPE,
DTDAttributes.REQUIRED)
+ attributes.put("property", Arrays.asList(new DTDAttributes[] {
//$NON-NLS-1$
+ new DTDAttributes("name", DTDAttributes.CDATA_TYPE,
DTDAttributes.REQUIRED) //$NON-NLS-1$
}));
/*
@@ -317,9 +319,9 @@
<!ATTLIST depends optional-attribute-name CDATA #IMPLIED>
<!ATTLIST depends proxy-type CDATA #IMPLIED>
*/
- attributes.put("depends", Arrays.asList(new DTDAttributes[] {
- new DTDAttributes("optional-attribute-name", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED),
- new DTDAttributes("proxy-type", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED)
+ attributes.put("depends", Arrays.asList(new DTDAttributes[] {
//$NON-NLS-1$
+ new DTDAttributes("optional-attribute-name", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED), //$NON-NLS-1$
+ new DTDAttributes("proxy-type", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED) //$NON-NLS-1$
}));
@@ -327,8 +329,8 @@
<!ELEMENT depends-list (depends-list-element)+>
<!ATTLIST depends-list optional-attribute-name CDATA #IMPLIED>
*/
- attributes.put("depends-list", Arrays.asList(new DTDAttributes[] {
- new DTDAttributes("type", DTDAttributes.CDATA_TYPE,
DTDAttributes.IMPLIED)
+ attributes.put("depends-list", Arrays.asList(new DTDAttributes[] {
//$NON-NLS-1$
+ new DTDAttributes("type", DTDAttributes.CDATA_TYPE, DTDAttributes.IMPLIED)
//$NON-NLS-1$
}));
@@ -339,14 +341,14 @@
super.addEmptyDocumentProposals(contentAssistRequest);
int beginPosition = contentAssistRequest.getReplacementBeginPosition();
- String text = "<server>";
+ String text = "<server>"; //$NON-NLS-1$
int cursorPos = text.length();
contentAssistRequest.addProposal(new CompletionProposal(text, beginPosition,
0, cursorPos, null, text, null, null));
- text += "\n\t\n</server>";
+ text += "\n\t\n</server>"; //$NON-NLS-1$
contentAssistRequest.addProposal(new CompletionProposal(text, beginPosition,
- 0, cursorPos+2, null, text.replaceAll("\n",
"").replaceAll("\t", ""), null, null));
+ 0, cursorPos+2, null, text.replaceAll("\n",
"").replaceAll("\t", ""), null, null)); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
/**
@@ -361,7 +363,7 @@
protected void addTagNameProposals(ContentAssistRequest contentAssistRequest, int
childPosition) {
String parentElement = contentAssistRequest.getParent().getNodeName();
String thisNode = contentAssistRequest.getNode().getNodeName();
- if( thisNode.equals("#text")) thisNode = "";
+ if( thisNode.equals("#text")) thisNode = ""; //$NON-NLS-1$
//$NON-NLS-2$
ArrayList possibleNodes = children.get(parentElement);
ChildOccurances occ;
@@ -411,16 +413,16 @@
*/
// <element></element>
- String nName = (thisNode.getNodeName().equals("#text") ? "" :
thisNode.getNodeName());
+ String nName = (thisNode.getNodeName().equals("#text") ? "" :
thisNode.getNodeName()); //$NON-NLS-1$ //$NON-NLS-2$
- String emptyCompletionText = occ.name + ">";
+ String emptyCompletionText = occ.name + ">"; //$NON-NLS-1$
int cursorLoc = emptyCompletionText.length();
- emptyCompletionText += "</" + occ.name + ">";
- String descriptionText = "";
+ emptyCompletionText += "</" + occ.name + ">"; //$NON-NLS-1$
//$NON-NLS-2$
+ String descriptionText = ""; //$NON-NLS-1$
if( !isTagOpened ) {
- emptyCompletionText = "<" + emptyCompletionText;
+ emptyCompletionText = "<" + emptyCompletionText; //$NON-NLS-1$
cursorLoc++;
}
descriptionText = occ.name;
@@ -434,26 +436,26 @@
List l = attributes.get(occ.name);
Iterator i = l.iterator();
cursorLoc = -1;
- String attributes = "";
+ String attributes = ""; //$NON-NLS-1$
while( i.hasNext()) {
DTDAttributes attribute = (DTDAttributes)i.next();
if( attribute.mandatory == DTDAttributes.REQUIRED) {
- attributes += " " + attribute.name + "=\"" +
attribute.defaultValue + "\"";
- if( cursorLoc == -1 && attribute.defaultValue.equals("")) {
+ attributes += " " + attribute.name + "=\"" +
attribute.defaultValue + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if( cursorLoc == -1 && attribute.defaultValue.equals("")) {
//$NON-NLS-1$
cursorLoc = occ.name.length() + attributes.length() - 1;
}
}
}
- String requiredCompletionText = occ.name + attributes + "></" +
occ.name + ">";
+ String requiredCompletionText = occ.name + attributes + "></" +
occ.name + ">"; //$NON-NLS-1$ //$NON-NLS-2$
if( !isTagOpened ) {
- requiredCompletionText = "<" + requiredCompletionText;
+ requiredCompletionText = "<" + requiredCompletionText; //$NON-NLS-1$
cursorLoc++;
}
- descriptionText = occ.name + " (with attributes)";
+ descriptionText =
MessageFormat.format(Messages.ServiceXMLEditorConfiguration_OccurrenceNameWithAttributes,
occ.name);
- if( !attributes.equals("")) {
+ if( !attributes.equals("")) { //$NON-NLS-1$
contentAssistRequest.addProposal(new CompletionProposal(requiredCompletionText,
beginPosition, nName.length(), cursorLoc != -1 ? cursorLoc :
requiredCompletionText.length(),
propImage, descriptionText, null, null));
@@ -492,7 +494,7 @@
while(i.hasNext()) {
DTDAttributes att = (DTDAttributes)i.next();
if( att.name.startsWith(match) && !activeAttributes.contains(att.name)
&& !alreadyAddedStrings.contains(att.name)) {
- String txt = att.name + "=\"" + att.defaultValue +
"\"";
+ String txt = att.name + "=\"" + att.defaultValue +
"\""; //$NON-NLS-1$ //$NON-NLS-2$
contentAssistRequest.addProposal(new CompletionProposal(txt,
contentAssistRequest.getReplacementBeginPosition(),
match.length(), txt.length()-1, attImage, att.name, null, null));
}
@@ -522,10 +524,10 @@
}
}
if( found ) {
- if( elementName.equals("mbean") &&
attribute.getName().equals("code")) {
+ if( elementName.equals("mbean") &&
attribute.getName().equals("code")) { //$NON-NLS-1$ //$NON-NLS-2$
handleCodeClassNameCompletion(contentAssistRequest);
}
- if( elementName.equals("attribute") &&
attribute.getName().equals("name")) {
+ if( elementName.equals("attribute") &&
attribute.getName().equals("name")) { //$NON-NLS-1$ //$NON-NLS-2$
handleAttributeNamesCompletion(contentAssistRequest);
}
}
@@ -534,7 +536,7 @@
protected void handleCodeClassNameCompletion(ContentAssistRequest contentAssistRequest)
{
String match = contentAssistRequest.getMatchString();
String attributeCurrentValue;
- if( match.startsWith("\"")) attributeCurrentValue =
match.substring(1);
+ if( match.startsWith("\"")) attributeCurrentValue = match.substring(1);
//$NON-NLS-1$
else attributeCurrentValue = match;
ResultFilter filter = new ResultFilter() {
@@ -547,7 +549,7 @@
IType type = (IType)found;
String[] interfaces = type.getSuperInterfaceNames();
for( int i = 0; i < interfaces.length; i++ ) {
- if( interfaces[i].equals(type.getElementName() + "MBean")) {
+ if( interfaces[i].equals(type.getElementName() + "MBean")) {
//$NON-NLS-1$
return true;
}
}
@@ -568,14 +570,14 @@
protected void handleAttributeNamesCompletion(ContentAssistRequest
contentAssistRequest) {
String match = contentAssistRequest.getMatchString();
String attributeCurrentValue;
- if( match.startsWith("\"")) attributeCurrentValue =
match.substring(1);
+ if( match.startsWith("\"")) attributeCurrentValue = match.substring(1);
//$NON-NLS-1$
else attributeCurrentValue = match;
Node node = contentAssistRequest.getNode();
Node mbeanNode = node.getParentNode();
NamedNodeMap mbeanAttributes = mbeanNode.getAttributes();
- Node att = mbeanAttributes.getNamedItem("code");
+ Node att = mbeanAttributes.getNamedItem("code"); //$NON-NLS-1$
String codeClass = att.getNodeValue();
IType type = ServiceXMLEditorUtil.findType(codeClass);
if( type != null ) {
@@ -634,7 +636,7 @@
Node currentNode = getCurrentNode(document, region.getOffset() );
Attr attr = getCurrentAttrNode(currentNode, region.getOffset());
- if( currentNode.getNodeName().equals("mbean") && attr != null
&& attr.getName().equals("code")) {
+ if( currentNode.getNodeName().equals("mbean") && attr != null
&& attr.getName().equals("code")) { //$NON-NLS-1$ //$NON-NLS-2$
IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
SearchPattern codePattern = SearchPattern.createPattern(attr.getValue(),
@@ -685,7 +687,7 @@
EditorUtility.revealInEditor(part, element);
}
} catch (PartInitException e) {
- IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Unable to
display element in editor.", e);
+ IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID,
Messages.ServiceXMLEditorConfiguration_UnableToDisplayInEditor, e);
Activator.getDefault().getLog().log(status);
}
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLOutlineConfiguration.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLOutlineConfiguration.java 2009-05-25
04:47:33 UTC (rev 15476)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLOutlineConfiguration.java 2009-05-25
05:22:00 UTC (rev 15477)
@@ -190,7 +190,7 @@
if( menuProviders == null ) {
ArrayList list = new ArrayList();
IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf =
registry.getConfigurationElementsFor(Activator.PLUGIN_ID,
"ServiceXMLOutlineMenuProvider");
+ IConfigurationElement[] cf =
registry.getConfigurationElementsFor(Activator.PLUGIN_ID,
"ServiceXMLOutlineMenuProvider"); //$NON-NLS-1$
for( int i = 0; i < cf.length; i++ ) {
try {
list.add(new OutlineMenuProvider(cf[i]));
@@ -226,7 +226,7 @@
private static class OutlineMenuProvider {
private IServiceXMLOutlineActionProvider listener;
public OutlineMenuProvider(IConfigurationElement element) throws CoreException {
- listener =
(IServiceXMLOutlineActionProvider)element.createExecutableExtension("class");
+ listener =
(IServiceXMLOutlineActionProvider)element.createExecutableExtension("class");
//$NON-NLS-1$
}
public void menuAboutToShow(IMenuManager manager, ISelection selection) {
if( listener != null ) listener.menuAboutToShow(manager, selection);
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/proposals/internal/ConvertNodeToXPathDialogOutlineMenuItemProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/proposals/internal/ConvertNodeToXPathDialogOutlineMenuItemProvider.java 2009-05-25
04:47:33 UTC (rev 15476)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/proposals/internal/ConvertNodeToXPathDialogOutlineMenuItemProvider.java 2009-05-25
05:22:00 UTC (rev 15477)
@@ -27,6 +27,7 @@
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.wst.xml.core.internal.document.AttrImpl;
import org.jboss.ide.eclipse.as.ui.dialogs.ConvertNodeToXPathDialog.ConvertNodeRunnable;
+import org.jboss.ide.eclipse.as.ui.mbeans.Messages;
import
org.jboss.ide.eclipse.as.ui.mbeans.editors.proposals.IServiceXMLOutlineActionProvider;
import org.w3c.dom.Node;
@@ -56,8 +57,8 @@
new ConvertNodeRunnable(n2, attName2).run();
}
};
- temp.setText("Add to XPaths");
- temp.setDescription("Add this element to the list of xpaths you can edit from the
properties view.");
+ temp.setText(Messages.ConvertNodeToXPathDialogOutlineMenuItemProvider_AddToXPathsAction);
+ temp.setDescription(Messages.ConvertNodeToXPathDialogOutlineMenuItemProvider_AddToXPathsDescription);
manager.add(temp);
}
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/NewMBeanWizard.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/NewMBeanWizard.java 2009-05-25
04:47:33 UTC (rev 15476)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/NewMBeanWizard.java 2009-05-25
05:22:00 UTC (rev 15477)
@@ -98,10 +98,10 @@
private MBeanInterfacePage interfacePage;
private MBeanPage mbeanPage;
private NewFilePageExtension newFilePage;
- private static String INTERFACE_NAME = "__INTERFACE_NAME__";
+ private static final String INTERFACE_NAME = "__INTERFACE_NAME__";
//$NON-NLS-1$
public NewMBeanWizard() {
- setWindowTitle("New MBean Wizard");
+ setWindowTitle(Messages.NewMBeanWizard_WindowTitle);
}
public void createPageControls(Composite pageContainer) {
@@ -193,7 +193,7 @@
public void run(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
try {
- monitor.beginTask("Creating Files", 100);
+ monitor.beginTask(Messages.NewMBeanWizard_CreatingTaskName, 100);
SubProgressMonitor interfaceMonitor = new SubProgressMonitor(monitor, 40);
SubProgressMonitor mbeanMonitor = new SubProgressMonitor(monitor, 40);
SubProgressMonitor xmlMonitor = new SubProgressMonitor(monitor, 20);
@@ -202,13 +202,13 @@
interfacePage.createType(interfaceMonitor);
mbeanPage.createType(mbeanMonitor);
- xmlMonitor.beginTask("XMLDescriptor", 1);
+ xmlMonitor.beginTask(Messages.NewMBeanWizard_XMLTaskName, 1);
if( mbeanPage.shouldCreateDescriptor()) {
- newFilePage.setFileName(mbeanPage.getCreatedType().getElementName() +
"-service.xml");
+ newFilePage.setFileName(mbeanPage.getCreatedType().getElementName() +
"-service.xml"); //$NON-NLS-1$
IPath fullPath = newFilePage.getContainerFullPath();
- IPath newPath = new Path(fullPath.segment(0)).append("META-INF");
+ IPath newPath = new Path(fullPath.segment(0)).append("META-INF");
//$NON-NLS-1$
createContainer(newPath);
newFilePage.setContainerFullPath(newPath);
@@ -281,9 +281,9 @@
newFilePage = new NewFilePageExtension(sel);
Preferences preference = XMLCorePlugin.getDefault().getPluginPreferences();
- String ext = "xml";
+ String ext = "xml"; //$NON-NLS-1$
newFilePage.defaultFileExtension = "."+ext; //$NON-NLS-1$
- newFilePage.filterExtensions = new String[] {"*.xml"};
+ newFilePage.filterExtensions = new String[] {"*.xml"}; //$NON-NLS-1$
addPage(newFilePage);
//
}
@@ -316,7 +316,7 @@
String fieldName = null;
if( field == fMBeanNameDialogField ) {
String txt = fMBeanNameDialogField.getText();
- fMBeanInterfaceNameDialogField.getTextControl(null).setText(txt +
"MBean");
+ fMBeanInterfaceNameDialogField.getTextControl(null).setText(txt +
"MBean"); //$NON-NLS-1$
fieldName = INTERFACE_NAME;
fTypeNameStatus = typeNameChanged(getTypeName());
fMBeanNameStatus = typeNameChanged(fMBeanNameDialogField.getText());
@@ -385,7 +385,7 @@
protected void handleFieldChanged(String fieldName) {
super.handleFieldChanged(fieldName);
- if( fieldName == INTERFACE_NAME) {
+ if( INTERFACE_NAME.equals(fieldName)) {
mbeanPage.setMBeanName(fMBeanNameDialogField.getText());
}
doStatusUpdate();
@@ -442,7 +442,7 @@
IResource resource= cu.getResource();
if (resource.exists()) {
- status.setError(NewWizardMessages.NewTypeWizardPage_error_TypeNameExists +
"(" + typeName + ")");
+ status.setError(NewWizardMessages.NewTypeWizardPage_error_TypeNameExists +
"(" + typeName + ")"); //$NON-NLS-1$ //$NON-NLS-2$
return status;
}
URI location= resource.getLocationURI();
@@ -602,10 +602,10 @@
PrintWriter writer = new PrintWriter(new OutputStreamWriter(outputStream, charSet));
writer.println("<?xml version=\"1.0\" encoding=\"" +
charSet + "\"?>"); //$NON-NLS-1$ //$NON-NLS-2$
- writer.println("<server>");
- writer.println("\t<mbean code=\"" +
mbeanPage.getCreatedType().getFullyQualifiedName() + "\"
name=\"your.domain:key=value\">");
- writer.println("\t</mbean>");
- writer.println("</server>");
+ writer.println("<server>"); //$NON-NLS-1$
+ writer.println("\t<mbean code=\"" +
mbeanPage.getCreatedType().getFullyQualifiedName() + "\"
name=\"your.domain:key=value\">"); //$NON-NLS-1$ //$NON-NLS-2$
+ writer.println("\t</mbean>"); //$NON-NLS-1$
+ writer.println("</server>"); //$NON-NLS-1$
writer.flush();
outputStream.close();
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/NewSessionBeanWizard.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/NewSessionBeanWizard.java 2009-05-25
04:47:33 UTC (rev 15476)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/NewSessionBeanWizard.java 2009-05-25
05:22:00 UTC (rev 15477)
@@ -30,6 +30,7 @@
import org.eclipse.jdt.internal.ui.wizards.NewElementWizard;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbench;
+import org.jboss.ide.eclipse.as.ui.mbeans.Messages;
import org.jboss.ide.eclipse.as.ui.mbeans.wizards.pages.NewSessionBeanWizardPage;
/**
@@ -46,7 +47,7 @@
{
super();
setDefaultPageImageDescriptor(JavaPluginImages.DESC_WIZBAN_NEWCLASS);
- setWindowTitle("New Session Bean");
+ setWindowTitle(Messages.NewSessionBeanWizard_WindowTitle);
}
public void init(IWorkbench workbench, IStructuredSelection selection)
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/pages/NewMessageDrivenBeanWizardPage.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/pages/NewMessageDrivenBeanWizardPage.java 2009-05-25
04:47:33 UTC (rev 15476)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/pages/NewMessageDrivenBeanWizardPage.java 2009-05-25
05:22:00 UTC (rev 15477)
@@ -61,7 +61,7 @@
public NewMessageDrivenBeanWizardPage()
{
- super(true, "New Message Driven Bean Page");
+ super(true, Messages.NewMessageDrivenBeanWizardPage_Name);
setTitle(Messages.NewMessageBeanWizardMessage);
setDescription(Messages.NewMessageBeanWizardDescription);
}
@@ -99,7 +99,7 @@
WorkbenchHelp.setHelp(composite, IJavaHelpContextIds.NEW_CLASS_WIZARD_PAGE);
ArrayList superInterfaces = new ArrayList();
- superInterfaces.add("javax.jms.MessageListener");
+ superInterfaces.add("javax.jms.MessageListener"); //$NON-NLS-1$
setSuperInterfaces(superInterfaces, true);
}
@@ -131,11 +131,11 @@
ImportDeclaration importDecl = ast.newImportDeclaration();
importDecl.setOnDemand(false);
importDecl.setName(ast.newName(new String[]
- {"javax", "ejb", "MessageDriven"}));
+ {"javax", "ejb", "MessageDriven"})); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$
beanAstUnit.imports().add(importDecl);
MarkerAnnotation sessionAnnotation = ast.newMarkerAnnotation();
- sessionAnnotation.setTypeName(ast.newSimpleName("MessageDriven"));
+ sessionAnnotation.setTypeName(ast.newSimpleName("MessageDriven"));
//$NON-NLS-1$
TypeDeclaration type = (TypeDeclaration) beanAstUnit.types().get(0);
type.modifiers().add(sessionAnnotation);
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/pages/NewSessionBeanWizardPage.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/pages/NewSessionBeanWizardPage.java 2009-05-25
04:47:33 UTC (rev 15476)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/pages/NewSessionBeanWizardPage.java 2009-05-25
05:22:00 UTC (rev 15477)
@@ -74,15 +74,15 @@
public class NewSessionBeanWizardPage extends NewTypeWizardPage
{
- public static final String BEAN_PACKAGE_NAME =
"NewSessionBeanWizard.beanPackageName";
+ public static final String BEAN_PACKAGE_NAME =
"NewSessionBeanWizard.beanPackageName"; //$NON-NLS-1$
- public static final String BEAN_NAME = "NewSessionBeanWizard.beanName";
+ public static final String BEAN_NAME = "NewSessionBeanWizard.beanName";
//$NON-NLS-1$
- public static final String REMOTE_INTERFACE_PACKAGE_NAME =
"NewSessionBeanWizard.remoteInterfacePackageName";
+ public static final String REMOTE_INTERFACE_PACKAGE_NAME =
"NewSessionBeanWizard.remoteInterfacePackageName"; //$NON-NLS-1$
- public static final String STATEFUL = "Stateful";
+ public static final String STATEFUL = "Stateful"; //$NON-NLS-1$
- public static final String STATELESS = "Stateless";
+ public static final String STATELESS = "Stateless"; //$NON-NLS-1$
private String remoteInterfacePackage, beanClass, remoteInterfaceName, beanPackage;
@@ -117,7 +117,7 @@
setDescription(Messages.NewSessionBeanWizardDescription);
packageCompletionProcessor = new JavaPackageCompletionProcessor();
- beanClass = "";
+ beanClass = ""; //$NON-NLS-1$
}
public void createControl(Composite parent)
@@ -228,7 +228,7 @@
fillAcrossColumns(beanNameText, nColumns - 1);
Label sessionClassNameLabel = createLabel(composite,
Messages.NewSessionBeanWizardBeanClassNameLabel);
- beanClassName = createLabelWithImage(composite, "",
JavaUI.getSharedImages().getImage(
+ beanClassName = createLabelWithImage(composite, "",
JavaUI.getSharedImages().getImage( //$NON-NLS-1$
ISharedImages.IMG_OBJS_CLASS), nColumns - 1);
}
@@ -278,7 +278,7 @@
ControlContentAssistHelper.createTextContentAssistant(remoteInterfacePackageText,
packageCompletionProcessor);
createLabel(composite, Messages.NewSessionBeanWizardRemoteInterfaceNameLabel);
- remoteInterfaceNameLabel = createLabelWithImage(composite, "",
JavaUI.getSharedImages().getImage(
+ remoteInterfaceNameLabel = createLabelWithImage(composite, "",
JavaUI.getSharedImages().getImage( //$NON-NLS-1$
ISharedImages.IMG_OBJS_INTERFACE), nColumns - 1);
}
@@ -307,13 +307,13 @@
ImportDeclaration importDecl = ast.newImportDeclaration();
importDecl.setName(ast.newName(new String[]
- {"javax", "ejb", beanType}));
+ {"javax", "ejb", beanType})); //$NON-NLS-1$ //$NON-NLS-2$
importDecl.setOnDemand(false);
beanAstUnit.imports().add(importDecl);
importDecl = ast.newImportDeclaration();
- String pkgElements[] = remoteInterfacePackage.split("\\.");
+ String pkgElements[] = remoteInterfacePackage.split("\\.");
//$NON-NLS-1$
String fullImport[] = new String[pkgElements.length + 1];
System.arraycopy(pkgElements, 0, fullImport, 0, pkgElements.length);
fullImport[fullImport.length - 1] = remoteInterfaceName;
@@ -348,11 +348,11 @@
public ICompilationUnit createRemoteInterface(IProgressMonitor monitor) throws
CoreException, InterruptedException
{
// lame.
- String source = "package " + remoteInterfacePackage + ";\n" +
"\n" + "import javax.ejb.Remote;\n" + "\n"
- + "@Remote\n" + "public interface " + remoteInterfaceName
+ " {\n" + "\n" + "}\n";
+ String source = "package " + remoteInterfacePackage + ";\n" +
"\n" + "import javax.ejb.Remote;\n" + "\n" //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ + "@Remote\n" + "public interface " + remoteInterfaceName
+ " {\n" + "\n" + "}\n"; //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- return remoteInterfacePackageFragment.createCompilationUnit(remoteInterfaceName +
".java", source, true, monitor);
+ return remoteInterfacePackageFragment.createCompilationUnit(remoteInterfaceName +
".java", source, true, monitor); //$NON-NLS-1$
// AST ast = new AST();
// CompilationUnit unit = ast.newCompilationUnit();
// PackageDeclaration packageDeclaration = ast.newPackageDeclaration();
@@ -398,7 +398,7 @@
else if (fieldName.equals(BEAN_NAME))
{
remoteInterfaceName = beanNameText.getText();
- beanClass = beanNameText.getText() + "Bean";
+ beanClass = beanNameText.getText() + "Bean"; //$NON-NLS-1$
}
}
catch (CoreException e)
@@ -423,19 +423,19 @@
if (val.getSeverity() == IStatus.ERROR)
{
status.setError(NewWizardMessages.bind(NewWizardMessages.NewTypeWizardPage_error_InvalidPackageName,
val
- .getMessage())); //$NON-NLS-1$
+ .getMessage()));
throw new CoreException(status);
}
else if (val.getSeverity() == IStatus.WARNING)
{
status.setWarning(NewWizardMessages.bind(
- NewWizardMessages.NewTypeWizardPage_warning_DiscouragedPackageName,
val.getMessage())); //$NON-NLS-1$
+ NewWizardMessages.NewTypeWizardPage_warning_DiscouragedPackageName,
val.getMessage()));
// continue
}
}
else
{
-
status.setWarning(NewWizardMessages.NewTypeWizardPage_warning_DefaultPackageDiscouraged);
//$NON-NLS-1$
+
status.setWarning(NewWizardMessages.NewTypeWizardPage_warning_DefaultPackageDiscouraged);
}
IPackageFragmentRoot root = getPackageFragmentRoot();
@@ -454,7 +454,7 @@
IPath packagePath = rootPath.append(packageName.replace('.',
'/'));
if (outputPath.isPrefixOf(packagePath))
{
-
status.setError(NewWizardMessages.NewTypeWizardPage_error_ClashOutputLocation);
//$NON-NLS-1$
+
status.setError(NewWizardMessages.NewTypeWizardPage_error_ClashOutputLocation);
throw new CoreException(status);
}
}
@@ -490,20 +490,20 @@
public TypeNameGetter()
{
- typeName = "";
+ typeName = ""; //$NON-NLS-1$
}
public void run()
{
if (beanNameText == null)
{
- typeName = "";
+ typeName = ""; //$NON-NLS-1$
return;
}
if (!beanNameText.isDisposed())
{
- typeName = beanNameText.getText() + "Bean";
+ typeName = beanNameText.getText() + "Bean"; //$NON-NLS-1$
}
}
}
@@ -522,7 +522,7 @@
{
if (pkg != null && pkg.length() > 0)
{
- return pkg + "." + clazz;
+ return pkg + "." + clazz; //$NON-NLS-1$
}
else
return clazz;
@@ -544,7 +544,7 @@
String beanName = beanNameText.getText();
beanClassName.setText(getClassName(packageName, beanName)
- + (beanName != null && beanName.length() > 0 ?
"Bean" : ""));
+ + (beanName != null && beanName.length() > 0 ?
"Bean" : "")); //$NON-NLS-1$ //$NON-NLS-2$
remoteInterfaceNameLabel.setText(getClassName(interfacePackageName,
beanName));
updateRemoteInterfaceValues();
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/util/PackageTypeSearcher.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/util/PackageTypeSearcher.java 2009-05-25
04:47:33 UTC (rev 15476)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/util/PackageTypeSearcher.java 2009-05-25
05:22:00 UTC (rev 15477)
@@ -57,7 +57,7 @@
private ResultFilter filter;
public PackageTypeSearcher(String string) {
fullString = string;
- int lastDot = string.lastIndexOf(".");
+ int lastDot = string.lastIndexOf("."); //$NON-NLS-1$
if( lastDot == -1 ) {
packageName = string;
remainder = null;
@@ -178,7 +178,7 @@
for (int i = 0; i < classFiles.length; i++) {
String typeName = classFiles[i].getType().getElementName();
- if (typeName.equals(""))
+ if (typeName.equals("")) //$NON-NLS-1$
continue;
if (typeName.toLowerCase().startsWith(remainder.toLowerCase()) &&
(filter == null || filter.accept(classFiles[i].getType())))
returnList.add(classFiles[i].getType());
@@ -201,7 +201,7 @@
}
public ICompletionProposal[] generateProposals(int beginIndex) {
- return generateProposals(beginIndex, "", "");
+ return generateProposals(beginIndex, "", "");
//$NON-NLS-1$//$NON-NLS-2$
}
public ICompletionProposal[] generateProposals(int beginIndex,
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/util/ServiceXMLEditorUtil.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/util/ServiceXMLEditorUtil.java 2009-05-25
04:47:33 UTC (rev 15476)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/util/ServiceXMLEditorUtil.java 2009-05-25
05:22:00 UTC (rev 15477)
@@ -75,13 +75,13 @@
public static String[] findAttributesFromMethods(IMethod[] methods, String
attributeCurrentValue) {
ArrayList attributeNames = new ArrayList();
- String getterPrefix = "get" + attributeCurrentValue;
+ String getterPrefix = "get" + attributeCurrentValue; //$NON-NLS-1$
for( int i = 0; i < methods.length; i++ ) {
if( methods[i].getElementName().startsWith(getterPrefix)) {
String atName = methods[i].getElementName().substring(3);
- String setterName = "set" + atName;
+ String setterName = "set" + atName; //$NON-NLS-1$
for( int j = 0; j < methods.length; j++ ) {
if( methods[j].getElementName().equals(setterName)) {
// there's a getter and a setter...