JBoss Tools SVN: r14540 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-04-07 03:34:06 -0400 (Tue, 07 Apr 2009)
New Revision: 14540
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/messages.properties
Log:
JBIDE-3557 Externalise English strings - marked apparently obsolete strings as non-translatable
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/messages.properties 2009-04-07 07:28:13 UTC (rev 14539)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/messages.properties 2009-04-07 07:34:06 UTC (rev 14540)
@@ -7,13 +7,17 @@
JavaChoicerFieldEditor.Tab1.Text.Label = Selected type\:
JavaEclipseChoicerFieldEditor.ChooseType.Label = Choose a type\:
+# START NON-TRANSLATABLE
JavaEclipseChoicerFieldEditor.ClassesList.Label = Matching types\:
JavaEclipseChoicerFieldEditor.PackagesList.Label = Qualifier\:
+# END NON-TRANSLATABLE
JavaFavoritesChoicerFieldEditor.ClassesList.Label = Recent types\:
+# START NON-TRANSLATABLE
JavaChoicerFieldEditor.Tab3.Tree.Label = Select a type\:
JavaChoicerFieldEditor.Tab3.Text.Label = Choose a type\:
JavaHyperlinkLineFieldEditor.CannotOpenJavaSource = Can't open java source. This Project is not Java Project.
+# END NON-TRANSLATABLE
JavaHyperlinkLineFieldEditor.CannotFindSource = Can't find java source.
\ No newline at end of file
15 years, 8 months
JBoss Tools SVN: r14539 - trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2009-04-07 03:28:13 -0400 (Tue, 07 Apr 2009)
New Revision: 14539
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModule.java
Log:
JBIDE-4123:Migration to Eclipse 3.5 M Builds, ESB project wizrd compile error because the IModule has a new method
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModule.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModule.java 2009-04-07 07:27:31 UTC (rev 14538)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModule.java 2009-04-07 07:28:13 UTC (rev 14539)
@@ -79,5 +79,9 @@
return delegate;
return null;
}
+
+ public boolean exists() {
+ return false;
+ }
}
15 years, 8 months
JBoss Tools SVN: r14538 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-04-07 03:27:31 -0400 (Tue, 07 Apr 2009)
New Revision: 14538
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/EditorMessages.java
Log:
JBIDE-3557 Externalise English strings - slightly modified EditorMessages, into the form understood by "Find Broken Externalized Strings"
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/EditorMessages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/EditorMessages.java 2009-04-07 07:15:51 UTC (rev 14537)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/EditorMessages.java 2009-04-07 07:27:31 UTC (rev 14538)
@@ -14,21 +14,19 @@
import java.util.ResourceBundle;
public class EditorMessages {
+ private static final String BUNDLE_NAME = "org.jboss.tools.common.model.ui.attribute.editor.messages"; //$NON-NLS-1$
- private static final String RESOURCE_BUNDLE= "org.jboss.tools.common.model.ui.attribute.editor.messages";//$NON-NLS-1$
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
- private static ResourceBundle bundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
-
private EditorMessages() {
}
public static String getString(String key) {
try {
- return bundle.getString(key);
+ return RESOURCE_BUNDLE.getString(key);
} catch (MissingResourceException e) {
- return key;
+ return '!' + key + '!';
}
}
}
-
-
15 years, 8 months
JBoss Tools SVN: r14537 - in trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui: forms and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-04-07 03:15:51 -0400 (Tue, 07 Apr 2009)
New Revision: 14537
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/ModelUIMessages.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/Form.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages.properties
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/DecoratorTextPreferencesPage.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/MainPreferencePage.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/resources/ResourceLayoutManager.java
Log:
JBIDE-3557 Externalise English strings - converted ModelUIMessages to new-style Eclipse message bundle; shortened some property keys; fixed some typos in English text.
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/ModelUIMessages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/ModelUIMessages.java 2009-04-07 06:05:59 UTC (rev 14536)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/ModelUIMessages.java 2009-04-07 07:15:51 UTC (rev 14537)
@@ -7,39 +7,51 @@
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.common.model.ui;
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
+import org.eclipse.osgi.util.NLS;
-/**
- * @author Aleksey
- */
-public class ModelUIMessages {
+public final class ModelUIMessages extends NLS {
- private static final String RESOURCE_BUNDLE= "org.jboss.tools.common.model.ui.messages";
+ private static final String BUNDLE_NAME = "org.jboss.tools.common.model.ui.messages";//$NON-NLS-1$
- private static ResourceBundle resourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
-
private ModelUIMessages() {
+ // Do not instantiate
}
- public static String getString(String key) {
- try {
- return resourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "%" + key + "%";
- }
- }
+ public static String DecoratorTextPreferencesPage_AddVariable;
+ public static String DecoratorTextPreferencesPage_Decorator;
+ public static String DecoratorTextPreferencesPage_DefaultLabel;
+ public static String DecoratorTextPreferencesPage_Format;
+ public static String DecoratorTextPreferencesPage_Preview;
+ public static String DecoratorTextPreferencesPage_SelectVariable;
+ public static String DecoratorTextPreferencesPage_Text;
+ public static String ResourceLayoutManager_ERROR_RESOURCE_NULL;
+ public static String ResourceLayoutManager_ERROR_CREATE_DOCUMENT;
+ public static String ResourceLayoutManager_WARNING_HEAD_EMPTY;
+ public static String ResourceLayoutManager_ERROR_ANOTHER_HEAD;
+ public static String ResourceLayoutManager_ERROR_UNKNOWN_EXCEPTION;
+ public static String Editor_Cut_label;
+ public static String Editor_Cut_tooltip;
+ public static String Editor_Cut_image;
+ public static String Editor_Cut_description;
+ public static String Editor_Copy_label;
+ public static String Editor_Copy_tooltip;
+ public static String Editor_Copy_image;
+ public static String Editor_Copy_description;
+ public static String Editor_Paste_label;
+ public static String Editor_Paste_tooltip;
+ public static String Editor_Paste_image;
+ public static String Editor_Paste_description;
+ public static String Editor_Delete_label;
+ public static String Editor_Delete_tooltip;
+ public static String Editor_Delete_image;
+ public static String Editor_Delete_description;
+ public static String MainPreferencePage_Description;
+ public static String Form_CANNOT_LOAD_ATTRIBUTE;
- public static String getString(String key, String[] args) {
- return MessageFormat.format(getString(key), args);
- }
-
- public static ResourceBundle getResourceBundle() {
- return resourceBundle;
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, ModelUIMessages.class);
}
-
-}
+}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/Form.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/Form.java 2009-04-07 06:05:59 UTC (rev 14536)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/Form.java 2009-04-07 07:15:51 UTC (rev 14537)
@@ -16,6 +16,7 @@
import java.util.Iterator;
import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -41,8 +42,6 @@
*/
public class Form extends ExpandableForm {
- private static final String CANNOT_LOAD_ATTRIBUTE = "org.jboss.tools.common.model.ui.forms.Form.CANNOT_LOAD_ATTRIBUTE";
-
private XAttributeSupport support;
private XModelObject xmo;
// private XModel model;
@@ -152,7 +151,7 @@
support.registerFieldEditor(editor.getAttributeName(), (ExtendedFieldEditor)fieldEditor);
}
} else {
- ModelUIPlugin.getPluginLog().logInfo( ModelUIMessages.getString(CANNOT_LOAD_ATTRIBUTE, new String[] {attributes[i].getName()}));
+ ModelUIPlugin.getPluginLog().logInfo( NLS.bind(ModelUIMessages.Form_CANNOT_LOAD_ATTRIBUTE, attributes[i].getName()));
}
}
} else {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages.properties 2009-04-07 06:05:59 UTC (rev 14536)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages.properties 2009-04-07 07:15:51 UTC (rev 14537)
@@ -1,36 +1,40 @@
-DecoratorTextPreferencesPage.AddVariable=Add Variable...
-DecoratorTextPreferencesPage.Decorator=Select decorator:
-DecoratorTextPreferencesPage.DefaultLabel=?
-DecoratorTextPreferencesPage.Format=Format:
-DecoratorTextPreferencesPage.Preview=Preview:
-DecoratorTextPreferencesPage.SelectVariable=Select Variable
-DecoratorTextPreferencesPage.Text=Text
-org.jboss.tools.common.model.ui.resources.ResourceLayoutManager.ERROR_RESOURCE_NULL = Resource paramener cannot be null.
-org.jboss.tools.common.model.ui.resources.ResourceLayoutManager.ERROR_CREATE_DOCUMENT = Cannot create new layout XML document \"{0}\" for resource \"{1}\".
-org.jboss.tools.common.model.ui.resources.ResourceLayoutManager.WARNING_HEAD_EMPTY = Empty head tag in layout \"{0}\".
-org.jboss.tools.common.model.ui.resources.ResourceLayoutManager.ERROR_ANOTHER_HEAD = Layout \"{0}\" from another resource \"{1}\".
-org.jboss.tools.common.model.ui.resources.ResourceLayoutManager.ERROR_UNKNOW_EXCEPTION = Unknow Exception.
+DecoratorTextPreferencesPage_AddVariable=Add Variable...
+DecoratorTextPreferencesPage_Decorator=Select decorator:
+DecoratorTextPreferencesPage_DefaultLabel=?
+DecoratorTextPreferencesPage_Format=Format:
+DecoratorTextPreferencesPage_Preview=Preview:
+DecoratorTextPreferencesPage_SelectVariable=Select Variable
+DecoratorTextPreferencesPage_Text=Text
+ResourceLayoutManager_ERROR_RESOURCE_NULL = Resource parameter cannot be null.
+ResourceLayoutManager_ERROR_CREATE_DOCUMENT = Cannot create new layout XML document \"{0}\" for resource \"{1}\".
+ResourceLayoutManager_WARNING_HEAD_EMPTY = Empty head tag in layout \"{0}\".
+# START NON-TRANSLATABLE
+# String only referenced in dead code.
+# The corresponding exception is never thrown in the current code.
+# (Besides which, the {0} and {1} parameters are not passed in.)
+ResourceLayoutManager_ERROR_ANOTHER_HEAD = Layout \"{0}\" from another resource \"{1}\".
+# END NON-TRANSLATABLE
+ResourceLayoutManager_ERROR_UNKNOWN_EXCEPTION = Unknown Exception.
-Editor.Cut.label=Cu&t
-Editor.Cut.tooltip=Cut
-Editor.Cut.image=
-Editor.Cut.description=Cut
+Editor_Cut_label=Cu&t
+Editor_Cut_tooltip=Cut
+Editor_Cut_image=
+Editor_Cut_description=Cut
-Editor.Copy.label=&Copy
-Editor.Copy.tooltip=Copy
-Editor.Copy.image=
-Editor.Copy.description=Copy
+Editor_Copy_label=&Copy
+Editor_Copy_tooltip=Copy
+Editor_Copy_image=
+Editor_Copy_description=Copy
-Editor.Paste.label=&Paste
-Editor.Paste.tooltip=Paste
-Editor.Paste.image=
-Editor.Paste.description=Paste
+Editor_Paste_label=&Paste
+Editor_Paste_tooltip=Paste
+Editor_Paste_image=
+Editor_Paste_description=Paste
-Editor.Delete.label=&Delete
-Editor.Delete.tooltip=Delete
-Editor.Delete.image=
-Editor.Delete.description=Delete
-MainPreferencePage.Description=JBossTools preferences
+Editor_Delete_label=&Delete
+Editor_Delete_tooltip=Delete
+Editor_Delete_image=
+Editor_Delete_description=Delete
+MainPreferencePage_Description=JBossTools preferences
-org.jboss.tools.common.model.ui.forms.Form.CANNOT_LOAD_ATTRIBUTE = Cannot load attribute \"{0}\" from model.
-
+Form_CANNOT_LOAD_ATTRIBUTE= Cannot load attribute \"{0}\" from model.
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/DecoratorTextPreferencesPage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/DecoratorTextPreferencesPage.java 2009-04-07 06:05:59 UTC (rev 14536)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/DecoratorTextPreferencesPage.java 2009-04-07 07:15:51 UTC (rev 14537)
@@ -69,7 +69,7 @@
Map<XModelObjectDecorator,String> currentValues = new HashMap<XModelObjectDecorator, String>();
public DecoratorTextPreferencesPage() {
- setTitle(ModelUIMessages.getString("DecoratorTextPreferencesPage.Text")); //$NON-NLS-1$
+ setTitle(ModelUIMessages.DecoratorTextPreferencesPage_Text);
}
@Override
@@ -79,7 +79,7 @@
g.setLayout(new GridLayout(1, false));
Label label = new Label(g, SWT.NONE);
- label.setText(ModelUIMessages.getString("DecoratorTextPreferencesPage.Decorator")); //$NON-NLS-1$
+ label.setText(ModelUIMessages.DecoratorTextPreferencesPage_Decorator);
label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
decorators = new TreeViewer(g, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
@@ -169,13 +169,13 @@
c.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Label cLabel = new Label(c, SWT.NONE);
- cLabel.setText(ModelUIMessages.getString("DecoratorTextPreferencesPage.Format")); //$NON-NLS-1$
+ cLabel.setText(ModelUIMessages.DecoratorTextPreferencesPage_Format);
formatField = new Text(c, SWT.SINGLE | SWT.BORDER);
formatField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
addVariableButton = new Button(c, SWT.PUSH);
- addVariableButton.setText(ModelUIMessages.getString("DecoratorTextPreferencesPage.AddVariable")); //$NON-NLS-1$
+ addVariableButton.setText(ModelUIMessages.DecoratorTextPreferencesPage_AddVariable);
addVariableButton.addSelectionListener(new SelectionListener() {
@@ -191,7 +191,7 @@
label = new Label(g, SWT.NONE);
- label.setText(ModelUIMessages.getString("DecoratorTextPreferencesPage.Preview")); //$NON-NLS-1$
+ label.setText(ModelUIMessages.DecoratorTextPreferencesPage_Preview);
label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
examples = new TreeViewer(g, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
examples.setContentProvider(new ITreeContentProvider() {
@@ -229,7 +229,7 @@
d.setValue(formatField.getText());
result = d.getLabel(modelObject);
} else {
- result = ModelUIMessages.getString("DecoratorTextPreferencesPage.DefaultLabel"); //$NON-NLS-1$
+ result = ModelUIMessages.DecoratorTextPreferencesPage_DefaultLabel;
}
return result;
}
@@ -367,7 +367,7 @@
}
);
dialog.setInput(selection);
- dialog.setTitle(ModelUIMessages.getString("DecoratorTextPreferencesPage.SelectVariable")); //$NON-NLS-1$
+ dialog.setTitle(ModelUIMessages.DecoratorTextPreferencesPage_SelectVariable);
dialog.create();
int result = dialog.open();
if(result == Window.OK) {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/MainPreferencePage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/MainPreferencePage.java 2009-04-07 06:05:59 UTC (rev 14536)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/MainPreferencePage.java 2009-04-07 07:15:51 UTC (rev 14537)
@@ -40,13 +40,13 @@
public class MainPreferencePage extends PreferencePage implements
IWorkbenchPreferencePage {
- public static final String ID = "org.jboss.tools.common.model.ui.MainPreferencePage";
+ public static final String ID = "org.jboss.tools.common.model.ui.MainPreferencePage"; //$NON-NLS-1$
private Image image;
/** Default constructor */
public MainPreferencePage() {
- this.setDescription(ModelUIMessages.getString("MainPreferencePage.Description")); //$NON-NLS-1$
+ this.setDescription(ModelUIMessages.MainPreferencePage_Description);
}
/** Description of the Method */
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/resources/ResourceLayoutManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/resources/ResourceLayoutManager.java 2009-04-07 06:05:59 UTC (rev 14536)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/resources/ResourceLayoutManager.java 2009-04-07 07:15:51 UTC (rev 14537)
@@ -29,6 +29,7 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.common.model.ui.ModelUIMessages;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.xml.SafeDocumentBuilderFactory;
@@ -44,19 +45,13 @@
public class ResourceLayoutManager {
// public
- public static final String ROOT_TAG = "Layout";
- public static final String RESOURCE_ATTR = "resource";
- public static final String LAYOUT_EXT = "l4t";
- public static final String LAYOUT_PROPERTY = "layout";
+ public static final String ROOT_TAG = "Layout"; //$NON-NLS-1$
+ public static final String RESOURCE_ATTR = "resource"; //$NON-NLS-1$
+ public static final String LAYOUT_EXT = "l4t"; //$NON-NLS-1$
+ public static final String LAYOUT_PROPERTY = "layout"; //$NON-NLS-1$
// static
private static ResourceLayoutManager instance;
- private static final String ERROR_UNKNOW_EXCEPTION = "org.jboss.tools.common.model.ui.resources.ResourceLayoutManager.ERROR_UNKNOW_EXCEPTION";
- private static final String ERROR_RESOURCE_NULL = "org.jboss.tools.common.model.ui.resources.ResourceLayoutManager.ERROR_RESOURCE_NULL";
- private static final String ERROR_CREATE_DOCUMENT = "org.jboss.tools.common.model.ui.resources.ResourceLayoutManager.ERROR_CREATE_DOCUMENT";
- private static final String WARNING_EMPTY_HEAD = "org.jboss.tools.common.model.ui.resources.ResourceLayoutManager.WARNING_HEAD_EMPTY";
- private static final String ERROR_ANOTHER_HEAD = "org.jboss.tools.common.model.ui.resources.ResourceLayoutManager.ERROR_ANOTHER_HEAD";
-
// documents hash, key == fullPathToResource, value == document
private HashMap<String,Document> hashMap = new HashMap<String,Document>();
@@ -93,7 +88,7 @@
private Document getLayoutDocument(IResource resource) {
Document document = null;
if (resource == null) {
- ModelUIPlugin.getPluginLog().logError(ModelUIMessages.getString(ERROR_RESOURCE_NULL));
+ ModelUIPlugin.getPluginLog().logError(ModelUIMessages.ResourceLayoutManager_ERROR_RESOURCE_NULL);
return null;
}
@@ -101,7 +96,7 @@
String layoutLocation = null;
try {
if(resource.isAccessible()) {
- layoutLocation = resource.getPersistentProperty(new QualifiedName("",LAYOUT_PROPERTY));
+ layoutLocation = resource.getPersistentProperty(new QualifiedName("",LAYOUT_PROPERTY)); //$NON-NLS-1$
}
} catch (CoreException e) {
ModelUIPlugin.getPluginLog().logError(e);
@@ -117,13 +112,13 @@
try {
document = loadDocument(resource);
} catch (ParserConfigurationException e) {
- ModelUIPlugin.getPluginLog().logError(ModelUIMessages.getString(ERROR_UNKNOW_EXCEPTION), e);
+ ModelUIPlugin.getPluginLog().logError(ModelUIMessages.ResourceLayoutManager_ERROR_UNKNOWN_EXCEPTION, e);
} catch (SAXException e) {
- ModelUIPlugin.getPluginLog().logError(ModelUIMessages.getString(ERROR_UNKNOW_EXCEPTION), e);
+ ModelUIPlugin.getPluginLog().logError(ModelUIMessages.ResourceLayoutManager_ERROR_UNKNOWN_EXCEPTION, e);
} catch (IOException e) {
- ModelUIPlugin.getPluginLog().logError(ModelUIMessages.getString(ERROR_UNKNOW_EXCEPTION), e);
+ ModelUIPlugin.getPluginLog().logError(ModelUIMessages.ResourceLayoutManager_ERROR_UNKNOWN_EXCEPTION, e);
} catch (AnotherResourceException e) {
- ModelUIPlugin.getPluginLog().logError(ModelUIMessages.getString(ERROR_ANOTHER_HEAD), e);
+ ModelUIPlugin.getPluginLog().logError(ModelUIMessages.ResourceLayoutManager_ERROR_ANOTHER_HEAD, e);
}
if (document!=null){
hashMap.put(fullResourceLocation, document);
@@ -135,7 +130,7 @@
document = createNewDocument(resource);
} catch (ParserConfigurationException e) {
//log(Status.ERROR, ModelUIMessages.getString(ERROR_CREATE_DOCUMENT, new String[] {fullLayoutLocation, fullResourceLocation}));
- ModelUIPlugin.getPluginLog().logError( ModelUIMessages.getString(ERROR_CREATE_DOCUMENT, new String[] {layoutLocation, fullResourceLocation}));
+ ModelUIPlugin.getPluginLog().logError( NLS.bind(ModelUIMessages.ResourceLayoutManager_ERROR_CREATE_DOCUMENT, layoutLocation, fullResourceLocation));
}
if (document!=null){
hashMap.put(fullResourceLocation, document);
@@ -163,7 +158,7 @@
String layoutLocation = null;
try {
if(resource != null && resource.isAccessible()) {
- layoutLocation = resource.getPersistentProperty(new QualifiedName("",LAYOUT_PROPERTY));
+ layoutLocation = resource.getPersistentProperty(new QualifiedName("",LAYOUT_PROPERTY)); //$NON-NLS-1$
}
} catch (CoreException e) {
ModelUIPlugin.getPluginLog().logError(e);
@@ -184,7 +179,7 @@
if (nodeList==null || nodeList.getLength()==0 || nodeList.item(0)==null) {
// warning
//log(ModelUIMessages.getString(WARNING_EMPTY_HEAD, new String[] {fullLayoutLocation}));
- ModelUIPlugin.getPluginLog().logInfo(ModelUIMessages.getString(WARNING_EMPTY_HEAD, new String[] {layoutLocation}));
+ ModelUIPlugin.getPluginLog().logInfo(NLS.bind(ModelUIMessages.ResourceLayoutManager_WARNING_HEAD_EMPTY, layoutLocation));
// create new head
createRoot(resource, document);
} /*else {
@@ -211,7 +206,7 @@
String layoutLocation = null;
try {
if(resource != null && resource.isAccessible()) {
- layoutLocation = resource.getPersistentProperty(new QualifiedName("",LAYOUT_PROPERTY));
+ layoutLocation = resource.getPersistentProperty(new QualifiedName("",LAYOUT_PROPERTY)); //$NON-NLS-1$
}
} catch (CoreException e) {
ModelUIPlugin.getPluginLog().logError(e);
@@ -231,20 +226,20 @@
try {
//FileWriter writer = new FileWriter(fullLayoutLocation);
FileWriter writer = new FileWriter(layoutLocation);
- XMLSerializer serial = new XMLSerializer(writer, createOutputFormat("UTF-8"));
+ XMLSerializer serial = new XMLSerializer(writer, createOutputFormat("UTF-8")); //$NON-NLS-1$
serial.asDOMSerializer();
serial.serialize(document);
writer.close();
} catch (IOException e) {
//log(Status.ERROR, ModelUIMessages.getString(ERROR_CREATE_DOCUMENT, new String[] {fullLayoutLocation, fullResourceLocation}), e);
- ModelUIPlugin.getPluginLog().logError(ModelUIMessages.getString(ERROR_CREATE_DOCUMENT, new String[] {layoutLocation, fullResourceLocation}), e);
+ ModelUIPlugin.getPluginLog().logError(NLS.bind(ModelUIMessages.ResourceLayoutManager_ERROR_CREATE_DOCUMENT, layoutLocation, fullResourceLocation), e);
}
}
private OutputFormat createOutputFormat(String encoding) {
- if(encoding == null || encoding.length() == 0) encoding = "UTF-8";
+ if(encoding == null || encoding.length() == 0) encoding = "UTF-8"; //$NON-NLS-1$
OutputFormat format = new OutputFormat(Method.XML, encoding, true);
- format.setLineSeparator(System.getProperty("line.separator", LineSeparator.Web));
+ format.setLineSeparator(System.getProperty("line.separator", LineSeparator.Web)); //$NON-NLS-1$
format.setIndent(1);
return format;
}
@@ -266,12 +261,12 @@
}
private String createNewLayoutLocation(IResource resource) {
- String fileName = resource.getProject().getName()+"_"+resource.getName()+"_"+System.currentTimeMillis();
+ String fileName = resource.getProject().getName()+"_"+resource.getName()+"_"+System.currentTimeMillis(); //$NON-NLS-1$//$NON-NLS-2$
String layoutLocation = getPluginMetadataPath().toString();
- String result = layoutLocation+"/"+fileName+"."+LAYOUT_EXT;
+ String result = layoutLocation+"/"+fileName+"."+LAYOUT_EXT; //$NON-NLS-1$//$NON-NLS-2$
try {
if(resource != null && resource.isAccessible()) {
- resource.setPersistentProperty(new QualifiedName("", LAYOUT_PROPERTY), result);
+ resource.setPersistentProperty(new QualifiedName("", LAYOUT_PROPERTY), result); //$NON-NLS-1$
}
} catch (CoreException e) {
ModelUIPlugin.getPluginLog().logError(e);
15 years, 8 months
JBoss Tools SVN: r14536 - in trunk: jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/internal and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-04-07 02:05:59 -0400 (Tue, 07 Apr 2009)
New Revision: 14536
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/DebugMessages.java
trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/DebugMessages.properties
trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/internal/JspLineBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionAttrForwardBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionEnterBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionExceptionBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormPopulateBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormValidateBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionForwardBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionIncludeBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionTilesDefinitionForwardBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/GlobalExceptionBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/GlobalForwardBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/PageEnterBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/TilesDefinitionGlobalForwardBreakpoint.java
Log:
JBIDE-3557 Externalise English strings - converted DebugMessages to new-style Eclipse message bundle
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/DebugMessages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/DebugMessages.java 2009-04-07 05:56:07 UTC (rev 14535)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/DebugMessages.java 2009-04-07 06:05:59 UTC (rev 14536)
@@ -10,33 +10,40 @@
******************************************************************************/
package org.jboss.tools.jst.web.debug;
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
import java.util.ResourceBundle;
-public class DebugMessages {
+import org.eclipse.osgi.util.NLS;
- private static final String RESOURCE_BUNDLE = "org.jboss.tools.jst.web.debug.DebugMessages";
+public final class DebugMessages extends NLS {
- private static ResourceBundle resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE);
+ private static final String BUNDLE_NAME = "org.jboss.tools.jst.web.debug.DebugMessages";//$NON-NLS-1$
private DebugMessages() {
+ // Do not instantiate
}
- public static String getString(String key) {
- try {
- return resourceBundle.getString(key);
- } catch (MissingResourceException e) {
- WebDebugPlugin.getPluginLog().logError(e);
- return "%"+key+"%";
- }
+ public static String ActionEnterBreakpoint_name;
+ public static String ActionFormPopulateBreakpoint_name;
+ public static String ActionFormValidateBreakpoint_name;
+ public static String ActionForwardBreakpoint_name;
+ public static String ActionTilesDefinitionForwardBreakpoint_name;
+ public static String ActionIncludeBreakpoint_name;
+ public static String ActionExceptionBreakpoint_name;
+ public static String GlobalExceptionBreakpoint_name;
+ public static String GlobalForwardBreakpoint_name;
+ public static String TilesDefinitionGlobalForwardBreakpoint_name;
+ public static String PageEnterBreakpoint_name;
+ public static String JspLineBreakpoint_name;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, DebugMessages.class);
}
- public static String getString(String key, String[] args) {
- return MessageFormat.format(getString(key), args);
- }
-
+ /**
+ * @deprecated use the string fields of the NLS subclass
+ */
public static ResourceBundle getResourceBundle() {
- return resourceBundle;
+ return ResourceBundle.getBundle(BUNDLE_NAME);
}
+
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/DebugMessages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/DebugMessages.properties 2009-04-07 05:56:07 UTC (rev 14535)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/DebugMessages.properties 2009-04-07 06:05:59 UTC (rev 14536)
@@ -1,14 +1,15 @@
# Breakpoints
# These messages are used in org.jboss.tools.struts.debug.internal.*Breakpoint.
-ActionEnterBreakpoint.name = {0} [action: {1}] - Before execution
-ActionFormPopulateBreakpoint.name = {0} [action: {1}] - After form filling
-ActionFormValidateBreakpoint.name = {0} [action: {1}] - After form validating
-ActionForwardBreakpoint.name = {0} [action: {1}] - success [forward: {2}]
-ActionTilesDefinitionForwardBreakpoint.name = {0} [action: {1}] - success [forward: {2}]
-ActionIncludeBreakpoint.name = {0} [action: {1}] - success [include: {2}]
-ActionExceptionBreakpoint.name = {0} [action: {1}] - {2}
-GlobalExceptionBreakpoint.name = {0} [global-exception: {1}]
-GlobalForwardBreakpoint.name = {0} [global-forward: {1}]
-TilesDefinitionGlobalForwardBreakpoint.name = {0} [global-forward: {1}]
-PageEnterBreakpoint.name = {0} [entry]
-JspLineBreakpoint.name = {0} [line: {1}]
\ No newline at end of file
+# and org.jboss.tools.jst.web.debug.internal.JspLineBreakpoint
+ActionEnterBreakpoint_name = {0} [action: {1}] - Before execution
+ActionFormPopulateBreakpoint_name = {0} [action: {1}] - After form filling
+ActionFormValidateBreakpoint_name = {0} [action: {1}] - After form validating
+ActionForwardBreakpoint_name = {0} [action: {1}] - success [forward: {2}]
+ActionTilesDefinitionForwardBreakpoint_name = {0} [action: {1}] - success [forward: {2}]
+ActionIncludeBreakpoint_name = {0} [action: {1}] - success [include: {2}]
+ActionExceptionBreakpoint_name = {0} [action: {1}] - {2}
+GlobalExceptionBreakpoint_name = {0} [global-exception: {1}]
+GlobalForwardBreakpoint_name = {0} [global-forward: {1}]
+TilesDefinitionGlobalForwardBreakpoint_name = {0} [global-forward: {1}]
+PageEnterBreakpoint_name = {0} [entry]
+JspLineBreakpoint_name = {0} [line: {1}]
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/internal/JspLineBreakpoint.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/internal/JspLineBreakpoint.java 2009-04-07 05:56:07 UTC (rev 14535)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/internal/JspLineBreakpoint.java 2009-04-07 06:05:59 UTC (rev 14536)
@@ -20,6 +20,7 @@
import org.eclipse.jdt.internal.debug.core.breakpoints.JavaPatternBreakpoint;
import org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget;
import org.eclipse.jdt.internal.debug.core.model.JDIThread;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.jst.web.WebUtils;
@@ -147,7 +148,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString("JspLineBreakpoint.name", new String[]{getPattern(), "" + getLineNumber()}); //$NON-NLS-1$ //$NON-NLS-2$
+ return NLS.bind(DebugMessages.JspLineBreakpoint_name, (new String[]{getPattern(), "" + getLineNumber()}));
} catch (CoreException e) {
ModelPlugin.getPluginLog().logError(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionAttrForwardBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionAttrForwardBreakpoint.java 2009-04-07 05:56:07 UTC (rev 14535)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionAttrForwardBreakpoint.java 2009-04-07 06:05:59 UTC (rev 14536)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.struts.debug.internal.condition.ActionAttrForwardCondition;
import org.jboss.tools.jst.web.debug.DebugMessages;
@@ -59,7 +60,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString("ActionForwardBreakpoint.name", new String[]{getMarker().getResource().getName(), getActionMappingPath(), getForwardName()}); //$NON-NLS-1$
+ return NLS.bind(DebugMessages.ActionForwardBreakpoint_name, (new String[]{getMarker().getResource().getName(), getActionMappingPath(), getForwardName()}));
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionEnterBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionEnterBreakpoint.java 2009-04-07 05:56:07 UTC (rev 14535)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionEnterBreakpoint.java 2009-04-07 06:05:59 UTC (rev 14536)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.jst.web.debug.DebugMessages;
@@ -43,7 +44,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString("ActionEnterBreakpoint.name", new String[]{getMarker().getResource().getName(), getActionMappingPath()}); //$NON-NLS-1$
+ return NLS.bind(DebugMessages.ActionEnterBreakpoint_name, (new String[]{getMarker().getResource().getName(), getActionMappingPath()}));
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionExceptionBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionExceptionBreakpoint.java 2009-04-07 05:56:07 UTC (rev 14535)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionExceptionBreakpoint.java 2009-04-07 06:05:59 UTC (rev 14536)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.struts.debug.internal.condition.ActionExceptionCondition;
import org.jboss.tools.jst.web.debug.DebugMessages;
@@ -63,7 +64,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString("ActionExceptionBreakpoint.name", new String[]{getMarker().getResource().getName(), getActionMappingPath(), getExceptionTypeName()}); //$NON-NLS-1$
+ return NLS.bind(DebugMessages.ActionExceptionBreakpoint_name, (new String[]{getMarker().getResource().getName(), getActionMappingPath(), getExceptionTypeName()}));
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormPopulateBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormPopulateBreakpoint.java 2009-04-07 05:56:07 UTC (rev 14535)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormPopulateBreakpoint.java 2009-04-07 06:05:59 UTC (rev 14536)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.jst.web.debug.DebugMessages;
@@ -44,7 +45,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString("ActionFormPopulateBreakpoint.name", new String[]{getMarker().getResource().getName(), getActionMappingPath()}); //$NON-NLS-1$
+ return NLS.bind(DebugMessages.ActionFormPopulateBreakpoint_name, (new String[]{getMarker().getResource().getName(), getActionMappingPath()}));
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormValidateBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormValidateBreakpoint.java 2009-04-07 05:56:07 UTC (rev 14535)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormValidateBreakpoint.java 2009-04-07 06:05:59 UTC (rev 14536)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.jst.web.debug.DebugMessages;
@@ -43,7 +44,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString("ActionFormValidateBreakpoint.name", new String[]{getMarker().getResource().getName(), getActionMappingPath()}); //$NON-NLS-1$
+ return NLS.bind(DebugMessages.ActionFormValidateBreakpoint_name, (new String[]{getMarker().getResource().getName(), getActionMappingPath()}));
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionForwardBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionForwardBreakpoint.java 2009-04-07 05:56:07 UTC (rev 14535)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionForwardBreakpoint.java 2009-04-07 06:05:59 UTC (rev 14536)
@@ -18,6 +18,7 @@
import org.eclipse.debug.core.DebugException;
import org.eclipse.jdt.internal.debug.core.model.JDIStackFrame;
import org.eclipse.jdt.internal.debug.core.model.JDIThread;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.struts.debug.internal.condition.ActionForwardCondition;
import org.jboss.tools.jst.web.debug.DebugMessages;
@@ -85,7 +86,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString("ActionForwardBreakpoint.name", new String[]{getMarker().getResource().getName(), getActionMappingPath(), getForwardName()}); //$NON-NLS-1$
+ return NLS.bind(DebugMessages.ActionForwardBreakpoint_name, (new String[]{getMarker().getResource().getName(), getActionMappingPath(), getForwardName()}));
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionIncludeBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionIncludeBreakpoint.java 2009-04-07 05:56:07 UTC (rev 14535)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionIncludeBreakpoint.java 2009-04-07 06:05:59 UTC (rev 14536)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.struts.debug.internal.condition.ActionIncludeCondition;
import org.jboss.tools.jst.web.debug.DebugMessages;
@@ -58,7 +59,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString("ActionIncludeBreakpoint.name", new String[]{getMarker().getResource().getName(), getActionMappingPath(), getIncludeName()}); //$NON-NLS-1$
+ return NLS.bind(DebugMessages.ActionIncludeBreakpoint_name, (new String[]{getMarker().getResource().getName(), getActionMappingPath(), getIncludeName()}));
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionTilesDefinitionForwardBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionTilesDefinitionForwardBreakpoint.java 2009-04-07 05:56:07 UTC (rev 14535)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionTilesDefinitionForwardBreakpoint.java 2009-04-07 06:05:59 UTC (rev 14536)
@@ -18,6 +18,7 @@
import org.eclipse.debug.core.DebugException;
import org.eclipse.jdt.internal.debug.core.model.JDIStackFrame;
import org.eclipse.jdt.internal.debug.core.model.JDIThread;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.jst.web.debug.DebugMessages;
@@ -59,7 +60,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString("ActionTilesDefinitionForwardBreakpoint.name", new String[]{getMarker().getResource().getName(), getActionMappingPath(), getForwardName()}); //$NON-NLS-1$
+ return NLS.bind(DebugMessages.ActionTilesDefinitionForwardBreakpoint_name, (new String[]{getMarker().getResource().getName(), getActionMappingPath(), getForwardName()}));
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/GlobalExceptionBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/GlobalExceptionBreakpoint.java 2009-04-07 05:56:07 UTC (rev 14535)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/GlobalExceptionBreakpoint.java 2009-04-07 06:05:59 UTC (rev 14536)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.struts.debug.internal.condition.GlobalExceptionCondition;
import org.jboss.tools.jst.web.debug.DebugMessages;
@@ -42,7 +43,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString("GlobalExceptionBreakpoint.name", new String[]{getMarker().getResource().getName(), getExceptionTypeName()}); //$NON-NLS-1$
+ return NLS.bind(DebugMessages.GlobalExceptionBreakpoint_name, (new String[]{getMarker().getResource().getName(), getExceptionTypeName()}));
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/GlobalForwardBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/GlobalForwardBreakpoint.java 2009-04-07 05:56:07 UTC (rev 14535)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/GlobalForwardBreakpoint.java 2009-04-07 06:05:59 UTC (rev 14536)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.struts.debug.internal.condition.GlobalForwardCondition;
import org.jboss.tools.jst.web.debug.DebugMessages;
@@ -38,7 +39,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString("GlobalForwardBreakpoint.name", new String[]{getMarker().getResource().getName(), getForwardName()}); //$NON-NLS-1$
+ return NLS.bind(DebugMessages.GlobalForwardBreakpoint_name, (new String[]{getMarker().getResource().getName(), getForwardName()}));
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/PageEnterBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/PageEnterBreakpoint.java 2009-04-07 05:56:07 UTC (rev 14535)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/PageEnterBreakpoint.java 2009-04-07 06:05:59 UTC (rev 14536)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.jst.web.debug.internal.JspLineBreakpoint;
import org.jboss.tools.jst.web.debug.DebugMessages;
@@ -29,7 +30,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString("PageEnterBreakpoint.name", new String[]{getPattern()}); //$NON-NLS-1$
+ return NLS.bind(DebugMessages.PageEnterBreakpoint_name, (new String[]{getPattern()}));
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/TilesDefinitionGlobalForwardBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/TilesDefinitionGlobalForwardBreakpoint.java 2009-04-07 05:56:07 UTC (rev 14535)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/TilesDefinitionGlobalForwardBreakpoint.java 2009-04-07 06:05:59 UTC (rev 14536)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.struts.debug.internal.condition.GlobalForwardCondition;
import org.jboss.tools.jst.web.debug.DebugMessages;
@@ -41,7 +42,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString("TilesDefinitionGlobalForwardBreakpoint.name", new String[]{getMarker().getResource().getName(), getForwardName()}); //$NON-NLS-1$
+ return NLS.bind(DebugMessages.TilesDefinitionGlobalForwardBreakpoint_name, (new String[]{getMarker().getResource().getName(), getForwardName()}));
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
15 years, 8 months
JBoss Tools SVN: r14535 - trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-04-07 01:56:07 -0400 (Tue, 07 Apr 2009)
New Revision: 14535
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/Messages.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.properties
Log:
JBIDE-3557 Externalise English strings - converted RegisterServerContext/Messages to new-style Eclipse message bundle
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/Messages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/Messages.java 2009-04-07 05:50:28 UTC (rev 14534)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/Messages.java 2009-04-07 05:56:07 UTC (rev 14535)
@@ -1,22 +1,20 @@
-package org.jboss.tools.jst.web.context;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
- private static final String BUNDLE_NAME = "org.jboss.tools.jst.web.context.RegisterServerContext"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
+package org.jboss.tools.jst.web.context;
+
+import org.eclipse.osgi.util.NLS;
+
+public final class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.jboss.tools.jst.web.context.RegisterServerContext";//$NON-NLS-1$
+
+ private Messages() {
+ // Do not instantiate
+ }
+
+ public static String ERR_APP_NAME_IS_NOT_SPECIFIED;
+ public static String ERR_SERVLET_VERSION_IS_NOT_SET;
+ public static String ERR_SERVLET_VERSION_IS_NOT_VALID;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.java 2009-04-07 05:50:28 UTC (rev 14534)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.java 2009-04-07 05:56:07 UTC (rev 14535)
@@ -134,19 +134,20 @@
return applicationName;
}
+ @SuppressWarnings("restriction")
public String getErrorMessage() {
if(runtimeName == null || runtimeName.length() == 0) return WebUIMessages.RUNTIME_IS_REQUIRED;
if(runtime == null) return WebUIMessages.SPECIFIED_RUNTIME_DOESNOT_EXIST;
if(!isEnabled()) {
if(servletVersion != null && servletVersion.length() == 0) {
- return Messages.getString("ERR_SERVLET_VERSION_IS_NOT_SET"); //$NON-NLS-1$
+ return Messages.ERR_SERVLET_VERSION_IS_NOT_SET;
}
return null;
}
if(applicationName == null || applicationName.length() == 0) {
- return Messages.getString("ERR_APP_NAME_IS_NOT_SPECIFIED"); //$NON-NLS-1$
+ return Messages.ERR_APP_NAME_IS_NOT_SPECIFIED;
}
if(true) {
@@ -154,7 +155,7 @@
if(contextRootError != null) return contextRootError;
for (int i = 0; i < targetServers.length; i++) {
if(RegistrationHelper.isRegistered(applicationName, targetServers[i])) {
- return NLS.bind(WebUIMessages.APPLICATION_IS_ALREADY_REGISTERED, applicationName, targetServers[i].getName()); //$NON-NLS-2$
+ return NLS.bind(WebUIMessages.APPLICATION_IS_ALREADY_REGISTERED, applicationName, targetServers[i].getName());
}
if(this.project != null /*&& !this.project.exists()*/ && servletVersion != null && servletVersion.length() > 0) {
if(project.exists() && RegistrationHelper.isRegistered(project)) {
@@ -170,9 +171,9 @@
}
}
if(servletVersion != null && servletVersion.length() == 0) {
- return Messages.getString("ERR_SERVLET_VERSION_IS_NOT_SET"); //$NON-NLS-1$
+ return Messages.ERR_SERVLET_VERSION_IS_NOT_SET;
} else if(!checkServletVersionFormat()) {
- return Messages.getString("ERR_SERVLET_VERSION_IS_NOT_VALID"); //$NON-NLS-1$
+ return Messages.ERR_SERVLET_VERSION_IS_NOT_VALID;
}
return null;
}
@@ -182,7 +183,7 @@
boolean checkServletVersionFormat() {
if(servletVersion == null || servletVersion.length() == 0) return true;
- StringTokenizer st = new StringTokenizer(servletVersion, ".");
+ StringTokenizer st = new StringTokenizer(servletVersion, "."); //$NON-NLS-1$
if(st.countTokens() < 2 || st.countTokens() > 3) return false;
while(st.hasMoreTokens()) {
String t = st.nextToken().trim();
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.properties 2009-04-07 05:50:28 UTC (rev 14534)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.properties 2009-04-07 05:56:07 UTC (rev 14535)
@@ -2,9 +2,5 @@
# Next 3 messages are used in org.jboss.tools.jst.web.context.RegisterServerContext
#
ERR_APP_NAME_IS_NOT_SPECIFIED=Application Name is not specified.
-
-# START NON-TRANSLATABLE
-# END NON-TRANSLATABLE
-
ERR_SERVLET_VERSION_IS_NOT_SET=Servlet version is not specified.
ERR_SERVLET_VERSION_IS_NOT_VALID=Servlet version is not valid.
15 years, 8 months
JBoss Tools SVN: r14534 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-04-07 01:50:28 -0400 (Tue, 07 Apr 2009)
New Revision: 14534
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPEditorMessages.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPEditorMessages.properties
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java
Log:
JBIDE-3557 Externalise English strings - converted JSPEditorMessages to new-style Eclipse message bundle
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPEditorMessages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPEditorMessages.java 2009-04-07 04:47:20 UTC (rev 14533)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPEditorMessages.java 2009-04-07 05:50:28 UTC (rev 14534)
@@ -7,38 +7,35 @@
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.jst.jsp.jspeditor;
-import java.util.MissingResourceException;
+
import java.util.ResourceBundle;
-import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.eclipse.osgi.util.NLS;
-/**
- * @author Jeremy
- *
- * To change the template for this generated type comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class JSPEditorMessages {
- private static final String RESOURCE_BUNDLE= "org.jboss.tools.jst.jsp.jspeditor.JSPEditorMessages";//$NON-NLS-1$
+public final class JSPEditorMessages extends NLS {
- private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+ private static final String BUNDLE_NAME = "org.jboss.tools.jst.jsp.jspeditor.JSPEditorMessages";//$NON-NLS-1$
private JSPEditorMessages() {
+ // Do not instantiate
}
- public static String getString(String key) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- JspEditorPlugin.getPluginLog().logError(e);
- return "!!!" + key + "!!!";//$NON-NLS-2$ //$NON-NLS-1$
- }
+ public static String JSPMultiPageEditor_TabLabel_VisualSource;
+ public static String JSPMultiPageEditor_TabLabel_Source;
+ public static String JSPMultiPageEditor_TabLabel_Preview;
+ public static String JSPMultiPageEditor_ContextMenu_ShowInMenu;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, JSPEditorMessages.class);
}
-
+
+ /**
+ * @deprecated use the string fields of the NLS subclass
+ */
public static ResourceBundle getResourceBundle() {
- return fgResourceBundle;
+ return ResourceBundle.getBundle(BUNDLE_NAME);
}
-}
+}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPEditorMessages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPEditorMessages.properties 2009-04-07 04:47:20 UTC (rev 14533)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPEditorMessages.properties 2009-04-07 05:50:28 UTC (rev 14534)
@@ -1,9 +1,9 @@
# used in org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor
-JSPMultiPageEditor.TabLabel.VisualSource = Visual/Source
+JSPMultiPageEditor_TabLabel_VisualSource = Visual/Source
# apparently unused
#JSPMultiPageEditor.TabLabel.Visual = Visual
-JSPMultiPageEditor.TabLabel.Source = Source
-JSPMultiPageEditor.TabLabel.Preview = Preview
+JSPMultiPageEditor_TabLabel_Source = Source
+JSPMultiPageEditor_TabLabel_Preview = Preview
# org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor.getShowInMenuLabel()
-JSPMultiPageEditor.ContextMenu.ShowInMenu = Show In
\ No newline at end of file
+JSPMultiPageEditor_ContextMenu_ShowInMenu = Show In
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2009-04-07 04:47:20 UTC (rev 14533)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2009-04-07 05:50:28 UTC (rev 14534)
@@ -465,8 +465,7 @@
try {
if(visualEditor!=null) {
visualSourceIndex = addPage(visualEditor, getEditorInput());
- setPageText(visualSourceIndex, JSPEditorMessages
- .getString("JSPMultiPageEditor.TabLabel.VisualSource")); //$NON-NLS-1$
+ setPageText(visualSourceIndex, JSPEditorMessages.JSPMultiPageEditor_TabLabel_VisualSource); //$NON-NLS-1$
setPartName(visualEditor.getTitle());
}
} catch (PartInitException e) {
@@ -482,8 +481,7 @@
}*/
try {
- String sourceTabLabel = JSPEditorMessages.getString(
- "JSPMultiPageEditor.TabLabel.Source"); //$NON-NLS-1$
+ String sourceTabLabel = JSPEditorMessages.JSPMultiPageEditor_TabLabel_Source; //$NON-NLS-1$
if(visualEditor!=null) {
sourceIndex = addPage(visualEditor, getEditorInput());
setPageText(sourceIndex, sourceTabLabel);
@@ -501,8 +499,7 @@
try {
if(visualEditor!=null) {
previewIndex = addPage(visualEditor, getEditorInput());
- setPageText(previewIndex, JSPEditorMessages
- .getString("JSPMultiPageEditor.TabLabel.Preview")); //$NON-NLS-1$
+ setPageText(previewIndex, JSPEditorMessages.JSPMultiPageEditor_TabLabel_Preview); //$NON-NLS-1$
setPartName(visualEditor.getTitle());
}
} catch (PartInitException e) {
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-04-07 04:47:20 UTC (rev 14533)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2009-04-07 05:50:28 UTC (rev 14534)
@@ -1288,6 +1288,6 @@
}
private String getShowInMenuLabel() {
- return JSPEditorMessages.getString("JSPMultiPageEditor.ContextMenu.ShowInMenu"); //$NON-NLS-1$
+ return JSPEditorMessages.JSPMultiPageEditor_ContextMenu_ShowInMenu;
}
}
15 years, 8 months
JBoss Tools SVN: r14533 - in trunk: common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences and 22 other directories.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-04-07 00:47:20 -0400 (Tue, 07 Apr 2009)
New Revision: 14533
Added:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/Messages.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/Messages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/ImageBundle.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/Messages.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/Messages.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/Messages.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/Messages.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/Messages.java
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/preferences/Messages.java
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/CompanyPreferencesPage.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XBundle.java
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/ui/XmlEditorMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/EclipseLaunchConsoleConfigurationPreferences.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/SchemaExportAction.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/QueryPagePropertySource.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/HibernateConfigurationPartFactory.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationSettingsTab.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterSettingsTab.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/EditorActionContributor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/figures/TitleLabel.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/ViewPlugin.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/image.properties
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ContentProviderVisitor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ObjectEditorInput.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelImageVisitor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ViewsAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/views.properties
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFStudioPreferencesPage.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.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.web.debug/src/org/jboss/tools/jst/web/debug/internal/JspLineBreakpoint.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractImplementationsPreferencesPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractPagesPreferencesPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/LibrarySetsPreferencePage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/messages.properties
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/messages.properties
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/Messages.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionAttrForwardBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionConditionBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionEnterBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionExceptionBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormPopulateBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormValidateBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionForwardBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionIncludeBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionTilesDefinitionForwardBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/GlobalExceptionBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/GlobalForwardBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/PageEnterBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/TilesDefinitionGlobalForwardBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/preferences/AutomationPreferencePage.java
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/preferences/StrutsStudioPreferencesPage.java
trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/Messages.java
trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteUIMessages.java
Log:
JBIDE-3557 Externalise English strings
- Marked a number of suspected obsolete messages as non-translatable.
- Replaced concatenated strings with NLS.bind() calls.
- Added some old-style Messages classes to replace direct ResourceBundle
usage.
- Replaced calls to ResourceBundle.getString() with Messages.getString(),
and inlined some property key constants. This
(a) helps "Find Broken Externalized Strings" and
(b) prepares the way for new-style Eclipse message bundles (ie Messages
classes with string fields).
- Deprecated some methods and fields which provide access to ResourceBundles,
bundle names and property key names.
Added: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/Messages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/Messages.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/Messages.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -0,0 +1,22 @@
+package org.jboss.tools.common.model.util;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.jboss.tools.common.model.util.XBundle"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XBundle.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XBundle.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XBundle.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -10,8 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.model.util;
-import java.util.*;
-import java.text.*;
+import java.text.MessageFormat;
import org.jboss.tools.common.meta.key.WizardKeys;
import org.jboss.tools.common.model.plugin.ModelPlugin;
@@ -19,10 +18,6 @@
public class XBundle {
private static XBundle bundle = new XBundle();
- private static ResourceBundle messages = ResourceBundle.getBundle(XBundle.class.getName());
- private static String ERR_GET_MESSAGE = "ERR_GET_MESSAGE";
- private static String ERR_TEMPLATE_NOT_FOUND = "ERR_TEMPLATE_NOT_FOUND";
-
private XBundle() {}
public static XBundle getInstance() {
@@ -44,7 +39,7 @@
return MessageFormat.format(t, args);
} catch (IllegalArgumentException e) {
ModelPlugin.getPluginLog().logError(e);
- return MessageFormat.format(messages.getString(XBundle.ERR_GET_MESSAGE),new Object[]{resourceid,templateid,t});
+ return MessageFormat.format(Messages.getString("ERR_GET_MESSAGE"),new Object[]{resourceid,templateid,t}); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/CompanyPreferencesPage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/CompanyPreferencesPage.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/CompanyPreferencesPage.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -10,20 +10,20 @@
******************************************************************************/
package org.jboss.tools.common.model.ui.preferences;
-import java.util.Locale;
-import java.util.ResourceBundle;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
public class CompanyPreferencesPage extends PreferencePage implements IWorkbenchPreferencePage {
- public static final String WEB_PREFERENCES_ID = "org.jboss.tools.common.model.ui";
+ public static final String WEB_PREFERENCES_ID = "org.jboss.tools.common.model.ui"; //$NON-NLS-1$
protected Control contents;
@@ -48,15 +48,14 @@
protected Control createContents(Composite parent) {
noDefaultAndApplyButton();
StyledText newControl = new StyledText(parent, SWT.WRAP);
- ResourceBundle bundle = ResourceBundle.getBundle(getClass().getPackage().getName() + ".preferences", Locale.getDefault(), getClass().getClassLoader());
- newControl.setText(bundle.getString(getKey()));
+ newControl.setText(getPrefsName());
newControl.setBackground(parent.getBackground());
newControl.setEditable(false);
return contents = newControl;
}
- protected String getKey() {
- return "REDHAT";
+ protected String getPrefsName() {
+ return Messages.getString("REDHAT"); //$NON-NLS-1$
}
public void init(IWorkbench workbench) {}
Added: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/Messages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/Messages.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/Messages.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -0,0 +1,22 @@
+package org.jboss.tools.common.model.ui.preferences;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.jboss.tools.common.model.ui.preferences.preferences"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
Modified: trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/ui/XmlEditorMessages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/ui/XmlEditorMessages.properties 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/ui/XmlEditorMessages.properties 2009-04-07 04:47:20 UTC (rev 14533)
@@ -1,4 +1,6 @@
-
+# START NON-TRANSLATABLE
+# There don't seem to be any references to XmlEditorMessages in the
+# codebase, so translation is disabled until proven otherwise!
ContentAssistProposal.label=Content Assist@Ctrl+SPACE
ContentAssistProposal.tooltip=Content Assist
ContentAssistProposal.image=
@@ -59,3 +61,4 @@
XmlSyntaxPreferencePage.InternalDTD.Type=XML Internal DTD Type
XmlSyntaxPreferencePage.InternalDTD.Contentspec=XML Internal DTD Contentspec
XmlSyntaxPreferencePage.InternalDTD.Conditional=XML Conditional Section
+# END NON-TRANSLATABLE
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/EclipseLaunchConsoleConfigurationPreferences.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/EclipseLaunchConsoleConfigurationPreferences.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/EclipseLaunchConsoleConfigurationPreferences.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -183,7 +183,7 @@
}
public void setName(String name) {
- throw new IllegalStateException(getName() + HibernateConsoleMessages.EclipseLaunchConsoleConfigurationPreferences_cannot_be_renamed);
+ throw new IllegalStateException(NLS.bind(HibernateConsoleMessages.EclipseLaunchConsoleConfigurationPreferences_cannot_be_renamed, getName()));
}
public void writeStateTo(Element node) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2009-04-07 04:47:20 UTC (rev 14533)
@@ -13,7 +13,8 @@
EclipseConsoleConfigurationPreferences_could_not_resolve_to_file=Could not resolve {0} to a file
EclipseConsoleConfigurationPreferences_could_not_resolve_classpaths=Could not resolve classpaths
EclipseConsoleConfigurationPreferences_errors_while_parsing=Errors while parsing
-EclipseLaunchConsoleConfigurationPreferences_cannot_be_renamed=\ cannot be renamed
+# {0}=name
+EclipseLaunchConsoleConfigurationPreferences_cannot_be_renamed={0} cannot be renamed
EclipseLaunchConsoleConfigurationPreferences_cannot_read_from_xml=Cannot read from xml
EclipseLaunchConsoleConfigurationPreferences_cannot_write_to_xml=Cannot write to xml
EclipseLaunchConsoleConfigurationPreferences_could_not_compute_classpath=Could not compute classpath
@@ -128,7 +129,8 @@
ReloadConfigurationAction_rebuild_configuration=Rebuild configuration
ReloadConfigurationAction_starting_hibernate_resulted_exception=Starting Hibernate resulted in a UnsupportedClassVersionError.\nThis can occur if you are running eclipse with JDK 1.4 and your domain classes require JDK 1.5. \n\nResolution: Run eclipse with JDK 1.5.
SchemaExportAction_errornum_while_performing_schemaexport=Error \# {0} while performing SchemaExport
-SchemaExportAction_error_while_performing_schemaexport=\ error(s) while performing SchemaExport, see Error Log for details
+# {0}=count
+SchemaExportAction_error_while_performing_schemaexport={0} error(s) while performing SchemaExport, see Error Log for details
SchemaExportAction_exception_running_schemaexport=Exception while running SchemaExport
SchemaExportAction_run_schemaexport=Run SchemaExport
SchemaExportAction_sure_run_schemaexport=Are you sure you want to run SchemaExport on ''{0}''?
@@ -140,11 +142,13 @@
EntityPropertySource_identifier=Identifier
EntityPropertySource_properties=Properties
QueryPagePropertySource_console_configuration=Console configuration
-QueryPagePropertySource_millisec=\ millisec
+# {0}=count in millisec
+QueryPagePropertySource_millisec={0} millisec
QueryPagePropertySource_query_run_time=Query run time
QueryPagePropertySource_query_size=Query size
QueryPagePropertySource_query_string=Query string
-QueryPagePropertySource_sec=\ sec
+# {0}=count in seconds
+QueryPagePropertySource_sec={0} sec
QueryPagePropertySource_unknown=(unknown)
ConsoleConfigurationWizardPage_config_name_already_exist=A configuration with this name already exists\!
@@ -272,8 +276,8 @@
JavaCompletionProcessor_no_console_configuration_found=No console configuration found
JavaCompletionProcessor_session_session=Session session;
-HibernateConfigurationPartFactory_not_known_by_factory=\ not known by factory
-
+# {0}=classname
+HibernateConfigurationPartFactory_not_known_by_factory={0} not known by factory
ToggleLayoutAction_auto_layout=Automatic Layout
ToggleLayoutAction_auto_layout_active=Automatic layout active
ToggleLayoutAction_enable_auto_layout=Enable automatic layout
@@ -342,11 +346,13 @@
CodeGenerationSettingsTab_detect_one_to_one_associations=Detect one-to-one associations
CodeGenerationSettingsTab_detect_optimistic_lock_columns=Detect optimistic lock columns
CodeGenerationSettingsTab_do_you_want_create_reveng_xml=Do you want to create a new reveng.xml or use an existing file ?
-CodeGenerationSettingsTab_does_not_exist=\ does not exist
+# {0}=name
+CodeGenerationSettingsTab_does_not_exist={0} does not exist
CodeGenerationSettingsTab_filesystem=&Filesystem...
CodeGenerationSettingsTab_generate_basic_typed_composite_ids=Generate basic typed composite ids
CodeGenerationSettingsTab_main=Main
-CodeGenerationSettingsTab_must_be_file=\ must be a file
+# {0}=name
+CodeGenerationSettingsTab_must_be_file={0} must be a file
CodeGenerationSettingsTab_output_dir=Output &directory:
CodeGenerationSettingsTab_output_directory=Output directory
CodeGenerationSettingsTab_package=&Package:
@@ -382,8 +388,10 @@
ConsoleConfigurationMainTab_DatabaseConnection=Database connection:
ConsoleConfigurationMainTab_do_you_want_to_create_new_cfgxml=Do you want to create a new *.cfg.xml or use an existing one ?
ConsoleConfigurationMainTab_do_you_want_to_create_new_property_file=Do you want to create a new property file or use an existing one ?
-ConsoleConfigurationMainTab_does_not_exist=\ does not exist
-ConsoleConfigurationMainTab_is_not_file=\ is not a file
+# {0}=name
+ConsoleConfigurationMainTab_does_not_exist={0} does not exist
+# {0}=name
+ConsoleConfigurationMainTab_is_not_file={0} is not a file
ConsoleConfigurationMainTab_java_project_to_determine_default_classpath=The (optional) java project is used to determine the default classpath
ConsoleConfigurationMainTab_jpa=JPA (jdk 1.5+)
ConsoleConfigurationMainTab_main=Main
@@ -428,14 +436,17 @@
ExporterSettingsTab_console_configuration_must_be_specified=Console configuration must be specified
ExporterSettingsTab_description=Description
ExporterSettingsTab_deselect_all=Deselect all
-ExporterSettingsTab_does_not_exist=\ does not exist
+# {0}=name
+ExporterSettingsTab_does_not_exist={0} does not exist
ExporterSettingsTab_edit=Edit...
ExporterSettingsTab_exporters=Exporters:
ExporterSettingsTab_exporters_2=Exporters
ExporterSettingsTab_general_settings=General settings:
ExporterSettingsTab_generate_ejb3annotations=Generate EJB3 annotations
-ExporterSettingsTab_has_to_be_folder_or_project=\ has to be a folder or project
-ExporterSettingsTab_must_be_file=\ must be a file
+# {0}=name
+ExporterSettingsTab_has_to_be_folder_or_project={0} has to be a folder or project
+# {0}=name
+ExporterSettingsTab_must_be_file={0} must be a file
ExporterSettingsTab_output_directory_for=Output directory for
ExporterSettingsTab_problem_when_reading_hibernate_tools_launch_configuration=Problem when reading hibernate tools launch configuration
ExporterSettingsTab_project_for_is_closed=Project for {0} is closed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/SchemaExportAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/SchemaExportAction.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/SchemaExportAction.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -83,9 +83,7 @@
HibernateConsolePlugin.getDefault().logErrorMessage(outStr, element );
}
HibernateConsolePlugin.getDefault().showError(viewer.getControl().getShell(),
- cnt
- - 1
- + HibernateConsoleMessages.SchemaExportAction_error_while_performing_schemaexport,
+ NLS.bind(HibernateConsoleMessages.SchemaExportAction_error_while_performing_schemaexport, cnt - 1),
(Throwable)null );
}
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/QueryPagePropertySource.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/QueryPagePropertySource.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/QueryPagePropertySource.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -21,6 +21,7 @@
*/
package org.hibernate.eclipse.console.views.properties;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource2;
import org.eclipse.ui.views.properties.PropertyDescriptor;
@@ -104,8 +105,12 @@
if(QUERY_TIME.equals(id) ) {
long resultTime = page.getQueryTime();
if (resultTime==-1) return HibernateConsoleMessages.QueryPagePropertySource_unknown;
- if (resultTime > 1000) return (resultTime / 1000) + "." + (resultTime / 100) % 10 +HibernateConsoleMessages.QueryPagePropertySource_sec; //$NON-NLS-1$
- return resultTime + HibernateConsoleMessages.QueryPagePropertySource_millisec;
+ if (resultTime > 1000) {
+ return NLS.bind(
+ HibernateConsoleMessages.QueryPagePropertySource_sec,
+ (resultTime / 1000) + "." + (resultTime / 100) % 10); //$NON-NLS-1$
+ }
+ return NLS.bind(HibernateConsoleMessages.QueryPagePropertySource_millisec, resultTime);
}
return null;
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/HibernateConfigurationPartFactory.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/HibernateConfigurationPartFactory.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/HibernateConfigurationPartFactory.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -23,6 +23,7 @@
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartFactory;
+import org.eclipse.osgi.util.NLS;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.graph.model.AssociationViewAdapter;
import org.hibernate.eclipse.graph.model.ConfigurationViewAdapter;
@@ -50,7 +51,9 @@
return new TableEditPart( (TableViewAdapter) model);
}
- throw new IllegalArgumentException(model.getClass() + HibernateConsoleMessages.HibernateConfigurationPartFactory_not_known_by_factory);
+ throw new IllegalArgumentException(NLS.bind(
+ HibernateConsoleMessages.HibernateConfigurationPartFactory_not_known_by_factory,
+ model.getClass()));
}
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationSettingsTab.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationSettingsTab.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationSettingsTab.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -44,6 +44,7 @@
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.graphics.Image;
@@ -351,10 +352,10 @@
if (resType == IResource.FILE) {
return null;
} else {
- return name + HibernateConsoleMessages.CodeGenerationSettingsTab_must_be_file;
+ return NLS.bind(HibernateConsoleMessages.CodeGenerationSettingsTab_must_be_file, name);
}
} else {
- return name + HibernateConsoleMessages.CodeGenerationSettingsTab_does_not_exist;
+ return NLS.bind(HibernateConsoleMessages.CodeGenerationSettingsTab_does_not_exist, name);
}
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -487,10 +487,10 @@
if(resource instanceof IFile) {
return null;
} else {
- return msgPrefix + HibernateConsoleMessages.ConsoleConfigurationMainTab_is_not_file;
+ return NLS.bind(HibernateConsoleMessages.ConsoleConfigurationMainTab_is_not_file, msgPrefix);
}
} else {
- return msgPrefix + HibernateConsoleMessages.ConsoleConfigurationMainTab_does_not_exist;
+ return NLS.bind(HibernateConsoleMessages.ConsoleConfigurationMainTab_does_not_exist, msgPrefix);
}
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterSettingsTab.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterSettingsTab.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterSettingsTab.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -832,11 +832,11 @@
}
}
else {
- return name + HibernateConsoleMessages.ExporterSettingsTab_has_to_be_folder_or_project;
+ return NLS.bind(HibernateConsoleMessages.ExporterSettingsTab_has_to_be_folder_or_project, name);
}
}
else {
- return name + HibernateConsoleMessages.ExporterSettingsTab_does_not_exist;
+ return NLS.bind(HibernateConsoleMessages.ExporterSettingsTab_does_not_exist, name);
}
return null;
}
@@ -850,11 +850,11 @@
return null;
}
else {
- return name + HibernateConsoleMessages.ExporterSettingsTab_must_be_file;
+ return NLS.bind(HibernateConsoleMessages.ExporterSettingsTab_must_be_file, name);
}
}
else {
- return name + HibernateConsoleMessages.ExporterSettingsTab_does_not_exist;
+ return NLS.bind(HibernateConsoleMessages.ExporterSettingsTab_does_not_exist, name);
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/EditorActionContributor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/EditorActionContributor.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/EditorActionContributor.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -17,13 +17,14 @@
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
import org.jboss.tools.hibernate.ui.veditor.UIVEditorMessages;
+import org.jboss.tools.hibernate.ui.view.ImageBundle;
import org.jboss.tools.hibernate.ui.view.ViewPlugin;
public class EditorActionContributor extends ActionBarContributor {
protected void buildActions() {
IWorkbenchAction workbenchAction = ActionFactory.REFRESH.create(getPage().getWorkbenchWindow());
- workbenchAction.setImageDescriptor(ViewPlugin.getImageDescriptor(ViewPlugin.BUNDLE_IMAGE.getString("Explorer.refreshOrmGef"))); //$NON-NLS-1$
+ workbenchAction.setImageDescriptor(ViewPlugin.getImageDescriptor(ImageBundle.getString("Explorer.refreshOrmGef"))); //$NON-NLS-1$
workbenchAction.setToolTipText(UIVEditorMessages.EditorActionContributor_refresh_visual_mapping);
addAction(workbenchAction);
addRetargetAction(new UndoRetargetAction());
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/figures/TitleLabel.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/figures/TitleLabel.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/figures/TitleLabel.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -14,13 +14,14 @@
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.hibernate.ui.view.ImageBundle;
import org.jboss.tools.hibernate.ui.view.ViewPlugin;
public class TitleLabel extends Label {
- static Image shevronUp = ViewPlugin.getImageDescriptor(ViewPlugin.BUNDLE_IMAGE.getString("VisualMapping.shevronUp")).createImage(); //$NON-NLS-1$
- static Image shevronDown = ViewPlugin.getImageDescriptor(ViewPlugin.BUNDLE_IMAGE.getString("VisualMapping.shevronDown")).createImage(); //$NON-NLS-1$
+ static Image shevronUp = ViewPlugin.getImageDescriptor(ImageBundle.getString("VisualMapping.shevronUp")).createImage(); //$NON-NLS-1$
+ static Image shevronDown = ViewPlugin.getImageDescriptor(ImageBundle.getString("VisualMapping.shevronDown")).createImage(); //$NON-NLS-1$
protected boolean hiden = false;
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/ImageBundle.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/ImageBundle.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/ImageBundle.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -0,0 +1,29 @@
+package org.jboss.tools.hibernate.ui.view;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class ImageBundle {
+ private static final String BUNDLE_NAME = "org.jboss.tools.hibernate.ui.view.image"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private ImageBundle() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+
+ /**
+ * @deprecated use bundle via ImageBundle.getString()
+ */
+ public static ResourceBundle getBundle() {
+ return RESOURCE_BUNDLE;
+ }
+}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/ViewPlugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/ViewPlugin.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/ViewPlugin.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -35,7 +35,10 @@
private static ViewPlugin plugin;
private ResourceBundle resourceBundle;
- public static final ResourceBundle BUNDLE_IMAGE = ResourceBundle.getBundle(ViewPlugin.class.getPackage().getName() + ".image"); //$NON-NLS-1$
+ /**
+ * @deprecated use bundle via ImageBundle.getString()
+ */
+ public static final ResourceBundle BUNDLE_IMAGE = ImageBundle.getBundle();
public static boolean TRACE = false;
public static boolean TRACE_VIEW = false;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/image.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/image.properties 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/image.properties 2009-04-07 04:47:20 UTC (rev 14533)
@@ -41,7 +41,7 @@
OrmModelImageVisitor.PersistentFieldParent=parent.gif
##OrmModelImageVisitor for Collection
-OrmModelImageVisitor.PersistentFieldCollection=collection.gif
+OrmModelImageVisitor.Collection=collection.gif
OrmModelImageVisitor.Collection_array=collection_array.gif
OrmModelImageVisitor.Collection_primitive_array=collection_primitive_array.gif
OrmModelImageVisitor.Collection_set=collection_set.gif
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ContentProviderVisitor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ContentProviderVisitor.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ContentProviderVisitor.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -10,8 +10,6 @@
******************************************************************************/
package org.jboss.tools.hibernate.ui.view.views;
-import java.util.ResourceBundle;
-
import org.hibernate.mapping.Column;
@@ -19,8 +17,6 @@
private static final Object[] nullChildren = new Object[0];
- private ResourceBundle BUNDLE = ResourceBundle.getBundle(ContentProviderVisitor.class.getPackage().getName() + ".views"); //$NON-NLS-1$
-
public Object visitDatabaseColumn(Column column, Object argument) {
return null;
}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/Messages.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/Messages.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/Messages.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -0,0 +1,22 @@
+package org.jboss.tools.hibernate.ui.view.views;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.jboss.tools.hibernate.ui.view.views.views"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ObjectEditorInput.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ObjectEditorInput.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ObjectEditorInput.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -12,7 +12,6 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IBaseLabelProvider;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;
import org.hibernate.console.ConsoleConfiguration;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelImageVisitor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelImageVisitor.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelImageVisitor.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -35,6 +35,7 @@
import org.hibernate.mapping.Subclass;
import org.hibernate.mapping.Table;
import org.hibernate.mapping.UnionSubclass;
+import org.jboss.tools.hibernate.ui.view.ImageBundle;
import org.jboss.tools.hibernate.ui.view.ViewPlugin;
/**
@@ -43,34 +44,32 @@
*/
public class OrmModelImageVisitor implements PersistentClassVisitor {
- private ResourceBundle BUNDLE = ViewPlugin.BUNDLE_IMAGE;
-
public Object visitDatabaseTable(Table table) {
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.DatabaseTable")); //$NON-NLS-1$
}
public Object visitDatabaseColumn(Column column) {
if (column.isUnique()) {
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.DatabaseUniqueKeyColumn")); //$NON-NLS-1$
} else if (HibernateUtils.isPrimaryKey(column)
&& HibernateUtils.getTable(column) != null
&& HibernateUtils.isForeignKey(column)) {
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.DatabasePrimaryForeignKeysColumn")); //$NON-NLS-1$
} else if (HibernateUtils.isPrimaryKey(column)) {
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.DatabasePrimaryKeyColumn")); //$NON-NLS-1$
} else if (HibernateUtils.getTable(column) != null
&& HibernateUtils.isForeignKey(column)) {
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.DatabaseForeignKeyColumn")); //$NON-NLS-1$
} else
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.DatabaseColumn")); //$NON-NLS-1$
}
@@ -79,30 +78,30 @@
if (field != null) {
if (field.getPersistentClass() != null && field.getPersistentClass().getVersion() == field) {
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldSimple_version")); //$NON-NLS-1$
}
if (field.getPersistentClass() != null && field.getPersistentClass().getIdentifierProperty() == field) {
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldSimple_id")); //$NON-NLS-1$
}
if (field.getValue() != null) {
if (field.getValue() instanceof OneToMany)
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldOne-to-many")); //$NON-NLS-1$
else if (field.getValue() instanceof OneToOne)
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldOne-to-one")); //$NON-NLS-1$
else if (field.getValue() instanceof ManyToOne)
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldMany-to-one")); //$NON-NLS-1$
else if (field.getValue() instanceof Any)
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldAny")); //$NON-NLS-1$
try {
@@ -110,112 +109,112 @@
&& field.getType().isCollectionType()) {
if (field.getValue() instanceof PrimitiveArray)
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.Collection_primitive_array")); //$NON-NLS-1$
else if (field.getValue() instanceof Array)
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.Collection_array")); //$NON-NLS-1$
else if (field.getValue() instanceof List)
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.Collection_list")); //$NON-NLS-1$
else if (field.getValue() instanceof Set)
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.Collection_set")); //$NON-NLS-1$
else if (field.getValue() instanceof Map)
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.Collection_map")); //$NON-NLS-1$
else if (field.getValue() instanceof Bag)
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.Collection_bag")); //$NON-NLS-1$
else if (field.getValue() instanceof IdentifierBag)
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.Collection_idbag")); //$NON-NLS-1$
else
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.Collection")); //$NON-NLS-1$
}
} catch (Exception e) {
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldNot_mapped")); //$NON-NLS-1$
}
}
if("parent".equals(field.getName())) //$NON-NLS-1$
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldParent")); //$NON-NLS-1$
}
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldSimple")); //$NON-NLS-1$
}
public Object visitManyToOneMapping(ManyToOne field) {
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldMany-to-many")); //$NON-NLS-1$
}
public Object visitOneToManyMapping(OneToMany field) {
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldOne-to-many")); //$NON-NLS-1$
}
public Object visitSimpleValueMapping(SimpleValue field) {
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldSimple")); //$NON-NLS-1$
}
public Object visitAnyMapping(Any field) {
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldMany-to-any")); //$NON-NLS-1$
}
public Object visitComponentMapping(Component mapping) {
if (mapping != null) {
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldComponent")); //$NON-NLS-1$
}
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldNot_mapped")); //$NON-NLS-1$
}
public Object visitComponentKeyMapping(DependantValue mapping) {
if (mapping.getTable().getIdentifierValue() == mapping) {
return ViewPlugin
- .getImageDescriptor(BUNDLE
+ .getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldComponent_id")); //$NON-NLS-1$
}
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentFieldSimple")); //$NON-NLS-1$
}
public Object accept(RootClass arg0) {
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentClass")); //$NON-NLS-1$
}
public Object accept(UnionSubclass arg0) {
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentClass")); //$NON-NLS-1$
}
public Object accept(SingleTableSubclass arg0) {
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentClass")); //$NON-NLS-1$
}
public Object accept(JoinedSubclass arg0) {
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentClass")); //$NON-NLS-1$
}
public Object accept(Subclass arg0) {
- return ViewPlugin.getImageDescriptor(BUNDLE
+ return ViewPlugin.getImageDescriptor(ImageBundle
.getString("OrmModelImageVisitor.PersistentClass")); //$NON-NLS-1$
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -12,8 +12,6 @@
import java.util.HashMap;
import java.util.Map;
-import java.util.Properties;
-import java.util.ResourceBundle;
import org.hibernate.HibernateException;
import org.hibernate.cfg.Environment;
@@ -38,10 +36,6 @@
static private String SPACE = " "; //$NON-NLS-1$
static private String POINTER = " -> "; //$NON-NLS-1$
- private ResourceBundle BUNDLE = ResourceBundle
- .getBundle(OrmModelNameVisitor.class.getPackage().getName()
- + ".views"); //$NON-NLS-1$
-
public OrmModelNameVisitor() {
super();
}
@@ -184,7 +178,7 @@
StringBuffer name = new StringBuffer();
name.append(field.getName());
name.append(" "); //$NON-NLS-1$
- name.append(BUNDLE.getString("OrmModelNameVisitor.Colon")); //$NON-NLS-1$
+ name.append(Messages.getString("OrmModelNameVisitor.Colon")); //$NON-NLS-1$
String typeString = null;
try {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ViewsAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ViewsAction.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ViewsAction.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -11,7 +11,6 @@
package org.jboss.tools.hibernate.ui.view.views;
import java.util.HashMap;
-import java.util.ResourceBundle;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.ide.IDE;
@@ -21,8 +20,6 @@
public class ViewsAction {
static ActionOrmTree openEditorAction;
- static private ResourceBundle BUNDLE = ResourceBundle.getBundle(ViewsAction.class.getPackage().getName() + ".views"); //$NON-NLS-1$
-
static {
openEditorAction = new ActionOrmTree() {
HashMap<Object,ObjectEditorInput> hashMap = new HashMap<Object,ObjectEditorInput>();
@@ -39,7 +36,7 @@
}
}
};
- openEditorAction.setText(BUNDLE.getString("Explorer.OpenEditorActionName")); //$NON-NLS-1$
- openEditorAction.setToolTipText(BUNDLE.getString("Explorer.OpenEditorActionToolTipText")); //$NON-NLS-1$
+ openEditorAction.setText(Messages.getString("Explorer.OpenEditorActionName")); //$NON-NLS-1$
+ openEditorAction.setToolTipText(Messages.getString("Explorer.OpenEditorActionToolTipText")); //$NON-NLS-1$
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/views.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/views.properties 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/views.properties 2009-04-07 04:47:20 UTC (rev 14533)
@@ -1,3 +1,5 @@
+# START NON-TRANSLATABLE
+# suspected OBSOLETE
//Explorer
Explorer.ActionRootPackageClassFieldName=project -> mapping -> package -> class(table) -> field -> column(s)
Explorer.ActionRootPackageClassFieldContentDescription=project -> mapping -> package -> class(table) -> field
@@ -58,7 +60,7 @@
Explorer.GenerateDDLErrorTitle=Generate DDL Error
Explorer.AutoBuildingFalseTitle=Warning
-Explorer.AutoBuildingFalseMessage=Build Automaticaly is switch off.\nContinue?
+Explorer.AutoBuildingFalseMessage="Build Automatically" is switched off.\nContinue?
Explorer.HibernateCacheWizardName=Hibernate Cache Wizard...
Explorer.HibernateCacheWizardToolTipText=Hibernate cache wizard
@@ -219,10 +221,13 @@
Explorer.HQLConsoleToolTipText=HQL Console
Explorer.HibernateConsole=Hibernate Console
Explorer.HibernateConsoleToolTipText=Hibernate Console
+# END NON-TRANSLATABLE
Explorer.OpenEditorActionName=Open Mapping Diagram
Explorer.OpenEditorActionToolTipText=Open Mapping Diagram
+# START NON-TRANSLATABLE
+# suspected OBSOLETE
#ExplorerBase
ExplorerBase.ActionRootSchemaTableColumnName=project -> mapping -> schema -> table -> column
ExplorerBase.ActionRootSchemaTableColumnContentDescription=project -> mapping -> schema -> table -> column
@@ -236,10 +241,17 @@
#OrmModelNameVisitor
OrmModelNameVisitor.DefaultPackageName=Default Package
OrmModelNameVisitor.DefaultDatabaseSchema=Default Schema
+# END NON-TRANSLATABLE
+
+
+
+# START NON-TRANSLATABLE
OrmModelNameVisitor.Colon=:
+# suspected OBSOLETE
OrmModelNameVisitor.OpenBrackets=(
OrmModelNameVisitor.Comma=,
OrmModelNameVisitor.CloseBrackets=)
#Job
Job.LoadMapping=Loading mappings...
+# END NON-TRANSLATABLE
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFStudioPreferencesPage.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFStudioPreferencesPage.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFStudioPreferencesPage.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -14,10 +14,11 @@
public class JSFStudioPreferencesPage extends CompanyPreferencesPage {
- public static final String ID = "org.jboss.tools.jsf.ui";
+ public static final String ID = "org.jboss.tools.jsf.ui"; //$NON-NLS-1$
- protected String getKey() {
- return "JSFSTUDIO";
+ @Override
+ protected String getPrefsName() {
+ return Messages.getString("JSFSTUDIO"); //$NON-NLS-1$
}
}
Added: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/Messages.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/Messages.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/Messages.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -0,0 +1,22 @@
+package org.jboss.tools.jsf.ui.preferences;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.jboss.tools.jsf.ui.preferences.preferences"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -91,13 +91,6 @@
public static final String EDITOR_ID = "org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor"; //$NON-NLS-1$
- private static final String VISUALSOURCE_TAB_LABEL = "JSPMultiPageEditor.TabLabel.VisualSource"; //$NON-NLS-1$
-
- private static final String SOURCE_TAB_LABEL = "JSPMultiPageEditor.TabLabel.Source"; //$NON-NLS-1$
-
- /** PREVIEW_TAB_LABEL */
- private static final String PREVIEW_TAB_LABEL = "JSPMultiPageEditor.TabLabel.Preview"; //$NON-NLS-1$
-
//option loads preview tab
private static final String PREVIEW_TAB="Preview"; //$NON-NLS-1$
//visual tab
@@ -473,7 +466,7 @@
if(visualEditor!=null) {
visualSourceIndex = addPage(visualEditor, getEditorInput());
setPageText(visualSourceIndex, JSPEditorMessages
- .getString(VISUALSOURCE_TAB_LABEL));
+ .getString("JSPMultiPageEditor.TabLabel.VisualSource")); //$NON-NLS-1$
setPartName(visualEditor.getTitle());
}
} catch (PartInitException e) {
@@ -489,15 +482,15 @@
}*/
try {
+ String sourceTabLabel = JSPEditorMessages.getString(
+ "JSPMultiPageEditor.TabLabel.Source"); //$NON-NLS-1$
if(visualEditor!=null) {
sourceIndex = addPage(visualEditor, getEditorInput());
- setPageText(sourceIndex, JSPEditorMessages
- .getString(SOURCE_TAB_LABEL));
+ setPageText(sourceIndex, sourceTabLabel);
setPartName(visualEditor.getTitle());
} else {
sourceIndex = addPage(sourceEditor, getEditorInput());
- setPageText(sourceIndex, JSPEditorMessages
- .getString(SOURCE_TAB_LABEL));
+ setPageText(sourceIndex, sourceTabLabel);
setPartName(sourceEditor.getTitle());
}
} catch (PartInitException e) {
@@ -509,7 +502,7 @@
if(visualEditor!=null) {
previewIndex = addPage(visualEditor, getEditorInput());
setPageText(previewIndex, JSPEditorMessages
- .getString(PREVIEW_TAB_LABEL));
+ .getString("JSPMultiPageEditor.TabLabel.Preview")); //$NON-NLS-1$
setPartName(visualEditor.getTitle());
}
} catch (PartInitException e) {
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-04-07 04:30:28 UTC (rev 14532)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -160,8 +160,6 @@
private TextEditorDropProviderImpl textEditorDropProvider;
- private static final String SHOW_IN_MENU = "JSPMultiPageEditor.ContextMenu.ShowInMenu"; //$NON-NLS-1$
-
public JSPTextEditor(JSPMultiPageEditor parentEditor) {
JspEditorPlugin.getDefault().initDefaultPluginPreferences();
textEditorDropProvider = new TextEditorDropProviderImpl();
@@ -298,7 +296,7 @@
ConfigurablePropertySheetPage sheet) {
try {
Method method = PropertySheetPage.class.getDeclaredMethod(
- "setSorter", new Class[] { PropertySheetSorter.class });
+ "setSorter", new Class[] { PropertySheetSorter.class }); //$NON-NLS-1$
method.setAccessible(true);
method.invoke(sheet, new Object[] { sorter });
} catch (InvocationTargetException e) {
@@ -341,7 +339,7 @@
getSourceViewer().removeTextListener(this);
getSourceViewer().addTextListener(this);
- Object dtid = getSourceViewer().getTextWidget().getData("DropTarget");
+ Object dtid = getSourceViewer().getTextWidget().getData("DropTarget"); //$NON-NLS-1$
if (dtid != null) {
if (dtid instanceof DropTarget) {
DropTarget dropTarget = (DropTarget) dtid;
@@ -571,8 +569,8 @@
return;
}
Properties p = new Properties();
- XActionInvoker.invoke("DiscardActions.Discard", o, p);
- if (!"true".equals(p.getProperty("done")))
+ XActionInvoker.invoke("DiscardActions.Discard", o, p); //$NON-NLS-1$
+ if (!"true".equals(p.getProperty("done"))) //$NON-NLS-1$ //$NON-NLS-2$
return;
super.doRevertToSaved();
if (o.isModified())
@@ -601,8 +599,8 @@
}
if (wtpTextJspKbConnector == null
&& model != null
- && (getContentType().toLowerCase().indexOf("jsp") != -1 || getContentType()
- .toLowerCase().indexOf("html") != -1)) {
+ && (getContentType().toLowerCase().indexOf("jsp") != -1 || getContentType() //$NON-NLS-1$
+ .toLowerCase().indexOf("html") != -1)) { //$NON-NLS-1$
wtpTextJspKbConnector = new WTPTextJspKbConnector(getEditorInput(),
document, model);
wtpTextJspKbConnector.setTaglibManagerProvider(parentEditor);
@@ -615,7 +613,7 @@
type = getModel().getContentTypeIdentifier();
} finally {
if (type == null)
- type = "";
+ type = ""; //$NON-NLS-1$
}
return type;
}
@@ -758,7 +756,7 @@
.getDropCommand(flavor,
JSPTagProposalFactory.getInstance());
- boolean promptAttributes = "yes"
+ boolean promptAttributes = "yes" //$NON-NLS-1$
.equals(VpePreference.ALWAYS_REQUEST_FOR_ATTRIBUTE
.getValue());
dropCommand
@@ -813,7 +811,7 @@
return;
}
// Drop from VPE to Source is forbidden
- if (dropContext.getFlavor().equals("text/html")) {
+ if (dropContext.getFlavor().equals("text/html")) { //$NON-NLS-1$
if (InnerDragBuffer.object != null) {
event.detail = DND.DROP_NONE;
}
@@ -1115,7 +1113,7 @@
try {
if (m == null) {
Class c = getSelectionProvider().getClass();
- m = c.getDeclaredMethod("isFiringSelection", new Class[0]);
+ m = c.getDeclaredMethod("isFiringSelection", new Class[0]); //$NON-NLS-1$
m.setAccessible(true);
}
Boolean b = (Boolean) m.invoke(getSelectionProvider(),
@@ -1251,8 +1249,8 @@
boolean isInsideResponseRedirect(Text textNode, int off) {
if (off < 0)
return false;
- String START = "response.sendRedirect(\"";
- String END = "\")";
+ String START = "response.sendRedirect(\""; //$NON-NLS-1$
+ String END = "\")"; //$NON-NLS-1$
String text = textNode.getNodeValue();
int i = 0;
while (i < text.length() && i < off) {
@@ -1290,7 +1288,6 @@
}
private String getShowInMenuLabel() {
-
- return JSPEditorMessages.getString(SHOW_IN_MENU);
+ return JSPEditorMessages.getString("JSPMultiPageEditor.ContextMenu.ShowInMenu"); //$NON-NLS-1$
}
}
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/Messages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/Messages.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/Messages.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -0,0 +1,22 @@
+package org.jboss.tools.jst.web.context;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.jboss.tools.jst.web.context.RegisterServerContext"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.jst.web.context;
-import java.util.ResourceBundle;
import java.util.StringTokenizer;
import org.eclipse.core.resources.IProject;
@@ -19,8 +18,9 @@
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.internal.*;
-
+import org.eclipse.wst.server.core.internal.Module;
+import org.eclipse.wst.server.core.internal.ModuleFactory;
+import org.eclipse.wst.server.core.internal.ServerPlugin;
import org.jboss.tools.common.model.options.Preference;
import org.jboss.tools.jst.web.WebModelPlugin;
import org.jboss.tools.jst.web.messages.xpl.WebUIMessages;
@@ -34,15 +34,9 @@
static String HELP_KEY_BASE = "FileSystems_RegisterInServerXML"; //$NON-NLS-1$
- static final private String ERR_APP_NAME_IS_NOT_SPECIFIED = "ERR_APP_NAME_IS_NOT_SPECIFIED"; //$NON-NLS-1$
- static final private String ERR_SERVLET_VERSION_IS_NOT_SET = "ERR_SERVLET_VERSION_IS_NOT_SET"; //$NON-NLS-1$
- static final private String ERR_SERVLET_VERSION_IS_NOT_VALID = "ERR_SERVLET_VERSION_IS_NOT_VALID"; //$NON-NLS-1$
-
IProject project = null;
String servletVersion = ""; //$NON-NLS-1$
- static final private ResourceBundle MESSAGES = ResourceBundle.getBundle(RegisterServerContext.class.getName());
-
int mode;
boolean isEnabled = false;
boolean isInitiallyEnabled = false;
@@ -146,13 +140,13 @@
if(!isEnabled()) {
if(servletVersion != null && servletVersion.length() == 0) {
- return MESSAGES.getString(ERR_SERVLET_VERSION_IS_NOT_SET);
+ return Messages.getString("ERR_SERVLET_VERSION_IS_NOT_SET"); //$NON-NLS-1$
}
return null;
}
if(applicationName == null || applicationName.length() == 0) {
- return MESSAGES.getString(ERR_APP_NAME_IS_NOT_SPECIFIED);
+ return Messages.getString("ERR_APP_NAME_IS_NOT_SPECIFIED"); //$NON-NLS-1$
}
if(true) {
@@ -176,9 +170,9 @@
}
}
if(servletVersion != null && servletVersion.length() == 0) {
- return MESSAGES.getString(ERR_SERVLET_VERSION_IS_NOT_SET);
+ return Messages.getString("ERR_SERVLET_VERSION_IS_NOT_SET"); //$NON-NLS-1$
} else if(!checkServletVersionFormat()) {
- return MESSAGES.getString(ERR_SERVLET_VERSION_IS_NOT_VALID);
+ return Messages.getString("ERR_SERVLET_VERSION_IS_NOT_VALID"); //$NON-NLS-1$
}
return null;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/internal/JspLineBreakpoint.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/internal/JspLineBreakpoint.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/internal/JspLineBreakpoint.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -34,9 +34,7 @@
public class JspLineBreakpoint extends JavaPatternBreakpoint implements IBreakpointSourceFinder, IBreakpointPresentation {
- private static final String JSP_BREAKPOINT = "org.jboss.tools.jst.web.debug.jspLineBreakpointMarker";
- private static final String BREAKPOINT_LABEL_TEXT_KEY = "JspLineBreakpoint.name";
-
+ private static final String JSP_BREAKPOINT = "org.jboss.tools.jst.web.debug.jspLineBreakpointMarker"; //$NON-NLS-1$
private JDIDebugTarget debugTarget = null;
private boolean startServer = false;
@@ -79,7 +77,7 @@
if (debugTarget != null) {
result = JspDebugUtils.getGeneratedJavaClassName(
super.getPattern(),
- debugTarget.getLaunch().getLaunchConfiguration().getAttribute(WebUtils.ATTR_WEB_SERVER_NAME, "")
+ debugTarget.getLaunch().getLaunchConfiguration().getAttribute(WebUtils.ATTR_WEB_SERVER_NAME, "") //$NON-NLS-1$
);
}
if(result==null) {
@@ -123,7 +121,7 @@
IJavaStackFrame javaStackFrame = (IJavaStackFrame)stackFrame;
try {
String receivingTypeName = javaStackFrame.getReceivingTypeName();
- String configName = javaStackFrame.getLaunch().getLaunchConfiguration().getAttribute(WebUtils.ATTR_WEB_SERVER_NAME, "");
+ String configName = javaStackFrame.getLaunch().getLaunchConfiguration().getAttribute(WebUtils.ATTR_WEB_SERVER_NAME, ""); //$NON-NLS-1$
String generatedClassName = JspDebugUtils.getGeneratedJavaClassName(super.getPattern(), configName);
result = receivingTypeName.equals(generatedClassName);
@@ -149,7 +147,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString(BREAKPOINT_LABEL_TEXT_KEY, new String[]{getPattern(), "" + getLineNumber()});
+ return DebugMessages.getString("JspLineBreakpoint.name", new String[]{getPattern(), "" + getLineNumber()}); //$NON-NLS-1$ //$NON-NLS-2$
} catch (CoreException e) {
ModelPlugin.getPluginLog().logError(e);
return "error";
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractImplementationsPreferencesPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractImplementationsPreferencesPage.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractImplementationsPreferencesPage.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -36,7 +36,13 @@
public class AbstractImplementationsPreferencesPage extends PreferencePage implements
IWorkbenchPreferencePage {
+ /**
+ * @deprecated use bundle via Messages.getString()
+ */
public static final String BUNDLE_NAME = "preferences"; //$NON-NLS-1$
+ /**
+ * @deprecated use bundle via Messages.getString()
+ */
public static final ResourceBundle BUNDLE = ResourceBundle.getBundle(AbstractImplementationsPreferencesPage.class.getPackage().getName() + "." + BUNDLE_NAME); //$NON-NLS-1$
private AbstractWebProjectTemplate helper;
@@ -121,10 +127,10 @@
heightHint = convertVerticalDLUsToPixels(14 /*IDialogConstants.BUTTON_HEIGHT*/);
widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- addButtonImpl = createButton(impl, BUNDLE.getString("ImplementationsPreferencesPage.Add")); //$NON-NLS-1$
+ addButtonImpl = createButton(impl, Messages.getString("ImplementationsPreferencesPage.Add")); //$NON-NLS-1$
if (errorMessage != null) addButtonImpl.setEnabled(false);
- removeButtonImpl = createButton(impl, BUNDLE.getString("ImplementationsPreferencesPage.Remove")); //$NON-NLS-1$
+ removeButtonImpl = createButton(impl, Messages.getString("ImplementationsPreferencesPage.Remove")); //$NON-NLS-1$
removeButtonImpl.setEnabled(false);
// TabFolder
@@ -133,10 +139,10 @@
tabbedComposite.setLayoutData(gridDataTab);
TabItem librariesTab = new TabItem(tabbedComposite,SWT.NULL);
- librariesTab.setText(BUNDLE.getString("ImplementationsPreferencesPage.Library.Sets")); //$NON-NLS-1$
+ librariesTab.setText(Messages.getString("ImplementationsPreferencesPage.Library.Sets")); //$NON-NLS-1$
TabItem projectTab = new TabItem(tabbedComposite,SWT.NULL);
- projectTab.setText(BUNDLE.getString("ImplementationsPreferencesPage.Project.Templates")); //$NON-NLS-1$
+ projectTab.setText(Messages.getString("ImplementationsPreferencesPage.Project.Templates")); //$NON-NLS-1$
// listLibraries
Composite entryLibraries = new Composite(tabbedComposite, SWT.NULL);
@@ -150,10 +156,10 @@
listLibraries.setLayoutData(gridDataListLibraries);
- addButtonLibraries = createButton(entryLibraries, BUNDLE.getString("ImplementationsPreferencesPage.Add")); //$NON-NLS-1$
+ addButtonLibraries = createButton(entryLibraries, Messages.getString("ImplementationsPreferencesPage.Add")); //$NON-NLS-1$
addButtonLibraries.setEnabled(false);
- removeButtonLibraries = createButton(entryLibraries, BUNDLE.getString("ImplementationsPreferencesPage.Remove")); //$NON-NLS-1$
+ removeButtonLibraries = createButton(entryLibraries, Messages.getString("ImplementationsPreferencesPage.Remove")); //$NON-NLS-1$
removeButtonLibraries.setEnabled(false);
librariesTab.setControl(entryLibraries);
@@ -170,23 +176,23 @@
listProject.setLayoutData(gridDataListProject);
- addButtonProject = createButton(entryProject, BUNDLE.getString("ImplementationsPreferencesPage.Add")); //$NON-NLS-1$
+ addButtonProject = createButton(entryProject, Messages.getString("ImplementationsPreferencesPage.Add")); //$NON-NLS-1$
addButtonProject.setEnabled(false);
- editButtonProject = createButton(entryProject, BUNDLE.getString("ImplementationsPreferencesPage.Edit")); //$NON-NLS-1$
+ editButtonProject = createButton(entryProject, Messages.getString("ImplementationsPreferencesPage.Edit")); //$NON-NLS-1$
editButtonProject.setEnabled(false);
- upButtonProject = createButton(entryProject, BUNDLE
+ upButtonProject = createButton(entryProject, Messages
.getString("ImplementationsPreferencesPage.Up")); //$NON-NLS-1$
upButtonProject.setEnabled(false);
GridData d = (GridData)upButtonProject.getLayoutData();
d.verticalIndent = 5;
- downButtonProject = createButton(entryProject, BUNDLE
+ downButtonProject = createButton(entryProject, Messages
.getString("ImplementationsPreferencesPage.Down")); //$NON-NLS-1$
downButtonProject.setEnabled(false);
- removeButtonProject = createButton(entryProject, BUNDLE.getString("ImplementationsPreferencesPage.Remove")); //$NON-NLS-1$
+ removeButtonProject = createButton(entryProject, Messages.getString("ImplementationsPreferencesPage.Remove")); //$NON-NLS-1$
removeButtonProject.setEnabled(false);
d = (GridData)removeButtonProject.getLayoutData();
d.verticalIndent = 5;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractPagesPreferencesPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractPagesPreferencesPage.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractPagesPreferencesPage.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -34,7 +34,13 @@
* @author Gavrs
*/
public abstract class AbstractPagesPreferencesPage extends PreferencePage implements IWorkbenchPreferencePage {
+ /**
+ * @deprecated use bundle via Messages.getString()
+ */
public static final String BUNDLE_NAME = "preferences";
+ /**
+ * @deprecated use bundle via Messages.getString()
+ */
public static ResourceBundle BUNDLE = ResourceBundle.getBundle(AbstractPagesPreferencesPage.class.getPackage().getName() + "." + BUNDLE_NAME);
protected AbstractWebProjectTemplate helper;
protected String[] pages;
@@ -77,7 +83,7 @@
String[] pageLabels = new String[pages == null ? 0 : pages.length];
for (int i = 0; pageLabels != null && i < pageLabels.length; i++) {
pageLabels[i] = pages[i];
- if (pages[i].equals(defaultPage)) pageLabels[i] += " " + BUNDLE.getString("AbstractPagesPreferencePage.3");
+ if (pages[i].equals(defaultPage)) pageLabels[i] += " " + Messages.getString("AbstractPagesPreferencePage.3");
}
return pageLabels;
}
@@ -109,14 +115,14 @@
listPages.setLayoutData(gridDataList);
addButtonPages = new Button(entryPage, SWT.PUSH);
- addButtonPages.setText(BUNDLE.getString("AbstractPagesPreferencePage.0"));
+ addButtonPages.setText(Messages.getString("AbstractPagesPreferencePage.0"));
GridData gridDataAddButton = new GridData(GridData.HORIZONTAL_ALIGN_END);
gridDataAddButton.widthHint = widthHint;
gridDataAddButton.heightHint=heightHint;
addButtonPages.setLayoutData(gridDataAddButton);
removeButton = new Button(entryPage, SWT.PUSH);
- removeButton.setText(BUNDLE.getString("AbstractPagesPreferencePage.1"));
+ removeButton.setText(Messages.getString("AbstractPagesPreferencePage.1"));
GridData gridDataRemoveButton = new GridData(GridData.HORIZONTAL_ALIGN_END);
gridDataRemoveButton.widthHint = widthHint;
gridDataRemoveButton.heightHint=heightHint;
@@ -127,7 +133,7 @@
if (isSetDefaultAllowed()) {
setDefaultButton = new Button(entryPage, SWT.PUSH);
- setDefaultButton.setText(BUNDLE.getString("AbstractPagesPreferencePage.2"));
+ setDefaultButton.setText(Messages.getString("AbstractPagesPreferencePage.2"));
GridData gridDataSetDefaultButton = new GridData(GridData.HORIZONTAL_ALIGN_END);
gridDataSetDefaultButton.widthHint = widthHint;
gridDataSetDefaultButton.heightHint=heightHint;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/LibrarySetsPreferencePage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/LibrarySetsPreferencePage.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/LibrarySetsPreferencePage.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -28,7 +28,13 @@
public class LibrarySetsPreferencePage extends PreferencePage implements
IWorkbenchPreferencePage {
public static final String ID = "org.jboss.tools.common.xstudio.libsets";
+ /**
+ * @deprecated use bundle via Messages.getString()
+ */
public static final String BUNDLE_NAME = "preferences";
+ /**
+ * @deprecated use bundle via Messages.getString()
+ */
public static final ResourceBundle BUNDLE = ResourceBundle.getBundle(LibrarySetsPreferencePage.class.getPackage().getName() + "." + BUNDLE_NAME);
String[] librarySets;
LibrarySets helper;
@@ -70,7 +76,7 @@
listLib.setLayoutData(gridDataList);
Button addButtonLib = new Button(entryLib, SWT.PUSH);
- addButtonLib.setText(BUNDLE.getString("LibrarySetsPreferencePage.0"));
+ addButtonLib.setText(Messages.getString("LibrarySetsPreferencePage.0"));
//addButtonLib.setText("Add");
GridData gridDataAddButton = new GridData(GridData.BEGINNING);
gridDataAddButton.widthHint = widthHint;
@@ -78,7 +84,7 @@
addButtonLib.setLayoutData(gridDataAddButton);
removeButtonLib = new Button(entryLib, SWT.PUSH);
- removeButtonLib.setText(BUNDLE.getString("LibrarySetsPreferencePage.1"));
+ removeButtonLib.setText(Messages.getString("LibrarySetsPreferencePage.1"));
GridData gridDataRemoveButton = new GridData(GridData.BEGINNING);
gridDataRemoveButton.widthHint = widthHint;
gridDataRemoveButton.heightHint = heightHint;
@@ -87,7 +93,7 @@
removeButtonLib.setEnabled(false);
Label jarsIncludedLabel = new Label(entryLib, SWT.NONE);
- jarsIncludedLabel.setText(BUNDLE.getString("LibrarySetsPreferencePage.jarsIncluded"));
+ jarsIncludedLabel.setText(Messages.getString("LibrarySetsPreferencePage.jarsIncluded"));
data = new GridData(GridData.FILL_HORIZONTAL);
data.horizontalSpan = 2;
jarsIncludedLabel.setLayoutData(data);
@@ -104,7 +110,7 @@
listLibJar.setLayoutData(gridDatalistLibJar);
addButtonLibJar = new Button(entryLib, SWT.PUSH);
- addButtonLibJar.setText(BUNDLE.getString("LibrarySetsPreferencePage.0"));
+ addButtonLibJar.setText(Messages.getString("LibrarySetsPreferencePage.0"));
GridData gridDataAddButtonLibJar = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gridDataAddButtonLibJar.widthHint = widthHint;
gridDataAddButtonLibJar.heightHint = heightHint;
@@ -112,7 +118,7 @@
addButtonLibJar.setEnabled(false);
removeButtonLibJar = new Button(entryLib, SWT.PUSH);
- removeButtonLibJar.setText(BUNDLE.getString("LibrarySetsPreferencePage.1"));
+ removeButtonLibJar.setText(Messages.getString("LibrarySetsPreferencePage.1"));
GridData gridDataRemoveButtonLibJar = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gridDataRemoveButtonLibJar.widthHint = widthHint;
gridDataRemoveButtonLibJar.heightHint = heightHint;
Added: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/Messages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/Messages.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/Messages.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -0,0 +1,22 @@
+package org.jboss.tools.jst.web.ui.internal.preferences;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.jboss.tools.jst.web.ui.internal.preferences.preferences"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/Messages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/Messages.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/Messages.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -0,0 +1,22 @@
+package org.jboss.tools.jst.web.ui.operation;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.jboss.tools.jst.web.ui.operation.WebProjectCreationOperation"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -15,7 +15,6 @@
import java.io.IOException;
import java.text.MessageFormat;
import java.util.Properties;
-import java.util.ResourceBundle;
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.XMLSerializer;
@@ -23,8 +22,6 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.w3c.dom.Element;
-
import org.jboss.tools.common.model.ServiceDialog;
import org.jboss.tools.common.model.XModelException;
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
@@ -33,8 +30,9 @@
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.model.util.XMLUtil;
import org.jboss.tools.common.util.FileUtil;
-import org.jboss.tools.jst.web.context.*;
+import org.jboss.tools.jst.web.context.IImportWebProjectContext;
import org.jboss.tools.jst.web.ui.WebUiPlugin;
+import org.w3c.dom.Element;
public abstract class WebProjectAdoptOperation extends WebNatureOperation {
protected IImportWebProjectContext context;
@@ -150,9 +148,8 @@
if(dots == null) return true;
ServiceDialog d = PreferenceModelUtilities.getPreferenceModel().getService();
- ResourceBundle bundle = ResourceBundle.getBundle(WebProjectCreationOperation.class.getName());
String message = MessageFormat.format(
- bundle.getString("ADOPT_WILL_OVERWRITE_DOT_FILES_MESSAGE"),new Object[]{dots} //$NON-NLS-1$
+ Messages.getString("ADOPT_WILL_OVERWRITE_DOT_FILES_MESSAGE"),new Object[]{dots} //$NON-NLS-1$
);
int q = d.showDialog("Warning", message, new String[]{"Continue", "Cancel"}, null, ServiceDialog.WARNING);
if(q != 0) return false;
@@ -175,9 +172,8 @@
if(cs == null || cs.length == 0) return true;
ServiceDialog d = PreferenceModelUtilities.getPreferenceModel().getService();
- ResourceBundle bundle = ResourceBundle.getBundle(WebProjectCreationOperation.class.getName());
String message = MessageFormat.format(
- bundle.getString("ADOPT_WILL_CLEAR_WORKSPACE_MESSAGE"),new Object[]{getProject().getName()} //$NON-NLS-1$
+ Messages.getString("ADOPT_WILL_CLEAR_WORKSPACE_MESSAGE"),new Object[]{getProject().getName()} //$NON-NLS-1$
);
int q = d.showDialog("Warning", message, new String[]{"Continue", "Cancel"}, null, ServiceDialog.WARNING);
if(q != 0) return false;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -14,14 +14,12 @@
import java.io.IOException;
import java.text.MessageFormat;
import java.util.Properties;
-import java.util.ResourceBundle;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-
import org.jboss.tools.common.meta.action.XActionInvoker;
import org.jboss.tools.common.model.ServiceDialog;
import org.jboss.tools.common.model.XModel;
@@ -33,9 +31,9 @@
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.project.ProjectHome;
+import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.util.FileUtil;
-import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.jst.web.context.RegisterServerContext;
import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
import org.jboss.tools.jst.web.project.helpers.IWebProjectTemplate;
@@ -98,16 +96,16 @@
IModelNature strutsProject = (IModelNature)getProject().getNature(getNatureID());
model = strutsProject.getModel();
XModelObject fso = FileSystemsHelper.getFileSystems(model);
- properties.setProperty("skipWizard", "yes");
- properties.setProperty("name", getProject().getName());
- XActionInvoker.invoke("CreateStrutsProject", fso, properties);
+ properties.setProperty("skipWizard", "yes"); //$NON-NLS-1$//$NON-NLS-2$
+ properties.setProperty("name", getProject().getName()); //$NON-NLS-1$
+ XActionInvoker.invoke("CreateStrutsProject", fso, properties); //$NON-NLS-1$
- XModelObject web = model.getByPath("Web");
+ XModelObject web = model.getByPath("Web"); //$NON-NLS-1$
if (web != null && properties.containsKey(NewWebProjectContext.ATTR_SERVLET_VERSION))
- model.changeObjectAttribute(web, NewWebProjectContext.ATTR_SERVLET_VERSION, properties.getProperty("servlet version"));
+ model.changeObjectAttribute(web, NewWebProjectContext.ATTR_SERVLET_VERSION, properties.getProperty("servlet version")); //$NON-NLS-1$
XModelObject webxml = WebAppHelper.getWebApp(model);
if(webxml != null) {
- model.changeObjectAttribute(webxml, "display-name", "" + getProject().getName());
+ model.changeObjectAttribute(webxml, "display-name", "" + getProject().getName()); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -119,10 +117,10 @@
protected void copyProjectFile(Properties p) {
String templateFolder = template.getProjectTemplatesLocation(
- getProperty(TEMPLATE_VERSION_ID)) + "/" +
- getProperty(TEMPLATE_ID) + "/";
+ getProperty(TEMPLATE_VERSION_ID)) + "/" + //$NON-NLS-1$
+ getProperty(TEMPLATE_ID) + "/"; //$NON-NLS-1$
File sf = new File(templateFolder + IModelNature.PROJECT_FILE);
- String tf = p.getProperty(NewWebProjectContext.ATTR_LOCATION) + "/" + IModelNature.PROJECT_FILE;
+ String tf = p.getProperty(NewWebProjectContext.ATTR_LOCATION) + "/" + IModelNature.PROJECT_FILE; //$NON-NLS-1$
if(sf.exists()) {
FileUtil.copyFile(sf, new File(tf), true);
projectFile = new File(tf);
@@ -145,8 +143,8 @@
protected String getTemplateLocation() {
String fileName = template.getProjectTemplatesLocation(
- getProperty(TEMPLATE_VERSION_ID)) + "/" +
- getProperty(TEMPLATE_ID) + "/";
+ getProperty(TEMPLATE_VERSION_ID)) + "/" + //$NON-NLS-1$
+ getProperty(TEMPLATE_ID) + "/"; //$NON-NLS-1$
try {
return new File(fileName).getCanonicalPath();
} catch (IOException e) {
@@ -155,9 +153,21 @@
}
}
+ /**
+ * @deprecated use bundle via Messages.getString()
+ */
public static final String WARNING_MESSAGE = "COD_MESSAGE"; //$NON-NLS-1$
+ /**
+ * @deprecated use bundle via Messages.getString()
+ */
public static final String WARNING_TITLE = "COD_TITLE"; //$NON-NLS-1$
+ /**
+ * @deprecated use bundle via Messages.getString()
+ */
public static final String BTN_CANCEL = "BTN_CANCEL"; //$NON-NLS-1$
+ /**
+ * @deprecated use bundle via Messages.getString()
+ */
public static final String BTN_OK = "BTN_OK"; //$NON-NLS-1$
protected boolean checkOverwrite() {
@@ -171,16 +181,15 @@
if(cs != null && cs.length > 0) {
ServiceDialog dlg = PreferenceModelUtilities.getPreferenceModel().getService();
- ResourceBundle bundle = ResourceBundle.getBundle(WebProjectCreationOperation.class.getName());
String message = MessageFormat.format(
- bundle.getString(WARNING_MESSAGE),new Object[]{location}
+ Messages.getString("COD_MESSAGE"),new Object[]{location} //$NON-NLS-1$
);
int selAction = dlg.showDialog(
- bundle.getString(WARNING_TITLE),
+ Messages.getString("COD_TITLE"), //$NON-NLS-1$
message,
- new String[]{bundle.getString(BTN_OK),bundle.getString(BTN_CANCEL)},
+ new String[]{Messages.getString("BTN_OK"),Messages.getString("BTN_CANCEL")}, //$NON-NLS-1$//$NON-NLS-2$
null,
ServiceDialog.WARNING
);
@@ -198,7 +207,7 @@
WebUiPlugin.getPluginLog().logError(e);
}
if(templateModel != null) {
- XModelObject o = FileSystemsHelper.getFileSystem(templateModel, "src");
+ XModelObject o = FileSystemsHelper.getFileSystem(templateModel, "src"); //$NON-NLS-1$
if(o instanceof FileSystemImpl) {
String s = ((FileSystemImpl)o).getAbsoluteLocation();
File f = new File(s);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/messages.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/messages.properties 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/messages.properties 2009-04-07 04:47:20 UTC (rev 14533)
@@ -2,6 +2,9 @@
MappingModel.SourceIsNull=Source is NULL
MappingModel.Target=;Target :
MappingModel.TargetIsNull=;Target is NULL
+# START NON-TRANSLATABLE
+# suspected OBSOLETE
SmooksFileBuilder.NullAnalyzer1=Can not find the Analyzer for SourceID :
SmooksFileBuilder.NullAnalyzer2=\ and the TargetID :
+# END NON-TRANSLATABLE
SmooksFileBuilder.ResourceIsNull=SmooksResource is NULL
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/messages.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/messages.properties 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/messages.properties 2009-04-07 04:47:20 UTC (rev 14533)
@@ -5,8 +5,11 @@
SmooksConfigFileNewWizard.NewConfigFileWizardTitle=New Smooks Configuration File
SmooksConfigFileNewWizard.SourceDataTypeSelectionTitle=Source Data Selection
SmooksConfigFileNewWizard.TargetDataTypeSelectionTitle=Target Data Selection
+# START NON-TRANSLATABLE
+# suspected OBSOLETE
# translators: please ensure the filename still ends in ".smooks"
SmooksConfigFileNewWizardPage.NewConfigFileWizardPageDefaultFileName=newConfig.smooks
+# END NON-TRANSLATABLE
SmooksConfigFileNewWizardPage.NewConfigFileWizardPageDescription=Create a new Smooks configuration file
SmooksConfigFileNewWizardPage.NewConfigFileWizardPageErrorMessage1=File extension must be "smooks"
SmooksConfigFileNewWizardPage.NewConfigFileWizardPageTitle=Smooks Configuration
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/Messages.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/Messages.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/Messages.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -1,6 +1,5 @@
package org.jboss.tools.smooks.utils;
-import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
@@ -21,7 +20,4 @@
}
}
- public static String getString(String key, Object... args) {
- return MessageFormat.format(getString(key), args);
- }
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -23,6 +23,7 @@
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Shell;
@@ -146,8 +147,8 @@
if (selector.indexOf(splitString) != -1) {
throw new InvocationTargetException(
new Exception(
- Messages
- .getString("UIUtils.SelectorCheckErrorMessage", //$NON-NLS-1$
+ NLS.bind(Messages
+ .getString("UIUtils.SelectorCheckErrorMessage"), //$NON-NLS-1$
splitString,
selector)));
}
@@ -276,8 +277,8 @@
context);
compositeCommand.setResolveDescription(Messages
.getString("UIUtils.ConnectAllConnections")); //$NON-NLS-1$
- disconnectCommand.setResolveDescription(Messages
- .getString("UIUtils.DisconnectAllConnections", //$NON-NLS-1$
+ disconnectCommand.setResolveDescription(NLS.bind(Messages
+ .getString("UIUtils.DisconnectAllConnections"), //$NON-NLS-1$
currentNode.getName()));
AbstractStructuredDataModel targetNode = UIUtils.findGraphModel(root,
currentNode);
@@ -303,8 +304,8 @@
if (tempMap.get(sourceParentNode) == null) {
JavaModelConnectionResolveCommand connectParent = new JavaModelConnectionResolveCommand(
context);
- String desc = Messages
- .getString("UIUtils.ConnectNode", //$NON-NLS-1$
+ String desc = NLS.bind(Messages
+ .getString("UIUtils.ConnectNode"), //$NON-NLS-1$
context.getSourceViewerLabelProvider().getText(
sourceParent),
parentNode.getName());
@@ -350,8 +351,8 @@
if (pgm != null && pgm instanceof IConnectableModel) {
if (((IConnectableModel) pgm)
.getModelTargetConnections().isEmpty()) {
- String errorMessage = Messages
- .getString("UIUtils.ParentNodeConnectErrorMessage", //$NON-NLS-1$
+ String errorMessage = NLS.bind(Messages
+ .getString("UIUtils.ParentNodeConnectErrorMessage"), //$NON-NLS-1$
javaModel.getName(),
parent.getName());
DesignTimeAnalyzeResult dr = new DesignTimeAnalyzeResult();
@@ -397,15 +398,15 @@
if (instanceClazz == null) {
DesignTimeAnalyzeResult result = new DesignTimeAnalyzeResult();
result
- .setErrorMessage(Messages
- .getString("UIUtils.InstanceLoadedErrorMessage", //$NON-NLS-1$
+ .setErrorMessage(NLS.bind(Messages
+ .getString("UIUtils.InstanceLoadedErrorMessage"), //$NON-NLS-1$
((JavaBeanModel) refObj).getName(),
instanceName));
JavaModelResolveCommand command = new JavaModelResolveCommand(
context);
command
- .setResolveDescription(Messages
- .getString("UIUtils.InstanceLoadedResolveMessage", //$NON-NLS-1$
+ .setResolveDescription(NLS.bind(Messages
+ .getString("UIUtils.InstanceLoadedResolveMessage"), //$NON-NLS-1$
instanceName));
command.setInstanceName(instanceName);
command.setJavaBean((JavaBeanModel) refObj);
@@ -415,8 +416,8 @@
if (instanceClazz != null && instanceClazz.isInterface()) {
DesignTimeAnalyzeResult result = new DesignTimeAnalyzeResult();
result
- .setErrorMessage(Messages
- .getString("UIUtils.JavaModelLoadedErrorMessage", //$NON-NLS-1$
+ .setErrorMessage(NLS.bind(Messages
+ .getString("UIUtils.JavaModelLoadedErrorMessage"), //$NON-NLS-1$
((JavaBeanModel) refObj).getName(),
instanceName));
if (List.class.isAssignableFrom(instanceClazz)) {
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionAttrForwardBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionAttrForwardBreakpoint.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionAttrForwardBreakpoint.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -25,10 +25,9 @@
private static IActionConditionBreakpointManager actionConditionBreakpointManager = new ActionConditionBreakpointManager();
- private static final String BREAKPOINT_CLASS_NAME = "org.apache.struts.action.RequestProcessor";
- private static final String BREAKPOINT_METHOD_NAME = "processForward";
- private static final String BREAKPOINT_METHOD_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/apache/struts/action/ActionMapping;)Z";
- private static final String BREAKPOINT_LABEL_TEXT_KEY = "ActionForwardBreakpoint.name";
+ private static final String BREAKPOINT_CLASS_NAME = "org.apache.struts.action.RequestProcessor"; //$NON-NLS-1$
+ private static final String BREAKPOINT_METHOD_NAME = "processForward"; //$NON-NLS-1$
+ private static final String BREAKPOINT_METHOD_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/apache/struts/action/ActionMapping;)Z"; //$NON-NLS-1$
public ActionAttrForwardBreakpoint() {
}
@@ -51,16 +50,16 @@
}
protected String getForwardName() throws CoreException {
- return ensureMarker().getAttribute(ATTR_FORWARD_NAME, "");
+ return ensureMarker().getAttribute(ATTR_FORWARD_NAME, ""); //$NON-NLS-1$
}
protected String getActionMappingPath() throws CoreException {
- return ensureMarker().getAttribute(ActionBreakpoint.ATTR_ACTION_MAPPING_PATH, "");
+ return ensureMarker().getAttribute(ActionBreakpoint.ATTR_ACTION_MAPPING_PATH, ""); //$NON-NLS-1$
}
public String getLabelText() {
try {
- return DebugMessages.getString(BREAKPOINT_LABEL_TEXT_KEY, new String[]{getMarker().getResource().getName(), getActionMappingPath(), getForwardName()});
+ return DebugMessages.getString("ActionForwardBreakpoint.name", new String[]{getMarker().getResource().getName(), getActionMappingPath(), getForwardName()}); //$NON-NLS-1$
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionConditionBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionConditionBreakpoint.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionConditionBreakpoint.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -42,7 +42,7 @@
*/
public abstract class ActionConditionBreakpoint extends ActionBreakpoint {
- private static final String ACTION_CONDITION_BREAKPOINT_MANAGER = "org.jboss.tools.struts.debug.actionConditionBreakpointManager";
+ private static final String ACTION_CONDITION_BREAKPOINT_MANAGER = "org.jboss.tools.struts.debug.actionConditionBreakpointManager"; //$NON-NLS-1$
private static boolean suspend = false;
protected Map fSuspendEvents = new HashMap();
@@ -126,7 +126,7 @@
return true;
}
if (thread.isPerformingEvaluation()) {
- StrutsDebugPlugin.log("Thread alraedy is performing evaluation.");
+ StrutsDebugPlugin.log("Thread is already performing evaluation.");
// If an evaluation is already being computed for this thread,
// we can't perform another
return !suspendForEvent(event, thread);
@@ -157,7 +157,7 @@
IJavaProject project = getJavaProject();
IAstEvaluationEngine engine = getEvaluationEngine(target, project);
if (project == null) {
- StrutsDebugPlugin.log("Struts debbuger: Java project is NULL!!!");
+ StrutsDebugPlugin.log("Struts debugger: Java project is NULL!!!");
return threadResumeQuiet(jdiThread);
}
if (engine == null) {
@@ -218,7 +218,7 @@
// Suspend when the condition evaluates true
IJavaPrimitiveValue javaValue = (IJavaPrimitiveValue)value;
if (isConditionSuspendOnTrue()) {
- if (javaValue.getJavaType().getName().equals("boolean") && javaValue.getBooleanValue()) {
+ if (javaValue.getJavaType().getName().equals("boolean") && javaValue.getBooleanValue()) { //$NON-NLS-1$
suspendForCondition(event, thread);
getActionConditionBreakpointManager().setStopHandleBreakpoints(true);
return;
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionEnterBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionEnterBreakpoint.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionEnterBreakpoint.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -19,11 +19,9 @@
public class ActionEnterBreakpoint extends ActionBreakpoint {
- public static final String BREAKPOINT_METHOD_NAME = "execute";
- public static final String BREAKPOINT_METHOD_SIGNATURE = "(Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/apache/struts/action/ActionForward;";
+ public static final String BREAKPOINT_METHOD_NAME = "execute"; //$NON-NLS-1$
+ public static final String BREAKPOINT_METHOD_SIGNATURE = "(Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/apache/struts/action/ActionForward;"; //$NON-NLS-1$
- private static final String BREAKPOINT_LABEL_TEXT_KEY = "ActionEnterBreakpoint.name";
-
public ActionEnterBreakpoint() {
}
@@ -36,16 +34,16 @@
}
protected String getActionMappingPath() throws CoreException {
- return ensureMarker().getAttribute(ActionBreakpoint.ATTR_ACTION_MAPPING_PATH, "");
+ return ensureMarker().getAttribute(ActionBreakpoint.ATTR_ACTION_MAPPING_PATH, ""); //$NON-NLS-1$
}
protected String getActionTypeName() throws CoreException {
- return ensureMarker().getAttribute(ATTR_ACTION_TYPE_NAME, "");
+ return ensureMarker().getAttribute(ATTR_ACTION_TYPE_NAME, ""); //$NON-NLS-1$
}
public String getLabelText() {
try {
- return DebugMessages.getString(BREAKPOINT_LABEL_TEXT_KEY, new String[]{getMarker().getResource().getName(), getActionMappingPath()});
+ return DebugMessages.getString("ActionEnterBreakpoint.name", new String[]{getMarker().getResource().getName(), getActionMappingPath()}); //$NON-NLS-1$
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionExceptionBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionExceptionBreakpoint.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionExceptionBreakpoint.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -22,10 +22,9 @@
private static IActionConditionBreakpointManager actionConditionBreakpointManager = new ActionConditionBreakpointManager();
- private static final String BREAKPOINT_CLASS_NAME = "org.apache.struts.action.RequestProcessor";
- private static final String BREAKPOINT_METHOD_NAME = "processException";
- private static final String BREAKPOINT_METHOD_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/Exception;Lorg/apache/struts/action/ActionForm;Lorg/apache/struts/action/ActionMapping;)Lorg/apache/struts/action/ActionForward;";
- private static final String BREAKPOINT_LABEL_TEXT_KEY = "ActionExceptionBreakpoint.name";
+ private static final String BREAKPOINT_CLASS_NAME = "org.apache.struts.action.RequestProcessor"; //$NON-NLS-1$
+ private static final String BREAKPOINT_METHOD_NAME = "processException"; //$NON-NLS-1$
+ private static final String BREAKPOINT_METHOD_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/Exception;Lorg/apache/struts/action/ActionForm;Lorg/apache/struts/action/ActionMapping;)Lorg/apache/struts/action/ActionForward;"; //$NON-NLS-1$
public ActionExceptionBreakpoint() {
}
@@ -51,20 +50,20 @@
}
public String getActionTypeName() throws CoreException {
- return ensureMarker().getAttribute(ATTR_ACTION_TYPE_NAME, "");
+ return ensureMarker().getAttribute(ATTR_ACTION_TYPE_NAME, ""); //$NON-NLS-1$
}
public String getExceptionTypeName() throws CoreException {
- return ensureMarker().getAttribute(ATTR_EXCEPTION_TYPE_NAME, "");
+ return ensureMarker().getAttribute(ATTR_EXCEPTION_TYPE_NAME, ""); //$NON-NLS-1$
}
protected String getActionMappingPath() throws CoreException {
- return ensureMarker().getAttribute(ActionBreakpoint.ATTR_ACTION_MAPPING_PATH, "");
+ return ensureMarker().getAttribute(ActionBreakpoint.ATTR_ACTION_MAPPING_PATH, ""); //$NON-NLS-1$
}
public String getLabelText() {
try {
- return DebugMessages.getString(BREAKPOINT_LABEL_TEXT_KEY, new String[]{getMarker().getResource().getName(), getActionMappingPath(), getExceptionTypeName()});
+ return DebugMessages.getString("ActionExceptionBreakpoint.name", new String[]{getMarker().getResource().getName(), getActionMappingPath(), getExceptionTypeName()}); //$NON-NLS-1$
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormBreakpoint.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormBreakpoint.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -25,7 +25,7 @@
*/
public abstract class ActionFormBreakpoint extends ActionConditionBreakpoint {
- private static final String BREAKPOINT_CLASS_NAME = "org.apache.struts.action.RequestProcessor";
+ private static final String BREAKPOINT_CLASS_NAME = "org.apache.struts.action.RequestProcessor"; //$NON-NLS-1$
public ActionFormBreakpoint() {
}
@@ -36,7 +36,7 @@
protected JDIStackFrame computeNewStackFrame(JDIThread jdiThread) throws DebugException {
JDIStackFrame frame = (JDIStackFrame)jdiThread.computeNewStackFrames().get(1);
- if("process".equals(frame.getMethodName())) {
+ if("process".equals(frame.getMethodName())) { //$NON-NLS-1$
return frame;
}
return null;
@@ -48,6 +48,6 @@
}
protected String getActionMappingPath() throws CoreException {
- return ensureMarker().getAttribute(ActionBreakpoint.ATTR_ACTION_MAPPING_PATH, "");
+ return ensureMarker().getAttribute(ActionBreakpoint.ATTR_ACTION_MAPPING_PATH, ""); //$NON-NLS-1$
}
}
\ No newline at end of file
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormPopulateBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormPopulateBreakpoint.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormPopulateBreakpoint.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -24,9 +24,8 @@
private static IActionConditionBreakpointManager actionConditionBreakpointManager = new ActionConditionBreakpointManager();
- private static final String BREAKPOINT_METHOD_NAME = "processPopulate";
- private static final String BREAKPOINT_METHOD_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/apache/struts/action/ActionForm;Lorg/apache/struts/action/ActionMapping;)V";
- private static final String BREAKPOINT_LABEL_TEXT_KEY = "ActionFormPopulateBreakpoint.name";
+ private static final String BREAKPOINT_METHOD_NAME = "processPopulate"; //$NON-NLS-1$
+ private static final String BREAKPOINT_METHOD_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/apache/struts/action/ActionForm;Lorg/apache/struts/action/ActionMapping;)V"; //$NON-NLS-1$
public ActionFormPopulateBreakpoint() {
}
@@ -45,7 +44,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString(BREAKPOINT_LABEL_TEXT_KEY, new String[]{getMarker().getResource().getName(), getActionMappingPath()});
+ return DebugMessages.getString("ActionFormPopulateBreakpoint.name", new String[]{getMarker().getResource().getName(), getActionMappingPath()}); //$NON-NLS-1$
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormValidateBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormValidateBreakpoint.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionFormValidateBreakpoint.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -24,10 +24,8 @@
private static IActionConditionBreakpointManager actionConditionBreakpointManager = new ActionConditionBreakpointManager();
- private static final String BREAKPOINT_METHOD_NAME = "processValidate";
- private static final String BREAKPOINT_METHOD_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/apache/struts/action/ActionForm;Lorg/apache/struts/action/ActionMapping;)Z";
- private static final String BREAKPOINT_LABEL_TEXT_KEY = "ActionFormValidateBreakpoint.name";
-
+ private static final String BREAKPOINT_METHOD_NAME = "processValidate"; //$NON-NLS-1$
+ private static final String BREAKPOINT_METHOD_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/apache/struts/action/ActionForm;Lorg/apache/struts/action/ActionMapping;)Z"; //$NON-NLS-1$
public ActionFormValidateBreakpoint() {
}
@@ -45,7 +43,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString(BREAKPOINT_LABEL_TEXT_KEY, new String[]{getMarker().getResource().getName(), getActionMappingPath()});
+ return DebugMessages.getString("ActionFormValidateBreakpoint.name", new String[]{getMarker().getResource().getName(), getActionMappingPath()}); //$NON-NLS-1$
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionForwardBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionForwardBreakpoint.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionForwardBreakpoint.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -26,10 +26,9 @@
private static IActionConditionBreakpointManager actionConditionBreakpointManager = new ActionConditionBreakpointManager();
- private static final String BREAKPOINT_CLASS_NAME = "org.apache.struts.action.RequestProcessor";
- private static final String BREAKPOINT_METHOD_NAME = "processForwardConfig";
- private static final String BREAKPOINT_METHOD_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/apache/struts/config/ForwardConfig;)V";
- private static final String BREAKPOINT_LABEL_TEXT_KEY = "ActionForwardBreakpoint.name";
+ private static final String BREAKPOINT_CLASS_NAME = "org.apache.struts.action.RequestProcessor"; //$NON-NLS-1$
+ private static final String BREAKPOINT_METHOD_NAME = "processForwardConfig"; //$NON-NLS-1$
+ private static final String BREAKPOINT_METHOD_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/apache/struts/config/ForwardConfig;)V"; //$NON-NLS-1$
public ActionForwardBreakpoint() {
}
@@ -58,13 +57,13 @@
protected JDIStackFrame computeNewStackFrame(JDIThread jdiThread) throws DebugException {
List frames = jdiThread.computeNewStackFrames();
JDIStackFrame frame = (JDIStackFrame)frames.get(1);
- if("process".equals(frame.getMethodName())) {
+ if("process".equals(frame.getMethodName())) { //$NON-NLS-1$
// RequestProcessor
return frame;
- } else if ("processForwardConfig".equals(frame.getMethodName())) {
+ } else if ("processForwardConfig".equals(frame.getMethodName())) { //$NON-NLS-1$
// TilesRequestProcessor
frame = (JDIStackFrame)frames.get(2);
- if("process".equals(frame.getMethodName())) {
+ if("process".equals(frame.getMethodName())) { //$NON-NLS-1$
// RequestProcessor
return frame;
}
@@ -73,20 +72,20 @@
}
protected String getActionTypeName() throws CoreException {
- return ensureMarker().getAttribute(ATTR_ACTION_TYPE_NAME, "");
+ return ensureMarker().getAttribute(ATTR_ACTION_TYPE_NAME, ""); //$NON-NLS-1$
}
protected String getForwardName() throws CoreException {
- return ensureMarker().getAttribute(ATTR_FORWARD_NAME, "");
+ return ensureMarker().getAttribute(ATTR_FORWARD_NAME, ""); //$NON-NLS-1$
}
protected String getActionMappingPath() throws CoreException {
- return ensureMarker().getAttribute(ActionBreakpoint.ATTR_ACTION_MAPPING_PATH, "");
+ return ensureMarker().getAttribute(ActionBreakpoint.ATTR_ACTION_MAPPING_PATH, ""); //$NON-NLS-1$
}
public String getLabelText() {
try {
- return DebugMessages.getString(BREAKPOINT_LABEL_TEXT_KEY, new String[]{getMarker().getResource().getName(), getActionMappingPath(), getForwardName()});
+ return DebugMessages.getString("ActionForwardBreakpoint.name", new String[]{getMarker().getResource().getName(), getActionMappingPath(), getForwardName()}); //$NON-NLS-1$
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionIncludeBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionIncludeBreakpoint.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionIncludeBreakpoint.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -25,11 +25,9 @@
private static IActionConditionBreakpointManager actionConditionBreakpointManager = new ActionConditionBreakpointManager();
- private static final String BREAKPOINT_CLASS_NAME = "org.apache.struts.action.RequestProcessor";
- private static final String BREAKPOINT_METHOD_NAME = "processForward";
- private static final String BREAKPOINT_METHOD_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/apache/struts/action/ActionMapping;)Z";
- private static final String BREAKPOINT_LABEL_TEXT_KEY = "ActionIncludeBreakpoint.name";
-
+ private static final String BREAKPOINT_CLASS_NAME = "org.apache.struts.action.RequestProcessor"; //$NON-NLS-1$
+ private static final String BREAKPOINT_METHOD_NAME = "processForward"; //$NON-NLS-1$
+ private static final String BREAKPOINT_METHOD_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/apache/struts/action/ActionMapping;)Z"; //$NON-NLS-1$
public ActionIncludeBreakpoint() {
}
@@ -51,16 +49,16 @@
}
protected String getIncludeName() throws CoreException {
- return ensureMarker().getAttribute(ATTR_INCLUDE_NAME, "");
+ return ensureMarker().getAttribute(ATTR_INCLUDE_NAME, ""); //$NON-NLS-1$
}
protected String getActionMappingPath() throws CoreException {
- return ensureMarker().getAttribute(ActionBreakpoint.ATTR_ACTION_MAPPING_PATH, "");
+ return ensureMarker().getAttribute(ActionBreakpoint.ATTR_ACTION_MAPPING_PATH, ""); //$NON-NLS-1$
}
public String getLabelText() {
try {
- return DebugMessages.getString(BREAKPOINT_LABEL_TEXT_KEY, new String[]{getMarker().getResource().getName(), getActionMappingPath(), getIncludeName()});
+ return DebugMessages.getString("ActionIncludeBreakpoint.name", new String[]{getMarker().getResource().getName(), getActionMappingPath(), getIncludeName()}); //$NON-NLS-1$
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionTilesDefinitionForwardBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionTilesDefinitionForwardBreakpoint.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionTilesDefinitionForwardBreakpoint.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -28,10 +28,9 @@
private static IActionConditionBreakpointManager actionConditionBreakpointManager = new ActionConditionBreakpointManager();
- private static final String BREAKPOINT_CLASS_NAME = "org.apache.struts.tiles.TilesRequestProcessor";
- private static final String BREAKPOINT_METHOD_NAME = "processTilesDefinition";
- private static final String BREAKPOINT_METHOD_SIGNATURE = "(Ljava/lang/String;ZLjavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Z";
- private static final String BREAKPOINT_LABEL_TEXT_KEY = "ActionTilesDefinitionForwardBreakpoint.name";
+ private static final String BREAKPOINT_CLASS_NAME = "org.apache.struts.tiles.TilesRequestProcessor"; //$NON-NLS-1$
+ private static final String BREAKPOINT_METHOD_NAME = "processTilesDefinition"; //$NON-NLS-1$
+ private static final String BREAKPOINT_METHOD_SIGNATURE = "(Ljava/lang/String;ZLjavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Z"; //$NON-NLS-1$
public ActionTilesDefinitionForwardBreakpoint() {
}
@@ -51,7 +50,7 @@
protected JDIStackFrame computeNewStackFrame(JDIThread jdiThread) throws DebugException {
List frames = jdiThread.computeNewStackFrames();
JDIStackFrame frame = (JDIStackFrame)frames.get(2);
- if("process".equals(frame.getMethodName())) {
+ if("process".equals(frame.getMethodName())) { //$NON-NLS-1$
// RequestProcessor
return frame;
}
@@ -60,7 +59,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString(BREAKPOINT_LABEL_TEXT_KEY, new String[]{getMarker().getResource().getName(), getActionMappingPath(), getForwardName()});
+ return DebugMessages.getString("ActionTilesDefinitionForwardBreakpoint.name", new String[]{getMarker().getResource().getName(), getActionMappingPath(), getForwardName()}); //$NON-NLS-1$
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/GlobalExceptionBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/GlobalExceptionBreakpoint.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/GlobalExceptionBreakpoint.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -20,7 +20,6 @@
public class GlobalExceptionBreakpoint extends ActionExceptionBreakpoint {
- private static final String BREAKPOINT_LABEL_TEXT_KEY = "GlobalExceptionBreakpoint.name";
public GlobalExceptionBreakpoint() {
}
@@ -43,7 +42,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString(BREAKPOINT_LABEL_TEXT_KEY, new String[]{getMarker().getResource().getName(), getExceptionTypeName()});
+ return DebugMessages.getString("GlobalExceptionBreakpoint.name", new String[]{getMarker().getResource().getName(), getExceptionTypeName()}); //$NON-NLS-1$
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/GlobalForwardBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/GlobalForwardBreakpoint.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/GlobalForwardBreakpoint.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -20,8 +20,6 @@
public class GlobalForwardBreakpoint extends ActionForwardBreakpoint {
- private static final String BREAKPOINT_LABEL_TEXT_KEY = "GlobalForwardBreakpoint.name";
-
public GlobalForwardBreakpoint(){
}
@@ -40,7 +38,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString(BREAKPOINT_LABEL_TEXT_KEY, new String[]{getMarker().getResource().getName(), getForwardName()});
+ return DebugMessages.getString("GlobalForwardBreakpoint.name", new String[]{getMarker().getResource().getName(), getForwardName()}); //$NON-NLS-1$
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/PageEnterBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/PageEnterBreakpoint.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/PageEnterBreakpoint.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -20,8 +20,6 @@
public class PageEnterBreakpoint extends JspLineBreakpoint {
- private static final String BREAKPOINT_LABEL_TEXT_KEY = "PageEnterBreakpoint.name";
-
public PageEnterBreakpoint() throws CoreException {
}
@@ -31,7 +29,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString(BREAKPOINT_LABEL_TEXT_KEY, new String[]{getPattern()});
+ return DebugMessages.getString("PageEnterBreakpoint.name", new String[]{getPattern()}); //$NON-NLS-1$
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/TilesDefinitionGlobalForwardBreakpoint.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/TilesDefinitionGlobalForwardBreakpoint.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/TilesDefinitionGlobalForwardBreakpoint.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -23,8 +23,6 @@
*/
public class TilesDefinitionGlobalForwardBreakpoint extends ActionTilesDefinitionForwardBreakpoint {
- private static final String BREAKPOINT_LABEL_TEXT_KEY = "TilesDefinitionGlobalForwardBreakpoint.name";
-
public TilesDefinitionGlobalForwardBreakpoint(){
}
@@ -43,7 +41,7 @@
public String getLabelText() {
try {
- return DebugMessages.getString(BREAKPOINT_LABEL_TEXT_KEY, new String[]{getMarker().getResource().getName(), getForwardName()});
+ return DebugMessages.getString("TilesDefinitionGlobalForwardBreakpoint.name", new String[]{getMarker().getResource().getName(), getForwardName()}); //$NON-NLS-1$
} catch (CoreException e) {
StrutsDebugPlugin.log(e);
return "error";
Modified: trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/preferences/AutomationPreferencePage.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/preferences/AutomationPreferencePage.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/preferences/AutomationPreferencePage.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -10,8 +10,6 @@
******************************************************************************/
package org.jboss.tools.struts.ui.preferences;
-import java.util.ResourceBundle;
-
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
@@ -40,11 +38,9 @@
protected Control createContents(Composite parent) {
noDefaultAndApplyButton();
StyledText newControl = new StyledText(parent,SWT.WRAP);
- newControl.setText(ResourceBundle.getBundle(this.getClass().getPackage().getName()+".preferences").getString("AUTOMATION_PD"));
+ newControl.setText(Messages.getString("AUTOMATION_PD")); //$NON-NLS-1$
newControl.setBackground(parent.getBackground());
newControl.setEditable(false);
return newControl;
-
-
}
}
Added: trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/preferences/Messages.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/preferences/Messages.java (rev 0)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/preferences/Messages.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -0,0 +1,22 @@
+package org.jboss.tools.struts.ui.preferences;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.jboss.tools.struts.ui.preferences.preferences"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
Modified: trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/preferences/StrutsStudioPreferencesPage.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/preferences/StrutsStudioPreferencesPage.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/preferences/StrutsStudioPreferencesPage.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -17,8 +17,9 @@
*/
public class StrutsStudioPreferencesPage extends CompanyPreferencesPage {
- protected String getKey() {
- return "XSTUDIO_PD";
+ @Override
+ protected String getPrefsName() {
+ return Messages.getString("XSTUDIO_PD"); //$NON-NLS-1$
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/Messages.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/Messages.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/Messages.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -10,25 +10,30 @@
******************************************************************************/
package org.jboss.tools.vpe.ui.palette;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
+import java.lang.reflect.Field;
+/**
+ * @deprecated use the fields of PaletteUIMessages instead
+ */
public class Messages {
- private static final String BUNDLE_NAME = "org.jboss.tools.vpe.ui.palette.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
private Messages() {
}
-
- public static String getString(String key) {
- // TODO Auto-generated method stub
+
+ /**
+ * Gets a resource string by field name. This is useful when the field name
+ * is constructed ad hoc.
+ *
+ * @param fieldName
+ * @return
+ */
+ public static String getString(String fieldName) {
+ Class c = PaletteUIMessages.class;
try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
+ Field field = c.getDeclaredField(fieldName);
+ return (String) field.get(null);
+ } catch (Exception e) {
PalettePlugin.getPluginLog().logError(e);
- return '!' + key + '!';
+ return "!" + fieldName + "!"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteUIMessages.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteUIMessages.java 2009-04-07 04:30:28 UTC (rev 14532)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteUIMessages.java 2009-04-07 04:47:20 UTC (rev 14533)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.vpe.ui.palette;
+import java.util.ResourceBundle;
+
import org.eclipse.osgi.util.NLS;
@@ -25,4 +27,15 @@
public static String SHOW_HIDE;
public static String IMPORT_TLD;
public static String IMPORT;
+
+ private PaletteUIMessages() {
+ }
+
+ /**
+ * @deprecated use the fields of PaletteUIMessages instead
+ */
+ static final ResourceBundle getBundle() {
+ return ResourceBundle.getBundle(BUNDLE_NAME);
+ }
+
}
15 years, 8 months
JBoss Tools SVN: r14532 - workspace/dart/smooksConfigurationsEditor.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-04-07 00:30:28 -0400 (Tue, 07 Apr 2009)
New Revision: 14532
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/
Removed:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/
Log:
Copied: workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui (from rev 14531, workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration)
15 years, 8 months
JBoss Tools SVN: r14531 - in workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration: META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-04-07 00:27:32 -0400 (Tue, 07 Apr 2009)
New Revision: 14531
Modified:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/.project
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/META-INF/MANIFEST.MF
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/plugin.properties
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/src/org/jboss/tools/smooks/configuration/SmooksConfigurationActivator.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java
Log:
Modified: workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/.project
===================================================================
--- workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/.project 2009-04-07 03:23:33 UTC (rev 14530)
+++ workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/.project 2009-04-07 04:27:32 UTC (rev 14531)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.jboss.tools.smooks.configuration</name>
+ <name>org.jboss.tools.smooks.ui</name>
<comment></comment>
<projects>
</projects>
Modified: workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/META-INF/MANIFEST.MF
===================================================================
--- workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/META-INF/MANIFEST.MF 2009-04-07 03:23:33 UTC (rev 14530)
+++ workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/META-INF/MANIFEST.MF 2009-04-07 04:27:32 UTC (rev 14531)
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Configuration Plug-in
-Bundle-SymbolicName: org.jboss.tools.smooks.configuration; singleton:=true
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.jboss.tools.smooks.ui;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: org.jboss.tools.smooks.configuration.SmooksConfigurationActivator
Require-Bundle: org.eclipse.ui,
@@ -11,13 +11,12 @@
org.eclipse.ui.editors,
org.eclipse.ui.ide,
org.jboss.tools.smooks.core;bundle-version="1.0.0",
- org.jboss.tools.smooks11.model;bundle-version="1.0.0",
org.eclipse.ui.forms,
org.eclipse.wst.sse.core,
org.eclipse.wst.sse.ui,
org.eclipse.emf;bundle-version="2.4.0",
org.eclipse.emf.edit;bundle-version="2.4.2",
- org.eclipse.emf.edit.ui;bundle-version="2.4.2",
- org.jboss.tools.smooks.model.edit;bundle-version="1.0.0"
+ org.eclipse.emf.edit.ui;bundle-version="2.4.2"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %providerName
Modified: workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/plugin.properties
===================================================================
--- workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/plugin.properties 2009-04-07 03:23:33 UTC (rev 14530)
+++ workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/plugin.properties 2009-04-07 04:27:32 UTC (rev 14531)
@@ -4,8 +4,8 @@
#
# $Id$
-pluginName = Edi-message-mapping-1 Editor
-providerName = www.example.org
+pluginName = Smooks Tools
+providerName = JBoss, a division of Red Hat
_UI_EdiEditor_menu = &Edi Editor
_UI_CommonEditor_menu = &Common Editor
Modified: workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/src/org/jboss/tools/smooks/configuration/SmooksConfigurationActivator.java
===================================================================
--- workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/src/org/jboss/tools/smooks/configuration/SmooksConfigurationActivator.java 2009-04-07 03:23:33 UTC (rev 14530)
+++ workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/src/org/jboss/tools/smooks/configuration/SmooksConfigurationActivator.java 2009-04-07 04:27:32 UTC (rev 14531)
@@ -11,7 +11,7 @@
public class SmooksConfigurationActivator extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.tools.smooks.configuration";
+ public static final String PLUGIN_ID = "org.jboss.tools.smooks.ui";
// The shared instance
private static SmooksConfigurationActivator plugin;
Modified: workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java
===================================================================
--- workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java 2009-04-07 03:23:33 UTC (rev 14530)
+++ workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java 2009-04-07 04:27:32 UTC (rev 14531)
@@ -53,12 +53,12 @@
import org.eclipse.ui.views.properties.PropertySheetPage;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
-import org.jboss.tools.smooks.model.util.SmooksResourceFactoryImpl;
+import org.jboss.tools.smooks.edit.common.provider.CommonItemProviderAdapterFactory;
+import org.jboss.tools.smooks.edit.smooks.provider.SmooksItemProviderAdapterFactory;
+import org.jboss.tools.smooks.edit.xsl.provider.XslItemProviderAdapterFactory;
+import org.jboss.tools.smooks10.model.smooks.util.SmooksResourceFactoryImpl;
-import smooks.provider.SmooksItemProviderAdapterFactory;
-import xsl.provider.XslItemProviderAdapterFactory;
-import common.provider.CommonItemProviderAdapterFactory;
/**
*
15 years, 8 months