[138734] Hardcoded English in XDoclet support
diff --git a/plugins/org.eclipse.jst.j2ee.ejb.annotations.ui/src/org/eclipse/jst/j2ee/ejb/annotation/ui/internal/cmp/wizards/ChooseTableWizardPage.java b/plugins/org.eclipse.jst.j2ee.ejb.annotations.ui/src/org/eclipse/jst/j2ee/ejb/annotation/ui/internal/cmp/wizards/ChooseTableWizardPage.java
index e8a8622..c525abf 100644
--- a/plugins/org.eclipse.jst.j2ee.ejb.annotations.ui/src/org/eclipse/jst/j2ee/ejb/annotation/ui/internal/cmp/wizards/ChooseTableWizardPage.java
+++ b/plugins/org.eclipse.jst.j2ee.ejb.annotations.ui/src/org/eclipse/jst/j2ee/ejb/annotation/ui/internal/cmp/wizards/ChooseTableWizardPage.java
@@ -608,6 +608,10 @@
fieldMapping.setJdbcType(CMPUtils.jdbcTypes[((Integer) value).intValue()]);
break;
case 4:
+ String sqlType = sqlTypes[((Integer) value).intValue()];
+ //Ugly fix - if the sql type is used to create/alter a table need some size
+ if("VARCHAR".equals(sqlType))
+ sqlType += "(255)";
fieldMapping.setSqlType(sqlTypes[((Integer) value).intValue()]);
break;
case 5:
diff --git a/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/XDocletRuntime.java b/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/XDocletRuntime.java
index b9d9b51..fdf45bb 100644
--- a/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/XDocletRuntime.java
+++ b/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/XDocletRuntime.java
@@ -26,6 +26,7 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jst.j2ee.ejb.annotations.internal.xdoclet.ui.Messages;
public class XDocletRuntime {
@@ -142,7 +143,7 @@
if (vLibs == null)
errors.add(new Status(IStatus.ERROR,
XDocletAnnotationPlugin.PLUGINID, 0,
- "Could not find library for version: " + version, null));
+ Messages.error_message_no_lib+ version, null));
else {
for (int i = 0; i < vLibs.length; i++) {
String jar = vLibs[i];
@@ -157,7 +158,7 @@
if (!libFile.exists() && !libFile2.exists())
errors.add(new Status(IStatus.ERROR,
XDocletAnnotationPlugin.PLUGINID, 0,
- "Could not find library: " + jar, null));
+ Messages.error_message_no_lib + jar, null));
}
}
return (IStatus[]) errors.toArray(new IStatus[errors.size()]);
diff --git a/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/ui/AttributesDecorator.java b/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/ui/AttributesDecorator.java
index 49a5a03..aa38306 100644
--- a/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/ui/AttributesDecorator.java
+++ b/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/ui/AttributesDecorator.java
@@ -52,7 +52,7 @@
public void decorate(final Composite composite) {
Group attributes = new Group(composite, SWT.NONE);
- attributes.setText("Attributes " + tag.getAttribute("name"));
+ attributes.setText(Messages.label_attributes + " "+ tag.getAttribute("name"));
attributes.setToolTipText(tag.getAttribute("description"));
GridLayout layout = new GridLayout(6, false);
@@ -76,7 +76,7 @@
// attributeGroup.setLayoutData(gridData);
createAttributeControl(attributes, attribute);
String includeId = attribute.getAttribute("id") + ".include";
- Button bool = createLabeledCheck("include", preferenceStore.getBooleanPropertyNoGlobal(includeId), attributes);
+ Button bool = createLabeledCheck(Messages.label_include, preferenceStore.getBooleanPropertyNoGlobal(includeId), attributes);
bool.setData(attribute);
allProperties.put(includeId, bool);
bool.addSelectionListener(new SelectionListener() {
diff --git a/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/ui/Messages.java b/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/ui/Messages.java
index fd8d293..8417c7c 100644
--- a/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/ui/Messages.java
+++ b/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/ui/Messages.java
@@ -31,6 +31,13 @@
public static String label_global_pref;
public static String desc_global_pref;
+ public static String label_attributes;
+ public static String label_include;
+ public static String label_tasks;
+ public static String label_task;
+ public static String label_edit;
+ public static String error_message_no_lib;
+
static {
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/ui/TaskProviderDecorator.java b/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/ui/TaskProviderDecorator.java
index 3631c83..d0eb777 100644
--- a/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/ui/TaskProviderDecorator.java
+++ b/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/ui/TaskProviderDecorator.java
@@ -47,7 +47,9 @@
private IExtension[] extensions;
private XDocletPreferenceStore preferenceStore;
+
Table table;
+
Button edit;
public TaskProviderDecorator(IExtension[] extensions, XDocletPreferenceStore preferenceStore) {
@@ -68,7 +70,7 @@
GridLayout layout;
GridData gridData;
Group libraryPanel = new Group(parent, SWT.NONE);
- libraryPanel.setText("Tasks");
+ libraryPanel.setText(Messages.label_tasks);
layout = new GridLayout(3, false);
libraryPanel.setLayout(layout);
gridData = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL);
@@ -92,7 +94,7 @@
column.setWidth(200);
edit = new Button(libraryPanel, SWT.PUSH);
- edit.setText("Edit...");
+ edit.setText(Messages.label_edit);
GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_BEGINNING);
edit.setLayoutData(data);
edit.setEnabled(false);
@@ -139,9 +141,9 @@
tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
Object obj = getSelection(event.getSelection());
- boolean enabled= false;
- if(obj != null && obj instanceof IExtension)
- enabled = ((IExtension)obj).getConfigurationElements().length >1;
+ boolean enabled = false;
+ if (obj != null && obj instanceof IExtension)
+ enabled = ((IExtension) obj).getConfigurationElements().length > 1;
edit.setEnabled(enabled);
}
});
@@ -170,7 +172,7 @@
return checked.toArray();
}
- protected static String[] columnNames = { "include", "task" };
+ protected static String[] columnNames = { Messages.label_include, Messages.label_task };
protected int getColumnIndex(String columName) {
if (columName == null)
diff --git a/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/ui/preferences.properties b/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/ui/preferences.properties
index a8f4f48..0cfe171 100644
--- a/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/ui/preferences.properties
+++ b/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/src/org/eclipse/jst/j2ee/ejb/annotations/internal/xdoclet/ui/preferences.properties
@@ -9,3 +9,10 @@
label_global_pref=Use global xdoclet preferences
desc_global_pref=Use global xdoclet preferences instead of project scoped preferences
+
+label_attributes=Attributes
+label_include=include
+label_tasks=Tasks
+label_task=task
+label_edit=Edit...
+error_message_no_lib=Could not find library for version: