Author: sflanigan
Date: 2009-07-01 04:03:17 -0400 (Wed, 01 Jul 2009)
New Revision: 16310
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.hblibs/.settings/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.hblibs/.settings/org.eclipse.jdt.core.prefs
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/.settings/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/.settings/org.eclipse.jdt.core.prefs
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/.settings/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/.settings/org.eclipse.jdt.core.prefs
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/.settings/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/.settings/org.eclipse.jdt.core.prefs
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/Messages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/messages.properties
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/.settings/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/.settings/org.eclipse.jdt.core.prefs
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/Messages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/messages.properties
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.settings/org.eclipse.jdt.core.prefs
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/Hibernate.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateGeneratorsComposite.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateUIMappingMessages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/ParametersComposite.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/messages.properties
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/HibernateUIXMLPlugin.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/editor/HibConfig3CompoundEditor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/editor/Hibernate3CompoundEditor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/form/HibConfig3CacheFormLayoutData.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/HibernateXMLPlugin.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/FileHibernateFilteredTreeConstraint.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibConfigLoader.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateConstants.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateLoader.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateRecognizer.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/AddHibernateAnyHandler.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/AddHibernateCollectionHandler.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/AddHibernateManyToAnyHandler.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/AddSubclassHandler.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/DeleteUniqueHandler.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/FolderOwnerAdopt.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/OpenSourceHandler.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/PasteUniqueHandler.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/helpers/ColumnsStructureHelper.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/helpers/HibernateTypeHelper.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/helpers/IdStructureHelper.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/ContextPackageProvider.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/DatabaseObjectImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibConfigCacheImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibConfigListenerImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibConfigMappingImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateClassImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateElementImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateFormulaImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateIdImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateMapImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateMetaImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateVersionImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/OrderedObject2Impl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/RegularObject2Impl.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3557 Externalize English strings
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.hblibs/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.hblibs/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.hblibs/.settings/org.eclipse.jdt.core.prefs 2009-07-01
08:03:17 UTC (rev 16310)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.settings/org.eclipse.jdt.core.prefs 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.settings/org.eclipse.jdt.core.prefs 2009-07-01
08:03:17 UTC (rev 16310)
@@ -4,4 +4,5 @@
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.source=1.5
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/Hibernate.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/Hibernate.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/Hibernate.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -32,12 +32,12 @@
String GENERATOR_PARAMETER__NAME = "name"; //$NON-NLS-1$
String GENERATOR_PARAMETER__VALUE = "value"; //$NON-NLS-1$
- String NAMED_QUERY = PACKAGE_ + "NamedQuery";
- String NAMED_QUERY__NAME = "name";
- String NAMED_QUERY__QUERY = "query";
- String NAMED_QUERY__HINTS = "hints";
+ String NAMED_QUERY = PACKAGE_ + "NamedQuery"; //$NON-NLS-1$
+ String NAMED_QUERY__NAME = "name"; //$NON-NLS-1$
+ String NAMED_QUERY__QUERY = "query"; //$NON-NLS-1$
+ String NAMED_QUERY__HINTS = "hints"; //$NON-NLS-1$
- String NAMED_QUERIES = PACKAGE_ + "NamedQueries";
- String NAMED_QUERIES__VALUE = "value";
+ String NAMED_QUERIES = PACKAGE_ + "NamedQueries"; //$NON-NLS-1$
+ String NAMED_QUERIES__VALUE = "value"; //$NON-NLS-1$
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -49,18 +49,18 @@
//see org.hibernate.id.IdentifierGeneratorFactory.GENERATORS
static {
- generatorClasses.add( "uuid");
- generatorClasses.add( "hilo");
- generatorClasses.add( "assigned");
- generatorClasses.add( "identity");
- generatorClasses.add( "select");
- generatorClasses.add( "sequence");
- generatorClasses.add( "seqhilo");
- generatorClasses.add( "increment");
- generatorClasses.add( "foreign");
- generatorClasses.add( "guid");
- generatorClasses.add( "uuid.hex");
- generatorClasses.add( "sequence-identity");
+ generatorClasses.add( "uuid"); //$NON-NLS-1$
+ generatorClasses.add( "hilo"); //$NON-NLS-1$
+ generatorClasses.add( "assigned"); //$NON-NLS-1$
+ generatorClasses.add( "identity"); //$NON-NLS-1$
+ generatorClasses.add( "select"); //$NON-NLS-1$
+ generatorClasses.add( "sequence"); //$NON-NLS-1$
+ generatorClasses.add( "seqhilo"); //$NON-NLS-1$
+ generatorClasses.add( "increment"); //$NON-NLS-1$
+ generatorClasses.add( "foreign"); //$NON-NLS-1$
+ generatorClasses.add( "guid"); //$NON-NLS-1$
+ generatorClasses.add( "uuid.hex"); //$NON-NLS-1$
+ generatorClasses.add( "sequence-identity"); //$NON-NLS-1$
}
/**
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/.settings/org.eclipse.jdt.core.prefs 2009-07-01
08:03:17 UTC (rev 16310)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateGeneratorsComposite.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateGeneratorsComposite.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateGeneratorsComposite.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -50,14 +50,14 @@
// Sequence Generator sub-section
container = addCollapsableSubSection(
addSubPane(container, 10),
- "Generic Generator",
+ HibernateUIMappingMessages.HibernateGeneratorsComposite_SectionLabel,
genericGeneratorExpansionStateHolder
);
// Sequence Generator check box
Button genericGeneratorCheckBox = addCheckBox(
addSubPane(container, 5),
- "Generic generator",
+ HibernateUIMappingMessages.HibernateGeneratorsComposite_CheckBoxLabel,
buildGenericGeneratorBooleanHolder(),
null//TODO add help
);
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateUIMappingMessages.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateUIMappingMessages.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateUIMappingMessages.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -22,6 +22,10 @@
public static String GenericGeneratorComposite_name;
public static String GenericGeneratorComposite_strategy;
+ public static String HibernateGeneratorsComposite_CheckBoxLabel;
+
+ public static String HibernateGeneratorsComposite_SectionLabel;
+
private HibernateUIMappingMessages() {}
static {
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/ParametersComposite.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/ParametersComposite.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/ParametersComposite.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -225,7 +225,7 @@
public String getColumnText(Object element, int columnIndex) {
Parameter parameter = (Parameter) element;
- String value = "";
+ String value = ""; //$NON-NLS-1$
switch (columnIndex) {
case ParameterColumnAdapter.NAME_COLUMN_INDEX: {
@@ -240,7 +240,7 @@
}
if (value == null) {
- value = "";
+ value = ""; //$NON-NLS-1$
}
return value;
@@ -274,7 +274,7 @@
public Object getValue(Object element, String property) {
Parameter parameter = (Parameter) element;
- String value = "";
+ String value = ""; //$NON-NLS-1$
if (property == Parameter.NAME_PROPERTY) {
value = parameter.getName();
@@ -284,7 +284,7 @@
}
if (value == null) {
- value = "";
+ value = ""; //$NON-NLS-1$
}
return value;
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/messages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/messages.properties 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/messages.properties 2009-07-01
08:03:17 UTC (rev 16310)
@@ -1,2 +1,4 @@
GenericGeneratorComposite_strategy=Strategy:
-GenericGeneratorComposite_name=Name:
\ No newline at end of file
+GenericGeneratorComposite_name=Name:
+HibernateGeneratorsComposite_CheckBoxLabel=Generic generator
+HibernateGeneratorsComposite_SectionLabel=Generic Generator
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/.settings/org.eclipse.jdt.core.prefs 2009-07-01
08:03:17 UTC (rev 16310)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/.settings/org.eclipse.jdt.core.prefs 2009-07-01
08:03:17 UTC (rev 16310)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/.settings/org.eclipse.jdt.core.prefs 2009-07-01
08:03:17 UTC (rev 16310)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/HibernateXMLPlugin.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/HibernateXMLPlugin.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/HibernateXMLPlugin.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -15,7 +15,7 @@
import org.eclipse.ui.plugin.AbstractUIPlugin;
public class HibernateXMLPlugin extends AbstractUIPlugin {
- public static final String PLUGIN_ID = "org.jboss.tools.hibernate.xml";
+ public static final String PLUGIN_ID = "org.jboss.tools.hibernate.xml";
//$NON-NLS-1$
static HibernateXMLPlugin INSTANCE = null;
@@ -37,7 +37,7 @@
}
public static void log(Exception ex) {
- INSTANCE.getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, "No
message", ex));
+ INSTANCE.getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, "No
message", ex)); //$NON-NLS-1$
}
public static boolean isDebugEnabled() {
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/Messages.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/Messages.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/Messages.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -0,0 +1,23 @@
+package org.jboss.tools.hibernate.xml;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME =
"org.jboss.tools.hibernate.xml.messages"; //$NON-NLS-1$
+ public static String DatabaseObjectImpl_GenericName;
+ public static String IdStructureHelper_CloseOption;
+ public static String IdStructureHelper_ShouldNotRemoveLastAttribute;
+ public static String IdStructureHelper_WarningTitle;
+ public static String PasteUniqueHandler_Cancel;
+ public static String PasteUniqueHandler_OK;
+ public static String PasteUniqueHandler_PasteTitle;
+ public static String PasteUniqueHandler_ReplaceExistingElement;
+ public static String RegularObject2Impl_NoIdAttribute;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/messages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/messages.properties
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/messages.properties 2009-07-01
08:03:17 UTC (rev 16310)
@@ -0,0 +1,9 @@
+DatabaseObjectImpl_GenericName=database object
+IdStructureHelper_CloseOption=Close
+IdStructureHelper_ShouldNotRemoveLastAttribute=You should not remove last attribute from
composite-id.\nPlease replace id first.
+IdStructureHelper_WarningTitle=Warning
+PasteUniqueHandler_Cancel=Cancel
+PasteUniqueHandler_OK=OK
+PasteUniqueHandler_PasteTitle=Paste
+PasteUniqueHandler_ReplaceExistingElement=Replace existing element {0}
+RegularObject2Impl_NoIdAttribute=No id attribute set for entity {0}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/FileHibernateFilteredTreeConstraint.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/FileHibernateFilteredTreeConstraint.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/FileHibernateFilteredTreeConstraint.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -31,16 +31,16 @@
boolean checkEntity(XModelEntity entity) {
String res = checkedEntities.getProperty(entity.getName());
- if(res != null) return "true".equals(res);
+ if(res != null) return "true".equals(res); //$NON-NLS-1$
XChild[] cs = entity.getChildren();
for (int i = 0; i < cs.length; i++) {
String n = cs[i].getName();
- if(n.startsWith("Hibernate") && n.endsWith("Folder")) {
- checkedEntities.setProperty(n, "true");
+ if(n.startsWith("Hibernate") && n.endsWith("Folder")) {
//$NON-NLS-1$ //$NON-NLS-2$
+ checkedEntities.setProperty(n, "true"); //$NON-NLS-1$
return true;
}
}
- checkedEntities.setProperty(entity.getName(), "false");
+ checkedEntities.setProperty(entity.getName(), "false"); //$NON-NLS-1$
return false;
}
@@ -52,7 +52,7 @@
public boolean accepts(XModelObject object) {
String entity = object.getModelEntity().getName();
// if("OrmDiagram".equals(entity)) return false;
- if(entity.startsWith("Hibernate") &&
entity.endsWith("Folder") && object.getChildren().length == 0) return
false;
+ if(entity.startsWith("Hibernate") &&
entity.endsWith("Folder") && object.getChildren().length == 0) return
false; //$NON-NLS-1$ //$NON-NLS-2$
return true;
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibConfigLoader.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibConfigLoader.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibConfigLoader.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -26,12 +26,12 @@
}
class HibConfigLoaderUtil extends XModelObjectLoaderUtil {
- static String[] factoryFolders = new String[]{"Properties",
"Mappings", "Caches", "Events", "Listeners"};
+ static String[] factoryFolders = new String[]{"Properties",
"Mappings", "Caches", "Events", "Listeners"};
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
public boolean save(Element parent, XModelObject o) {
- if(o.getModelEntity().getName().equals("HibConfig3Security")) {
- if(o.getAttributeValue("context").length() == 0 &&
o.getChildren().length == 0 &&
- o.getAttributeValue("comment").length() == 0) {
+ if(o.getModelEntity().getName().equals("HibConfig3Security")) {
//$NON-NLS-1$
+ if(o.getAttributeValue("context").length() == 0 &&
o.getChildren().length == 0 && //$NON-NLS-1$
+ o.getAttributeValue("comment").length() == 0) { //$NON-NLS-1$
return true;
}
}
@@ -40,7 +40,7 @@
private String[] getFolders(XModelObject o) {
String entity = o.getModelEntity().getName();
- if(entity.equals("HibConfig3SessionFactory")) return factoryFolders;
+ if(entity.equals("HibConfig3SessionFactory")) return factoryFolders;
//$NON-NLS-1$
return null;
}
@@ -77,7 +77,7 @@
if(v == null) return false;
if(v.length() == 0 || v.equals(dv)) {
XAttribute attr = entity.getAttribute(n);
- return (attr != null &&
"always".equals(attr.getProperty("save")));
+ return (attr != null &&
"always".equals(attr.getProperty("save"))); //$NON-NLS-1$
//$NON-NLS-2$
}
return super.isSaveable(entity, n, v, dv);
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateConstants.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateConstants.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateConstants.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -12,20 +12,20 @@
public interface HibernateConstants {
- public static String DOC_PUBLICID_3_0 = "-//Hibernate/Hibernate Mapping DTD
3.0//EN";
- public static String DOC_SYSTEMID_3_0 =
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";
+ public static String DOC_PUBLICID_3_0 = "-//Hibernate/Hibernate Mapping DTD
3.0//EN"; //$NON-NLS-1$
+ public static String DOC_SYSTEMID_3_0 =
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"; //$NON-NLS-1$
- public static String CFG_DOC_PUBLICID_3_0 = "-//Hibernate/Hibernate Configuration
DTD 3.0//EN";
- public static String CFG_DOC_SYSTEMID_3_0 =
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd";
+ public static String CFG_DOC_PUBLICID_3_0 = "-//Hibernate/Hibernate Configuration
DTD 3.0//EN"; //$NON-NLS-1$
+ public static String CFG_DOC_SYSTEMID_3_0 =
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd";
//$NON-NLS-1$
- public static String RVE_DOC_PUBLICID_3_0 = "-//Hibernate/Hibernate Reverse
Engineering DTD 3.0//EN";
- public static String RVE_DOC_SYSTEMID_3_0 =
"http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd";
+ public static String RVE_DOC_PUBLICID_3_0 = "-//Hibernate/Hibernate Reverse
Engineering DTD 3.0//EN"; //$NON-NLS-1$
+ public static String RVE_DOC_SYSTEMID_3_0 =
"http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd";
//$NON-NLS-1$
- public static String ENTITY_FILE_HIBERNATE_3_0 = "FileHibernate3";
- public static String ENTITY_HIBERNATE_CACHE_3_0 = "Hibernate3Cache";
- public static String ENTITY_HIBERNATE_PROPERTY_3_0 = "Hibernate3Property";
+ public static String ENTITY_FILE_HIBERNATE_3_0 = "FileHibernate3";
//$NON-NLS-1$
+ public static String ENTITY_HIBERNATE_CACHE_3_0 = "Hibernate3Cache";
//$NON-NLS-1$
+ public static String ENTITY_HIBERNATE_PROPERTY_3_0 = "Hibernate3Property";
//$NON-NLS-1$
- public static String ENTITY_FILE_HIB_CONFIG_3_0 = "FileHibConfig3";
- public static String ENTITY_FILE_HIB_REV_ENG_3_0 = "FileHibReverse3";
+ public static String ENTITY_FILE_HIB_CONFIG_3_0 = "FileHibConfig3";
//$NON-NLS-1$
+ public static String ENTITY_FILE_HIB_REV_ENG_3_0 = "FileHibReverse3";
//$NON-NLS-1$
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateLoader.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateLoader.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateLoader.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -40,28 +40,28 @@
}
class HibernateLoaderUtil extends XModelObjectLoaderUtil {
- static String[] metaFolders = new String[]{"Meta"};
- static String[] fileFolders = new String[]{"Types", "Imports",
"Classes", "Result Sets", "Queries", "Filters",
"Database Objects"};
- static String[] classFolders = new String[]{"Tuplizers",
"Properties", "Subclasses", "SQL", "Filters",
"Result Sets", "Queries"};
- static String[] subclassFolders = new String[]{"Tuplizers",
"Synchronize", "Properties", "Subclasses", "SQL",
"Result Sets", "Queries"};
- static String[] compositeElementFolders = new String[]{"Properties"};
- static String[] listFolders = new String[]{"SQL"};
- static String[] setFolders = new String[]{"SQL", "Filters"};
+ static String[] metaFolders = new String[]{"Meta"}; //$NON-NLS-1$
+ static String[] fileFolders = new String[]{"Types", "Imports",
"Classes", "Result Sets", "Queries", "Filters",
"Database Objects"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
//$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
+ static String[] classFolders = new String[]{"Tuplizers",
"Properties", "Subclasses", "SQL", "Filters",
"Result Sets", "Queries"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
+ static String[] subclassFolders = new String[]{"Tuplizers",
"Synchronize", "Properties", "Subclasses", "SQL",
"Result Sets", "Queries"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
+ static String[] compositeElementFolders = new String[]{"Properties"};
//$NON-NLS-1$
+ static String[] listFolders = new String[]{"SQL"}; //$NON-NLS-1$
+ static String[] setFolders = new String[]{"SQL", "Filters"};
//$NON-NLS-1$ //$NON-NLS-2$
static Map<String,String[]> folders = new HashMap<String,String[]>();
static {
- folders.put("file", fileFolders);
- folders.put("class", classFolders);
- folders.put("subclass", subclassFolders);
- folders.put("component", compositeElementFolders);
- folders.put("element", compositeElementFolders);
- folders.put("list", listFolders);
- folders.put("set", setFolders);
+ folders.put("file", fileFolders); //$NON-NLS-1$
+ folders.put("class", classFolders); //$NON-NLS-1$
+ folders.put("subclass", subclassFolders); //$NON-NLS-1$
+ folders.put("component", compositeElementFolders); //$NON-NLS-1$
+ folders.put("element", compositeElementFolders); //$NON-NLS-1$
+ folders.put("list", listFolders); //$NON-NLS-1$
+ folders.put("set", setFolders); //$NON-NLS-1$
}
private String[] getFolders(XModelObject o) {
- String loaderKind = o.getModelEntity().getProperty("loaderKind");
+ String loaderKind = o.getModelEntity().getProperty("loaderKind");
//$NON-NLS-1$
return (loaderKind == null) ? null : (String[])folders.get(loaderKind);
}
@@ -82,8 +82,8 @@
public boolean saveChildren(Element element, XModelObject o) {
saveFolders(element, o, metaFolders);
String entity = o.getModelEntity().getName();
- if("Hibernate3Component".equals(entity)) {
- moveElementToEnd(element, "parent");
+ if("Hibernate3Component".equals(entity)) { //$NON-NLS-1$
+ moveElementToEnd(element, "parent"); //$NON-NLS-1$
}
boolean b = super.saveChildren(element, o);
String[] fs = getFolders(o);
@@ -104,7 +104,7 @@
if(v == null) return false;
if(v.length() == 0 || v.equals(dv)) {
XAttribute attr = entity.getAttribute(n);
- return (attr != null &&
"always".equals(attr.getProperty("save")));
+ return (attr != null &&
"always".equals(attr.getProperty("save"))); //$NON-NLS-1$
//$NON-NLS-2$
}
return super.isSaveable(entity, n, v, dv);
}
@@ -118,9 +118,9 @@
}
protected String getChildEntity(XModelEntity entity, Element e) {
- if(e != null && "database-object".equals(e.getNodeName())) {
- Element c = XMLUtilities.getUniqueChild(e, "definition");
- return c != null ? "Hibernate3DatabaseObjectDef" :
"Hibernate3DatabaseObjectCreateDrop";
+ if(e != null && "database-object".equals(e.getNodeName())) {
//$NON-NLS-1$
+ Element c = XMLUtilities.getUniqueChild(e, "definition"); //$NON-NLS-1$
+ return c != null ? "Hibernate3DatabaseObjectDef" :
"Hibernate3DatabaseObjectCreateDrop"; //$NON-NLS-1$ //$NON-NLS-2$
}
return super.getChildEntity(entity, e);
}
@@ -133,7 +133,7 @@
ok = true;
try {
XModelEntity e =
XModelMetaDataImpl.getInstance().getEntity(HibernateConstants.ENTITY_HIBERNATE_PROPERTY_3_0);
- XAttribute a = e.getAttribute("type");
+ XAttribute a = e.getAttribute("type"); //$NON-NLS-1$
if(a.getConstraint() instanceof XAttributeConstraintAList) {
XAttributeConstraintAList c = (XAttributeConstraintAList)a.getConstraint();
c.setValues(HibernateTypeHelper.TYPE_NAMES);
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateRecognizer.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateRecognizer.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateRecognizer.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -17,29 +17,29 @@
static {
try {
XMLEntityResolver.registerPublicEntity(
- HibernateConstants.DOC_PUBLICID_3_0, HibernateRecognizer.class,
"/meta/hibernate-mapping-3.0.dtd"
+ HibernateConstants.DOC_PUBLICID_3_0, HibernateRecognizer.class,
"/meta/hibernate-mapping-3.0.dtd" //$NON-NLS-1$
);
XMLEntityResolver.registerSystemEntity(
- HibernateConstants.DOC_SYSTEMID_3_0, HibernateRecognizer.class,
"/meta/hibernate-mapping-3.0.dtd"
+ HibernateConstants.DOC_SYSTEMID_3_0, HibernateRecognizer.class,
"/meta/hibernate-mapping-3.0.dtd" //$NON-NLS-1$
);
XMLEntityResolver.registerPublicEntity(
- HibernateConstants.CFG_DOC_PUBLICID_3_0, HibernateRecognizer.class,
"/meta/hibernate-configuration-3.0.dtd"
+ HibernateConstants.CFG_DOC_PUBLICID_3_0, HibernateRecognizer.class,
"/meta/hibernate-configuration-3.0.dtd" //$NON-NLS-1$
);
XMLEntityResolver.registerSystemEntity(
- HibernateConstants.CFG_DOC_SYSTEMID_3_0, HibernateRecognizer.class,
"/meta/hibernate-configuration-3.0.dtd"
+ HibernateConstants.CFG_DOC_SYSTEMID_3_0, HibernateRecognizer.class,
"/meta/hibernate-configuration-3.0.dtd" //$NON-NLS-1$
);
} catch (Exception e) {}
}
public String getEntityName(String ext, String body) {
- return (body == null || !"xml".equals(ext)) ? null
- : (body.indexOf("\"" + HibernateConstants.DOC_PUBLICID_3_0 +
"\"") >= 0
- || body.indexOf("\"" + HibernateConstants.DOC_SYSTEMID_3_0 +
"\"") >= 0) ? HibernateConstants.ENTITY_FILE_HIBERNATE_3_0
- : (body.indexOf("\"" + HibernateConstants.CFG_DOC_PUBLICID_3_0 +
"\"") >= 0
- || body.indexOf("\"" + HibernateConstants.CFG_DOC_SYSTEMID_3_0 +
"\"") >= 0) ? HibernateConstants.ENTITY_FILE_HIB_CONFIG_3_0
- : (body.indexOf("\"" + HibernateConstants.RVE_DOC_PUBLICID_3_0 +
"\"") >= 0
- || body.indexOf("\"" + HibernateConstants.RVE_DOC_SYSTEMID_3_0 +
"\"") >= 0) ? HibernateConstants.ENTITY_FILE_HIB_REV_ENG_3_0
+ return (body == null || !"xml".equals(ext)) ? null //$NON-NLS-1$
+ : (body.indexOf("\"" + HibernateConstants.DOC_PUBLICID_3_0 +
"\"") >= 0 //$NON-NLS-1$ //$NON-NLS-2$
+ || body.indexOf("\"" + HibernateConstants.DOC_SYSTEMID_3_0 +
"\"") >= 0) ? HibernateConstants.ENTITY_FILE_HIBERNATE_3_0
//$NON-NLS-1$ //$NON-NLS-2$
+ : (body.indexOf("\"" + HibernateConstants.CFG_DOC_PUBLICID_3_0 +
"\"") >= 0 //$NON-NLS-1$ //$NON-NLS-2$
+ || body.indexOf("\"" + HibernateConstants.CFG_DOC_SYSTEMID_3_0 +
"\"") >= 0) ? HibernateConstants.ENTITY_FILE_HIB_CONFIG_3_0
//$NON-NLS-1$ //$NON-NLS-2$
+ : (body.indexOf("\"" + HibernateConstants.RVE_DOC_PUBLICID_3_0 +
"\"") >= 0 //$NON-NLS-1$ //$NON-NLS-2$
+ || body.indexOf("\"" + HibernateConstants.RVE_DOC_SYSTEMID_3_0 +
"\"") >= 0) ? HibernateConstants.ENTITY_FILE_HIB_REV_ENG_3_0
//$NON-NLS-1$ //$NON-NLS-2$
: null;
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/AddHibernateAnyHandler.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/AddHibernateAnyHandler.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/AddHibernateAnyHandler.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -21,7 +21,7 @@
protected XModelObject modifyCreatedObject(XModelObject o) {
Properties p = extractProperties(data[0]);
- String[] cs = new String[]{p.getProperty("column1"),
p.getProperty("column2")};
+ String[] cs = new String[]{p.getProperty("column1"),
p.getProperty("column2")}; //$NON-NLS-1$ //$NON-NLS-2$
for (int i = 0; i < cs.length; i++) {
o.addChild(ColumnsStructureHelper.newColumn(o.getModel(), cs[i]));
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/AddHibernateCollectionHandler.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/AddHibernateCollectionHandler.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/AddHibernateCollectionHandler.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -17,14 +17,14 @@
public class AddHibernateCollectionHandler extends DefaultCreateHandler {
protected XModelObject modifyCreatedObject(XModelObject o) {
- XModelObject c = o.getChildByPath("index");
+ XModelObject c = o.getChildByPath("index"); //$NON-NLS-1$
if(c == null) {
- c = o.getModel().createModelObject("Hibernate3Index", null);
+ c = o.getModel().createModelObject("Hibernate3Index", null); //$NON-NLS-1$
o.addChild(c);
}
- c = o.getChildByPath("element");
+ c = o.getChildByPath("element"); //$NON-NLS-1$
if(c == null) {
- c = o.getModel().createModelObject("Hibernate3Element", null);
+ c = o.getModel().createModelObject("Hibernate3Element", null);
//$NON-NLS-1$
o.addChild(c);
}
return o;
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/AddHibernateManyToAnyHandler.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/AddHibernateManyToAnyHandler.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/AddHibernateManyToAnyHandler.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -21,7 +21,7 @@
protected XModelObject modifyCreatedObject(XModelObject o) {
Properties p = extractProperties(data[0]);
- String[] cs = new String[]{p.getProperty("column1"),
p.getProperty("column2")};
+ String[] cs = new String[]{p.getProperty("column1"),
p.getProperty("column2")}; //$NON-NLS-1$ //$NON-NLS-2$
for (int i = 0; i < cs.length; i++) {
o.addChild(ColumnsStructureHelper.newColumn(o.getModel(), cs[i]));
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/AddSubclassHandler.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/AddSubclassHandler.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/AddSubclassHandler.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -16,10 +16,10 @@
public class AddSubclassHandler extends DefaultCreateHandler {
static String[] entities =
- {"Hibernate3Join",
- "Hibernate3Subclass",
- "Hibernate3JoinedSubclass",
- "Hibernate3UnionSubclass"};
+ {"Hibernate3Join", //$NON-NLS-1$
+ "Hibernate3Subclass", //$NON-NLS-1$
+ "Hibernate3JoinedSubclass", //$NON-NLS-1$
+ "Hibernate3UnionSubclass"}; //$NON-NLS-1$
static int[][] matrix = new int[][]{
{1,1,0,0},
{1,1,0,0},
@@ -36,7 +36,7 @@
public boolean isEnabled(XModelObject object) {
if(!super.isEnabled(object)) return true;
- String entity = action.getProperty("entity");
+ String entity = action.getProperty("entity"); //$NON-NLS-1$
if(entity == null) return true;
XModelObject[] os = object.getChildren();
if(os.length == 0) return true;
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/DeleteUniqueHandler.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/DeleteUniqueHandler.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/DeleteUniqueHandler.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -23,14 +23,14 @@
public void executeHandler(XModelObject object, Properties p) throws XModelException {
if(!isEnabled(object)) return;
- String transactionName = "delete " + DefaultCreateHandler.title(object,
false);
+ String transactionName = "delete " + DefaultCreateHandler.title(object,
false); //$NON-NLS-1$
executeInTransaction(object, p, transactionName, XTransactionUndo.REMOVE);
}
protected void transaction(XModelObject object, Properties p) throws XModelException {
XModelObject parent = object.getParent();
removeFromParent(object);
- String entity = action.getProperty("entity");
+ String entity = action.getProperty("entity"); //$NON-NLS-1$
if(entity == null) entity = object.getModelEntity().getName();
XModelObject c = XModelObjectLoaderUtil.createValidObject(object.getModel(), entity);
DefaultCreateHandler.addCreatedObject(parent, c, p);
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/FolderOwnerAdopt.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/FolderOwnerAdopt.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/FolderOwnerAdopt.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -30,7 +30,7 @@
if(isAdoptableGrandChild(target, object)) {
XModelObject folder = getFolderForChild(target, object);
if(folder == null) return;
- XActionInvoker.invoke("CopyActions.Paste", folder, null);
+ XActionInvoker.invoke("CopyActions.Paste", folder, null); //$NON-NLS-1$
}
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/OpenSourceHandler.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/OpenSourceHandler.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/OpenSourceHandler.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -21,13 +21,13 @@
XModelObject f = object;
while(f != null && f.getFileType() != XModelObject.FILE) f = f.getParent();
if(f == null) return v;
- String p = f.getAttributeValue("package");
- if(p != null && p.length() > 0) return p + "." + v;
+ String p = f.getAttributeValue("package"); //$NON-NLS-1$
+ if(p != null && p.length() > 0) return p + "." + v;
//$NON-NLS-1$
return v;
}
protected String getAttribute() {
- return action.getProperty("attribute");
+ return action.getProperty("attribute"); //$NON-NLS-1$
}
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/PasteUniqueHandler.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/PasteUniqueHandler.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/handlers/PasteUniqueHandler.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.hibernate.xml.model.handlers;
+import java.text.MessageFormat;
import java.util.Properties;
import org.jboss.tools.common.meta.XChild;
@@ -19,6 +20,7 @@
import org.jboss.tools.common.model.XModelException;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.ServiceDialog;
+import org.jboss.tools.hibernate.xml.Messages;
public class PasteUniqueHandler extends PasteHandler {
@@ -43,11 +45,10 @@
if(c == null || c.getMaxCount() > 1) return true;
XModelObject co = parent.getChildByPath(source.getPathPart());
if(co == null) return true;
- String message = "Replace existing element ";
- String n = "<" + co.getModelEntity().getXMLSubPath() + ">";
- message += n;
+ String n = "<" + co.getModelEntity().getXMLSubPath() + ">";
//$NON-NLS-1$ //$NON-NLS-2$
+ String message =
MessageFormat.format(Messages.PasteUniqueHandler_ReplaceExistingElement, n);
ServiceDialog d = parent.getModel().getService();
- int q = d.showDialog("Paste", message, new String[]{"OK",
"Cancel"}, null, ServiceDialog.QUESTION);
+ int q = d.showDialog(Messages.PasteUniqueHandler_PasteTitle, message, new
String[]{Messages.PasteUniqueHandler_OK, Messages.PasteUniqueHandler_Cancel}, null,
ServiceDialog.QUESTION);
if(q != 0) return false;
DefaultRemoveHandler.removeFromParent(co);
return true;
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/helpers/ColumnsStructureHelper.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/helpers/ColumnsStructureHelper.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/helpers/ColumnsStructureHelper.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -22,7 +22,7 @@
import org.jboss.tools.common.model.XModelObject;
public class ColumnsStructureHelper {
- public static String ENT_HIBERNATE_COLUMN = "Hibernate3Column";
+ public static String ENT_HIBERNATE_COLUMN = "Hibernate3Column"; //$NON-NLS-1$
public static boolean isColumnObject(XModelObject object) {
return ENT_HIBERNATE_COLUMN.equals(object.getModelEntity().getName());
@@ -30,7 +30,7 @@
public static XModelObject newColumn(XModel model, String name) {
XModelObject c = model.createModelObject(ENT_HIBERNATE_COLUMN, null);
- c.setAttributeValue("name", name);
+ c.setAttributeValue("name", name); //$NON-NLS-1$
return c;
}
@@ -58,10 +58,10 @@
*/
public static String getDeclaredColumnName(XModelObject columnOwner) {
if(!hasNoChildColumns(columnOwner)) return null;
- String column = columnOwner.getAttributeValue("column");
+ String column = columnOwner.getAttributeValue("column"); //$NON-NLS-1$
if(column == null || column.length() > 0) return column;
- String name = columnOwner.getAttributeValue("name");
- if(name != null && name.length() == 0 &&
IdStructureHelper.isId(columnOwner)) return "id";
+ String name = columnOwner.getAttributeValue("name"); //$NON-NLS-1$
+ if(name != null && name.length() == 0 &&
IdStructureHelper.isId(columnOwner)) return "id"; //$NON-NLS-1$
return name;
}
@@ -76,7 +76,7 @@
XAttribute[] as = c.getModelEntity().getAttributes();
for (int i = 0; i < as.length; i++) {
String n = as[i].getName();
- if("name".equals(n)) continue;
+ if("name".equals(n)) continue; //$NON-NLS-1$
String v = columnOwner.getAttributeValue(n);
if(v == null || v.equals(as[i].getDefaultValue())) continue;
c.setAttributeValue(n, v);
@@ -104,7 +104,7 @@
XAttribute[] as = column.getModelEntity().getAttributes();
for (int i = 0; i < as.length; i++) {
String n = as[i].getName();
- if("name".equals(n) || "persistent".equals(n)) continue;
+ if("name".equals(n) || "persistent".equals(n)) continue;
//$NON-NLS-1$ //$NON-NLS-2$
String v = column.getAttributeValue(n);
if(v == null || v.equals(as[i].getDefaultValue())) continue;
if(attribute.getAttribute(n) == null) return true;
@@ -136,9 +136,9 @@
for (int i = 0; i < as.length; i++) {
String n = as[i].getName();
String v = column.getAttributeValue(n);
- if("name".equals(n)) {
- n = "column";
- if(v.equals(attribute.getAttributeValue("name"))) v = "";
+ if("name".equals(n)) { //$NON-NLS-1$
+ n = "column"; //$NON-NLS-1$
+ if(v.equals(attribute.getAttributeValue("name"))) v = "";
//$NON-NLS-1$ //$NON-NLS-2$
}
if(v == null) continue;
/// if(!"column".equals(n) && v.equals(as[i].getDefaultValue()))
continue;
@@ -154,17 +154,17 @@
Set<String> set = new HashSet<String>();
if(table == null) return set;
XModelObject[] cs = table.getChildren();
- for (int i = 0; i < cs.length; i++)
set.add(cs[i].getAttributeValue("name"));
+ for (int i = 0; i < cs.length; i++)
set.add(cs[i].getAttributeValue("name")); //$NON-NLS-1$
return set;
}
public static void provideUniqueName(XModelObject column, Set<String> columns) {
- String n = column.getAttributeValue("name");
+ String n = column.getAttributeValue("name"); //$NON-NLS-1$
if(columns.contains(n)) {
int i = 1;
while(columns.contains(n + i)) ++i;
n = n + i;
- column.setAttributeValue("name", n);
+ column.setAttributeValue("name", n); //$NON-NLS-1$
}
columns.add(n);
}
@@ -188,7 +188,7 @@
public static void replaceColumnDeclarationWithChild(XModelObject attrReference,
XModelObject column) throws XModelException {
DefaultCreateHandler.addCreatedObject(attrReference, column, -1);
- XModelObject c = newColumn(attrReference.getModel(),
attrReference.getAttributeValue("name"));
+ XModelObject c = newColumn(attrReference.getModel(),
attrReference.getAttributeValue("name")); //$NON-NLS-1$
mergeColumnDataToAttribute(attrReference, c);
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/helpers/HibernateTypeHelper.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/helpers/HibernateTypeHelper.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/helpers/HibernateTypeHelper.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -18,6 +18,7 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.util.XModelObjectLoaderUtil;
+@SuppressWarnings("nls")
public class HibernateTypeHelper {
static Properties hToJ = new Properties();
static Properties jToH = new Properties();
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/helpers/IdStructureHelper.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/helpers/IdStructureHelper.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/helpers/IdStructureHelper.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -19,11 +19,12 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.engines.impl.EnginesLoader;
import org.jboss.tools.common.model.util.XModelObjectLoaderUtil;
+import org.jboss.tools.hibernate.xml.Messages;
public class IdStructureHelper {
- public static String ENT_HIBERNATE_ID = "Hibernate3Id";
- public static String ENT_HIBERNATE_COMPOSITE_ID = "Hibernate3CompositeId";
- public static String ID_PATH_PART = "[id]";
+ public static String ENT_HIBERNATE_ID = "Hibernate3Id"; //$NON-NLS-1$
+ public static String ENT_HIBERNATE_COMPOSITE_ID = "Hibernate3CompositeId";
//$NON-NLS-1$
+ public static String ID_PATH_PART = "[id]"; //$NON-NLS-1$
public static XModelObject getIdChild(XModelObject clsReference) {
return clsReference.getChildByPath(ID_PATH_PART);
@@ -65,7 +66,7 @@
List<XModelObject> list = new ArrayList<XModelObject>();
XModelObject[] cs = id.getChildren();
for (int i = 0; i < cs.length; i++) {
- if(cs[i].getModelEntity().getName().startsWith("HibernateMeta")) continue;
+ if(cs[i].getModelEntity().getName().startsWith("HibernateMeta")) continue;
//$NON-NLS-1$
list.add(cs[i]);
}
return list.toArray(new XModelObject[0]);
@@ -73,26 +74,26 @@
}
public static XModelObject[] getAsAttributes(XModelObject id) throws XModelException {
- String name = id.getAttributeValue("name");
+ String name = id.getAttributeValue("name"); //$NON-NLS-1$
if(name.length() == 0) return new XModelObject[0];
String entity = id.getModelEntity().getName();
if(ENT_HIBERNATE_ID.equals(entity)) {
- XModelObject c = id.getModel().createModelObject("HibernateProperty",
null);
+ XModelObject c = id.getModel().createModelObject("HibernateProperty", null);
//$NON-NLS-1$
EnginesLoader.merge(c, id, false);
return new XModelObject[]{c};
- } else if("HibernateCompositeId".equals(entity)) {
- String cls = id.getAttributeValue("class");
+ } else if("HibernateCompositeId".equals(entity)) { //$NON-NLS-1$
+ String cls = id.getAttributeValue("class"); //$NON-NLS-1$
if(cls.length() == 0) {
XModelObject[] cs = id.getChildren();
List<XModelObject> list = new ArrayList<XModelObject>();
for (int i = 0; i < cs.length; i++) {
- if(cs[i].getModelEntity().getName().startsWith("HibernateMeta"))
continue;
+ if(cs[i].getModelEntity().getName().startsWith("HibernateMeta")) continue;
//$NON-NLS-1$
XModelObject gc = getAsAttribute(cs[i]);
if(gc != null) list.add(gc);
}
return list.toArray(new XModelObject[0]);
} else {
- XModelObject c = id.getModel().createModelObject("HibernateComponent",
null);
+ XModelObject c = id.getModel().createModelObject("HibernateComponent",
null); //$NON-NLS-1$
EnginesLoader.merge(c, id, false);
XModelObject[] cs = id.getChildren();
for (int i = 0; i < cs.length; i++) {
@@ -107,8 +108,8 @@
public static XModelObject getAsAttribute(XModelObject key) throws XModelException {
String ec = key.getModelEntity().getName();
- String er = ("HibernateKeyProperty".equals(ec)) ?
"HibernateProperty"
- : ("HibernateKeyManyToOne".equals(ec)) ? "HibernateManyToOne"
+ String er = ("HibernateKeyProperty".equals(ec)) ?
"HibernateProperty" //$NON-NLS-1$ //$NON-NLS-2$
+ : ("HibernateKeyManyToOne".equals(ec)) ? "HibernateManyToOne"
//$NON-NLS-1$ //$NON-NLS-2$
: null;
if(er == null) return null;
XModelObject a = key.getModel().createModelObject(er, null);
@@ -126,7 +127,7 @@
} else if(ENT_HIBERNATE_COMPOSITE_ID.equals(entity)) {
XModelObject[] cs = id.getChildren();
for (int i = 0; i < cs.length; i++) {
- if(cs[i].getModelEntity().getName().startsWith("HibernateMeta")) continue;
+ if(cs[i].getModelEntity().getName().startsWith("HibernateMeta")) continue;
//$NON-NLS-1$
addColumnsToList(cs[i], list);
}
}
@@ -134,35 +135,35 @@
}
private static void addColumnsToList(XModelObject o, List<XModelObject> list)
throws XModelException {
- XModelObject[] cs = o.getChildren("HibernateColumn");
+ XModelObject[] cs = o.getChildren("HibernateColumn"); //$NON-NLS-1$
if(cs.length > 0) {
for (int i = 0; i < cs.length; i++) list.add(cs[i].copy());
} else {
- String column = o.getAttributeValue("column");
+ String column = o.getAttributeValue("column"); //$NON-NLS-1$
if(column == null) return;
- XModelObject c = o.getModel().createModelObject("HibernateColumn", null);
+ XModelObject c = o.getModel().createModelObject("HibernateColumn", null);
//$NON-NLS-1$
EnginesLoader.merge(c, o, false);
- if(column.length() > 0) c.setAttributeValue("name", column);
+ if(column.length() > 0) c.setAttributeValue("name", column);
//$NON-NLS-1$
list.add(c);
}
}
public static boolean isDefaultId(XModelObject id) {
return isNamelessId(id) && !isIdComposite(id) &&
- id.getAttributeValue("column").length() == 0 &&
- id.getChildren("HibernateColumn").length == 0;
+ id.getAttributeValue("column").length() == 0 && //$NON-NLS-1$
+ id.getChildren("HibernateColumn").length == 0; //$NON-NLS-1$
}
public static boolean isNamelessId(XModelObject id) {
- return isId(id) && id.getAttributeValue("name").length() == 0;
+ return isId(id) && id.getAttributeValue("name").length() == 0;
//$NON-NLS-1$
}
public static String getIdType(XModelObject id) {
if(id == null) return null;
if(ENT_HIBERNATE_ID.equals(id.getModelEntity().getName())) {
- return id.getAttributeValue("type");
+ return id.getAttributeValue("type"); //$NON-NLS-1$
} else if(isIdComposite(id)) {
- return id.getAttributeValue("class");
+ return id.getAttributeValue("class"); //$NON-NLS-1$
} else {
return null;
}
@@ -183,8 +184,8 @@
public static boolean isCompositeIdOfOtherType(XModelObject object) {
if(object == null || !isIdComposite(object)) return false;
- return (object.getAttributeValue("name").length() > 0 ||
- object.getAttributeValue("class").length() > 0);
+ return (object.getAttributeValue("name").length() > 0 || //$NON-NLS-1$
+ object.getAttributeValue("class").length() > 0); //$NON-NLS-1$
}
public static boolean isLastPropertyInCompositeId(XModelObject object) {
@@ -195,9 +196,9 @@
}
public static void showLastPropertyInCompositeIdWarning(XModel model) {
- String message = "You should not remove last attribute from composite-id.\n"
+
- "Please replace id first.";
- model.getService().showDialog("Warning", message, new
String[]{"Close"}, null, ServiceDialog.WARNING);
+ String message = Messages.IdStructureHelper_ShouldNotRemoveLastAttribute;
+ model.getService().showDialog(Messages.IdStructureHelper_WarningTitle, message,
+ new String[]{Messages.IdStructureHelper_CloseOption}, null, ServiceDialog.WARNING);
}
// public static JavaBean getBeanForId(XModelObject id) {
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/ContextPackageProvider.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/ContextPackageProvider.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/ContextPackageProvider.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -19,7 +19,7 @@
public String getContextPackage() {
while(object != null && object.getFileType() != XModelObject.FILE) object =
object.getParent();
if(object == null) return null;
- String s = object.getAttributeValue("package");
+ String s = object.getAttributeValue("package"); //$NON-NLS-1$
if(s != null && s.length() == 0) return null;
return s;
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/DatabaseObjectImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/DatabaseObjectImpl.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/DatabaseObjectImpl.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -10,27 +10,29 @@
******************************************************************************/
package org.jboss.tools.hibernate.xml.model.impl;
+import org.jboss.tools.hibernate.xml.Messages;
+
public class DatabaseObjectImpl extends RegularObject2Impl {
private static final long serialVersionUID = 1L;
public DatabaseObjectImpl() {}
public String getPresentationString() {
- if("Hibernate3DatabaseObjectDef".equals(getModelEntity().getName())) {
+ if("Hibernate3DatabaseObjectDef".equals(getModelEntity().getName())) {
//$NON-NLS-1$
return super.getPresentationString();
}
- String s = getAttributeValue("drop");
- if(s == null || s.length() == 0) return "database object";
+ String s = getAttributeValue("drop"); //$NON-NLS-1$
+ if(s == null || s.length() == 0) return Messages.DatabaseObjectImpl_GenericName;
s = s.trim();
- if(s.toLowerCase().startsWith("drop")) {
+ if(s.toLowerCase().startsWith("drop")) { //$NON-NLS-1$
s = s.substring(4).trim();
}
- if(s != null && s.length() > 23) s = s.substring(0, 20) + "...";
+ if(s != null && s.length() > 23) s = s.substring(0, 20) + "...";
//$NON-NLS-1$
return s;
}
public String getAttributeValue(String name) {
- if("presentation".equals(name)) {
+ if("presentation".equals(name)) { //$NON-NLS-1$
return getPresentationString();
} else {
return super.getAttributeValue(name);
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibConfigCacheImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibConfigCacheImpl.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibConfigCacheImpl.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -14,19 +14,19 @@
private static final long serialVersionUID = 1L;
public String getAttributeValue(String name) {
- if("item".equals(name)) {
- String[] as = {"class", "collection"};
+ if("item".equals(name)) { //$NON-NLS-1$
+ String[] as = {"class", "collection"}; //$NON-NLS-1$
//$NON-NLS-2$
for (int i = 0; i < as.length; i++) {
String s = getAttributeValue(as[i]);
- if(s != null && s.length() > 0) return as[i] + "=" + s;
+ if(s != null && s.length() > 0) return as[i] + "=" + s;
//$NON-NLS-1$
}
- return "";
+ return ""; //$NON-NLS-1$
}
return super.getAttributeValue(name);
}
public String setAttributeValue(String name, String value) {
- if("item".equals(name)) {
+ if("item".equals(name)) { //$NON-NLS-1$
return getAttributeValue(name);
}
return super.setAttributeValue(name, value);
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibConfigListenerImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibConfigListenerImpl.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibConfigListenerImpl.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -8,9 +8,9 @@
public String getPathPart() {
String pp = super.getPathPart();
- String type = getAttributeValue("type");
+ String type = getAttributeValue("type"); //$NON-NLS-1$
if(type != null && type.length() > 0) {
- pp += ":" + type;
+ pp += ":" + type; //$NON-NLS-1$
}
return pp;
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibConfigMappingImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibConfigMappingImpl.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibConfigMappingImpl.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -14,19 +14,19 @@
private static final long serialVersionUID = 1L;
public String getAttributeValue(String name) {
- if("item".equals(name)) {
- String[] as = {"resource", "file", "jar",
"package", "class"};
+ if("item".equals(name)) { //$NON-NLS-1$
+ String[] as = {"resource", "file", "jar",
"package", "class"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$ //$NON-NLS-5$
for (int i = 0; i < as.length; i++) {
String s = getAttributeValue(as[i]);
- if(s != null && s.length() > 0) return as[i] + "=" + s;
+ if(s != null && s.length() > 0) return as[i] + "=" + s;
//$NON-NLS-1$
}
- return "";
+ return ""; //$NON-NLS-1$
}
return super.getAttributeValue(name);
}
public String setAttributeValue(String name, String value) {
- if("item".equals(name)) {
+ if("item".equals(name)) { //$NON-NLS-1$
return getAttributeValue(name);
}
return super.setAttributeValue(name, value);
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateClassImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateClassImpl.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateClassImpl.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -14,12 +14,12 @@
private static final long serialVersionUID = 3382417320218706443L;
public String get(String s) {
- if("details".equals(s)) {
- String elementType = getAttributeValue("element type");
- if("join".equals(elementType)) {
- return "join " + "table=" +
getAttributeValue("table");
+ if("details".equals(s)) { //$NON-NLS-1$
+ String elementType = getAttributeValue("element type"); //$NON-NLS-1$
+ if("join".equals(elementType)) { //$NON-NLS-1$
+ return "join " + "table=" +
getAttributeValue("table"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} else {
- return elementType + " name=" + getAttributeValue("name");
+ return elementType + " name=" + getAttributeValue("name");
//$NON-NLS-1$ //$NON-NLS-2$
}
}
return super.get(s);
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateElementImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateElementImpl.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateElementImpl.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -16,17 +16,17 @@
private static final long serialVersionUID = 220538596631608391L;
public String getPresentationString() {
- String presentationAttr =
getModelEntity().getProperty("presentationAttribute");
- return ((presentationAttr != null) ? getAttributeValue(presentationAttr) :
"") +
- "[" + getAttributeValue("element type") + "]";
+ String presentationAttr =
getModelEntity().getProperty("presentationAttribute"); //$NON-NLS-1$
+ return ((presentationAttr != null) ? getAttributeValue(presentationAttr) :
"") + //$NON-NLS-1$
+ "[" + getAttributeValue("element type") + "]";
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
public String name() {
- return "" + getPathPart();
+ return "" + getPathPart(); //$NON-NLS-1$
}
public String getPathPart() {
- return "element";
+ return "element"; //$NON-NLS-1$
}
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateFormulaImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateFormulaImpl.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateFormulaImpl.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -16,10 +16,10 @@
private static final long serialVersionUID = 1L;
public String name() {
- return "formula";
+ return "formula"; //$NON-NLS-1$
}
public String getPathPart() {
- return "" + ("" +
getAttributeValue("value")).hashCode();
+ return "" + ("" + getAttributeValue("value")).hashCode();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateIdImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateIdImpl.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateIdImpl.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -22,21 +22,21 @@
}
public String name() {
- String nm = "" + getAttributeValue("name");
- if(nm.length() == 0) nm = "<" + getModelEntity().getXMLSubPath() +
">";
+ String nm = "" + getAttributeValue("name"); //$NON-NLS-1$
//$NON-NLS-2$
+ if(nm.length() == 0) nm = "<" + getModelEntity().getXMLSubPath() +
">"; //$NON-NLS-1$ //$NON-NLS-2$
return nm;
}
public String getPathPart() {
- return "[id]";
+ return "[id]"; //$NON-NLS-1$
}
}
class IdOrderedByEntityChildren extends OrderedByEntityChildren {
protected int getEntityIndex(String s) {
- if("Hibernate3KeyManyToOne".equals(s))
- s = "Hibernate3KeyProperty";
+ if("Hibernate3KeyManyToOne".equals(s)) //$NON-NLS-1$
+ s = "Hibernate3KeyProperty"; //$NON-NLS-1$
return super.getEntityIndex(s);
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateMapImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateMapImpl.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateMapImpl.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -20,20 +20,20 @@
private static final long serialVersionUID = 1L;
public String getAttributeValue(String name) {
- if("index".equals(name)) {
- XModelObject c = getChildByPath("index");
- return c == null ? "index" : c.getAttributeValue("element type");
- } else if("element".equals(name)) {
- XModelObject c = getChildByPath("element");
- return c == null ? "element" : c.getAttributeValue("element
type");
+ if("index".equals(name)) { //$NON-NLS-1$
+ XModelObject c = getChildByPath("index"); //$NON-NLS-1$
+ return c == null ? "index" : c.getAttributeValue("element type");
//$NON-NLS-1$ //$NON-NLS-2$
+ } else if("element".equals(name)) { //$NON-NLS-1$
+ XModelObject c = getChildByPath("element"); //$NON-NLS-1$
+ return c == null ? "element" : c.getAttributeValue("element
type"); //$NON-NLS-1$ //$NON-NLS-2$
}
return super.getAttributeValue(name);
}
public String setAttributeValue(String name, String value) {
- if("index".equals(name)) {
+ if("index".equals(name)) { //$NON-NLS-1$
return value;
- } else if("element".equals(name)) {
+ } else if("element".equals(name)) { //$NON-NLS-1$
return value;
}
return super.setAttributeValue(name, value);
@@ -41,30 +41,30 @@
protected void onAttributeValueEdit(String name, String oldValue, String newValue)
throws XModelException {
if(newValue == null || newValue.equals(oldValue)) return;
- if("index".equals(name)) {
+ if("index".equals(name)) { //$NON-NLS-1$
String actionName =
- "index".equals(newValue) ? "AddIndex" :
- "list-index".equals(newValue) ? "AddListIndex" :
- "map-key".equals(newValue) ? "AddMapKey" :
- "composite-map-key".equals(newValue) ? "AddCompositeMapKey" :
- "map-key-many-to-many".equals(newValue) ? "AddMapKeyManyToMany"
:
- "composite-index".equals(newValue) ? "AddCompositeIndex" :
- "index-many-to-any".equals(newValue) ? "AddIndexManyToAny" :
- "index-many-to-many".equals(newValue) ? "AddIndexManyToMany" :
+ "index".equals(newValue) ? "AddIndex" : //$NON-NLS-1$
//$NON-NLS-2$
+ "list-index".equals(newValue) ? "AddListIndex" :
//$NON-NLS-1$ //$NON-NLS-2$
+ "map-key".equals(newValue) ? "AddMapKey" : //$NON-NLS-1$
//$NON-NLS-2$
+ "composite-map-key".equals(newValue) ? "AddCompositeMapKey" :
//$NON-NLS-1$ //$NON-NLS-2$
+ "map-key-many-to-many".equals(newValue) ? "AddMapKeyManyToMany" :
//$NON-NLS-1$ //$NON-NLS-2$
+ "composite-index".equals(newValue) ? "AddCompositeIndex" :
//$NON-NLS-1$ //$NON-NLS-2$
+ "index-many-to-any".equals(newValue) ? "AddIndexManyToAny" :
//$NON-NLS-1$ //$NON-NLS-2$
+ "index-many-to-many".equals(newValue) ? "AddIndexManyToMany" :
//$NON-NLS-1$ //$NON-NLS-2$
null;
- String actionPath = (actionName == null) ? null :
"CreateActions.IndexActions." + actionName;
+ String actionPath = (actionName == null) ? null :
"CreateActions.IndexActions." + actionName; //$NON-NLS-1$
if(actionPath != null && XActionInvoker.getAction(actionPath, this) != null)
{
XActionInvoker.invoke(actionPath, this, new Properties());
}
- } else if("element".equals(name)) {
+ } else if("element".equals(name)) { //$NON-NLS-1$
String actionName =
- "element".equals(newValue) ? "AddElement" :
- "one-to-many".equals(newValue) ? "AddOneToMany" :
- "many-to-many".equals(newValue) ? "AddManyToMany" :
- "composite-element".equals(newValue) ? "AddCompositeElement" :
- "many-to-any".equals(newValue) ? "AddManyToAny" :
+ "element".equals(newValue) ? "AddElement" : //$NON-NLS-1$
//$NON-NLS-2$
+ "one-to-many".equals(newValue) ? "AddOneToMany" : //$NON-NLS-1$
//$NON-NLS-2$
+ "many-to-many".equals(newValue) ? "AddManyToMany" : //$NON-NLS-1$
//$NON-NLS-2$
+ "composite-element".equals(newValue) ? "AddCompositeElement" :
//$NON-NLS-1$ //$NON-NLS-2$
+ "many-to-any".equals(newValue) ? "AddManyToAny" : //$NON-NLS-1$
//$NON-NLS-2$
null;
- String actionPath = (actionName == null) ? null : "CreateActions." +
actionName;
+ String actionPath = (actionName == null) ? null : "CreateActions." +
actionName; //$NON-NLS-1$
if(actionPath != null && XActionInvoker.getAction(actionPath, this) != null)
{
XActionInvoker.invoke(actionPath, this, new Properties());
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateMetaImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateMetaImpl.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateMetaImpl.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -16,13 +16,13 @@
private static final long serialVersionUID = 6834715619315516824L;
public String name() {
- return "" + getAttributeValue("attribute");
+ return "" + getAttributeValue("attribute"); //$NON-NLS-1$
//$NON-NLS-2$
}
public String getPathPart() {
- String v = getAttributeValue("value");
+ String v = getAttributeValue("value"); //$NON-NLS-1$
int hash = (v == null) ? -1 : v.hashCode();
- return name() + "[" + hash + "]";
+ return name() + "[" + hash + "]"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateVersionImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateVersionImpl.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/HibernateVersionImpl.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -16,11 +16,11 @@
private static final long serialVersionUID = 220540876994971851L;
public String getPathPart() {
- return "version";
+ return "version"; //$NON-NLS-1$
}
public String getPresentationString() {
- return "" + getAttributeValue("name");
+ return "" + getAttributeValue("name"); //$NON-NLS-1$
//$NON-NLS-2$
}
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/OrderedObject2Impl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/OrderedObject2Impl.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/OrderedObject2Impl.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -19,7 +19,7 @@
protected RegularChildren createChildren() {
return new OrderedByEntityChildren() {
protected int getEntityIndex(String s) {
- if("Hibernate3Formula".equals(s)) return
super.getEntityIndex("Hibernate3Column");
+ if("Hibernate3Formula".equals(s)) return
super.getEntityIndex("Hibernate3Column"); //$NON-NLS-1$ //$NON-NLS-2$
return super.getEntityIndex(s);
}
};
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/RegularObject2Impl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/RegularObject2Impl.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/impl/RegularObject2Impl.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -10,9 +10,11 @@
******************************************************************************/
package org.jboss.tools.hibernate.xml.model.impl;
+import java.text.MessageFormat;
import org.jboss.tools.common.meta.XAttribute;
import org.jboss.tools.common.model.impl.OrderedObjectImpl;
import org.jboss.tools.hibernate.xml.HibernateXMLPlugin;
+import org.jboss.tools.hibernate.xml.Messages;
public class RegularObject2Impl extends OrderedObjectImpl {
private static final long serialVersionUID = 1L;
@@ -22,18 +24,18 @@
if(attribute != null) return attribute;
XAttribute[] as = getModelEntity().getAttributes();
for (int i = 0; i < as.length; i++) {
- if("true".equals(as[i].getProperty("id"))) {
+ if("true".equals(as[i].getProperty("id"))) { //$NON-NLS-1$
//$NON-NLS-2$
attribute = as[i].getName();
return attribute;
}
}
- HibernateXMLPlugin.log("No id attribute set for entity " +
getModelEntity().getName());
+ HibernateXMLPlugin.log(MessageFormat.format(Messages.RegularObject2Impl_NoIdAttribute,
getModelEntity().getName()));
attribute = as[0].getName();
return attribute;
}
public String name() {
- return "" + getAttributeValue(getAttribute());
+ return "" + getAttributeValue(getAttribute()); //$NON-NLS-1$
}
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/HibernateUIXMLPlugin.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/HibernateUIXMLPlugin.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/HibernateUIXMLPlugin.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -15,7 +15,7 @@
import org.eclipse.ui.plugin.AbstractUIPlugin;
public class HibernateUIXMLPlugin extends AbstractUIPlugin {
- public static final String PLUGIN_ID = "org.jboss.tools.hibernate.xml.ui";
+ public static final String PLUGIN_ID = "org.jboss.tools.hibernate.xml.ui";
//$NON-NLS-1$
static HibernateUIXMLPlugin INSTANCE = null;
@@ -37,7 +37,7 @@
}
public static void log(Exception ex) {
- INSTANCE.getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, "No
message", ex));
+ INSTANCE.getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK,
Messages.HibernateUIXMLPlugin_NoExceptionMessage, ex));
}
public static boolean isDebugEnabled() {
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/Messages.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/Messages.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/Messages.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -0,0 +1,20 @@
+package org.jboss.tools.hibernate.ui.xml;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME =
"org.jboss.tools.hibernate.ui.xml.messages"; //$NON-NLS-1$
+ public static String HibConfig3CompoundEditor_SecurityLabel;
+ public static String HibConfig3CompoundEditor_SecurityTitle;
+ public static String HibConfig3CompoundEditor_SessionFactoryLabel;
+ public static String HibConfig3CompoundEditor_SessionFactoryTitle;
+ public static String Hibernate3CompoundEditor_HibernateXMLEditor;
+ public static String HibernateUIXMLPlugin_NoExceptionMessage;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/editor/HibConfig3CompoundEditor.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/editor/HibConfig3CompoundEditor.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/editor/HibConfig3CompoundEditor.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -15,6 +15,7 @@
import org.jboss.tools.common.model.ui.editors.multipage.DefaultMultipageEditor;
import org.jboss.tools.common.model.ui.texteditors.XMLTextEditorComponent;
import org.jboss.tools.hibernate.ui.xml.HibernateUIXMLPlugin;
+import org.jboss.tools.hibernate.ui.xml.Messages;
import org.jboss.tools.hibernate.xml.model.FileHibernateFilteredTreeConstraint;
@@ -27,25 +28,25 @@
if(isAppropriateNature()) {
sessionFactory = createTreeFormPage();
- sessionFactory.setLabel("Session Factory");
- sessionFactory.setTitle("Hibernate Configuration 3.0 XML Editor");
+ sessionFactory.setLabel(Messages.HibConfig3CompoundEditor_SessionFactoryLabel);
+ sessionFactory.setTitle(Messages.HibConfig3CompoundEditor_SessionFactoryTitle);
((TreeFormPage)sessionFactory).addFilter(new FileHibernateFilteredTreeConstraint());
- sessionFactory.initialize(object.getChildByPath("Session Factory"));
- addFormPage(sessionFactory, "sessionFactoryEditor");
+ sessionFactory.initialize(object.getChildByPath("Session Factory"));
//$NON-NLS-1$
+ addFormPage(sessionFactory, "sessionFactoryEditor"); //$NON-NLS-1$
security = createTreeFormPage();
- security.setLabel("Security");
- security.setTitle("Hibernate Configuration 3.0 XML Editor");
+ security.setLabel(Messages.HibConfig3CompoundEditor_SecurityLabel);
+ security.setTitle(Messages.HibConfig3CompoundEditor_SecurityTitle);
((TreeFormPage)security).addFilter(new FileHibernateFilteredTreeConstraint());
- security.initialize(object.getChildByPath("Security"));
- addFormPage(security, "securityEditor");
+ security.initialize(object.getChildByPath("Security")); //$NON-NLS-1$
+ addFormPage(security, "securityEditor"); //$NON-NLS-1$
}
createTextPage();
initEditors();
- if(treeFormPage != null) selectionProvider.addHost("treeEditor",
treeFormPage.getSelectionProvider());
- if(sessionFactory != null) selectionProvider.addHost("sessionFactoryEditor",
sessionFactory.getSelectionProvider());
- if(textEditor != null) selectionProvider.addHost("textEditor",
getTextSelectionProvider());
+ if(treeFormPage != null) selectionProvider.addHost("treeEditor",
treeFormPage.getSelectionProvider()); //$NON-NLS-1$
+ if(sessionFactory != null) selectionProvider.addHost("sessionFactoryEditor",
sessionFactory.getSelectionProvider()); //$NON-NLS-1$
+ if(textEditor != null) selectionProvider.addHost("textEditor",
getTextSelectionProvider()); //$NON-NLS-1$
}
protected void addFormPage(TreeFormPage formPage, String name) {
@@ -63,9 +64,9 @@
protected void setNormalMode() {
if (treeFormPage!=null) { // AU added
- sessionFactory.initialize(getModelObject().getChildByPath("Session
Factory")); // AU added
+ sessionFactory.initialize(getModelObject().getChildByPath("Session
Factory")); // AU added //$NON-NLS-1$
sessionFactory.setErrorMode(isErrorMode());
- security.initialize(getModelObject().getChildByPath("Security")); // AU
added
+ security.initialize(getModelObject().getChildByPath("Security")); // AU
added //$NON-NLS-1$
security.setErrorMode(isErrorMode());
} // AU added
if (selectionProvider!=null) {
@@ -78,9 +79,9 @@
protected void setErrorMode() {
if (treeFormPage!=null) { // AU added
- sessionFactory.initialize(getModelObject().getChildByPath("Session
Factory")); // AU added
+ sessionFactory.initialize(getModelObject().getChildByPath("Session
Factory")); // AU added //$NON-NLS-1$
sessionFactory.setErrorMode(isErrorMode());
- security.initialize(getModelObject().getChildByPath("Security")); // AU
added
+ security.initialize(getModelObject().getChildByPath("Security")); // AU
added //$NON-NLS-1$
security.setErrorMode(isErrorMode());
} // AU added
if (treeEditor!=null) {
@@ -90,7 +91,7 @@
public Object getAdapter(Class adapter) {
if (adapter == EditorDescriptor.class)
- return new EditorDescriptor("HibernateConfiguration3.0");
+ return new EditorDescriptor("HibernateConfiguration3.0"); //$NON-NLS-1$
return super.getAdapter(adapter);
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/editor/Hibernate3CompoundEditor.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/editor/Hibernate3CompoundEditor.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/editor/Hibernate3CompoundEditor.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -18,6 +18,7 @@
import org.jboss.tools.common.model.ui.editor.EditorDescriptor;
import org.jboss.tools.common.model.ui.editors.multipage.DefaultMultipageEditor;
import org.jboss.tools.common.model.ui.texteditors.XMLTextEditorComponent;
+import org.jboss.tools.hibernate.ui.xml.Messages;
import org.jboss.tools.hibernate.xml.model.FileHibernateFilteredTreeConstraint;
@@ -26,20 +27,20 @@
protected void doCreatePages() {
if(isAppropriateNature()) {
treeFormPage = createTreeFormPage();
- treeFormPage.setTitle("Hibernate 3.0 XML Editor");
+ treeFormPage.setTitle(Messages.Hibernate3CompoundEditor_HibernateXMLEditor);
((TreeFormPage)treeFormPage).addFilter(new FileHibernateFilteredTreeConstraint());
treeFormPage.initialize(object);
addFormPage(treeFormPage);
}
createTextPage();
initEditors();
- if(treeFormPage != null) selectionProvider.addHost("treeEditor",
treeFormPage.getSelectionProvider());
- if(textEditor != null) selectionProvider.addHost("textEditor",
getTextSelectionProvider());
+ if(treeFormPage != null) selectionProvider.addHost("treeEditor",
treeFormPage.getSelectionProvider()); //$NON-NLS-1$
+ if(textEditor != null) selectionProvider.addHost("textEditor",
getTextSelectionProvider()); //$NON-NLS-1$
}
public Object getAdapter(Class adapter) {
if (adapter == EditorDescriptor.class)
- return new EditorDescriptor("Hibernate3.0");
+ return new EditorDescriptor("Hibernate3.0"); //$NON-NLS-1$
return super.getAdapter(adapter);
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/form/HibConfig3CacheFormLayoutData.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/form/HibConfig3CacheFormLayoutData.java 2009-07-01
07:07:14 UTC (rev 16309)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/form/HibConfig3CacheFormLayoutData.java 2009-07-01
08:03:17 UTC (rev 16310)
@@ -18,25 +18,25 @@
* @author glory
*/
public class HibConfig3CacheFormLayoutData {
- static String CLASS_CACHE_ENTITY = "HibConfig3ClassCache";
- static String COLLECTION_CACHE_ENTITY = "HibConfig3CollectionCache";
+ static String CLASS_CACHE_ENTITY = "HibConfig3ClassCache"; //$NON-NLS-1$
+ static String COLLECTION_CACHE_ENTITY = "HibConfig3CollectionCache";
//$NON-NLS-1$
final static IFormData CACHE_LIST_DEFINITION = new FormData(
"Caches",
- "", //Description
+ "", //Description //$NON-NLS-1$
"Caches",
new FormAttributeData[]{new FormAttributeData("item", 100,
"item")},
new String[]{CLASS_CACHE_ENTITY, COLLECTION_CACHE_ENTITY},
- Hibernate3FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddCache")
+ Hibernate3FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddCache")
//$NON-NLS-1$
);
final static IFormData CACHE_FOLDER_DEFINITION = new FormData(
"Caches",
- "", //"Description
+ "", //"Description //$NON-NLS-1$
"HibConfig3CachesFolder",
new FormAttributeData[]{new FormAttributeData("item", 100,
"item")},
new String[]{CLASS_CACHE_ENTITY, COLLECTION_CACHE_ENTITY},
- Hibernate3FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddCache")
+ Hibernate3FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddCache")
//$NON-NLS-1$
);
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/messages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/messages.properties
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/messages.properties 2009-07-01
08:03:17 UTC (rev 16310)
@@ -0,0 +1,6 @@
+HibConfig3CompoundEditor_SecurityLabel=Security
+HibConfig3CompoundEditor_SecurityTitle=Hibernate Configuration 3.0 XML Editor
+HibConfig3CompoundEditor_SessionFactoryLabel=Session Factory
+HibConfig3CompoundEditor_SessionFactoryTitle=Hibernate Configuration 3.0 XML Editor
+Hibernate3CompoundEditor_HibernateXMLEditor=Hibernate 3.0 XML Editor
+HibernateUIXMLPlugin_NoExceptionMessage=No message