Author: vyemialyanchyk
Date: 2008-06-04 10:33:46 -0400 (Wed, 04 Jun 2008)
New Revision: 8545
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/Messages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/messages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/Messages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/messages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/Messages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/messages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/Messages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/messages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/Messages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/messages.properties
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/MapperPlugin.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/CFGXMLContentAssistProcessor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ChooseConsoleConfigurationDialog.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/HBMXMLContentAssistProcessor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/HBMXMLHyperlink.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/HBMXMLHyperlinkDetector.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/HibernateCfgXmlEditor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringEditor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/SQLTypeContentProvider.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/ColumnDetailsPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/ConsoleConfigNamePart.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/CounterFormPart.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/GeneratorDetailsPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/HibernateConfigurationForm.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/ParamDetailsPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/PrimaryKeyDetailsPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngFormEditorPart.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngOverviewPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngTableFilterPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngTablesPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngTypeMappingPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TableDetailsPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TableFilterFormPart.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TablePropertiesBlock.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TablePropertiesLabelProvider.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TypeMappingFormPart.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TypeMappingView.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/GeneratorTypeHandler.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/HBMInfoExtractor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/HibernateTypeHandler.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/JavaTypeHandler.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/PropertyAccessHandler.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/factory/ObserverAdapterFactory.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngColumnAdapter.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngGeneratorAdapter.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngParamAdapter.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngPrimaryKeyAdapter.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngTableAdapter.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/TableFilterAdapter.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/TypeMappingAdapter.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/HibernateXMLContentOutlineConfiguration.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/JFaceNodeAdapterForXML.java
Log:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-500
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/MapperPlugin.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/MapperPlugin.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/MapperPlugin.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -97,7 +97,7 @@
public ResourceBundle getResourceBundle() {
try {
if (resourceBundle == null)
- resourceBundle =
ResourceBundle.getBundle("org.hibernate.eclipse.mapper.MapperPluginResources");
+ resourceBundle =
ResourceBundle.getBundle("org.hibernate.eclipse.mapper.MapperPluginResources");
//$NON-NLS-1$
} catch (MissingResourceException x) {
resourceBundle = null;
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/CFGXMLContentAssistProcessor.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/CFGXMLContentAssistProcessor.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/CFGXMLContentAssistProcessor.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -49,7 +49,7 @@
protected List getAttributeValueProposals(String attributeName, String matchString, int
offset, ContentAssistRequest contentAssistRequest) {
String nodeName = contentAssistRequest.getNode().getNodeName();
- if("property".equals(nodeName) &&
"name".equals(attributeName)) {
+ if("property".equals(nodeName) &&
"name".equals(attributeName)) { //$NON-NLS-1$ //$NON-NLS-2$
List types = this.extractor.findMatchingPropertyTypes(matchString);
List proposals = new ArrayList(types.size() );
@@ -59,7 +59,7 @@
}
return proposals;
}
- if("property".equals(nodeName) &&
"value".equals(attributeName)) {
+ if("property".equals(nodeName) &&
"value".equals(attributeName)) { //$NON-NLS-1$//$NON-NLS-2$
List types = this.extractor.findMatchingPropertyValues(matchString,
contentAssistRequest.getNode());
List proposals = new ArrayList(types.size() );
@@ -70,7 +70,7 @@
return proposals;
}
- if("mapping".equals(nodeName) &&
"resource".equals(attributeName)) {
+ if("mapping".equals(nodeName) &&
"resource".equals(attributeName)) { //$NON-NLS-1$ //$NON-NLS-2$
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ChooseConsoleConfigurationDialog.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ChooseConsoleConfigurationDialog.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ChooseConsoleConfigurationDialog.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -42,7 +42,7 @@
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
- setTitle("Select a console configuration");
+ setTitle(Messages.CHOOSCONSOLECONFIGURATIONDIALOG_SELECT_CONSOLE_CONFIGURATION);
//setMessage("");
if (getTitleImageLabel() != null) {
@@ -56,7 +56,7 @@
protected void configureShell(Shell shell) {
super.configureShell(shell);
- shell.setText("Select a console configuration");
+
shell.setText(Messages.CHOOSCONSOLECONFIGURATIONDIALOG_SELECT_CONSOLE_CONFIGURATION);
}
protected void okPressed() {
@@ -82,7 +82,7 @@
panel.setFont(parent.getFont());
Label label = new Label(panel, SWT.NONE);
- label.setText("Console configuration:");
+ label.setText(Messages.CHOOSCONSOLECONFIGURATIONDIALOG_CONSOLE_CONFIGURATION);
text = new Combo(panel, SWT.BORDER | SWT.LEAD | SWT.DROP_DOWN | SWT.READ_ONLY);
@@ -93,7 +93,7 @@
public void modifyText(ModifyEvent e) {
Button okButton = getButton(Window.OK);
if(okButton != null && !okButton.isDisposed()) {
- okButton.setEnabled(!"".equals(text.getText()));
+ okButton.setEnabled(!"".equals(text.getText())); //$NON-NLS-1$
}
}
});
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/HBMXMLContentAssistProcessor.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/HBMXMLContentAssistProcessor.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/HBMXMLContentAssistProcessor.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -45,7 +45,7 @@
Node node = contentAssistRequest.getNode();
List proposals = new ArrayList();
- String path = node.getNodeName() + ">" + attributeName;
+ String path = node.getNodeName() + ">" + attributeName; //$NON-NLS-1$
HBMInfoHandler handler = sourceLocator.getAttributeHandler(path);
if (handler != null) {
proposals.addAll(Arrays.asList(handler.attributeCompletionProposals(getJavaProject(contentAssistRequest),
node, attributeName, start, offset) ) );
@@ -55,7 +55,7 @@
String string = contentAssistRequest.getDocumentRegion().getText();
string = string.replace('<', '[');
string = string.replace('>', ']');
- CompletionProposal completionProposal = new CompletionProposal("[" + start +
"],[" + path + "],[" + offset + "]", offset, 1, 4, null,
null, null, string);
+ CompletionProposal completionProposal = new CompletionProposal("[" + start +
"],[" + path + "],[" + offset + "]", offset, 1, 4, null,
null, null, string); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
proposals.add(completionProposal);
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/HBMXMLHyperlink.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/HBMXMLHyperlink.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/HBMXMLHyperlink.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -65,7 +65,7 @@
}
public String toString() {
- return "HBMXML hyperlink: " + element;
+ return "HBMXML hyperlink: " + element; //$NON-NLS-1$
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/HBMXMLHyperlinkDetector.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/HBMXMLHyperlinkDetector.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/HBMXMLHyperlinkDetector.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -65,7 +65,7 @@
Attr currentAttrNode = getCurrentAttrNode(currentNode, region.getOffset() );
if(currentAttrNode!=null) {
- String path = currentNode.getNodeName() + ">" +
currentAttrNode.getName();
+ String path = currentNode.getNodeName() + ">" +
currentAttrNode.getName(); //$NON-NLS-1$
HBMInfoHandler handler = infoExtractor.getAttributeHandler(path);
if(handler!=null) {
IJavaProject project =
CFGXMLStructuredTextViewerConfiguration.findJavaProject(document);
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/HibernateCfgXmlEditor.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/HibernateCfgXmlEditor.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/HibernateCfgXmlEditor.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -45,7 +45,7 @@
initSourcePage();
} catch (PartInitException pe) {
MapperPlugin.getDefault().getLogger().logException(
- "Could not create form part for hibernate.cfg.xml editor", pe );
+ Messages.HIBERNATECFGXMLEDITOR_COULD_NOT_CREATE_FORM_PART, pe );
}
}
@@ -64,7 +64,7 @@
configurationForm = new HibernateConfigurationForm();
configurationForm.createPartControl(getContainer());
configurationPageNo = addPage(configurationForm.getControl());
- setPageText(configurationPageNo, "Configuration");
+ setPageText(configurationPageNo, Messages.HIBERNATECFGXMLEDITOR_CONFIGURATION);
setActivePage( 0 );
}
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/Messages.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/Messages.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/Messages.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -0,0 +1,26 @@
+package org.hibernate.eclipse.mapper.editors;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME =
"org.hibernate.eclipse.mapper.editors.messages"; //$NON-NLS-1$
+ public static String CHOOSCONSOLECONFIGURATIONDIALOG_CONSOLE_CONFIGURATION;
+ public static String CHOOSCONSOLECONFIGURATIONDIALOG_SELECT_CONSOLE_CONFIGURATION;
+ public static String HIBERNATECFGXMLEDITOR_CONFIGURATION;
+ public static String HIBERNATECFGXMLEDITOR_COULD_NOT_CREATE_FORM_PART;
+ public static String REVERSEENGINEERINGEDITOR_COULD_NOT_CREATE_GRAPHICAL_VIEWER;
+ public static String REVERSEENGINEERINGEDITOR_ERROR_WHILE_REFRESHING_DATABASETREE;
+ public static String REVERSEENGINEERINGEDITOR_NO_FILTERS_DEFINED;
+ public static String REVERSEENGINEERINGEDITOR_NO_FILTERS_HAS_BEEN_DEFINED;
+ public static String REVERSEENGINEERINGEDITOR_OVERVIEW;
+ public static String REVERSEENGINEERINGEDITOR_TABLE_COLUMN;
+ public static String REVERSEENGINEERINGEDITOR_TABLE_FILTERS;
+ public static String REVERSEENGINEERINGEDITOR_TYPE_MAPPINGS;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringEditor.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringEditor.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringEditor.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -89,7 +89,7 @@
}
catch (PartInitException e) {
MapperPlugin.getDefault().getLogger().logException(
- "Could not create graphical viewer", e );
+ Messages.REVERSEENGINEERINGEDITOR_COULD_NOT_CREATE_GRAPHICAL_VIEWER, e );
}
}
@@ -97,26 +97,26 @@
int i = 0;
overviewsPage = new RevEngOverviewPage(this);
addPage( i, overviewsPage);
- setPageText(i, "Overview");
+ setPageText(i, Messages.REVERSEENGINEERINGEDITOR_OVERVIEW);
pageNameToIndex.put(RevEngOverviewPage.PART_ID, new Integer(i));
i++;
typeMappingsPage = new RevEngTypeMappingPage( this );
addPage( i, typeMappingsPage);
- setPageText( i, "Type Mappings" );
+ setPageText( i, Messages.REVERSEENGINEERINGEDITOR_TYPE_MAPPINGS );
pageNameToIndex.put(RevEngTypeMappingPage.PART_ID, new Integer(i));
i++;
tableFilterPage = new RevEngTableFilterPage( this );
addPage( i, tableFilterPage);
- setPageText( i, "Table Filters" );
+ setPageText( i, Messages.REVERSEENGINEERINGEDITOR_TABLE_FILTERS );
pageNameToIndex.put(RevEngTableFilterPage.PART_ID, new Integer(i));
i++;
tableProperties = new RevEngTablesPage(this );
addPage( i, tableProperties);
- setPageText(i, "Table && Columns");
+ setPageText(i, Messages.REVERSEENGINEERINGEDITOR_TABLE_COLUMN);
pageNameToIndex.put(RevEngTablesPage.PART_ID, new Integer(i));
i++;
@@ -217,12 +217,12 @@
}
TableFilter tf = new TableFilter();
tf.setExclude(Boolean.FALSE);
- tf.setMatchCatalog(".*");
- tf.setMatchSchema(".*");
- tf.setMatchName(".*");
+ tf.setMatchCatalog(".*"); //$NON-NLS-1$
+ tf.setMatchSchema(".*"); //$NON-NLS-1$
+ tf.setMatchName(".*"); //$NON-NLS-1$
repository.addTableFilter(tf);
if(tableFilters.length==0) {
- boolean b = MessageDialog.openQuestion(getContainer().getShell(), "No filters
defined", "No filters has been defined.\n This can make the reading of the
database schema very slow.\n Do you wish to continue reading the database schema
?");
+ boolean b = MessageDialog.openQuestion(getContainer().getShell(),
Messages.REVERSEENGINEERINGEDITOR_NO_FILTERS_DEFINED,
Messages.REVERSEENGINEERINGEDITOR_NO_FILTERS_HAS_BEEN_DEFINED);
if(!b) {
return null;
}
@@ -238,13 +238,13 @@
return lazyDatabaseSchema;
} catch(HibernateException he) {
- HibernateConsolePlugin.getDefault().showError(getContainer().getShell(), "Error
while refreshing database tree", he);
+ HibernateConsolePlugin.getDefault().showError(getContainer().getShell(),
Messages.REVERSEENGINEERINGEDITOR_ERROR_WHILE_REFRESHING_DATABASETREE, he);
return null;
}
}
private ConsoleConfiguration askForConsoleConfiguration() {
- ChooseConsoleConfigurationDialog dialog = new
ChooseConsoleConfigurationDialog(getContainer().getShell(),"");
+ ChooseConsoleConfigurationDialog dialog = new
ChooseConsoleConfigurationDialog(getContainer().getShell(),""); //$NON-NLS-1$
dialog.prompt();
if(StringHelper.isEmpty(dialog.getSelectedConfigurationName())) {
return null;
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/SQLTypeContentProvider.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/SQLTypeContentProvider.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/SQLTypeContentProvider.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -37,12 +37,12 @@
if(im instanceof IDOMModel) {
IDOMModel model = (IDOMModel)im;
- List childNodes = DOMModelUtil.getChildrenByTagName(model.getDocument(),
"hibernate-reverse-engineering");
+ List childNodes = DOMModelUtil.getChildrenByTagName(model.getDocument(),
"hibernate-reverse-engineering"); //$NON-NLS-1$
if(childNodes.size()>=1) {
Element l = (Element)childNodes.get(0);
- childNodes = DOMModelUtil.getChildrenByTagName(l, "type-mapping");
+ childNodes = DOMModelUtil.getChildrenByTagName(l, "type-mapping");
//$NON-NLS-1$
if(childNodes.size()>=1) {
- childNodes = DOMModelUtil.getChildrenByTagName(l, "sql-type");
+ childNodes = DOMModelUtil.getChildrenByTagName(l, "sql-type");
//$NON-NLS-1$
Object[] o = new Object[childNodes.size()];
for (int i = 0; i < childNodes.size(); i++) {
o[i] = childNodes.get(i);
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/messages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/messages.properties
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/messages.properties 2008-06-04
14:33:46 UTC (rev 8545)
@@ -0,0 +1,12 @@
+CHOOSCONSOLECONFIGURATIONDIALOG_CONSOLE_CONFIGURATION=Console configuration:
+CHOOSCONSOLECONFIGURATIONDIALOG_SELECT_CONSOLE_CONFIGURATION=Select a console
configuration
+HIBERNATECFGXMLEDITOR_CONFIGURATION=Configuration
+HIBERNATECFGXMLEDITOR_COULD_NOT_CREATE_FORM_PART=Could not create form part for
hibernate.cfg.xml editor
+REVERSEENGINEERINGEDITOR_COULD_NOT_CREATE_GRAPHICAL_VIEWER=Could not create graphical
viewer
+REVERSEENGINEERINGEDITOR_ERROR_WHILE_REFRESHING_DATABASETREE=Error while refreshing
database tree
+REVERSEENGINEERINGEDITOR_NO_FILTERS_DEFINED=No filters defined
+REVERSEENGINEERINGEDITOR_NO_FILTERS_HAS_BEEN_DEFINED=No filters has been defined.\n This
can make the reading of the database schema very slow.\n Do you wish to continue reading
the database schema ?
+REVERSEENGINEERINGEDITOR_OVERVIEW=Overview
+REVERSEENGINEERINGEDITOR_TABLE_COLUMN=Table && Columns
+REVERSEENGINEERINGEDITOR_TABLE_FILTERS=Table Filters
+REVERSEENGINEERINGEDITOR_TYPE_MAPPINGS=Type Mappings
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/ColumnDetailsPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/ColumnDetailsPage.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/ColumnDetailsPage.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -49,18 +49,18 @@
private IRevEngColumn column;
public void buildContents(FormToolkit toolkit, Section section, Composite client) {
- section.setText("Column Details");
- section.setDescription("Set the properties of the selected column.");
+ section.setText(Messages.COLUMNDETAILSPAGE_COLUMN_DETAILS);
+ section.setDescription(Messages.COLUMNDETAILSPAGE_SET_PROPERTIES_OF_SELECTED_COLUMN);
- nameEntry = new FormTextEntry(client, toolkit, "Name:", SWT.NULL);
- nameEntry.setDescription("The name of the column");
+ nameEntry = new FormTextEntry(client, toolkit, Messages.COLUMNDETAILSPAGE_NAME,
SWT.NULL);
+ nameEntry.setDescription(Messages.COLUMNDETAILSPAGE_THE_NAME_OF_THE_COLUMN);
nameEntry.setFormEntryListener(new FormTextEntryListenerAdapter() {
public void textValueChanged(FormTextEntry entry) {
column.setName(entry.getValue());
}
});
- excluded = toolkit.createButton(client, "Exclude column from reverse
engineering", SWT.CHECK);
+ excluded = toolkit.createButton(client,
Messages.COLUMNDETAILSPAGE_EXCLUDE_COLUMNS_FROM_REVERSE_ENGINEERING, SWT.CHECK);
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true,false);
gridData.horizontalSpan = 3;
excluded.setLayoutData(gridData);
@@ -72,23 +72,23 @@
});
- jdbcTypeEntry = new FormTextEntry(client, toolkit, "JDBC Type:", SWT.NULL);
- jdbcTypeEntry.setDescription("Which JDBC Type this column should have (overriding
the type read from the database)");
+ jdbcTypeEntry = new FormTextEntry(client, toolkit,
Messages.COLUMNDETAILSPAGE_JDBC_TYPE, SWT.NULL);
+ jdbcTypeEntry.setDescription(Messages.COLUMNDETAILSPAGE_WHICH_JDBC_TYPE_THIS_COLUMN_SHOULD_HAVE);
jdbcTypeEntry.setFormEntryListener(new FormTextEntryListenerAdapter() {
public void textValueChanged(FormTextEntry entry) {
column.setJDBCType(entry.getValue());
}
});
- propertyEntry = new FormTextEntry(client, toolkit, "Property name:",
SWT.NULL);
- propertyEntry.setDescription("The property name which must be used for this column
when used as a property");
+ propertyEntry = new FormTextEntry(client, toolkit,
Messages.COLUMNDETAILSPAGE_PROPERTY_NAME, SWT.NULL);
+ propertyEntry.setDescription(Messages.COLUMNDETAILSPAGE_THE_PROPERTY_NAME_WHICH_MUST_BE_USED_FOR);
propertyEntry.setFormEntryListener(new FormTextEntryListenerAdapter() {
public void textValueChanged(FormTextEntry entry) {
column.setPropertyName(entry.getValue());
}
});
- typeEntry = new FormTextEntry(client, toolkit, "Hibernate Type:", SWT.NULL);
- typeEntry.setDescription("The hibernate type which should be used for this colum
when used as a property");
+ typeEntry = new FormTextEntry(client, toolkit,
Messages.COLUMNDETAILSPAGE_HIBERNATE_TYPE, SWT.NULL);
+ typeEntry.setDescription(Messages.COLUMNDETAILSPAGE_THE_HIBERNATE_TYPE);
typeEntry.setFormEntryListener(new FormTextEntryListenerAdapter() {
public void textValueChanged(FormTextEntry entry) {
column.setType(entry.getValue());
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/ConsoleConfigNamePart.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/ConsoleConfigNamePart.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/ConsoleConfigNamePart.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -49,13 +49,13 @@
public boolean setFormInput(IReverseEngineeringDefinition def) {
if(StringHelper.isEmpty(text.getText())) {
- String initialConfg = "";
+ String initialConfg = ""; //$NON-NLS-1$
try {
if (re.getHibernateNature()!=null) {
initialConfg = re.getHibernateNature().getDefaultConsoleConfigurationName();
}
} catch (CoreException e) {
- MapperPlugin.getDefault().getLogger().logException("Problem when trying to
Hibernate Project information",e);
+ MapperPlugin.getDefault().getLogger().logException(Messages.CONSOLECONFIGNAMEPART_PROBLEM_WHEN_TRYING_TO_HIBERNATE_PROJECT_INFO,e);
}
text.setText(initialConfg);
@@ -87,11 +87,11 @@
}
protected String getSectionDescription() {
- return "Select Console configuration to be used for editing the reverse
engineering settings";
+ return Messages.CONSOLECONFIGNAMEPART_SELECT_CONSOLE_CONFIGURATION;
}
protected String getSectionTitle() {
- return "Console Configuration";
+ return Messages.CONSOLECONFIGNAMEPART_CONSOLE_CONFIGURATION;
}
String getConsoleConfigName() {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/CounterFormPart.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/CounterFormPart.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/CounterFormPart.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -47,7 +47,7 @@
listener = new PropertyChangeListener() {
int cnt = 0;
public void propertyChange(PropertyChangeEvent evt) {
- text.setText("" + cnt++);
+ text.setText("" + cnt++); //$NON-NLS-1$
}
};
@@ -63,15 +63,15 @@
FormToolkit toolkit = form.getToolkit();
Composite composite = toolkit.createComposite(getSection());
composite.setLayout(new FillLayout());
- text = toolkit.createText(composite, "Zero");
+ text = toolkit.createText(composite, Messages.COUNTERFORMPART_ZERO);
return composite;
}
protected String getSectionDescription() {
- return "debug counter for property changes";
+ return Messages.COUNTERFORMPART_DEBUG_COUNTER_FOR_PROPERTY_CHANGES;
}
protected String getSectionTitle() {
- return "Debug counter";
+ return Messages.COUNTERFORMPART_DEBUG_COUNTER;
}
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/GeneratorDetailsPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/GeneratorDetailsPage.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/GeneratorDetailsPage.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -43,10 +43,10 @@
private IRevEngGenerator generator;
protected void buildContents(FormToolkit toolkit, Section section, Composite client) {
- section.setText("Id Generator details");
- section.setDescription("Set the properties of the selected generator.");
+ section.setText(Messages.GENERATORDETAILSPAGE_ID_GENERATOR_DETAILS);
+ section.setDescription(Messages.GENERATORDETAILSPAGE_SET_THE_PROPERTIES_OF_THE_SELECTED_GENERATOR);
- nameEntry = new FormTextEntry(client, toolkit, "Class:", SWT.NULL);
+ nameEntry = new FormTextEntry(client, toolkit, Messages.GENERATORDETAILSPAGE_CLASS,
SWT.NULL);
nameEntry.setFormEntryListener(new FormTextEntryListenerAdapter() {
public void textValueChanged(FormTextEntry entry) {
generator.setGeneratorClassName(entry.getValue());
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/HibernateConfigurationForm.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/HibernateConfigurationForm.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/HibernateConfigurationForm.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -71,7 +71,7 @@
public void createPartControl(Composite cotainer) {
this.container = cotainer;
managedForm = new ManagedForm( container );
- getForm().setText( "Hibernate Configuration" );
+ getForm().setText( Messages.HIBERNATECONFIGURATIONFORM_HIBERNATE_CONFIGURATION );
GridLayout layout = new GridLayout();
layout.numColumns = 2;
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/Messages.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/Messages.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/Messages.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -0,0 +1,84 @@
+package org.hibernate.eclipse.mapper.editors.reveng;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME =
"org.hibernate.eclipse.mapper.editors.reveng.messages"; //$NON-NLS-1$
+ public static String COLUMNDETAILSPAGE_COLUMN_DETAILS;
+ public static String COLUMNDETAILSPAGE_EXCLUDE_COLUMNS_FROM_REVERSE_ENGINEERING;
+ public static String COLUMNDETAILSPAGE_HIBERNATE_TYPE;
+ public static String COLUMNDETAILSPAGE_JDBC_TYPE;
+ public static String COLUMNDETAILSPAGE_NAME;
+ public static String COLUMNDETAILSPAGE_PROPERTY_NAME;
+ public static String COLUMNDETAILSPAGE_SET_PROPERTIES_OF_SELECTED_COLUMN;
+ public static String COLUMNDETAILSPAGE_THE_HIBERNATE_TYPE;
+ public static String COLUMNDETAILSPAGE_THE_NAME_OF_THE_COLUMN;
+ public static String COLUMNDETAILSPAGE_THE_PROPERTY_NAME_WHICH_MUST_BE_USED_FOR;
+ public static String COLUMNDETAILSPAGE_WHICH_JDBC_TYPE_THIS_COLUMN_SHOULD_HAVE;
+ public static String CONSOLECONFIGNAMEPART_CONSOLE_CONFIGURATION;
+ public static String
CONSOLECONFIGNAMEPART_PROBLEM_WHEN_TRYING_TO_HIBERNATE_PROJECT_INFO;
+ public static String CONSOLECONFIGNAMEPART_SELECT_CONSOLE_CONFIGURATION;
+ public static String COUNTERFORMPART_DEBUG_COUNTER;
+ public static String COUNTERFORMPART_DEBUG_COUNTER_FOR_PROPERTY_CHANGES;
+ public static String COUNTERFORMPART_ZERO;
+ public static String GENERATORDETAILSPAGE_CLASS;
+ public static String GENERATORDETAILSPAGE_ID_GENERATOR_DETAILS;
+ public static String GENERATORDETAILSPAGE_SET_THE_PROPERTIES_OF_THE_SELECTED_GENERATOR;
+ public static String HIBERNATECONFIGURATIONFORM_HIBERNATE_CONFIGURATION;
+ public static String PARAMDETAILSPAGE_GENERATOR_PARAMETER_DETAILS;
+ public static String PARAMDETAILSPAGE_NAME;
+ public static String PARAMDETAILSPAGE_SET_THE_PROPERTIES_OF_THE_SELECTED_PARAMETER;
+ public static String PARAMDETAILSPAGE_VALUE;
+ public static String PRIMARYKEYDETAILSPAGE_ADD_COLUMN;
+ public static String PRIMARYKEYDETAILSPAGE_ADD_GENERATOR;
+ public static String
PRIMARYKEYDETAILSPAGE_PRIMARY_KEY_CAN_DEFINE_GENERATOR_STRATEGY_AND_ALTERNATIVE_COLUMNS;
+ public static String PRIMARYKEYDETAILSPAGE_PRIMARY_KEY_DETAILS;
+ public static String REVENGFORMEDITORPART_NEED_TO_OVERRIDE_FORMCONTENT_IN;
+ public static String REVENGOVERVIEWPAGE_CONTENTS;
+ public static String REVENGOVERVIEWPAGE_OVERVIEW;
+ public static String REVENGOVERVIEWPAGE_THE_CONTENT;
+ public static String REVENGTABLEFILTERPAGE_TABLE_FILTERS;
+ public static String REVENGTABLESPAGE_TABLES_AND_COLUMNS;
+ public static String REVENGTYPEMAPPINGPAGE_TYPE_MAPPINGS;
+ public static String TABLEDETAILSPAGE_ADD_PRIMARY_KEY;
+ public static String TABLEDETAILSPAGE_CATALOG;
+ public static String TABLEDETAILSPAGE_CLASS_NAME;
+ public static String TABLEDETAILSPAGE_NAME;
+ public static String TABLEDETAILSPAGE_SCHEMA;
+ public static String TABLEDETAILSPAGE_SET_PROPERTIES_OF_SELECTED_TABLE;
+ public static String TABLEDETAILSPAGE_TABLE_DETAILS;
+ public static String TABLEFILTERFORMPART_TABLE_FILTERS;
+ public static String TABLEFILTERFORMPART_TABLE_FILTERS_DEFINES_WHICH_TABLE_INCLUDED;
+ public static String TABLEPROPERTIESBLOCK_ADD;
+ public static String TABLEPROPERTIESBLOCK_ADD_TABLES_COLUMNS;
+ public static String TABLEPROPERTIESBLOCK_DELETE;
+ public static String TABLEPROPERTIESBLOCK_DESELECT_ALL;
+ public static String
TABLEPROPERTIESBLOCK_EXPLICITLY_CONTROL_SETTINGS_FOR_TABLE_COLUMNS;
+ public static String TABLEPROPERTIESBLOCK_HORIZONTAL_ORIENTATION;
+ public static String TABLEPROPERTIESBLOCK_SELECT_ALL_CHILDREN;
+ public static String TABLEPROPERTIESBLOCK_SELECT_TABLES_COLUMNS;
+ public static String TABLEPROPERTIESBLOCK_TABLES_COLUMNS;
+ public static String TABLEPROPERTIESBLOCK_VERTICAL_ORIENTATION;
+ public static String TABLEPROPERTIESLABELPROVIDER_PRIMARY_KEY;
+ public static String TYPEMAPPINGFORMPART_TYPE_MAPPINGS;
+ public static String
TYPEMAPPINGFORMPART_TYPE_MAPPINGS_ALLOWS_YOU_DEFINE_WHICH_HIBERNATE_TYPE;
+ public static String TYPEMAPPINGVIEW_ADD;
+ public static String TYPEMAPPINGVIEW_DATABASE_SCHEMA;
+ public static String TYPEMAPPINGVIEW_DO_YOU_WANT_TO_REMOVE_ALL_MAPPINGS;
+ public static String TYPEMAPPINGVIEW_HIBERNATE_TYPE;
+ public static String TYPEMAPPINGVIEW_JDBC_TYPE;
+ public static String TYPEMAPPINGVIEW_LENGTH;
+ public static String TYPEMAPPINGVIEW_NOT_KNOWN_BUTTON;
+ public static String TYPEMAPPINGVIEW_NOT_NULL;
+ public static String TYPEMAPPINGVIEW_PRECISION;
+ public static String TYPEMAPPINGVIEW_REMOVE_ALL_MAPPINGS;
+ public static String TYPEMAPPINGVIEW_SCALE;
+ public static String TYPEMAPPINGVIEW_TYPE_MAPPINGS;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/ParamDetailsPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/ParamDetailsPage.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/ParamDetailsPage.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -44,17 +44,17 @@
private IRevEngParameter param;
protected void buildContents(FormToolkit toolkit, Section section, Composite client) {
- section.setText("Generator parameter details");
- section.setDescription("Set the properties of the selected parameter.");
+ section.setText(Messages.PARAMDETAILSPAGE_GENERATOR_PARAMETER_DETAILS);
+ section.setDescription(Messages.PARAMDETAILSPAGE_SET_THE_PROPERTIES_OF_THE_SELECTED_PARAMETER);
- nameEntry = new FormTextEntry(client, toolkit, "Name:", SWT.NULL);
+ nameEntry = new FormTextEntry(client, toolkit, Messages.PARAMDETAILSPAGE_NAME,
SWT.NULL);
nameEntry.setFormEntryListener(new FormTextEntryListenerAdapter() {
public void textValueChanged(FormTextEntry entry) {
param.setName(entry.getValue());
}
});
- valueEntry = new FormTextEntry(client, toolkit, "Value:", SWT.NULL);
+ valueEntry = new FormTextEntry(client, toolkit, Messages.PARAMDETAILSPAGE_VALUE,
SWT.NULL);
valueEntry.setFormEntryListener(new FormTextEntryListenerAdapter() {
public void textValueChanged(FormTextEntry entry) {
param.setValue(entry.getValue());
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/PrimaryKeyDetailsPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/PrimaryKeyDetailsPage.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/PrimaryKeyDetailsPage.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -46,10 +46,10 @@
private IRevEngPrimaryKey primaryKey;
protected void buildContents(FormToolkit toolkit, Section section, Composite client) {
- section.setText("Primary key details");
- section.setDescription("A primary key can define a generator strategy and
alternative columns");
+ section.setText(Messages.PRIMARYKEYDETAILSPAGE_PRIMARY_KEY_DETAILS);
+ section.setDescription(Messages.PRIMARYKEYDETAILSPAGE_PRIMARY_KEY_CAN_DEFINE_GENERATOR_STRATEGY_AND_ALTERNATIVE_COLUMNS);
- Button createGenerator = toolkit.createButton(client, "Add generator",
SWT.NONE);
+ Button createGenerator = toolkit.createButton(client,
Messages.PRIMARYKEYDETAILSPAGE_ADD_GENERATOR, SWT.NONE);
createGenerator.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -57,7 +57,7 @@
}
});
- Button createColumn = toolkit.createButton(client, "Add column", SWT.NONE);
+ Button createColumn = toolkit.createButton(client,
Messages.PRIMARYKEYDETAILSPAGE_ADD_COLUMN, SWT.NONE);
createColumn.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngFormEditorPart.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngFormEditorPart.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngFormEditorPart.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -41,7 +41,7 @@
super.createPartControl( parent );
}
protected void createFormContent(IManagedForm managedForm) {
- throw new IllegalStateException("Need to override formcontent in " +
this.getClass().getName());
+ throw new
IllegalStateException(Messages.REVENGFORMEDITORPART_NEED_TO_OVERRIDE_FORMCONTENT_IN +
this.getClass().getName());
}
ReverseEngineeringEditor getReverseEngineeringEditor() {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngOverviewPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngOverviewPage.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngOverviewPage.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -39,10 +39,10 @@
public class RevEngOverviewPage extends RevEngFormEditorPart {
- public static final String PART_ID = "overview";
+ public static final String PART_ID = "overview"; //$NON-NLS-1$
public RevEngOverviewPage(ReverseEngineeringEditor reditor) {
- super(reditor, PART_ID, "Overview");
+ super(reditor, PART_ID, Messages.REVENGOVERVIEWPAGE_OVERVIEW);
this.reditor = reditor;
}
@@ -85,7 +85,7 @@
private void createContentsSection() {
String sectionTitle;
- sectionTitle = "Contents";
+ sectionTitle = Messages.REVENGOVERVIEWPAGE_CONTENTS;
Section section = createStaticSection(
getManagedForm().getToolkit(),
getManagedForm().getForm().getBody(),
@@ -97,7 +97,7 @@
container.setLayout(layout);
container.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
- FormText text = createClient(container, "<form><p>The content of the
reveng.xml is made up of three sections:</p><li style=\"image\"
value=\"page\" bindent=\"5\"><a
href=\"typemappings\">Type Mappings</a>: lists the mappings from a
JDBC/SQL type to Hibernate type.</li><li style=\"image\"
value=\"page\" bindent=\"5\"><a
href=\"tablefilter\">Table filters</a>: lists which tables that should
be included or excluded during reverse engineering.</li><li
style=\"image\" value=\"page\" bindent=\"5\"><a
href=\"tables\">Tables & Columns</a>: explicitly set properties
for tables and columns.</li></form>", getManagedForm().getToolkit());
+ FormText text = createClient(container, Messages.REVENGOVERVIEWPAGE_THE_CONTENT,
getManagedForm().getToolkit());
//text.setImage("page", EclipseImages.getImage(ImageConstants.));
//$NON-NLS-1$
section.setClient(container);
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngTableFilterPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngTableFilterPage.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngTableFilterPage.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -29,10 +29,10 @@
public class RevEngTableFilterPage extends RevEngFormEditorPart {
- public final static String PART_ID = "tablefilter";
+ public final static String PART_ID = "tablefilter"; //$NON-NLS-1$
public RevEngTableFilterPage(ReverseEngineeringEditor reditor) {
- super(reditor, PART_ID, "Table filters");
+ super(reditor, PART_ID, Messages.REVENGTABLEFILTERPAGE_TABLE_FILTERS);
}
protected void createFormContent(IManagedForm managedForm) {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngTablesPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngTablesPage.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngTablesPage.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -28,10 +28,10 @@
public class RevEngTablesPage extends RevEngFormEditorPart {
- public final static String PART_ID = "tables";
+ public final static String PART_ID = "tables"; //$NON-NLS-1$
public RevEngTablesPage(ReverseEngineeringEditor reditor) {
- super(reditor, PART_ID, "Tables & Columns");
+ super(reditor, PART_ID, Messages.REVENGTABLESPAGE_TABLES_AND_COLUMNS);
}
protected void createFormContent(IManagedForm managedForm) {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngTypeMappingPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngTypeMappingPage.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/RevEngTypeMappingPage.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -30,10 +30,10 @@
public class RevEngTypeMappingPage extends RevEngFormEditorPart {
- public final static String PART_ID = "typemappings";
+ public final static String PART_ID = "typemappings"; //$NON-NLS-1$
public RevEngTypeMappingPage(ReverseEngineeringEditor reditor) {
- super(reditor, PART_ID, "Type Mappings");
+ super(reditor, PART_ID, Messages.REVENGTYPEMAPPINGPAGE_TYPE_MAPPINGS);
}
public void createFormContent(IManagedForm mform) {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TableDetailsPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TableDetailsPage.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TableDetailsPage.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -50,37 +50,37 @@
private IRevEngTable table;
protected void buildContents(FormToolkit toolkit, Section section, Composite client) {
- section.setText("Table details");
- section.setDescription("Set the properties of the selected table.");
+ section.setText(Messages.TABLEDETAILSPAGE_TABLE_DETAILS);
+ section.setDescription(Messages.TABLEDETAILSPAGE_SET_PROPERTIES_OF_SELECTED_TABLE);
- catalogEntry = new FormTextEntry(client, toolkit, "Catalog:", SWT.NULL);
+ catalogEntry = new FormTextEntry(client, toolkit, Messages.TABLEDETAILSPAGE_CATALOG,
SWT.NULL);
catalogEntry.setFormEntryListener(new FormTextEntryListenerAdapter() {
public void textValueChanged(FormTextEntry entry) {
table.setCatalog(entry.getValue());
}
});
- schemaEntry = new FormTextEntry(client, toolkit, "Schema:", SWT.NULL);
+ schemaEntry = new FormTextEntry(client, toolkit, Messages.TABLEDETAILSPAGE_SCHEMA,
SWT.NULL);
schemaEntry.setFormEntryListener(new FormTextEntryListenerAdapter() {
public void textValueChanged(FormTextEntry entry) {
table.setSchema(entry.getValue());
}
});
- nameEntry = new FormTextEntry(client, toolkit, "Name:", SWT.NULL);
+ nameEntry = new FormTextEntry(client, toolkit, Messages.TABLEDETAILSPAGE_NAME,
SWT.NULL);
nameEntry.setFormEntryListener(new FormTextEntryListenerAdapter() {
public void textValueChanged(FormTextEntry entry) {
table.setName(entry.getValue());
}
});
- classEntry = new FormTextEntry(client, toolkit, "Class name:", SWT.NULL);
+ classEntry = new FormTextEntry(client, toolkit, Messages.TABLEDETAILSPAGE_CLASS_NAME,
SWT.NULL);
classEntry.setFormEntryListener(new FormTextEntryListenerAdapter() {
public void textValueChanged(FormTextEntry entry) {
table.setClassname(entry.getValue());
}
});
- Button button = toolkit.createButton(client, "Add primary key", SWT.NULL);
+ Button button = toolkit.createButton(client, Messages.TABLEDETAILSPAGE_ADD_PRIMARY_KEY,
SWT.NULL);
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TableFilterFormPart.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TableFilterFormPart.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TableFilterFormPart.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -43,11 +43,11 @@
}
protected String getSectionTitle() {
- return "Table filters";
+ return Messages.TABLEFILTERFORMPART_TABLE_FILTERS;
}
protected String getSectionDescription() {
- return "Table filters defines which tables/views are included when performing
reverse engineering.";
+ return Messages.TABLEFILTERFORMPART_TABLE_FILTERS_DEFINES_WHICH_TABLE_INCLUDED;
}
public Control createClient(IManagedForm form) {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TablePropertiesBlock.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TablePropertiesBlock.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TablePropertiesBlock.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -90,8 +90,8 @@
FormToolkit toolkit = managedForm.getToolkit();
Section section = toolkit.createSection( parent, Section.DESCRIPTION |
Section.FOCUS_TITLE | Section.TWISTIE | Section.EXPANDED);
- section.setText( "Tables & Columns" );
- section.setDescription( "Explicitly control settings for table & columns for
which the defaults is not applicable. Click Add, select the relevant tables & columns
and adjust their settings here." );
+ section.setText( Messages.TABLEPROPERTIESBLOCK_TABLES_COLUMNS );
+ section.setDescription(
Messages.TABLEPROPERTIESBLOCK_EXPLICITLY_CONTROL_SETTINGS_FOR_TABLE_COLUMNS );
section.marginWidth = 10;
section.marginHeight = 5;
toolkit.createCompositeSeparator( section );
@@ -109,7 +109,7 @@
t.setLayoutData( gd );
toolkit.paintBordersFor( client );
- Button btnAdd = toolkit.createButton( client, "Add...", SWT.PUSH );
+ Button btnAdd = toolkit.createButton( client, Messages.TABLEPROPERTIESBLOCK_ADD,
SWT.PUSH );
btnAdd.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -120,7 +120,7 @@
gd = new GridData( GridData.VERTICAL_ALIGN_BEGINNING );
btnAdd.setLayoutData( gd );
- Button btnDel = toolkit.createButton( client, "Delete", SWT.PUSH );
+ Button btnDel = toolkit.createButton( client, Messages.TABLEPROPERTIESBLOCK_DELETE,
SWT.PUSH );
btnDel.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -163,8 +163,8 @@
Map columns = new HashMap();
if(lds!=null) {
- dialog.setTitle("Add Tables & Columns");
- dialog.setMessage("Select tables and columns");
+ dialog.setTitle(Messages.TABLEPROPERTIESBLOCK_ADD_TABLES_COLUMNS);
+ dialog.setMessage(Messages.TABLEPROPERTIESBLOCK_SELECT_TABLES_COLUMNS);
dialog.setInput(lds);
dialog.setContainerMode(true);
dialog.open();
@@ -262,7 +262,7 @@
data.grabExcessHorizontalSpace = true;
composite.setData(data);
Button selectButton = createButton(buttonComposite,
- IDialogConstants.SELECT_ALL_ID, "Select all children",
+ IDialogConstants.SELECT_ALL_ID,
Messages.TABLEPROPERTIESBLOCK_SELECT_ALL_CHILDREN,
false);
SelectionListener listener = new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -276,7 +276,7 @@
};
selectButton.addSelectionListener(listener);
Button deselectButton = createButton(buttonComposite,
- IDialogConstants.DESELECT_ALL_ID, "Deselect all",
+ IDialogConstants.DESELECT_ALL_ID,
Messages.TABLEPROPERTIESBLOCK_DESELECT_ALL,
false);
listener = new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -295,22 +295,22 @@
protected void createToolBarActions(IManagedForm managedForm) {
final ScrolledForm form = managedForm.getForm();
- Action haction = new Action( "hor", IAction.AS_RADIO_BUTTON ) {
+ Action haction = new Action( "hor", IAction.AS_RADIO_BUTTON ) {
//$NON-NLS-1$
public void run() {
sashForm.setOrientation( SWT.HORIZONTAL );
form.reflow( true );
}
};
haction.setChecked( true );
- haction.setToolTipText( "Horizontal orientation" );
- Action vaction = new Action( "ver", IAction.AS_RADIO_BUTTON ) {
+ haction.setToolTipText( Messages.TABLEPROPERTIESBLOCK_HORIZONTAL_ORIENTATION );
+ Action vaction = new Action( "ver", IAction.AS_RADIO_BUTTON ) {
//$NON-NLS-1$
public void run() {
sashForm.setOrientation( SWT.VERTICAL );
form.reflow( true );
}
};
vaction.setChecked( false );
- vaction.setToolTipText( "Vertical orientation" );
+ vaction.setToolTipText( Messages.TABLEPROPERTIESBLOCK_VERTICAL_ORIENTATION );
form.getToolBarManager().add( haction );
form.getToolBarManager().add( vaction );
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TablePropertiesLabelProvider.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TablePropertiesLabelProvider.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TablePropertiesLabelProvider.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -36,7 +36,7 @@
public String getText(Object element) {
String internalText = getInternalText( element );
if(internalText==null) {
- return "<n/a>";
+ return "<n/a>"; //$NON-NLS-1$
} else {
return internalText;
}
@@ -49,7 +49,7 @@
} else if(element instanceof IRevEngColumn) {
return ((IRevEngColumn)element).getName();
} else if(element instanceof IRevEngPrimaryKey) {
- return "Primary key";
+ return Messages.TABLEPROPERTIESLABELPROVIDER_PRIMARY_KEY;
} else if(element instanceof IRevEngGenerator) {
return ((IRevEngGenerator)element).getGeneratorClassName();
} else if ( element instanceof IRevEngParameter ) {
@@ -66,12 +66,12 @@
}
if(table.getSchema()!=null) {
- if(res.length()!=0) res.append(".");
+ if(res.length()!=0) res.append("."); //$NON-NLS-1$
res.append(table.getSchema());
}
if(table.getName()!=null) {
- if(res.length()!=0) res.append(".");
+ if(res.length()!=0) res.append("."); //$NON-NLS-1$
res.append(table.getName());
}
return res.toString();
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TypeMappingFormPart.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TypeMappingFormPart.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TypeMappingFormPart.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -42,11 +42,11 @@
}
protected String getSectionDescription() {
- return "Type mappings allows you to define which Hibernate type to use for
specific JDBC types.";
+ return
Messages.TYPEMAPPINGFORMPART_TYPE_MAPPINGS_ALLOWS_YOU_DEFINE_WHICH_HIBERNATE_TYPE;
}
protected String getSectionTitle() {
- return "Type mappings";
+ return Messages.TYPEMAPPINGFORMPART_TYPE_MAPPINGS;
}
public Control createClient(IManagedForm form) {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TypeMappingView.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TypeMappingView.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TypeMappingView.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -79,8 +79,8 @@
private TableViewer createTypeMappingViewer() {
TableViewer result = new TableViewer( rightTable );
result.setUseHashlookup( true );
- result.setColumnProperties( new String[] { "jdbctype",
"hibernatetype",
- "length", "scale", "precision", "not-null" }
);
+ result.setColumnProperties( new String[] { "jdbctype",
"hibernatetype", //$NON-NLS-1$//$NON-NLS-2$
+ "length", "scale", "precision", "not-null" }
); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
CellEditor[] editors = new CellEditor[result.getColumnProperties().length];
editors[0] = new NullableTextCellEditor( result.getTable() );//new ComboBoxCellEditor(
result.getTable(), JDBCToHibernateTypeHelper.getJDBCTypes() );
@@ -172,15 +172,15 @@
private void createDefaultSqlTypeMapping() {
ITypeMapping createTypeMapping = revEngDef.createTypeMapping();
- createTypeMapping.setJDBCType("VARCHAR");
- createTypeMapping.setHibernateType("string");
+ createTypeMapping.setJDBCType("VARCHAR"); //$NON-NLS-1$
+ createTypeMapping.setHibernateType("string"); //$NON-NLS-1$
revEngDef.addTypeMapping(createTypeMapping);
}
protected String[] getAddButtonLabels() {
- return new String[] { "Add..." };
+ return new String[] { Messages.TYPEMAPPINGVIEW_ADD };
}
protected void handleAddButtonPressed(int i) {
@@ -189,7 +189,7 @@
doAdd();
break;
default:
- throw new IllegalArgumentException( i + " not a known button" );
+ throw new IllegalArgumentException( i + Messages.TYPEMAPPINGVIEW_NOT_KNOWN_BUTTON );
}
}
@@ -205,7 +205,7 @@
}
protected void doRemoveAll() {
- if(MessageDialog.openQuestion( getShell(), "Remove all mappings" , "Do
you want to remove all mappings?")) {
+ if(MessageDialog.openQuestion( getShell(), Messages.TYPEMAPPINGVIEW_REMOVE_ALL_MAPPINGS
, Messages.TYPEMAPPINGVIEW_DO_YOU_WANT_TO_REMOVE_ALL_MAPPINGS)) {
revEngDef.removeAllTypeMappings();
}
}
@@ -228,36 +228,36 @@
protected void createTableColumns(org.eclipse.swt.widgets.Table table) {
TableColumn column = new TableColumn(table, SWT.CENTER, 0);
- column.setText("JDBC Type");
+ column.setText(Messages.TYPEMAPPINGVIEW_JDBC_TYPE);
column.setWidth(100);
column = new TableColumn(table, SWT.LEFT, 1);
- column.setText("Hibernate Type");
+ column.setText(Messages.TYPEMAPPINGVIEW_HIBERNATE_TYPE);
column.setWidth(150);
column = new TableColumn(table, SWT.LEFT, 2);
- column.setText("Length");
+ column.setText(Messages.TYPEMAPPINGVIEW_LENGTH);
column.setWidth(100);
column = new TableColumn(table, SWT.LEFT, 3);
- column.setText("Scale");
+ column.setText(Messages.TYPEMAPPINGVIEW_SCALE);
column.setWidth(100);
column = new TableColumn(table, SWT.LEFT, 4);
- column.setText("Precision");
+ column.setText(Messages.TYPEMAPPINGVIEW_PRECISION);
column.setWidth(100);
column = new TableColumn(table, SWT.LEFT, 5);
- column.setText("Not-Null");
+ column.setText(Messages.TYPEMAPPINGVIEW_NOT_NULL);
column.setWidth(75);
}
protected String getTableTitle() {
- return "Type mappings:";
+ return Messages.TYPEMAPPINGVIEW_TYPE_MAPPINGS;
}
protected String getTreeTitle() {
- return "Database schema:";
+ return Messages.TYPEMAPPINGVIEW_DATABASE_SCHEMA;
}
}
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/messages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/messages.properties
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/messages.properties 2008-06-04
14:33:46 UTC (rev 8545)
@@ -0,0 +1,70 @@
+COLUMNDETAILSPAGE_COLUMN_DETAILS=Column Details
+COLUMNDETAILSPAGE_EXCLUDE_COLUMNS_FROM_REVERSE_ENGINEERING=Exclude column from reverse
engineering
+COLUMNDETAILSPAGE_HIBERNATE_TYPE=Hibernate Type:
+COLUMNDETAILSPAGE_JDBC_TYPE=JDBC Type:
+COLUMNDETAILSPAGE_NAME=Name:
+COLUMNDETAILSPAGE_PROPERTY_NAME=Property name:
+COLUMNDETAILSPAGE_SET_PROPERTIES_OF_SELECTED_COLUMN=Set the properties of the selected
column.
+COLUMNDETAILSPAGE_THE_HIBERNATE_TYPE=The hibernate type which should be used for this
column when used as a property
+COLUMNDETAILSPAGE_THE_NAME_OF_THE_COLUMN=The name of the column
+COLUMNDETAILSPAGE_THE_PROPERTY_NAME_WHICH_MUST_BE_USED_FOR=The property name which must
be used for this column when used as a property
+COLUMNDETAILSPAGE_WHICH_JDBC_TYPE_THIS_COLUMN_SHOULD_HAVE=Which JDBC Type this column
should have (overriding the type read from the database)
+CONSOLECONFIGNAMEPART_CONSOLE_CONFIGURATION=Console Configuration
+CONSOLECONFIGNAMEPART_PROBLEM_WHEN_TRYING_TO_HIBERNATE_PROJECT_INFO=Problem when trying
to Hibernate Project information
+CONSOLECONFIGNAMEPART_SELECT_CONSOLE_CONFIGURATION=Select Console configuration to be
used for editing the reverse engineering settings
+COUNTERFORMPART_DEBUG_COUNTER=Debug counter
+COUNTERFORMPART_DEBUG_COUNTER_FOR_PROPERTY_CHANGES=debug counter for property changes
+COUNTERFORMPART_ZERO=Zero
+GENERATORDETAILSPAGE_CLASS=Class:
+GENERATORDETAILSPAGE_ID_GENERATOR_DETAILS=Id Generator details
+GENERATORDETAILSPAGE_SET_THE_PROPERTIES_OF_THE_SELECTED_GENERATOR=Set the properties of
the selected generator.
+HIBERNATECONFIGURATIONFORM_HIBERNATE_CONFIGURATION=Hibernate Configuration
+PARAMDETAILSPAGE_GENERATOR_PARAMETER_DETAILS=Generator parameter details
+PARAMDETAILSPAGE_NAME=Name:
+PARAMDETAILSPAGE_SET_THE_PROPERTIES_OF_THE_SELECTED_PARAMETER=Set the properties of the
selected parameter.
+PARAMDETAILSPAGE_VALUE=Value:
+PRIMARYKEYDETAILSPAGE_ADD_COLUMN=Add column
+PRIMARYKEYDETAILSPAGE_ADD_GENERATOR=Add generator
+PRIMARYKEYDETAILSPAGE_PRIMARY_KEY_CAN_DEFINE_GENERATOR_STRATEGY_AND_ALTERNATIVE_COLUMNS=A
primary key can define a generator strategy and alternative columns
+PRIMARYKEYDETAILSPAGE_PRIMARY_KEY_DETAILS=Primary key details
+REVENGFORMEDITORPART_NEED_TO_OVERRIDE_FORMCONTENT_IN=Need to override formcontent in
+REVENGOVERVIEWPAGE_CONTENTS=Contents
+REVENGOVERVIEWPAGE_OVERVIEW=Overview
+REVENGOVERVIEWPAGE_THE_CONTENT=<form><p>The content of the reveng.xml is made
up of three sections:</p><li style="image" value="page"
bindent="5"><a href="typemappings">Type Mappings</a>:
lists the mappings from a JDBC/SQL type to Hibernate type.</li><li
style="image" value="page" bindent="5"><a
href="tablefilter">Table filters</a>: lists which tables that should be
included or excluded during reverse engineering.</li><li style="image"
value="page" bindent="5"><a href="tables">Tables
& Columns</a>: explicitly set properties for tables and
columns.</li></form>
+REVENGTABLEFILTERPAGE_TABLE_FILTERS=Table filters
+REVENGTABLESPAGE_TABLES_AND_COLUMNS=Tables & Columns
+REVENGTYPEMAPPINGPAGE_TYPE_MAPPINGS=Type Mappings
+TABLEDETAILSPAGE_ADD_PRIMARY_KEY=Add primary key
+TABLEDETAILSPAGE_CATALOG=Catalog:
+TABLEDETAILSPAGE_CLASS_NAME=Class name:
+TABLEDETAILSPAGE_NAME=Name:
+TABLEDETAILSPAGE_SCHEMA=Schema:
+TABLEDETAILSPAGE_SET_PROPERTIES_OF_SELECTED_TABLE=Set the properties of the selected
table.
+TABLEDETAILSPAGE_TABLE_DETAILS=Table details
+TABLEFILTERFORMPART_TABLE_FILTERS=Table filters
+TABLEFILTERFORMPART_TABLE_FILTERS_DEFINES_WHICH_TABLE_INCLUDED=Table filters defines
which tables/views are included when performing reverse engineering.
+TABLEPROPERTIESBLOCK_ADD=Add...
+TABLEPROPERTIESBLOCK_ADD_TABLES_COLUMNS=Add Tables & Columns
+TABLEPROPERTIESBLOCK_DELETE=Delete
+TABLEPROPERTIESBLOCK_DESELECT_ALL=Deselect all
+TABLEPROPERTIESBLOCK_EXPLICITLY_CONTROL_SETTINGS_FOR_TABLE_COLUMNS=Explicitly control
settings for table & columns for which the defaults is not applicable. Click Add,
select the relevant tables & columns and adjust their settings here.
+TABLEPROPERTIESBLOCK_HORIZONTAL_ORIENTATION=Horizontal orientation
+TABLEPROPERTIESBLOCK_SELECT_ALL_CHILDREN=Select all children
+TABLEPROPERTIESBLOCK_SELECT_TABLES_COLUMNS=Select tables and columns
+TABLEPROPERTIESBLOCK_TABLES_COLUMNS=Tables & Columns
+TABLEPROPERTIESBLOCK_VERTICAL_ORIENTATION=Vertical orientation
+TABLEPROPERTIESLABELPROVIDER_PRIMARY_KEY=Primary key
+TYPEMAPPINGFORMPART_TYPE_MAPPINGS=Type mappings
+TYPEMAPPINGFORMPART_TYPE_MAPPINGS_ALLOWS_YOU_DEFINE_WHICH_HIBERNATE_TYPE=Type mappings
allows you to define which Hibernate type to use for specific JDBC types.
+TYPEMAPPINGVIEW_ADD=Add...
+TYPEMAPPINGVIEW_DATABASE_SCHEMA=Database schema:
+TYPEMAPPINGVIEW_DO_YOU_WANT_TO_REMOVE_ALL_MAPPINGS=Do you want to remove all mappings?
+TYPEMAPPINGVIEW_HIBERNATE_TYPE=Hibernate Type
+TYPEMAPPINGVIEW_JDBC_TYPE=JDBC Type
+TYPEMAPPINGVIEW_LENGTH=Length
+TYPEMAPPINGVIEW_NOT_KNOWN_BUTTON=\ not a known button
+TYPEMAPPINGVIEW_NOT_NULL=Not-Null
+TYPEMAPPINGVIEW_PRECISION=Precision
+TYPEMAPPINGVIEW_REMOVE_ALL_MAPPINGS=Remove all mappings
+TYPEMAPPINGVIEW_SCALE=Scale
+TYPEMAPPINGVIEW_TYPE_MAPPINGS=Type mappings:
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/GeneratorTypeHandler.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/GeneratorTypeHandler.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/GeneratorTypeHandler.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -55,20 +55,20 @@
List proposals = new ArrayList(types.size() );
for (Iterator iter = types.iterator(); iter.hasNext();) {
HibernateTypeDescriptor element = (HibernateTypeDescriptor) iter.next();
- String extendedinfo = "<b>Generator type</b>: " +
element.getName();
+ String extendedinfo = Messages.GENERATORTYPEHANDLER_GENERATOR_TYPE +
element.getName();
if(element.getReturnClass()!=null) {
- extendedinfo += "<br><b>Return class</b>: " +
element.getReturnClass();
+ extendedinfo += Messages.GENERATORTYPEHANDLER_RETURN_CLASS +
element.getReturnClass();
}
proposals.add(new CompletionProposal(element.getName(), offset, start.length(),
element.getName().length(), null, null, null, extendedinfo) );
}
try {
- IType typeInterface =
project.findType("org.hibernate.id.IdentifierGenerator");
+ IType typeInterface =
project.findType("org.hibernate.id.IdentifierGenerator"); //$NON-NLS-1$
Set alreadyFound = new HashSet();
if (typeInterface != null) {
ITypeHierarchy hier = typeInterface.newTypeHierarchy(project, new
NullProgressMonitor() );
IType[] classes = hier.getAllSubtypes(typeInterface); // TODO: cache these results
?
- this.extractor.generateTypeProposals(start, offset, proposals, alreadyFound,
classes, "org.hibernate.id");
+ this.extractor.generateTypeProposals(start, offset, proposals, alreadyFound,
classes, "org.hibernate.id"); //$NON-NLS-1$
}
} catch (CoreException e) {
throw new RuntimeException(e); // TODO: log as error!
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/HBMInfoExtractor.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/HBMInfoExtractor.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/HBMInfoExtractor.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -97,84 +97,84 @@
}
- String[] TRUE_FALSE = new String[] { "true", "false" };
+ String[] TRUE_FALSE = new String[] { "true", "false" };
//$NON-NLS-1$ //$NON-NLS-2$
private void setupHibernateProperties() {
hibernatePropertyNames = extractHibernateProperties();
hibernatePropertyValues = new HashMap();
- hibernatePropertyValues.put("bytecode.provider", new String[] {
"cglib", "javassist"} );
- hibernatePropertyValues.put("bytecode.use_reflection_optimizer", TRUE_FALSE
);
- //hibernatePropertyValues.put("c3p0.acquire_increment", new String[] { } );
- //hibernatePropertyValues.put("c3p0.idle_test_period", new String[] { } );
- //hibernatePropertyValues.put("c3p0.max_size", new String[] { } );
- //hibernatePropertyValues.put("c3p0.max_statements", new String[] { } );
- //hibernatePropertyValues.put("c3p0.min_size", new String[] { } );
- //hibernatePropertyValues.put("c3p0.timeout", new String[] { } );
- //hibernatePropertyValues.put("cache.jndi", new String[] { } );
- //hibernatePropertyValues.put("cache.provider_class", new String[] { } );
-
//hibernatePropertyValues.put("cache.provider_configuration_file_resource_path",
new String[] { } );
- //hibernatePropertyValues.put("cache.query_cache_factory", new String[] { }
);
- //hibernatePropertyValues.put("cache.region_prefix", new String[] { } );
- hibernatePropertyValues.put("cache.use_minimal_puts", TRUE_FALSE );
- hibernatePropertyValues.put("cache.use_query_cache", TRUE_FALSE );
- hibernatePropertyValues.put("cache.use_second_level_cache", TRUE_FALSE );
- hibernatePropertyValues.put("cache.use_structured_entries", TRUE_FALSE );
- //hibernatePropertyValues.put("connection", new String[] { } );
- hibernatePropertyValues.put("connection.autocommit", TRUE_FALSE );
- //hibernatePropertyValues.put("connection.datasource", new String[] { } );
- //hibernatePropertyValues.put("connection.driver_class", new String[] { }
);
+ hibernatePropertyValues.put("bytecode.provider", new String[] {
"cglib", "javassist"} ); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ hibernatePropertyValues.put("bytecode.use_reflection_optimizer", TRUE_FALSE
); //$NON-NLS-1$
+ //hibernatePropertyValues.put("c3p0.acquire_increment", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("c3p0.idle_test_period", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("c3p0.max_size", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("c3p0.max_statements", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("c3p0.min_size", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("c3p0.timeout", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("cache.jndi", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("cache.provider_class", new String[] { } );
//$NON-NLS-1$
+
//hibernatePropertyValues.put("cache.provider_configuration_file_resource_path",
new String[] { } ); //$NON-NLS-1$
+ //hibernatePropertyValues.put("cache.query_cache_factory", new String[] { }
); //$NON-NLS-1$
+ //hibernatePropertyValues.put("cache.region_prefix", new String[] { } );
//$NON-NLS-1$
+ hibernatePropertyValues.put("cache.use_minimal_puts", TRUE_FALSE );
//$NON-NLS-1$
+ hibernatePropertyValues.put("cache.use_query_cache", TRUE_FALSE );
//$NON-NLS-1$
+ hibernatePropertyValues.put("cache.use_second_level_cache", TRUE_FALSE );
//$NON-NLS-1$
+ hibernatePropertyValues.put("cache.use_structured_entries", TRUE_FALSE );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("connection", new String[] { } );
//$NON-NLS-1$
+ hibernatePropertyValues.put("connection.autocommit", TRUE_FALSE );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("connection.datasource", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("connection.driver_class", new String[] { } );
//$NON-NLS-1$
- hibernatePropertyValues.put("connection.isolation", new String[] {
"0", "1", "2", "4", "8"} );
- //hibernatePropertyValues.put("connection.password", new String[] { } );
- //hibernatePropertyValues.put("connection.pool_size", new String[] { } );
- //hibernatePropertyValues.put("connection.provider_class", new String[] { }
);
- //hibernatePropertyValues.put("connection.release_mode", new String[] { }
);
- //hibernatePropertyValues.put("connection.url", new String[] { } );
- //hibernatePropertyValues.put("connection.username", new String[] { } );
- //hibernatePropertyValues.put("current_session_context_class", new String[]
{ } );
- //hibernatePropertyValues.put("default_batch_fetch_size", new String[] { }
);
- //hibernatePropertyValues.put("default_catalog", new String[] { } );
- //hibernatePropertyValues.put("default_entity_mode", new String[] { } );
- //hibernatePropertyValues.put("default_schema", new String[] { } );
- //hibernatePropertyValues.put("dialect", new String[] { } );
- hibernatePropertyValues.put("format_sql", TRUE_FALSE );
- hibernatePropertyValues.put("generate_statistics", TRUE_FALSE );
- hibernatePropertyValues.put("hbm2ddl.auto", new String[] {
"validate", "update", "create", "create-drop" }
);
- //hibernatePropertyValues.put("jacc_context_id", new String[] { } );
- //hibernatePropertyValues.put("jdbc.batch_size", new String[] { } );
- hibernatePropertyValues.put("jdbc.batch_versioned_data", TRUE_FALSE );
- //hibernatePropertyValues.put("jdbc.factory_class", new String[] { } );
- //hibernatePropertyValues.put("jdbc.fetch_size", new String[] { } );
- //hibernatePropertyValues.put("jdbc.sql_exception_converter", new String[] {
} );
- hibernatePropertyValues.put("jdbc.use_get_generated_keys", TRUE_FALSE );
- hibernatePropertyValues.put("jdbc.use_scrollable_resultset", TRUE_FALSE );
- hibernatePropertyValues.put("jdbc.use_streams_for_binary", TRUE_FALSE );
- hibernatePropertyValues.put("jdbc.wrap_result_sets", TRUE_FALSE );
- //hibernatePropertyValues.put("jndi", new String[] { } );
- //hibernatePropertyValues.put("jndi.class", new String[] { } );
- //hibernatePropertyValues.put("jndi.url", new String[] { } );
- //hibernatePropertyValues.put("max_fetch_depth", new String[] { } );
- hibernatePropertyValues.put("order_inserts", TRUE_FALSE );
- hibernatePropertyValues.put("order_updates", TRUE_FALSE );
- //hibernatePropertyValues.put("proxool", new String[] { } );
- //hibernatePropertyValues.put("proxool.existing_pool", new String[] { } );
- //hibernatePropertyValues.put("proxool.pool_alias", new String[] { } );
- //hibernatePropertyValues.put("proxool.properties", new String[] { } );
- //hibernatePropertyValues.put("proxool.xml", new String[] { } );
- //hibernatePropertyValues.put("query.factory_class", new String[] { } );
- hibernatePropertyValues.put("query.jpaql_strict_compliance", TRUE_FALSE );
- hibernatePropertyValues.put("query.startup_check", TRUE_FALSE );
- //hibernatePropertyValues.put("query.substitutions", new String[] { } );
- //hibernatePropertyValues.put("session_factory_name", new String[] { } );
- hibernatePropertyValues.put("show_sql", TRUE_FALSE );
- hibernatePropertyValues.put("transaction.auto_close_session", TRUE_FALSE );
- //hibernatePropertyValues.put("transaction.factory_class", new String[] { }
);
- hibernatePropertyValues.put("transaction.flush_before_completion",
TRUE_FALSE );
- //hibernatePropertyValues.put("transaction.manager_lookup_class", new
String[] { } );
- hibernatePropertyValues.put("use_identifier_rollback", TRUE_FALSE );
- hibernatePropertyValues.put("use_sql_comments", TRUE_FALSE );
- //hibernatePropertyValues.put("xml.output_stylesheet]", new String[] { } );
+ hibernatePropertyValues.put("connection.isolation", new String[] {
"0", "1", "2", "4", "8"} );
//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$//$NON-NLS-6$
+ //hibernatePropertyValues.put("connection.password", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("connection.pool_size", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("connection.provider_class", new String[] { }
); //$NON-NLS-1$
+ //hibernatePropertyValues.put("connection.release_mode", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("connection.url", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("connection.username", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("current_session_context_class", new String[]
{ } ); //$NON-NLS-1$
+ //hibernatePropertyValues.put("default_batch_fetch_size", new String[] { }
); //$NON-NLS-1$
+ //hibernatePropertyValues.put("default_catalog", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("default_entity_mode", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("default_schema", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("dialect", new String[] { } ); //$NON-NLS-1$
+ hibernatePropertyValues.put("format_sql", TRUE_FALSE ); //$NON-NLS-1$
+ hibernatePropertyValues.put("generate_statistics", TRUE_FALSE );
//$NON-NLS-1$
+ hibernatePropertyValues.put("hbm2ddl.auto", new String[] {
"validate", "update", "create", "create-drop" } );
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ //hibernatePropertyValues.put("jacc_context_id", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("jdbc.batch_size", new String[] { } );
//$NON-NLS-1$
+ hibernatePropertyValues.put("jdbc.batch_versioned_data", TRUE_FALSE );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("jdbc.factory_class", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("jdbc.fetch_size", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("jdbc.sql_exception_converter", new String[] {
} ); //$NON-NLS-1$
+ hibernatePropertyValues.put("jdbc.use_get_generated_keys", TRUE_FALSE );
//$NON-NLS-1$
+ hibernatePropertyValues.put("jdbc.use_scrollable_resultset", TRUE_FALSE );
//$NON-NLS-1$
+ hibernatePropertyValues.put("jdbc.use_streams_for_binary", TRUE_FALSE );
//$NON-NLS-1$
+ hibernatePropertyValues.put("jdbc.wrap_result_sets", TRUE_FALSE );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("jndi", new String[] { } ); //$NON-NLS-1$
+ //hibernatePropertyValues.put("jndi.class", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("jndi.url", new String[] { } ); //$NON-NLS-1$
+ //hibernatePropertyValues.put("max_fetch_depth", new String[] { } );
//$NON-NLS-1$
+ hibernatePropertyValues.put("order_inserts", TRUE_FALSE ); //$NON-NLS-1$
+ hibernatePropertyValues.put("order_updates", TRUE_FALSE ); //$NON-NLS-1$
+ //hibernatePropertyValues.put("proxool", new String[] { } ); //$NON-NLS-1$
+ //hibernatePropertyValues.put("proxool.existing_pool", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("proxool.pool_alias", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("proxool.properties", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("proxool.xml", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("query.factory_class", new String[] { } );
//$NON-NLS-1$
+ hibernatePropertyValues.put("query.jpaql_strict_compliance", TRUE_FALSE );
//$NON-NLS-1$
+ hibernatePropertyValues.put("query.startup_check", TRUE_FALSE );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("query.substitutions", new String[] { } );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("session_factory_name", new String[] { } );
//$NON-NLS-1$
+ hibernatePropertyValues.put("show_sql", TRUE_FALSE ); //$NON-NLS-1$
+ hibernatePropertyValues.put("transaction.auto_close_session", TRUE_FALSE );
//$NON-NLS-1$
+ //hibernatePropertyValues.put("transaction.factory_class", new String[] { }
); //$NON-NLS-1$
+ hibernatePropertyValues.put("transaction.flush_before_completion",
TRUE_FALSE ); //$NON-NLS-1$
+ //hibernatePropertyValues.put("transaction.manager_lookup_class", new
String[] { } ); //$NON-NLS-1$
+ hibernatePropertyValues.put("use_identifier_rollback", TRUE_FALSE );
//$NON-NLS-1$
+ hibernatePropertyValues.put("use_sql_comments", TRUE_FALSE ); //$NON-NLS-1$
+ //hibernatePropertyValues.put("xml.output_stylesheet]", new String[] { } );
//$NON-NLS-1$
}
@@ -189,7 +189,7 @@
if(Modifier.isStatic(field.getModifiers() ) &&
field.getType().equals(String.class) ) {
String str = (String) field.get(cl);
- if(str.startsWith("hibernate.") ) {
+ if(str.startsWith("hibernate.") ) { //$NON-NLS-1$
names.add(str);
}
}
@@ -205,229 +205,229 @@
private void setupTypeFinder() {
- javaTypeProvider.put("class", "name");
- javaTypeProvider.put("subclass", "name");
- javaTypeProvider.put("joined-subclass", "name");
- javaTypeProvider.put("union-subclass", "name");
+ javaTypeProvider.put("class", "name"); //$NON-NLS-1$ //$NON-NLS-2$
+ javaTypeProvider.put("subclass", "name"); //$NON-NLS-1$
//$NON-NLS-2$
+ javaTypeProvider.put("joined-subclass", "name"); //$NON-NLS-1$
//$NON-NLS-2$
+ javaTypeProvider.put("union-subclass", "name"); //$NON-NLS-1$
//$NON-NLS-2$
// TODO: use eclipse java model to infer types of components property/fields
- javaTypeProvider.put("composite-id", "class");
- javaTypeProvider.put("component", "class");
- javaTypeProvider.put("composite-element", "class");
+ javaTypeProvider.put("composite-id", "class"); //$NON-NLS-1$
//$NON-NLS-2$
+ javaTypeProvider.put("component", "class"); //$NON-NLS-1$
//$NON-NLS-2$
+ javaTypeProvider.put("composite-element", "class"); //$NON-NLS-1$
//$NON-NLS-2$
- javaTypeProvider.put("many-to-one", "class");
- javaTypeProvider.put("one-to-many", "class");
- javaTypeProvider.put("many-to-many", "class");
- javaTypeProvider.put("composite-element", "class");
- javaTypeProvider.put("composite-id", "class");
- javaTypeProvider.put("key-many-to-one", "class");
- javaTypeProvider.put("one-to-many", "class");
+ javaTypeProvider.put("many-to-one", "class"); //$NON-NLS-1$
//$NON-NLS-2$
+ javaTypeProvider.put("one-to-many", "class"); //$NON-NLS-1$
//$NON-NLS-2$
+ javaTypeProvider.put("many-to-many", "class"); //$NON-NLS-1$
//$NON-NLS-2$
+ javaTypeProvider.put("composite-element", "class"); //$NON-NLS-1$
//$NON-NLS-2$
+ javaTypeProvider.put("composite-id", "class"); //$NON-NLS-1$
//$NON-NLS-2$
+ javaTypeProvider.put("key-many-to-one", "class"); //$NON-NLS-1$
//$NON-NLS-2$
+ javaTypeProvider.put("one-to-many", "class"); //$NON-NLS-1$
//$NON-NLS-2$
}
private void setupTableFinder() {
- tableProvider.put("class", "table");
- tableProvider.put("join", "table");
- tableProvider.put("joined-subclass", "table");
- tableProvider.put("union-subclass", "table");
- tableProvider.put("map", "table");
- tableProvider.put("set", "table");
- tableProvider.put("bag", "table");
- tableProvider.put("idbag", "table");
- tableProvider.put("list", "table");
- tableProvider.put("array", "table");
- tableProvider.put("primitive-array", "table");
- tableProvider.put("synchronize", "table");
+ tableProvider.put("class", "table"); //$NON-NLS-1$ //$NON-NLS-2$
+ tableProvider.put("join", "table"); //$NON-NLS-1$ //$NON-NLS-2$
+ tableProvider.put("joined-subclass", "table"); //$NON-NLS-1$
//$NON-NLS-2$
+ tableProvider.put("union-subclass", "table"); //$NON-NLS-1$
//$NON-NLS-2$
+ tableProvider.put("map", "table"); //$NON-NLS-1$ //$NON-NLS-2$
+ tableProvider.put("set", "table"); //$NON-NLS-1$ //$NON-NLS-2$
+ tableProvider.put("bag", "table"); //$NON-NLS-1$ //$NON-NLS-2$
+ tableProvider.put("idbag", "table"); //$NON-NLS-1$ //$NON-NLS-2$
+ tableProvider.put("list", "table"); //$NON-NLS-1$ //$NON-NLS-2$
+ tableProvider.put("array", "table"); //$NON-NLS-1$ //$NON-NLS-2$
+ tableProvider.put("primitive-array", "table"); //$NON-NLS-1$
//$NON-NLS-2$
+ tableProvider.put("synchronize", "table"); //$NON-NLS-1$
//$NON-NLS-2$
}
private void setupHibernateTypeDescriptors() {
List types = new ArrayList();
- addType("long","java.lang.Long","long", types);
- addType("short","java.lang.Short","short", types);
- addType("integer","java.lang.Integer","int", types);
- addType("byte","java.lang.Byte","byte", types);
- addType("float","java.lang.Float","float", types);
- addType("double","java.lang.Double","double", types);
- addType("character","java.lang.Character","char",
types);
- addType("string","java.lang.String",null, types);
- addType("time","java.util.Date",null, types);
- addType("date","java.util.Date",null, types);
- addType("timestamp","java.util.Date",null, types);
- addType("boolean","java.lang.Boolean","boolean", types);
- addType("true_false","java.lang.Boolean","boolean",
types);
- addType("yes_no","java.lang.Boolean","boolean", types);
- addType("big_decimal","java.math.BigDecimal",null, types);
- addType("binary","byte[]",null, types);
- addType("text","java.lang.String",null, types);
- addType("blob","java.sql.Blob",null, types);
- addType("clob","java.sql.Clob",null, types);
- addType("calendar","java.util.Calendar",null, types);
- addType("calendar_date","java.util.Calendar",null, types);
- addType("locale","java.util.Locale",null, types);
- addType("currency","java.util.Currency",null, types);
- addType("timezone","java.util.TimeZone",null, types);
- addType("class","java.lang.Class",null, types);
- addType("serializable","java.io.Serializable",null, types);
- addType("object","java.lang.Object",null, types);
+ addType("long","java.lang.Long","long", types);
//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
+ addType("short","java.lang.Short","short", types);
//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
+ addType("integer","java.lang.Integer","int", types);
//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
+ addType("byte","java.lang.Byte","byte", types);
//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
+ addType("float","java.lang.Float","float", types);
//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
+ addType("double","java.lang.Double","double", types);
//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
+ addType("character","java.lang.Character","char", types);
//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
+ addType("string","java.lang.String",null, types); //$NON-NLS-1$
//$NON-NLS-2$
+ addType("time","java.util.Date",null, types); //$NON-NLS-1$
//$NON-NLS-2$
+ addType("date","java.util.Date",null, types); //$NON-NLS-1$
//$NON-NLS-2$
+ addType("timestamp","java.util.Date",null, types); //$NON-NLS-1$
//$NON-NLS-2$
+ addType("boolean","java.lang.Boolean","boolean", types);
//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
+ addType("true_false","java.lang.Boolean","boolean",
types); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
+ addType("yes_no","java.lang.Boolean","boolean", types);
//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
+ addType("big_decimal","java.math.BigDecimal",null, types);
//$NON-NLS-1$ //$NON-NLS-2$
+ addType("binary","byte[]",null, types); //$NON-NLS-1$
//$NON-NLS-2$
+ addType("text","java.lang.String",null, types); //$NON-NLS-1$
//$NON-NLS-2$
+ addType("blob","java.sql.Blob",null, types); //$NON-NLS-1$
//$NON-NLS-2$
+ addType("clob","java.sql.Clob",null, types); //$NON-NLS-1$
//$NON-NLS-2$
+ addType("calendar","java.util.Calendar",null, types);
//$NON-NLS-1$ //$NON-NLS-2$
+ addType("calendar_date","java.util.Calendar",null, types);
//$NON-NLS-1$ //$NON-NLS-2$
+ addType("locale","java.util.Locale",null, types); //$NON-NLS-1$
//$NON-NLS-2$
+ addType("currency","java.util.Currency",null, types);
//$NON-NLS-1$ //$NON-NLS-2$
+ addType("timezone","java.util.TimeZone",null, types);
//$NON-NLS-1$ //$NON-NLS-2$
+ addType("class","java.lang.Class",null, types); //$NON-NLS-1$
//$NON-NLS-2$
+ addType("serializable","java.io.Serializable",null, types);
//$NON-NLS-1$ //$NON-NLS-2$
+ addType("object","java.lang.Object",null, types); //$NON-NLS-1$
//$NON-NLS-2$
Collections.sort(types);
hibernateTypes = (HibernateTypeDescriptor[]) types.toArray(new
HibernateTypeDescriptor[types.size()]);
}
private void setupGeneratorClassHandlers() {
List types = new ArrayList();
- addType("native", "Database dependent", null, types);
- addType("uuid", "UUIDHexGenerator", null, types);
- addType("hilo", "TableHiLoGenerator", null, types);
- addType("assigned", "Assigned", null, types);
- addType("identity", "IdentityGenerator", null, types);
- addType("select", "SelectGenerator", null, types);
- addType("sequence", "SequenceGenerator", null, types);
- addType("seqhilo", "SequenceHiLoGenerator", null, types);
- addType("increment", "IncrementGenerator", null, types);
- addType("foreign", "ForeignGenerator", null, types);
- addType("guid", "GUIDGenerator", null, types);
+ addType("native", "Database dependent", null, types); //$NON-NLS-1$
//$NON-NLS-2$
+ addType("uuid", "UUIDHexGenerator", null, types); //$NON-NLS-1$
//$NON-NLS-2$
+ addType("hilo", "TableHiLoGenerator", null, types); //$NON-NLS-1$
//$NON-NLS-2$
+ addType("assigned", "Assigned", null, types); //$NON-NLS-1$
//$NON-NLS-2$
+ addType("identity", "IdentityGenerator", null, types);
//$NON-NLS-1$ //$NON-NLS-2$
+ addType("select", "SelectGenerator", null, types); //$NON-NLS-1$
//$NON-NLS-2$
+ addType("sequence", "SequenceGenerator", null, types);
//$NON-NLS-1$ //$NON-NLS-2$
+ addType("seqhilo", "SequenceHiLoGenerator", null, types);
//$NON-NLS-1$ //$NON-NLS-2$
+ addType("increment", "IncrementGenerator", null, types);
//$NON-NLS-1$ //$NON-NLS-2$
+ addType("foreign", "ForeignGenerator", null, types); //$NON-NLS-1$
//$NON-NLS-2$
+ addType("guid", "GUIDGenerator", null, types); //$NON-NLS-1$
//$NON-NLS-2$
Collections.sort(types);
generatorTypes = (HibernateTypeDescriptor[]) types.toArray(new
HibernateTypeDescriptor[types.size()]);
}
private void setupHibernateTypeHandlers() {
HBMInfoHandler hibernateTypeFinder = new HibernateTypeHandler(this);
- attributeHandlers.put("filter-param>type", hibernateTypeFinder);
- attributeHandlers.put("id>type", hibernateTypeFinder);
- attributeHandlers.put("discriminator>type", hibernateTypeFinder);
- attributeHandlers.put("version>type", hibernateTypeFinder);
- attributeHandlers.put("property>type", hibernateTypeFinder);
- attributeHandlers.put("key-property>type", hibernateTypeFinder);
- attributeHandlers.put("element>type", hibernateTypeFinder);
- attributeHandlers.put("map-key>type", hibernateTypeFinder);
- attributeHandlers.put("index>type", hibernateTypeFinder);
- attributeHandlers.put("collection-id>type", hibernateTypeFinder);
- attributeHandlers.put("return-scalar>type", hibernateTypeFinder);
+ attributeHandlers.put("filter-param>type", hibernateTypeFinder);
//$NON-NLS-1$
+ attributeHandlers.put("id>type", hibernateTypeFinder); //$NON-NLS-1$
+ attributeHandlers.put("discriminator>type", hibernateTypeFinder);
//$NON-NLS-1$
+ attributeHandlers.put("version>type", hibernateTypeFinder); //$NON-NLS-1$
+ attributeHandlers.put("property>type", hibernateTypeFinder);
//$NON-NLS-1$
+ attributeHandlers.put("key-property>type", hibernateTypeFinder);
//$NON-NLS-1$
+ attributeHandlers.put("element>type", hibernateTypeFinder); //$NON-NLS-1$
+ attributeHandlers.put("map-key>type", hibernateTypeFinder); //$NON-NLS-1$
+ attributeHandlers.put("index>type", hibernateTypeFinder); //$NON-NLS-1$
+ attributeHandlers.put("collection-id>type", hibernateTypeFinder);
//$NON-NLS-1$
+ attributeHandlers.put("return-scalar>type", hibernateTypeFinder);
//$NON-NLS-1$
HBMInfoHandler generatorClassFinder = new GeneratorTypeHandler(this);
- attributeHandlers.put("generator>class", generatorClassFinder);
+ attributeHandlers.put("generator>class", generatorClassFinder);
//$NON-NLS-1$
}
private void setupTableNameHandlers() {
HBMInfoHandler hih = new TableNameHandler();
- attributeHandlers.put("class>table", hih);
- attributeHandlers.put("join>table", hih);
- attributeHandlers.put("joined-subclass>table", hih);
- attributeHandlers.put("union-subclass>table", hih);
- attributeHandlers.put("map>table", hih);
- attributeHandlers.put("set>table", hih);
- attributeHandlers.put("bag>table", hih);
- attributeHandlers.put("idbag>table", hih);
- attributeHandlers.put("list>table", hih);
- attributeHandlers.put("array>table", hih);
- attributeHandlers.put("primitive-array>table", hih);
- attributeHandlers.put("synchronize>table", hih);
+ attributeHandlers.put("class>table", hih); //$NON-NLS-1$
+ attributeHandlers.put("join>table", hih); //$NON-NLS-1$
+ attributeHandlers.put("joined-subclass>table", hih); //$NON-NLS-1$
+ attributeHandlers.put("union-subclass>table", hih); //$NON-NLS-1$
+ attributeHandlers.put("map>table", hih); //$NON-NLS-1$
+ attributeHandlers.put("set>table", hih); //$NON-NLS-1$
+ attributeHandlers.put("bag>table", hih); //$NON-NLS-1$
+ attributeHandlers.put("idbag>table", hih); //$NON-NLS-1$
+ attributeHandlers.put("list>table", hih); //$NON-NLS-1$
+ attributeHandlers.put("array>table", hih); //$NON-NLS-1$
+ attributeHandlers.put("primitive-array>table", hih); //$NON-NLS-1$
+ attributeHandlers.put("synchronize>table", hih); //$NON-NLS-1$
}
private void setupColumnNameHandlers() {
HBMInfoHandler hih = new ColumnNameHandler(this);
- attributeHandlers.put("id>column", hih);
- attributeHandlers.put("discriminator>column", hih);
- attributeHandlers.put("version>column", hih);
- attributeHandlers.put("timestamp>column", hih);
- attributeHandlers.put("property>column", hih);
- attributeHandlers.put("many-to-one>column", hih);
- attributeHandlers.put("key-property>column", hih);
- attributeHandlers.put("key-many-to-one>column", hih);
- attributeHandlers.put("element>column", hih);
- attributeHandlers.put("many-to-many>column", hih);
- attributeHandlers.put("key>column", hih);
- attributeHandlers.put("list-index>column", hih);
- attributeHandlers.put("map-key>column", hih);
- attributeHandlers.put("index>column", hih);
- attributeHandlers.put("map-key-many-to-many>column", hih);
- attributeHandlers.put("index-many-to-many>column", hih);
- attributeHandlers.put("collection-id>column", hih);
- attributeHandlers.put("column>name", hih);
- attributeHandlers.put("return-property>column", hih);
- attributeHandlers.put("return-column>column", hih);
- attributeHandlers.put("return-discriminator>column", hih);
- attributeHandlers.put("return-scalar>column", hih);
+ attributeHandlers.put("id>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("discriminator>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("version>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("timestamp>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("property>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("many-to-one>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("key-property>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("key-many-to-one>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("element>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("many-to-many>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("key>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("list-index>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("map-key>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("index>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("map-key-many-to-many>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("index-many-to-many>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("collection-id>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("column>name", hih); //$NON-NLS-1$
+ attributeHandlers.put("return-property>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("return-column>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("return-discriminator>column", hih); //$NON-NLS-1$
+ attributeHandlers.put("return-scalar>column", hih); //$NON-NLS-1$
}
private void setupAccessHandlers() {
List types = new ArrayList();
- addType("property", "Use JavaBean accessor methods", null, types);
- addType("field", "Access fields directly", null, types);
- addType("noop", "Do not perform any access. Use with HQL-only
properties", null, types);
+ addType("property", Messages.HBMINFOEXTRACTOR_USE_JAVABEAN_ACCESSOR_METHODS,
null, types); //$NON-NLS-1$
+ addType("field", Messages.HBMINFOEXTRACTOR_ACCESS_FIELDS_DIRECTLY, null,
types); //$NON-NLS-1$
+ addType("noop", Messages.HBMINFOEXTRACTOR_DO_NOT_PERFORM_ANY_ACCESS, null,
types); //$NON-NLS-1$
Collections.sort(types);
propertyAccessors = (HibernateTypeDescriptor[]) types.toArray(new
HibernateTypeDescriptor[types.size()]);
HBMInfoHandler hih = new PropertyAccessHandler(this);
- attributeHandlers.put("hibernate-mapping>default-access", hih);
- attributeHandlers.put("id>access", hih);
- attributeHandlers.put("composite-id>access", hih);
- attributeHandlers.put("version>access", hih);
- attributeHandlers.put("timestamp>access", hih);
- attributeHandlers.put("property>access", hih);
- attributeHandlers.put("many-to-one>access", hih);
- attributeHandlers.put("one-to-one>access", hih);
- attributeHandlers.put("key-property>access", hih);
- attributeHandlers.put("key-many-to-one>access", hih);
- attributeHandlers.put("any>access", hih);
- attributeHandlers.put("component>access", hih);
- attributeHandlers.put("dynamic-component>access", hih);
- attributeHandlers.put("map>access", hih);
- attributeHandlers.put("set>access", hih);
- attributeHandlers.put("bag>access", hih);
- attributeHandlers.put("idbag>access", hih);
- attributeHandlers.put("list>access", hih);
- attributeHandlers.put("array>access", hih);
- attributeHandlers.put("primitive-array>access", hih);
- attributeHandlers.put("nested-composite-element>access", hih);
+ attributeHandlers.put("hibernate-mapping>default-access", hih);
//$NON-NLS-1$
+ attributeHandlers.put("id>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("composite-id>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("version>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("timestamp>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("property>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("many-to-one>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("one-to-one>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("key-property>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("key-many-to-one>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("any>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("component>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("dynamic-component>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("map>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("set>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("bag>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("idbag>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("list>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("array>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("primitive-array>access", hih); //$NON-NLS-1$
+ attributeHandlers.put("nested-composite-element>access", hih);
//$NON-NLS-1$
}
private void setupFieldsPropertyHandlers() {
HBMInfoHandler fieldsFinder = new FieldPropertyHandler(this);
- attributeHandlers.put("version>name", fieldsFinder);
- attributeHandlers.put("timestamp>name", fieldsFinder);
- attributeHandlers.put("property>name", fieldsFinder);
- attributeHandlers.put("key-property>name", fieldsFinder);
- attributeHandlers.put("id>name", fieldsFinder);
- attributeHandlers.put("composite-id>name", fieldsFinder);
- attributeHandlers.put("set>name", fieldsFinder);
- attributeHandlers.put("key-property>name", fieldsFinder);
- attributeHandlers.put("property>name", fieldsFinder);
- attributeHandlers.put("key-many-to-one>name", fieldsFinder);
- attributeHandlers.put("many-to-one>name", fieldsFinder);
- attributeHandlers.put("one-to-one>name", fieldsFinder);
- attributeHandlers.put("component>name", fieldsFinder);
- attributeHandlers.put("dynamic-component>name", fieldsFinder);
- attributeHandlers.put("properties>name", fieldsFinder);
- attributeHandlers.put("any>name", fieldsFinder);
- attributeHandlers.put("map>name", fieldsFinder);
- attributeHandlers.put("set>name", fieldsFinder);
- attributeHandlers.put("list>name", fieldsFinder);
- attributeHandlers.put("bag>name", fieldsFinder);
- attributeHandlers.put("idbag>name", fieldsFinder);
- attributeHandlers.put("array>name", fieldsFinder);
- attributeHandlers.put("primitive-array>name", fieldsFinder);
- attributeHandlers.put("query-list>name", fieldsFinder);
+ attributeHandlers.put("version>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("timestamp>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("property>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("key-property>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("id>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("composite-id>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("set>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("key-property>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("property>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("key-many-to-one>name", fieldsFinder);
//$NON-NLS-1$
+ attributeHandlers.put("many-to-one>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("one-to-one>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("component>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("dynamic-component>name", fieldsFinder);
//$NON-NLS-1$
+ attributeHandlers.put("properties>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("any>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("map>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("set>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("list>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("bag>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("idbag>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("array>name", fieldsFinder); //$NON-NLS-1$
+ attributeHandlers.put("primitive-array>name", fieldsFinder);
//$NON-NLS-1$
+ attributeHandlers.put("query-list>name", fieldsFinder); //$NON-NLS-1$
}
private void setupPackageHandlers() {
HBMInfoHandler packageFinder = new PackageHandler(this);
- attributeHandlers.put("hibernate-mapping>package", packageFinder);
+ attributeHandlers.put("hibernate-mapping>package", packageFinder);
//$NON-NLS-1$
}
private void setupJavaTypeHandlers() {
HBMInfoHandler classFinder = new JavaTypeHandler(this);
- attributeHandlers.put("class>name", classFinder);
- attributeHandlers.put("subclass>name", classFinder);
- attributeHandlers.put("joined-subclass>name", classFinder);
- attributeHandlers.put("union-subclass>name", classFinder);
- attributeHandlers.put("many-to-one>class", classFinder);
- attributeHandlers.put("one-to-many>class", classFinder);
- attributeHandlers.put("many-to-many>class", classFinder);
- attributeHandlers.put("composite-element>class", classFinder);
- attributeHandlers.put("component>class", classFinder);
- attributeHandlers.put("composite-id>class", classFinder);
- attributeHandlers.put("key-many-to-one>class", classFinder);
+ attributeHandlers.put("class>name", classFinder); //$NON-NLS-1$
+ attributeHandlers.put("subclass>name", classFinder); //$NON-NLS-1$
+ attributeHandlers.put("joined-subclass>name", classFinder); //$NON-NLS-1$
+ attributeHandlers.put("union-subclass>name", classFinder); //$NON-NLS-1$
+ attributeHandlers.put("many-to-one>class", classFinder); //$NON-NLS-1$
+ attributeHandlers.put("one-to-many>class", classFinder); //$NON-NLS-1$
+ attributeHandlers.put("many-to-many>class", classFinder); //$NON-NLS-1$
+ attributeHandlers.put("composite-element>class", classFinder);
//$NON-NLS-1$
+ attributeHandlers.put("component>class", classFinder); //$NON-NLS-1$
+ attributeHandlers.put("composite-id>class", classFinder); //$NON-NLS-1$
+ attributeHandlers.put("key-many-to-one>class", classFinder);
//$NON-NLS-1$
}
List findMatchingHibernateTypes(String item) {
@@ -462,9 +462,9 @@
if(element.startsWith(prefix) ) {
foundFirst = true;
l.add(element);
- } else if (element.startsWith("hibernate." + prefix) ) {
+ } else if (element.startsWith("hibernate." + prefix) ) { //$NON-NLS-1$
foundFirst = true;
- l.add(element.substring("hibernate.".length() ) );
+ l.add(element.substring("hibernate.".length() ) ); //$NON-NLS-1$
} else if (foundFirst) {
return l; // fail fast since if we dont get a match no future match can be found.
}
@@ -479,14 +479,14 @@
*/
protected String getPackageName(Node root) {
if(root!=null) {
- while(!"hibernate-mapping".equals(root.getNodeName() ) ) {
+ while(!"hibernate-mapping".equals(root.getNodeName() ) ) { //$NON-NLS-1$
root = root.getParentNode();
if(root==null) return null;
}
NamedNodeMap attributes = root.getAttributes();
for(int count = 0; count<attributes.getLength(); count++) {
Node att = attributes.item(count);
- if("package".equals(att.getNodeName() ) ) {
+ if("package".equals(att.getNodeName() ) ) { //$NON-NLS-1$
return att.getNodeValue();
}
}
@@ -562,7 +562,7 @@
if(typename!=null && typename.indexOf('.')<0) {
String packageName = getPackageName(node);
if(packageName!=null) {
- typename = packageName + "." + typename;
+ typename = packageName + "." + typename; //$NON-NLS-1$
}
}
return typename;
@@ -576,8 +576,8 @@
if(typename!=null) return typename;
try {
- if("component".equals(parentNode.getNodeName())) { // probably need to
integrate this into extractor?
- Node componentPropertyNodeName =
parentNode.getAttributes().getNamedItem("name");
+ if("component".equals(parentNode.getNodeName())) { // probably need to
integrate this into extractor? //$NON-NLS-1$
+ Node componentPropertyNodeName =
parentNode.getAttributes().getNamedItem("name"); //$NON-NLS-1$
if(componentPropertyNodeName!=null) {
String parentTypeName = getNearestType(project, parentNode.getParentNode());
if(parentTypeName!=null) {
@@ -628,12 +628,12 @@
String catalog = null;
String schema = null;
- Node namedItem = attributes.getNamedItem("catalog");
+ Node namedItem = attributes.getNamedItem("catalog"); //$NON-NLS-1$
if(namedItem!=null) {
catalog = namedItem.getNodeValue();
}
- namedItem = attributes.getNamedItem("schema");
+ namedItem = attributes.getNamedItem("schema"); //$NON-NLS-1$
if(namedItem!=null) {
schema = namedItem.getNodeValue();
}
@@ -667,10 +667,10 @@
if(node==null) return Collections.EMPTY_LIST;
NamedNodeMap attributes = node.getAttributes();
- Node namedItem = attributes.getNamedItem("name");
+ Node namedItem = attributes.getNamedItem("name"); //$NON-NLS-1$
String propName = namedItem.getNodeValue();
- if(propName.startsWith("hibernate.")) {
- propName = propName.substring("hibernate.".length());
+ if(propName.startsWith("hibernate.")) { //$NON-NLS-1$
+ propName = propName.substring("hibernate.".length()); //$NON-NLS-1$
}
String[] strings = (String[]) hibernatePropertyValues.get(propName);
if(strings==null) {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/HibernateTypeHandler.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/HibernateTypeHandler.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/HibernateTypeHandler.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -55,18 +55,18 @@
List proposals = new ArrayList(types.size() );
for (Iterator iter = types.iterator(); iter.hasNext();) {
HibernateTypeDescriptor element = (HibernateTypeDescriptor) iter.next();
- String extendedinfo = "<b>Hibernate type</b>: " +
element.getName();
+ String extendedinfo = Messages.HIBERANTETYPEHANDLER_HIBERNATE_TYPE +
element.getName();
if(element.getReturnClass()!=null) {
- extendedinfo += "<br><b>Return class</b>: " +
element.getReturnClass();
+ extendedinfo += Messages.HIBERANTETYPEHANDLER_RETURN_CLASS +
element.getReturnClass();
}
if(element.getPrimitiveClass()!=null) {
- extendedinfo += "<br><b>Return primitive</b>: " +
element.getPrimitiveClass();
+ extendedinfo += Messages.HIBERANTETYPEHANDLER_RETURN_PRIMITIVE +
element.getPrimitiveClass();
}
proposals.add(new CompletionProposal(element.getName(), offset, start.length(),
element.getName().length(), null, null, null, extendedinfo) );
}
try {
- IType typeInterface =
project.findType("org.hibernate.usertype.CompositeUserType");
+ IType typeInterface =
project.findType("org.hibernate.usertype.CompositeUserType"); //$NON-NLS-1$
Set alreadyFound = new HashSet();
if (typeInterface != null) {
ITypeHierarchy hier = typeInterface.newTypeHierarchy(project, new
NullProgressMonitor() );
@@ -74,7 +74,7 @@
this.extractor.generateTypeProposals(start, offset, proposals, alreadyFound,
classes,null);
}
- typeInterface = project.findType("org.hibernate.usertype.UserType");
+ typeInterface = project.findType("org.hibernate.usertype.UserType");
//$NON-NLS-1$
if (typeInterface != null) {
ITypeHierarchy hier = typeInterface.newTypeHierarchy(project, new
NullProgressMonitor() );
IType[] classes = hier.getAllSubtypes(typeInterface); // TODO: cache these results ?
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/JavaTypeHandler.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/JavaTypeHandler.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/JavaTypeHandler.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -55,7 +55,7 @@
String packageName = this.extractor.getPackageName(node);
if(StringHelper.isEmpty(start) && StringHelper.isNotEmpty(packageName)) {
// In case of an empty string we try and code complete the relevant package
- start = packageName + ".";
+ start = packageName + "."; //$NON-NLS-1$
}
return CompletionHelper.completeOnJavaTypes(project, settings,packageName, start,
offset);
}
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/Messages.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/Messages.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/Messages.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -0,0 +1,24 @@
+package org.hibernate.eclipse.mapper.extractor;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME =
"org.hibernate.eclipse.mapper.extractor.messages"; //$NON-NLS-1$
+ public static String GENERATORTYPEHANDLER_GENERATOR_TYPE;
+ public static String GENERATORTYPEHANDLER_RETURN_CLASS;
+ public static String HBMINFOEXTRACTOR_ACCESS_FIELDS_DIRECTLY;
+ public static String HBMINFOEXTRACTOR_DO_NOT_PERFORM_ANY_ACCESS;
+ public static String HBMINFOEXTRACTOR_USE_JAVABEAN_ACCESSOR_METHODS;
+ public static String HIBERANTETYPEHANDLER_HIBERNATE_TYPE;
+ public static String HIBERANTETYPEHANDLER_RETURN_CLASS;
+ public static String HIBERANTETYPEHANDLER_RETURN_PRIMITIVE;
+ public static String PROPERTYACCESSHANDLER_ACCESS_METHOD;
+ public static String PROPERTYACCESSHANDLER_DESCRIPTION;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/PropertyAccessHandler.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/PropertyAccessHandler.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/PropertyAccessHandler.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -52,20 +52,20 @@
List proposals = new ArrayList(types.size() );
for (Iterator iter = types.iterator(); iter.hasNext();) {
HibernateTypeDescriptor element = (HibernateTypeDescriptor) iter.next();
- String extendedinfo = "<b>Access method</b>: " +
element.getName();
+ String extendedinfo = Messages.PROPERTYACCESSHANDLER_ACCESS_METHOD +
element.getName();
if(element.getReturnClass()!=null) {
- extendedinfo += "<br><b>Description</b>: " +
element.getReturnClass();
+ extendedinfo += Messages.PROPERTYACCESSHANDLER_DESCRIPTION +
element.getReturnClass();
}
proposals.add(new CompletionProposal(element.getName(), offset, start.length(),
element.getName().length(), null, null, null, extendedinfo) );
}
try {
- IType typeInterface =
project.findType("org.hibernate.property.PropertyAccessor");
+ IType typeInterface =
project.findType("org.hibernate.property.PropertyAccessor"); //$NON-NLS-1$
Set alreadyFound = new HashSet();
if (typeInterface != null) {
ITypeHierarchy hier = typeInterface.newTypeHierarchy(project, new
NullProgressMonitor() );
IType[] classes = hier.getAllSubtypes(typeInterface); // TODO: cache these results ?
- this.extractor.generateTypeProposals(start, offset, proposals, alreadyFound, classes,
"org.hibernate.property");
+ this.extractor.generateTypeProposals(start, offset, proposals, alreadyFound, classes,
"org.hibernate.property"); //$NON-NLS-1$
}
} catch (CoreException e) {
throw new RuntimeException(e); // TODO: log as error!
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/messages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/messages.properties
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/extractor/messages.properties 2008-06-04
14:33:46 UTC (rev 8545)
@@ -0,0 +1,10 @@
+GENERATORTYPEHANDLER_GENERATOR_TYPE=<b>Generator type</b>:
+GENERATORTYPEHANDLER_RETURN_CLASS=<br><b>Return class</b>:
+HBMINFOEXTRACTOR_ACCESS_FIELDS_DIRECTLY=Access fields directly
+HBMINFOEXTRACTOR_DO_NOT_PERFORM_ANY_ACCESS=Do not perform any access. Use with HQL-only
properties
+HBMINFOEXTRACTOR_USE_JAVABEAN_ACCESSOR_METHODS=Use JavaBean accessor methods
+HIBERANTETYPEHANDLER_HIBERNATE_TYPE=<b>Hibernate type</b>:
+HIBERANTETYPEHANDLER_RETURN_CLASS=<br><b>Return class</b>:
+HIBERANTETYPEHANDLER_RETURN_PRIMITIVE=<br><b>Return primitive</b>:
+PROPERTYACCESSHANDLER_ACCESS_METHOD=<b>Access method</b>:
+PROPERTYACCESSHANDLER_DESCRIPTION=<br><b>Description</b>:
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/factory/ObserverAdapterFactory.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/factory/ObserverAdapterFactory.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/factory/ObserverAdapterFactory.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -55,35 +55,35 @@
Object key = DOMAdapter.class;
- if("hibernate-reverse-engineering".equals(nodeName)) {
+ if("hibernate-reverse-engineering".equals(nodeName)) { //$NON-NLS-1$
result = new UnknownNodeAdapter(key, revEngDefinition) {
public void notifyChanged(INodeNotifier notifier, int eventType, Object
changedFeature, Object oldValue, Object newValue, int pos) {
observer.hibernateMappingChanged();
}
};
- } else if("table-filter".equals(nodeName)) {
+ } else if("table-filter".equals(nodeName)) { //$NON-NLS-1$
result = new TableFilterAdapter((Node) target, revEngDefinition);
- } else if("type-mapping".equals(nodeName)) {
+ } else if("type-mapping".equals(nodeName)) { //$NON-NLS-1$
result = new UnknownNodeAdapter(key, revEngDefinition) {
public void notifyChanged(INodeNotifier notifier, int eventType, Object
changedFeature, Object oldValue, Object newValue, int pos) {
observer.typeMappingChanged(notifier);
}
};
- } else if("sql-type".equals(nodeName)) {
+ } else if("sql-type".equals(nodeName)) { //$NON-NLS-1$
result = new TypeMappingAdapter((Node) target, revEngDefinition);
- } else if("table".equals(nodeName)) {
+ } else if("table".equals(nodeName)) { //$NON-NLS-1$
result = new RevEngTableAdapter((Node) target, revEngDefinition);
- } else if("column".equals(nodeName) ||
"key-column".equals(nodeName)) {
+ } else if("column".equals(nodeName) ||
"key-column".equals(nodeName)) { //$NON-NLS-1$ //$NON-NLS-2$
result = new RevEngColumnAdapter((Node) target, revEngDefinition);
- } else if("primary-key".equals(nodeName)) {
+ } else if("primary-key".equals(nodeName)) { //$NON-NLS-1$
result = new RevEngPrimaryKeyAdapter((Node) target, revEngDefinition);
- } else if("generator".equals(nodeName)) {
+ } else if("generator".equals(nodeName)) { //$NON-NLS-1$
result = new RevEngGeneratorAdapter((Node) target, revEngDefinition);
- } else if("param".equals(nodeName)) {
+ } else if("param".equals(nodeName)) { //$NON-NLS-1$
result = new RevEngParamAdapter((Node) target, revEngDefinition);
}
- else if("foreign-key".equals(nodeName)
- || "column-ref".equals(nodeName)
+ else if("foreign-key".equals(nodeName) //$NON-NLS-1$
+ || "column-ref".equals(nodeName) //$NON-NLS-1$
) {
result = new UnknownNodeAdapter(key, revEngDefinition) {
public void notifyChanged(INodeNotifier notifier, int eventType, Object
changedFeature, Object oldValue, Object newValue, int pos) {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -26,6 +26,7 @@
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.sse.core.internal.provisional.IModelStateListener;
import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
@@ -96,7 +97,7 @@
}
public ITableFilter createTableFilter() {
- return (ITableFilter) factory.adapt((INodeNotifier)
getDocument().createElement("table-filter"));
+ return (ITableFilter) factory.adapt((INodeNotifier)
getDocument().createElement("table-filter")); //$NON-NLS-1$
}
public void addTableFilter(ITableFilter filter) {
@@ -104,11 +105,11 @@
TableFilterAdapter tf = (TableFilterAdapter) filter;
factory.adapt((INodeNotifier) tf.getNode());
- List lastChild =
DOMModelUtil.getChildrenByTagName(getDocument().getDocumentElement(),"table-filter");
+ List lastChild =
DOMModelUtil.getChildrenByTagName(getDocument().getDocumentElement(),"table-filter");
//$NON-NLS-1$
if(lastChild==null || lastChild.isEmpty()) {
- List typeMapping =
DOMModelUtil.getChildrenByTagName(getDocument().getDocumentElement(),"type-mapping");
+ List typeMapping =
DOMModelUtil.getChildrenByTagName(getDocument().getDocumentElement(),"type-mapping");
//$NON-NLS-1$
if(typeMapping==null || typeMapping.isEmpty()) {
- List tableMapping =
DOMModelUtil.getChildrenByTagName(getDocument().getDocumentElement(),"table");
+ List tableMapping =
DOMModelUtil.getChildrenByTagName(getDocument().getDocumentElement(),"table");
//$NON-NLS-1$
if(tableMapping==null || tableMapping.isEmpty()) {
getDocument().getDocumentElement().appendChild(tf.getNode());
} else {
@@ -176,7 +177,7 @@
public void moveTableFilterDown(ITableFilter item) {
if ( item instanceof TableFilterAdapter ) {
TableFilterAdapter tfe = (TableFilterAdapter) item;
- Node nextSibling = DOMModelUtil.getNextNamedSibling( tfe.getNode(),
"table-filter" );
+ Node nextSibling = DOMModelUtil.getNextNamedSibling( tfe.getNode(),
"table-filter" ); //$NON-NLS-1$
if(nextSibling!=null) {
DOMModelUtil.addElementBefore(tfe.getNode().getParentNode(), nextSibling,
tfe.getNode());
}
@@ -188,7 +189,7 @@
if ( item instanceof TableFilterAdapter ) {
TableFilterAdapter tfe = (TableFilterAdapter) item;
- Node sibling = DOMModelUtil.getPreviousNamedSibling( tfe.getNode(),
"table-filter");
+ Node sibling = DOMModelUtil.getPreviousNamedSibling( tfe.getNode(),
"table-filter"); //$NON-NLS-1$
if(sibling!=null) {
DOMModelUtil.addElementBefore(tfe.getNode().getParentNode(), tfe.getNode(),
sibling);
}
@@ -197,11 +198,12 @@
}
private List getTableFiltersList() {
- return DOMModelUtil.getAdaptedElements(getDocument().getDocumentElement(),
"table-filter", factory);
+ return DOMModelUtil.getAdaptedElements(getDocument().getDocumentElement(),
"table-filter", factory); //$NON-NLS-1$
}
public void unknownNotifyChanged(INodeNotifier notifier, int eventType, Object
changedFeature, Object oldValue, Object newValue, int pos) {
- System.out.println("Unknown change: " + notifier + " " +
INodeNotifier.EVENT_TYPE_STRINGS[eventType]);
+ String out = NLS.bind(Messages.DOMREVERSEENGINEERINGDEFINITION_UNKNOWN_CHANGE,
notifier, INodeNotifier.EVENT_TYPE_STRINGS[eventType]);
+ System.out.println(out);
}
public void hibernateMappingChanged() {
@@ -220,10 +222,10 @@
private List getTypeMappingsList() {
List result = new ArrayList();
- List list =
DOMModelUtil.getChildrenByTagName(getDocument().getDocumentElement(),"type-mapping");
+ List list =
DOMModelUtil.getChildrenByTagName(getDocument().getDocumentElement(),"type-mapping");
//$NON-NLS-1$
for (int i = 0; i < list.size(); i++) {
Element item = (Element) list.get(i);
- List sqllist = DOMModelUtil.getChildrenByTagName(item, "sql-type");
+ List sqllist = DOMModelUtil.getChildrenByTagName(item, "sql-type");
//$NON-NLS-1$
for (int j = 0; j < sqllist.size(); j++) {
Element item2 = (Element) sqllist.get(j);
result.add(factory.adapt((INodeNotifier) item2));
@@ -233,17 +235,17 @@
}
public ITypeMapping createTypeMapping() {
- return (ITypeMapping)
factory.adapt((INodeNotifier)getDocument().createElement("sql-type"));
+ return (ITypeMapping)
factory.adapt((INodeNotifier)getDocument().createElement("sql-type"));
//$NON-NLS-1$
}
public void addTypeMapping(ITypeMapping typeMapping) {
if ( typeMapping instanceof TypeMappingAdapter ) {
TypeMappingAdapter tf = (TypeMappingAdapter) typeMapping;
- List parentList =
DOMModelUtil.getChildrenByTagName(getDocument().getDocumentElement(),"type-mapping");
+ List parentList =
DOMModelUtil.getChildrenByTagName(getDocument().getDocumentElement(),"type-mapping");
//$NON-NLS-1$
Element parent;
if(parentList.isEmpty()) {
- parent = getDocument().createElement("type-mapping");
+ parent = getDocument().createElement("type-mapping"); //$NON-NLS-1$
factory.adapt((INodeNotifier)parent);
Node firstChild = getDocument().getDocumentElement().getFirstChild();
if(firstChild==null) {
@@ -270,7 +272,7 @@
public void moveTypeMappingDown(ITypeMapping item) {
if ( item instanceof TypeMappingAdapter ) {
TypeMappingAdapter tfe = (TypeMappingAdapter) item;
- Node nextSibling = DOMModelUtil.getNextNamedSibling( tfe.getNode(),
"sql-type" );
+ Node nextSibling = DOMModelUtil.getNextNamedSibling( tfe.getNode(),
"sql-type" ); //$NON-NLS-1$
if(nextSibling!=null) {
DOMModelUtil.addElementBefore(tfe.getNode().getParentNode(), nextSibling,
tfe.getNode());
}
@@ -281,7 +283,7 @@
if ( item instanceof TypeMappingAdapter ) {
TypeMappingAdapter tfe = (TypeMappingAdapter) item;
- Node sibling = DOMModelUtil.getPreviousNamedSibling( tfe.getNode(),
"sql-type");
+ Node sibling = DOMModelUtil.getPreviousNamedSibling( tfe.getNode(),
"sql-type"); //$NON-NLS-1$
if(sibling!=null) {
DOMModelUtil.addElementBefore(tfe.getNode().getParentNode(), tfe.getNode(),
sibling);
}
@@ -318,7 +320,7 @@
}
private List getTablesList() {
- return DOMModelUtil.getAdaptedElements(getDocument().getDocumentElement(),
"table",factory);
+ return DOMModelUtil.getAdaptedElements(getDocument().getDocumentElement(),
"table",factory); //$NON-NLS-1$
}
public void tablesChanged(INodeNotifier notifier) {
@@ -334,7 +336,7 @@
}
public IRevEngTable createTable() {
- return (IRevEngTable) factory.adapt((INodeNotifier)
getDocument().createElement("table"));
+ return (IRevEngTable) factory.adapt((INodeNotifier)
getDocument().createElement("table")); //$NON-NLS-1$
}
public void addTable(IRevEngTable retable) {
@@ -365,19 +367,19 @@
}
public IRevEngColumn createColumn() {
- return (IRevEngColumn) factory.adapt((INodeNotifier)
getDocument().createElement("column"));
+ return (IRevEngColumn) factory.adapt((INodeNotifier)
getDocument().createElement("column")); //$NON-NLS-1$
}
public IRevEngColumn createKeyColumn() {
- return (IRevEngColumn) factory.adapt((INodeNotifier)
getDocument().createElement("key-column"));
+ return (IRevEngColumn) factory.adapt((INodeNotifier)
getDocument().createElement("key-column")); //$NON-NLS-1$
}
public IRevEngPrimaryKey createPrimaryKey() {
- return (IRevEngPrimaryKey) factory.adapt((INodeNotifier)
getDocument().createElement("primary-key"));
+ return (IRevEngPrimaryKey) factory.adapt((INodeNotifier)
getDocument().createElement("primary-key")); //$NON-NLS-1$
}
public IRevEngGenerator createGenerator() {
- return (IRevEngGenerator) factory.adapt((INodeNotifier)
getDocument().createElement("generator"));
+ return (IRevEngGenerator) factory.adapt((INodeNotifier)
getDocument().createElement("generator")); //$NON-NLS-1$
}
}
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/Messages.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/Messages.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/Messages.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -0,0 +1,16 @@
+package org.hibernate.eclipse.mapper.model;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME =
"org.hibernate.eclipse.mapper.model.messages"; //$NON-NLS-1$
+ public static String DOMREVERSEENGINEERINGDEFINITION_UNKNOWN_CHANGE;
+ public static String REVENGPRIMARYKEYADAPTER_COLUMN;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngColumnAdapter.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngColumnAdapter.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngColumnAdapter.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -32,28 +32,28 @@
}
public String getJDBCType() {
- return getNodeValue("jdbc-type", null);
+ return getNodeValue("jdbc-type", null); //$NON-NLS-1$
}
public String getType() {
- return getNodeValue("type", null);
+ return getNodeValue("type", null); //$NON-NLS-1$
}
public String getPropertyName() {
- return getNodeValue("property", null);
+ return getNodeValue("property", null); //$NON-NLS-1$
}
public boolean getExclude() {
- String nodeValue = getNodeValue("exclude", "false");
+ String nodeValue = getNodeValue("exclude", "false"); //$NON-NLS-1$
//$NON-NLS-2$
return nodeValue==null ? false : Boolean.valueOf(nodeValue).booleanValue();
}
public String getName() {
- return getNodeValue("name", null);
+ return getNodeValue("name", null); //$NON-NLS-1$
}
public void setName(String value) {
- setAttribute("name", value, "");
+ setAttribute("name", value, ""); //$NON-NLS-1$//$NON-NLS-2$
}
public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature,
Object oldValue, Object newValue, int pos) {
@@ -62,19 +62,19 @@
}
public void setPropertyName(String value) {
- setAttribute("property", value, "");
+ setAttribute("property", value, ""); //$NON-NLS-1$//$NON-NLS-2$
}
public void setJDBCType(String value) {
- setAttribute("jdbc-type", value, "");
+ setAttribute("jdbc-type", value, "");
//$NON-NLS-1$//$NON-NLS-2$
}
public void setType(String value) {
- setAttribute("type", value, "");
+ setAttribute("type", value, ""); //$NON-NLS-1$ //$NON-NLS-2$
}
public void setExcluded(boolean selection) {
- setAttribute("exclude", ""+selection, "false");
+ setAttribute("exclude", ""+selection, "false");
//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
}
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngGeneratorAdapter.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngGeneratorAdapter.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngGeneratorAdapter.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -35,11 +35,11 @@
}
public String getGeneratorClassName() {
- return getNodeValue("class", "");
+ return getNodeValue("class", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
public IRevEngParameter[] getParameters() {
- return (IRevEngParameter[]) getAdaptedElements((Element) getNode(),
"param").toArray(new IRevEngParameter[0]);
+ return (IRevEngParameter[]) getAdaptedElements((Element) getNode(),
"param").toArray(new IRevEngParameter[0]); //$NON-NLS-1$
}
public void notifyChanged(INodeNotifier notifier, int eventType,
@@ -48,7 +48,7 @@
}
public void setGeneratorClassName(String value) {
- setAttribute("class", value, null);
+ setAttribute("class", value, null); //$NON-NLS-1$
}
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngParamAdapter.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngParamAdapter.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngParamAdapter.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -32,11 +32,11 @@
}
public String getName() {
- return getNodeValue("name", "");
+ return getNodeValue("name", ""); //$NON-NLS-1$//$NON-NLS-2$
}
public String getValue() {
- return getNodeValue("value", "");
+ return getNodeValue("value", ""); //$NON-NLS-1$//$NON-NLS-2$
}
public void notifyChanged(INodeNotifier notifier, int eventType,
@@ -45,11 +45,11 @@
}
public void setName(String value) {
- setAttribute("name", value, "");
+ setAttribute("name", value, ""); //$NON-NLS-1$ //$NON-NLS-2$
}
public void setValue(String value) {
- setAttribute("value", value, "");
+ setAttribute("value", value, ""); //$NON-NLS-1$//$NON-NLS-2$
}
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngPrimaryKeyAdapter.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngPrimaryKeyAdapter.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngPrimaryKeyAdapter.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -38,7 +38,7 @@
}
public IRevEngGenerator getGenerator() {
- List adaptedElements = getAdaptedElements((Element) getNode(), "generator");
+ List adaptedElements = getAdaptedElements((Element) getNode(), "generator");
//$NON-NLS-1$
if(adaptedElements.isEmpty()) {
return null;
} else {
@@ -47,7 +47,7 @@
}
public IRevEngColumn[] getColumns() {
- return (IRevEngColumn[]) getAdaptedElements((Element) getNode(),
"key-column").toArray(new IRevEngColumn[0]);
+ return (IRevEngColumn[]) getAdaptedElements((Element) getNode(),
"key-column").toArray(new IRevEngColumn[0]); //$NON-NLS-1$
}
public void notifyChanged(INodeNotifier notifier, int eventType,
@@ -57,14 +57,14 @@
public void addGenerator() {
RevEngGeneratorAdapter key = (RevEngGeneratorAdapter) getModel().createGenerator();
- key.setGeneratorClassName("assigned");
+ key.setGeneratorClassName("assigned"); //$NON-NLS-1$
getNode().insertBefore(key.getNode(), getNode().getFirstChild());
DOMModelUtil.formatNode(getNode().getParentNode());
}
public void addColumn() {
RevEngColumnAdapter key = (RevEngColumnAdapter) getModel().createKeyColumn();
- key.setName("column_" + (getColumns().length+1));
+ key.setName(Messages.REVENGPRIMARYKEYADAPTER_COLUMN + (getColumns().length+1));
getNode().appendChild(key.getNode());
DOMModelUtil.formatNode(getNode().getParentNode());
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngTableAdapter.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngTableAdapter.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/RevEngTableAdapter.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -37,25 +37,25 @@
}
public String getCatalog() {
- String attrib = "catalog";
+ String attrib = "catalog"; //$NON-NLS-1$
String nullValue = null;
return getNodeValue( attrib, nullValue );
}
public String getSchema() {
- return getNodeValue("schema", null);
+ return getNodeValue("schema", null); //$NON-NLS-1$
}
public String getClassname() {
- return getNodeValue("class", null);
+ return getNodeValue("class", null); //$NON-NLS-1$
}
public String getName() {
- return getNodeValue("name", null);
+ return getNodeValue("name", null); //$NON-NLS-1$
}
public IRevEngPrimaryKey getPrimaryKey() {
- String elementName = "primary-key";
+ String elementName = "primary-key"; //$NON-NLS-1$
return (IRevEngPrimaryKey) getAdaptedElement( elementName );
}
@@ -73,32 +73,32 @@
}
private List getColumnList() {
- return getAdaptedElements( (Element) getNode(), "column" );
+ return getAdaptedElements( (Element) getNode(), "column" ); //$NON-NLS-1$
}
public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature,
Object oldValue, Object newValue, int pos) {
getModel().tablesChanged(notifier);
if(changedFeature==null) {
- firePropertyChange("unknown-changed-feature", oldValue, newValue);
+ firePropertyChange("unknown-changed-feature", oldValue, newValue);
//$NON-NLS-1$
} else {
firePropertyChange(((Node)changedFeature).getNodeName(), oldValue, newValue);
}
}
public void setName(String value) {
- setAttribute("name", value, "");
+ setAttribute("name", value, ""); //$NON-NLS-1$ //$NON-NLS-2$
}
public void setClassname(String value) {
- setAttribute("class", value, "");
+ setAttribute("class", value, ""); //$NON-NLS-1$//$NON-NLS-2$
}
public void setCatalog(String value) {
- setAttribute("catalog", value, null);
+ setAttribute("catalog", value, null); //$NON-NLS-1$
}
public void setSchema(String value) {
- setAttribute("schema", value, null);
+ setAttribute("schema", value, null); //$NON-NLS-1$
}
public void addColumn(IRevEngColumn revCol) {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/TableFilterAdapter.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/TableFilterAdapter.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/TableFilterAdapter.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -32,39 +32,39 @@
}
public void setExclude(Boolean exclude) {
- setAttribute("exclude", exclude==null?"false":exclude.toString(),
"false");
+ setAttribute("exclude", exclude==null?"false":exclude.toString(),
"false"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
public void setMatchCatalog(String catalog) {
- setAttribute( "match-catalog", catalog, ".*" );
+ setAttribute( "match-catalog", catalog, ".*" ); //$NON-NLS-1$
//$NON-NLS-2$
}
public void setMatchSchema(String schema) {
- setAttribute("match-schema", schema, ".*");
+ setAttribute("match-schema", schema, ".*"); //$NON-NLS-1$
//$NON-NLS-2$
}
public void setMatchName(String name) {
- setAttribute("match-name", name, null);
+ setAttribute("match-name", name, null); //$NON-NLS-1$
}
public Boolean getExclude() {
- Node type = getNode().getAttributes().getNamedItem("exclude");
+ Node type = getNode().getAttributes().getNamedItem("exclude"); //$NON-NLS-1$
return type == null ? Boolean.FALSE : Boolean.valueOf(type.getNodeValue());
}
public String getMatchCatalog() {
- Node type = getNode().getAttributes().getNamedItem("match-catalog");
- return type == null ? ".*" : type.getNodeValue();
+ Node type = getNode().getAttributes().getNamedItem("match-catalog");
//$NON-NLS-1$
+ return type == null ? ".*" : type.getNodeValue(); //$NON-NLS-1$
}
public String getMatchSchema() {
- Node type = getNode().getAttributes().getNamedItem("match-schema");
- return type == null ? ".*" : type.getNodeValue();
+ Node type = getNode().getAttributes().getNamedItem("match-schema");
//$NON-NLS-1$
+ return type == null ? ".*" : type.getNodeValue(); //$NON-NLS-1$
}
public String getMatchName() {
- Node type = getNode().getAttributes().getNamedItem("match-name");
- return type == null ? ".*" : type.getNodeValue();
+ Node type = getNode().getAttributes().getNamedItem("match-name");
//$NON-NLS-1$
+ return type == null ? ".*" : type.getNodeValue(); //$NON-NLS-1$
}
public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature,
Object oldValue, Object newValue, int pos) {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/TypeMappingAdapter.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/TypeMappingAdapter.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/TypeMappingAdapter.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -32,22 +32,22 @@
}
public String getJDBCType() {
- Node type = getNode().getAttributes().getNamedItem("jdbc-type");
+ Node type = getNode().getAttributes().getNamedItem("jdbc-type");
//$NON-NLS-1$
return type == null ? null : type.getNodeValue();
}
public String getHibernateType() {
- Node type = getNode().getAttributes().getNamedItem("hibernate-type");
+ Node type = getNode().getAttributes().getNamedItem("hibernate-type");
//$NON-NLS-1$
return type == null ? null : type.getNodeValue();
}
public Integer getLength() {
- String name = "length";
+ String name = "length"; //$NON-NLS-1$
return getInteger( name );
}
public Boolean getNullable() {
- return getBoolean("not-null");
+ return getBoolean("not-null"); //$NON-NLS-1$
}
private Integer getInteger(String name) {
@@ -75,35 +75,35 @@
}
public Integer getPrecision() {
- return getInteger( "precision" );
+ return getInteger( "precision" ); //$NON-NLS-1$
}
public Integer getScale() {
- return getInteger( "scale" );
+ return getInteger( "scale" ); //$NON-NLS-1$
}
public void setJDBCType(String string) {
- setAttribute("jdbc-type", string, null);
+ setAttribute("jdbc-type", string, null); //$NON-NLS-1$
}
public void setLength(Integer length) {
- setAttribute("length", length==null?null:length.toString(), null);
+ setAttribute("length", length==null?null:length.toString(), null);
//$NON-NLS-1$
}
public void setHibernateType(String type) {
- setAttribute("hibernate-type", type, "");
+ setAttribute("hibernate-type", type, ""); //$NON-NLS-1$
//$NON-NLS-2$
}
public void setPrecision(Integer precision) {
- setAttribute("precision", precision==null?null:precision.toString(), null);
+ setAttribute("precision", precision==null?null:precision.toString(), null);
//$NON-NLS-1$
}
public void setScale(Integer scale) {
- setAttribute("scale", scale==null?null:scale.toString(), null);
+ setAttribute("scale", scale==null?null:scale.toString(), null);
//$NON-NLS-1$
}
public void setNullable(Boolean value) {
- setAttribute("not-null", value==null?null:value.toString(), null);
+ setAttribute("not-null", value==null?null:value.toString(), null);
//$NON-NLS-1$
}
public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature,
Object oldValue, Object newValue, int pos) {
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/messages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/messages.properties
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/messages.properties 2008-06-04
14:33:46 UTC (rev 8545)
@@ -0,0 +1,2 @@
+DOMREVERSEENGINEERINGDEFINITION_UNKNOWN_CHANGE=Unknown change: {0} {1}
+REVENGPRIMARYKEYADAPTER_COLUMN=column_
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/HibernateXMLContentOutlineConfiguration.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/HibernateXMLContentOutlineConfiguration.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/HibernateXMLContentOutlineConfiguration.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -77,16 +77,16 @@
static Map nameToMap = new HashMap();
static {
//TODO: this will affect any xml provided by hibernatetools...should be configured by
contenttype instead.
- nameToMap.put("many-to-one", ImageConstants.MANYTOONE);
- nameToMap.put("one-to-many", ImageConstants.ONETOMANY);
- nameToMap.put("property", ImageConstants.PROPERTY);
- nameToMap.put("class", ImageConstants.MAPPEDCLASS);
- nameToMap.put("subclass", ImageConstants.MAPPEDCLASS);
- nameToMap.put("joined-subclass", ImageConstants.MAPPEDCLASS);
- nameToMap.put("union-subclass", ImageConstants.MAPPEDCLASS);
- nameToMap.put("id", ImageConstants.IDPROPERTY);
- nameToMap.put("one-to-one", ImageConstants.ONETOONE);
- nameToMap.put("component", ImageConstants.ONETOONE);
+ nameToMap.put("many-to-one", ImageConstants.MANYTOONE); //$NON-NLS-1$
+ nameToMap.put("one-to-many", ImageConstants.ONETOMANY); //$NON-NLS-1$
+ nameToMap.put("property", ImageConstants.PROPERTY); //$NON-NLS-1$
+ nameToMap.put("class", ImageConstants.MAPPEDCLASS); //$NON-NLS-1$
+ nameToMap.put("subclass", ImageConstants.MAPPEDCLASS); //$NON-NLS-1$
+ nameToMap.put("joined-subclass", ImageConstants.MAPPEDCLASS); //$NON-NLS-1$
+ nameToMap.put("union-subclass", ImageConstants.MAPPEDCLASS); //$NON-NLS-1$
+ nameToMap.put("id", ImageConstants.IDPROPERTY); //$NON-NLS-1$
+ nameToMap.put("one-to-one", ImageConstants.ONETOONE); //$NON-NLS-1$
+ nameToMap.put("component", ImageConstants.ONETOONE); //$NON-NLS-1$
}
public Image getImage(Object element) {
@@ -104,8 +104,8 @@
if(element instanceof Node) {
Node node = (Node) element;
String nodeName = node.getNodeName();
- if(node.getNodeType()==Node.PROCESSING_INSTRUCTION_NODE &&
"xml".equals(nodeName)) {
- return "xml (Hibernate Tools)";
+ if(node.getNodeType()==Node.PROCESSING_INSTRUCTION_NODE &&
"xml".equals(nodeName)) { //$NON-NLS-1$
+ return Messages.XML_HIBERNATE_TOOLS;
}
}
return delegate.getText( element );
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/JFaceNodeAdapterForXML.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/JFaceNodeAdapterForXML.java 2008-06-04
14:29:48 UTC (rev 8544)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/JFaceNodeAdapterForXML.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -59,7 +59,7 @@
if(attributes!=null) {
Node firstAttribute = attributes.item(0);
if(firstAttribute!=null) {
- return result + " " + firstAttribute.getNodeName() + "=\"" +
firstAttribute.getNodeValue() + "\"";
+ return result + " " + firstAttribute.getNodeName() + "=\"" +
firstAttribute.getNodeValue() + "\""; //$NON-NLS-1$//$NON-NLS-2$
//$NON-NLS-3$
}
}
@@ -69,8 +69,8 @@
private String getNodeName(Object object) {
Node node = (Node) object;
String nodeName = node.getNodeName();
- if(node.getNodeType()==Node.PROCESSING_INSTRUCTION_NODE &&
"xml".equals(nodeName)) {
- return "xml (Hibernate Tools)";
+ if(node.getNodeType()==Node.PROCESSING_INSTRUCTION_NODE &&
"xml".equals(nodeName)) { //$NON-NLS-1$
+ return Messages.XML_HIBERNATE_TOOLS;
}
return nodeName;
}
@@ -96,16 +96,16 @@
static Map nameToMap = new HashMap();
static {
- nameToMap.put("many-to-one", ImageConstants.MANYTOONE);
- nameToMap.put("one-to-many", ImageConstants.ONETOMANY);
- nameToMap.put("property", ImageConstants.PROPERTY);
- nameToMap.put("class", ImageConstants.MAPPEDCLASS);
- nameToMap.put("subclass", ImageConstants.MAPPEDCLASS);
- nameToMap.put("joined-subclass", ImageConstants.MAPPEDCLASS);
- nameToMap.put("union-subclass", ImageConstants.MAPPEDCLASS);
- nameToMap.put("id", ImageConstants.IDPROPERTY);
- nameToMap.put("one-to-one", ImageConstants.ONETOONE);
- nameToMap.put("component", ImageConstants.ONETOONE);
+ nameToMap.put("many-to-one", ImageConstants.MANYTOONE); //$NON-NLS-1$
+ nameToMap.put("one-to-many", ImageConstants.ONETOMANY); //$NON-NLS-1$
+ nameToMap.put("property", ImageConstants.PROPERTY); //$NON-NLS-1$
+ nameToMap.put("class", ImageConstants.MAPPEDCLASS); //$NON-NLS-1$
+ nameToMap.put("subclass", ImageConstants.MAPPEDCLASS); //$NON-NLS-1$
+ nameToMap.put("joined-subclass", ImageConstants.MAPPEDCLASS); //$NON-NLS-1$
+ nameToMap.put("union-subclass", ImageConstants.MAPPEDCLASS); //$NON-NLS-1$
+ nameToMap.put("id", ImageConstants.IDPROPERTY); //$NON-NLS-1$
+ nameToMap.put("one-to-one", ImageConstants.ONETOONE); //$NON-NLS-1$
+ nameToMap.put("component", ImageConstants.ONETOONE); //$NON-NLS-1$
}
protected Image createImage(Object object) {
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/Messages.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/Messages.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/Messages.java 2008-06-04
14:33:46 UTC (rev 8545)
@@ -0,0 +1,15 @@
+package org.hibernate.eclipse.mapper.views.contentoutline;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME =
"org.hibernate.eclipse.mapper.views.contentoutline.messages"; //$NON-NLS-1$
+ public static String XML_HIBERNATE_TOOLS;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/messages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/messages.properties
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/messages.properties 2008-06-04
14:33:46 UTC (rev 8545)
@@ -0,0 +1 @@
+XML_HIBERNATE_TOOLS=xml (Hibernate Tools)