Author: vyemialyanchyk
Date: 2008-06-04 11:02:34 -0400 (Wed, 04 Jun 2008)
New Revision: 8549
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/Messages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/Messages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/messages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/messages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/Messages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/messages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/Messages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/messages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/Messages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/messages.properties
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleQueryParameter.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/HQLQueryPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ImageConstants.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ImageMap.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/JavaPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryInputModel.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/DefaultExecutionContext.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/BaseNode.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ClassNode.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationEntitiesNode.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationNode.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/NodeFactory.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PersistentCollectionNode.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ProxyFactory.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TypeNode.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/AbstractConsoleConfigurationPreferences.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/ConsoleConfigurationPreferences.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/StandAloneConsoleConfigurationPreferences.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/HibernatePlugin.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginFileAppender.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogAppender.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogListener.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogManager.java
Log:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-500
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -134,7 +134,7 @@
public void addException(Throwable e) {
exceptions.add(e);
release();
- pcs.firePropertyChange("exceptions", null, exceptions);
+ pcs.firePropertyChange("exceptions", null, exceptions); //$NON-NLS-1$
}
public ConsoleConfiguration getConsoleConfiguration() {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -43,6 +43,7 @@
import org.dom4j.DocumentException;
import org.dom4j.Node;
import org.dom4j.io.DOMWriter;
+import org.eclipse.osgi.util.NLS;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
import org.hibernate.Session;
@@ -116,40 +117,41 @@
overrides.putAll( properties );
}
if(StringHelper.isNotEmpty( prefs.getNamingStrategy())) {
- overrides.put( "hibernate.ejb.naming_strategy", prefs.getNamingStrategy()
);
+ overrides.put( "hibernate.ejb.naming_strategy", prefs.getNamingStrategy()
); //$NON-NLS-1$
}
if(!includeMappings) {
- overrides.put( "hibernate.archive.autodetection", "none" );
+ overrides.put( "hibernate.archive.autodetection", "none" );
//$NON-NLS-1$//$NON-NLS-2$
}
- Class clazz =
ReflectHelper.classForName("org.hibernate.ejb.Ejb3Configuration",
ConsoleConfiguration.class);
+ Class clazz =
ReflectHelper.classForName("org.hibernate.ejb.Ejb3Configuration",
ConsoleConfiguration.class); //$NON-NLS-1$
Object ejb3cfg = clazz.newInstance();
if(StringHelper.isNotEmpty(entityResolver)) {
Class resolver = ReflectHelper.classForName(entityResolver, this.getClass());
Object object = resolver.newInstance();
- Method method = clazz.getMethod("setEntityResolver", new Class[] {
EntityResolver.class });
+ Method method = clazz.getMethod("setEntityResolver", new Class[] {
EntityResolver.class });//$NON-NLS-1$
method.invoke(ejb3cfg, new Object[] { object } );
}
- Method method = clazz.getMethod("configure", new Class[] { String.class,
Map.class });
+ Method method = clazz.getMethod("configure", new Class[] { String.class,
Map.class }); //$NON-NLS-1$
if ( method.invoke(ejb3cfg, new Object[] { persistenceUnit, overrides } ) == null ) {
- throw new HibernateConsoleRuntimeException("Persistence unit not found:
'" + persistenceUnit + "'.");
+ String out = NLS.bind(Messages.CONSOLECONFIGURATION_PERSISTENCE_UNIT_NOT_FOUND,
persistenceUnit);
+ throw new HibernateConsoleRuntimeException(out);
}
- method = clazz.getMethod("getHibernateConfiguration", new Class[0]);
+ method = clazz.getMethod("getHibernateConfiguration", new
Class[0]);//$NON-NLS-1$
Configuration invoke = (Configuration) method.invoke(ejb3cfg, (Object[])null);
return invoke;
}
catch (Exception e) {
- throw new HibernateConsoleRuntimeException("Could not create JPA based
Configuration",e);
+ throw new
HibernateConsoleRuntimeException(Messages.CONSOLECONFIGURATION_COULD_NOT_CREATE_JPA_BASED_CONFIGURATION,e);
}
}
private Configuration buildAnnotationConfiguration() throws ClassNotFoundException,
InstantiationException, IllegalAccessException {
Class clazz = ReflectHelper
- .classForName( "org.hibernate.cfg.AnnotationConfiguration" );
+ .classForName( "org.hibernate.cfg.AnnotationConfiguration" );
//$NON-NLS-1$
Configuration newInstance = (Configuration) clazz.newInstance();
return newInstance;
}
@@ -195,9 +197,9 @@
if(properties!=null) {
// in case the transaction manager is empty then we need to inject a faketm since
hibernate will still try and instantiate it.
- String str = properties.getProperty(
"hibernate.transaction.manager_lookup_class" );
+ String str = properties.getProperty(
"hibernate.transaction.manager_lookup_class" ); //$NON-NLS-1$
if(str != null && StringHelper.isEmpty( str )) {
- properties.setProperty( "hibernate.transaction.manager_lookup_class",
"org.hibernate.console.FakeTransactionManagerLookup");
+ properties.setProperty( "hibernate.transaction.manager_lookup_class",
"org.hibernate.console.FakeTransactionManagerLookup"); //$NON-NLS-1$
//$NON-NLS-2$
//properties.setProperty( "hibernate.transaction.factory_class",
"");
}
}
@@ -226,8 +228,8 @@
}
}
// TODO: HBX-
- localCfg.setProperty( "hibernate.temp.use_jdbc_metadata_defaults",
"false" );
- localCfg.setProperty( Environment.HBM2DDL_AUTO, "false" );
+ localCfg.setProperty( "hibernate.temp.use_jdbc_metadata_defaults",
"false" ); //$NON-NLS-1$//$NON-NLS-2$
+ localCfg.setProperty( Environment.HBM2DDL_AUTO, "false" ); //$NON-NLS-1$
return localCfg;
}
@@ -244,18 +246,18 @@
org.dom4j.Document doc;
XMLHelper xmlHelper = new XMLHelper();
InputStream stream;
- String resourceName = "<unknown>";
+ String resourceName = "<unknown>"; //$NON-NLS-1$
try {
if(configXMLFile!=null) {
resourceName = configXMLFile.toString();
stream = new FileInputStream( configXMLFile );
} else {
- resourceName = "/hibernate.cfg.xml";
+ resourceName = "/hibernate.cfg.xml"; //$NON-NLS-1$
stream = ConfigHelper.getResourceAsStream( resourceName ); // simulate
hibernate's default look up
}
}
catch (FileNotFoundException e1) {
- throw new HibernateConsoleRuntimeException("Could not access " +
configXMLFile, e1);
+ throw new
HibernateConsoleRuntimeException(Messages.CONSOLECONFIGURATION_COULD_NOT_ACCESS +
configXMLFile, e1);
}
try {
@@ -265,13 +267,13 @@
.read( new InputSource( stream ) );
if ( errors.size() != 0 ) {
throw new MappingException(
- "invalid configuration",
+ Messages.CONSOLECONFIGURATION_INVALID_CONFIGURATION,
(Throwable) errors.get( 0 )
);
}
- List list =
doc.getRootElement().element("session-factory").elements("mapping");
+ List list =
doc.getRootElement().element("session-factory").elements("mapping");
//$NON-NLS-1$ //$NON-NLS-2$
Iterator iterator = list.iterator();
while ( iterator.hasNext() ) {
Node element = (Node) iterator.next();
@@ -285,7 +287,7 @@
}
catch (DocumentException e) {
throw new HibernateException(
- "Could not parse configuration: " + resourceName, e
+ Messages.CONSOLECONFIGURATION_COULD_NOT_PARSE_CONFIGURATION + resourceName, e
);
}
finally {
@@ -326,16 +328,20 @@
}
}
catch (ClassNotFoundException e) {
- throw new HibernateConsoleRuntimeException("Problems while loading database
driverclass (" + driverClassName + ")", e);
+ String out =
NLS.bind(Messages.CONSOLECONFIGURATION_PROBLEMS_WHILE_LOADING_DATABASE_DRIVERCLASS,
driverClassName);
+ throw new HibernateConsoleRuntimeException(out, e);
}
catch (InstantiationException e) {
- throw new HibernateConsoleRuntimeException("Problems while loading database
driverclass (" + driverClassName + ")", e);
+ String out =
NLS.bind(Messages.CONSOLECONFIGURATION_PROBLEMS_WHILE_LOADING_DATABASE_DRIVERCLASS,
driverClassName);
+ throw new HibernateConsoleRuntimeException(out, e);
}
catch (IllegalAccessException e) {
- throw new HibernateConsoleRuntimeException("Problems while loading database
driverclass (" + driverClassName + ")", e);
+ String out =
NLS.bind(Messages.CONSOLECONFIGURATION_PROBLEMS_WHILE_LOADING_DATABASE_DRIVERCLASS,
driverClassName);
+ throw new HibernateConsoleRuntimeException(out, e);
}
catch (SQLException e) {
- throw new HibernateConsoleRuntimeException("Problems while loading database
driverclass (" + driverClassName + ")", e);
+ String out =
NLS.bind(Messages.CONSOLECONFIGURATION_PROBLEMS_WHILE_LOADING_DATABASE_DRIVERCLASS,
driverClassName);
+ throw new HibernateConsoleRuntimeException(out, e);
}
}
}
@@ -356,7 +362,7 @@
execute(new ExecutionContext.Command() {
public Object execute() {
if(sessionFactory!=null) {
- throw new HibernateConsoleRuntimeException("Factory were not closed before
attempting to built a new factory.");
+ throw new
HibernateConsoleRuntimeException(Messages.CONSOLECONFIGURATION_FACTORY_NOT_CLOSED_BEFORE_BUILD_NEW_FACTORY);
}
sessionFactory = getConfiguration().buildSessionFactory();
fireFactoryBuilt();
@@ -459,7 +465,7 @@
}
public String toString() {
- return getClass().getName() + ":" + getName();
+ return getClass().getName() + ":" + getName(); //$NON-NLS-1$
}
public ExecutionContext getExecutionContext() {
@@ -493,14 +499,14 @@
localCfg = configureStandardConfiguration( includeMappings, localCfg, properties );
}
catch (Exception e) {
- throw new HibernateConsoleRuntimeException("Could not load
AnnotationConfiguration",e);
+ throw new
HibernateConsoleRuntimeException(Messages.CONSOLECONFIGURATION_COULD_NOT_LOAD_ANNOTATIONCONFIGURATION,e);
}
} else if(prefs.getConfigurationMode().equals( ConfigurationMode.JPA )) {
try {
localCfg = buildJPAConfiguration( getPreferences().getPersistenceUnitName(),
properties, prefs.getEntityResolverName(), includeMappings );
}
catch (Exception e) {
- throw new HibernateConsoleRuntimeException("Could not load JPA
Configuration",e);
+ throw new
HibernateConsoleRuntimeException(Messages.CONSOLECONFIGURATION_COULD_NOT_LOAD_JPA_CONFIGURATION,e);
}
} else {
localCfg = new Configuration();
@@ -518,7 +524,7 @@
try {
entityResolver = (EntityResolver)
ReflectHelper.classForName(prefs.getEntityResolverName()).newInstance();
} catch (Exception c) {
- throw new HibernateConsoleRuntimeException("Could not configure entity resolver
" + prefs.getEntityResolverName(), c);
+ throw new
HibernateConsoleRuntimeException(Messages.CONSOLECONFIGURATION_COULD_NOT_CONFIGURE_ENTITY_RESOLVER
+ prefs.getEntityResolverName(), c);
}
}
localCfg.setEntityResolver(entityResolver);
@@ -528,7 +534,7 @@
NamingStrategy ns = (NamingStrategy)
ReflectHelper.classForName(prefs.getNamingStrategy()).newInstance();
localCfg.setNamingStrategy( ns );
} catch (Exception c) {
- throw new HibernateConsoleRuntimeException("Could not configure naming strategy
" + prefs.getNamingStrategy(), c);
+ throw new
HibernateConsoleRuntimeException(Messages.CONSOLECONFIGURATION_COULD_NOT_CONFIGURE_NAMING_STRATEGY
+ prefs.getNamingStrategy(), c);
}
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleQueryParameter.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleQueryParameter.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleQueryParameter.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -60,8 +60,8 @@
addTypeFormat(Hibernate.FLOAT, new Float(42.42));
addTypeFormat(Hibernate.LOCALE, Locale.getDefault());
addTypeFormat(Hibernate.LONG, new Long(42));
- addTypeFormat(Hibernate.STRING, "a string");
- addTypeFormat(Hibernate.TEXT, "a text");
+ addTypeFormat(Hibernate.STRING, "a string"); //$NON-NLS-1$
+ addTypeFormat(Hibernate.TEXT, "a text"); //$NON-NLS-1$
addTypeFormat(Hibernate.TIME, new Date());
addTypeFormat(Hibernate.TIMESTAMP, new Date());
addTypeFormat(Hibernate.TIMEZONE, TimeZone.getDefault());
@@ -119,7 +119,7 @@
}
public String getValueAsString() {
- if(isNull()) return "";
+ if(isNull()) return ""; //$NON-NLS-1$
return type.toString(getValue());
}
@@ -140,7 +140,7 @@
return object.toString();
}
}
- return "<unknown>";
+ return "<unknown>"; //$NON-NLS-1$
}
public static Set getPossibleTypes() {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/HQLQueryPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/HQLQueryPage.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/HQLQueryPage.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -53,7 +53,7 @@
Object element = iter.next();
list.add(element);
}
- pcs.firePropertyChange("list", null, list);
+ pcs.firePropertyChange("list", null, list); //$NON-NLS-1$
}
catch (HibernateException e) {
list = Collections.EMPTY_LIST;
@@ -142,7 +142,7 @@
for (int i = 0; i < t.length; i++) {
Type type = t[i];
if(type==null) {
- l.add("<multiple types>");
+ l.add("<multiple types>"); //$NON-NLS-1$
} else {
l.add(type.getName() );
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ImageConstants.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ImageConstants.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ImageConstants.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -27,101 +27,101 @@
*/
public interface ImageConstants {
- public static final String HIBERNATE_LOGO = "images/hibernate.gif";
- public static final String MINI_HIBERNATE = "images/hicon.gif";
- public static final String JBOSS_LOGO = "images/jboss.gif";
+ public static final String HIBERNATE_LOGO = "images/hibernate.gif";
//$NON-NLS-1$
+ public static final String MINI_HIBERNATE = "images/hicon.gif"; //$NON-NLS-1$
+ public static final String JBOSS_LOGO = "images/jboss.gif"; //$NON-NLS-1$
- public static final String FORMAT_QL = "images/format.gif";
- public static final String MAPPEDCLASS_PATH = "images/mapped_class.gif";
+ public static final String FORMAT_QL = "images/format.gif"; //$NON-NLS-1$
+ public static final String MAPPEDCLASS_PATH = "images/mapped_class.gif";
//$NON-NLS-1$
- public static final String UNMAPPEDCLASS_PATH = "images/unmapped_class.gif";
+ public static final String UNMAPPEDCLASS_PATH = "images/unmapped_class.gif";
//$NON-NLS-1$
- public static final String PROPERTY_PATH = "images/property.gif";
+ public static final String PROPERTY_PATH = "images/property.gif";
//$NON-NLS-1$
- public static final String ONETOMANY_PATH = "images/1tonproperty.gif";
+ public static final String ONETOMANY_PATH = "images/1tonproperty.gif";
//$NON-NLS-1$
- public static final String CONFIGURATION = "images/configuration.gif";
- public static final String ADD = "ADD";
- public static final String REMOVE = "REMOVE";
+ public static final String CONFIGURATION = "images/configuration.gif";
//$NON-NLS-1$
+ public static final String ADD = "ADD"; //$NON-NLS-1$
+ public static final String REMOVE = "REMOVE"; //$NON-NLS-1$
- public static final String MANYTOONE_PATH = "images/mto1property.gif";
+ public static final String MANYTOONE_PATH = "images/mto1property.gif";
//$NON-NLS-1$
- public static final String ONETOONE_PATH = "images/1to1property.gif";
+ public static final String ONETOONE_PATH = "images/1to1property.gif";
//$NON-NLS-1$
- public static final String ANY_PATH = "images/anyproperty.gif";
+ public static final String ANY_PATH = "images/anyproperty.gif"; //$NON-NLS-1$
- public static final String CLEAR_PATH = "images/clear.gif";
+ public static final String CLEAR_PATH = "images/clear.gif"; //$NON-NLS-1$
- public static final String COMPONENT_PATH = "images/componentproperty.gif";
+ public static final String COMPONENT_PATH = "images/componentproperty.gif";
//$NON-NLS-1$
- public static final String CLOSE_PATH = "images/close.gif";
+ public static final String CLOSE_PATH = "images/close.gif"; //$NON-NLS-1$
- public static final String CLOSE_DISABLED_PATH = "images/close_disabled.gif";
+ public static final String CLOSE_DISABLED_PATH = "images/close_disabled.gif";
//$NON-NLS-1$
- public static final String CLOSE_ALL_PATH = "images/xpl/removeall.gif";
+ public static final String CLOSE_ALL_PATH = "images/xpl/removeall.gif";
//$NON-NLS-1$
- public static final String CLOSE_ALL_DISABLED_PATH =
"images/xpl/removeall_disabled.gif";
+ public static final String CLOSE_ALL_DISABLED_PATH =
"images/xpl/removeall_disabled.gif"; //$NON-NLS-1$
- public static final String IDPROPERTY_PATH = "images/idproperty.gif";
+ public static final String IDPROPERTY_PATH = "images/idproperty.gif";
//$NON-NLS-1$
- public static final String TYPES_PATH = "images/types.gif";
+ public static final String TYPES_PATH = "images/types.gif"; //$NON-NLS-1$
- public static final String UNKNOWNPROPERTY_PATH =
"images/unknowntypeproperty.gif";
+ public static final String UNKNOWNPROPERTY_PATH =
"images/unknowntypeproperty.gif"; //$NON-NLS-1$
- public static final String EXECUTE_PATH = "images/execute.gif";
+ public static final String EXECUTE_PATH = "images/execute.gif"; //$NON-NLS-1$
- public static final String MAPPEDCLASS = "MAPPEDCLASS";
+ public static final String MAPPEDCLASS = "MAPPEDCLASS"; //$NON-NLS-1$
- public static final String UNMAPPEDCLASS = "UNMAPPEDCLASS";
+ public static final String UNMAPPEDCLASS = "UNMAPPEDCLASS"; //$NON-NLS-1$
- public static final String PROPERTY = "PROPERTY";
+ public static final String PROPERTY = "PROPERTY"; //$NON-NLS-1$
- public static final String ONETOMANY = "ONETOMANY";
+ public static final String ONETOMANY = "ONETOMANY"; //$NON-NLS-1$
- public static final String MANYTOONE = "MANYTOONE";
+ public static final String MANYTOONE = "MANYTOONE"; //$NON-NLS-1$
- public static final String ONETOONE = "ONETOONE";
+ public static final String ONETOONE = "ONETOONE"; //$NON-NLS-1$
- public static final String ANY = "ANY";
+ public static final String ANY = "ANY"; //$NON-NLS-1$
- public static final String CLEAR = "CLEAR";
+ public static final String CLEAR = "CLEAR"; //$NON-NLS-1$
- public static final String COMPONENT = "COMPONENT";
+ public static final String COMPONENT = "COMPONENT"; //$NON-NLS-1$
- public static final String CLOSE = "CLOSE";
+ public static final String CLOSE = "CLOSE"; //$NON-NLS-1$
- public static final String CLOSE_DISABLED = "CLOSE_DISABLED";
+ public static final String CLOSE_DISABLED = "CLOSE_DISABLED"; //$NON-NLS-1$
- public static final String CLOSE_ALL = "CLOSE_ALL";
+ public static final String CLOSE_ALL = "CLOSE_ALL"; //$NON-NLS-1$
- public static final String CLOSE_ALL_DISABLED = "CLOSE_ALL_DISABLED";
+ public static final String CLOSE_ALL_DISABLED = "CLOSE_ALL_DISABLED";
//$NON-NLS-1$
- public static final String IDPROPERTY = "IDPROPERTY";
+ public static final String IDPROPERTY = "IDPROPERTY"; //$NON-NLS-1$
- public static final String TYPES = "TYPES";
+ public static final String TYPES = "TYPES"; //$NON-NLS-1$
- public static final String UNKNOWNPROPERTY = "UNKNOWNPROPERTY";
+ public static final String UNKNOWNPROPERTY = "UNKNOWNPROPERTY"; //$NON-NLS-1$
- public static final String EXECUTE = "EXECUTE";
+ public static final String EXECUTE = "EXECUTE"; //$NON-NLS-1$
- public static final String NEW_WIZARD = "NEW_WIZARD";
+ public static final String NEW_WIZARD = "NEW_WIZARD"; //$NON-NLS-1$
- public static final String COLUMN = "COLUMN";
- public static final String TABLE = "TABLE";
- public static final String SCHEMA = "SCHEMA";
- public static final String CATALOG = "CATALOG";
- public static final String DATABASE = "DATABASE";
- public static final String HQL_EDITOR = "HQL_EDITOR";
- public static final String PARAMETER = "PARAMETER";
- public static final String NEW_PARAMETER = "NEW_PARAMETER";
- public static final String IGNORE_PARAMETER = "IGNORE_PARAMETER";
- public static final String LAYOUT = "LAYOUT";
- public static final String LAYOUT_DISABLED = "LAYOUT_DISABLED";
- public static final String CRITERIA_EDITOR = "images/criteria_editor.gif";
- public static final String FUNCTION = "FUNCTION";
+ public static final String COLUMN = "COLUMN"; //$NON-NLS-1$
+ public static final String TABLE = "TABLE"; //$NON-NLS-1$
+ public static final String SCHEMA = "SCHEMA"; //$NON-NLS-1$
+ public static final String CATALOG = "CATALOG"; //$NON-NLS-1$
+ public static final String DATABASE = "DATABASE"; //$NON-NLS-1$
+ public static final String HQL_EDITOR = "HQL_EDITOR"; //$NON-NLS-1$
+ public static final String PARAMETER = "PARAMETER"; //$NON-NLS-1$
+ public static final String NEW_PARAMETER = "NEW_PARAMETER"; //$NON-NLS-1$
+ public static final String IGNORE_PARAMETER = "IGNORE_PARAMETER";
//$NON-NLS-1$
+ public static final String LAYOUT = "LAYOUT"; //$NON-NLS-1$
+ public static final String LAYOUT_DISABLED = "LAYOUT_DISABLED"; //$NON-NLS-1$
+ public static final String CRITERIA_EDITOR = "images/criteria_editor.gif";
//$NON-NLS-1$
+ public static final String FUNCTION = "FUNCTION"; //$NON-NLS-1$
- public static final String CHECKBOX_FULL = "images/xpl/complete_tsk.gif";
- public static final String CHECKBOX_EMPTY = "images/xpl/incomplete_tsk.gif";
- public static final String RELOAD = "images/reload.gif";
+ public static final String CHECKBOX_FULL = "images/xpl/complete_tsk.gif";
//$NON-NLS-1$
+ public static final String CHECKBOX_EMPTY = "images/xpl/incomplete_tsk.gif";
//$NON-NLS-1$
+ public static final String RELOAD = "images/reload.gif"; //$NON-NLS-1$
}
\ No newline at end of file
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ImageMap.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ImageMap.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ImageMap.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -50,30 +50,30 @@
declareRegistryImage(CLOSE_ALL, CLOSE_ALL_PATH);
declareRegistryImage(CLOSE_ALL_DISABLED, CLOSE_ALL_DISABLED_PATH);
declareRegistryImage(CLEAR, CLEAR_PATH);
- declareRegistryImage(CONFIGURATION, "images/hibernate_config.gif");
- declareRegistryImage(ADD, "images/treeplus.gif");
- declareRegistryImage(REMOVE, "images/treeminus.gif");
- declareRegistryImage(NEW_WIZARD, "images/newhibernate_wiz.gif");
- declareRegistryImage(TABLE, "images/table.gif");
- declareRegistryImage(COLUMN, "images/columns.gif");
- declareRegistryImage(SCHEMA, "images/schema.gif");
- declareRegistryImage(CATALOG, "images/catalog.gif");
- declareRegistryImage(DATABASE, "images/database.gif");
- declareRegistryImage(FORMAT_QL, "images/format.gif");
- declareRegistryImage(HQL_EDITOR, "images/hql_editor.gif");
- declareRegistryImage(CRITERIA_EDITOR, "images/criteria_editor.gif");
- declareRegistryImage(PARAMETER, "images/parameter.gif");
- declareRegistryImage(NEW_PARAMETER, "images/new_param.gif");
- declareRegistryImage(IGNORE_PARAMETER, "images/ignoreparameter.gif");
- declareRegistryImage(LAYOUT, "images/layout.gif");
- declareRegistryImage(LAYOUT_DISABLED, "images/layout_disabled.gif");
- declareRegistryImage(MINI_HIBERNATE, "images/hicon.gif");
- declareRegistryImage(HIBERNATE_LOGO, "images/hibernate.gif");
- declareRegistryImage(JBOSS_LOGO, "images/jboss.gif");
- declareRegistryImage(FUNCTION, "images/function.gif");
- declareRegistryImage(CHECKBOX_EMPTY, "images/xpl/incomplete_tsk.gif");
- declareRegistryImage(CHECKBOX_FULL, "images/xpl/complete_tsk.gif");
- declareRegistryImage(RELOAD, "images/reload.gif");
+ declareRegistryImage(CONFIGURATION, "images/hibernate_config.gif");
//$NON-NLS-1$
+ declareRegistryImage(ADD, "images/treeplus.gif"); //$NON-NLS-1$
+ declareRegistryImage(REMOVE, "images/treeminus.gif"); //$NON-NLS-1$
+ declareRegistryImage(NEW_WIZARD, "images/newhibernate_wiz.gif");
//$NON-NLS-1$
+ declareRegistryImage(TABLE, "images/table.gif"); //$NON-NLS-1$
+ declareRegistryImage(COLUMN, "images/columns.gif"); //$NON-NLS-1$
+ declareRegistryImage(SCHEMA, "images/schema.gif"); //$NON-NLS-1$
+ declareRegistryImage(CATALOG, "images/catalog.gif"); //$NON-NLS-1$
+ declareRegistryImage(DATABASE, "images/database.gif"); //$NON-NLS-1$
+ declareRegistryImage(FORMAT_QL, "images/format.gif"); //$NON-NLS-1$
+ declareRegistryImage(HQL_EDITOR, "images/hql_editor.gif");
//$NON-NLS-1$
+ declareRegistryImage(CRITERIA_EDITOR, "images/criteria_editor.gif");
//$NON-NLS-1$
+ declareRegistryImage(PARAMETER, "images/parameter.gif"); //$NON-NLS-1$
+ declareRegistryImage(NEW_PARAMETER, "images/new_param.gif");
//$NON-NLS-1$
+ declareRegistryImage(IGNORE_PARAMETER, "images/ignoreparameter.gif");
//$NON-NLS-1$
+ declareRegistryImage(LAYOUT, "images/layout.gif"); //$NON-NLS-1$
+ declareRegistryImage(LAYOUT_DISABLED, "images/layout_disabled.gif");
//$NON-NLS-1$
+ declareRegistryImage(MINI_HIBERNATE, "images/hicon.gif");
//$NON-NLS-1$
+ declareRegistryImage(HIBERNATE_LOGO, "images/hibernate.gif");
//$NON-NLS-1$
+ declareRegistryImage(JBOSS_LOGO, "images/jboss.gif"); //$NON-NLS-1$
+ declareRegistryImage(FUNCTION, "images/function.gif"); //$NON-NLS-1$
+ declareRegistryImage(CHECKBOX_EMPTY, "images/xpl/incomplete_tsk.gif");
//$NON-NLS-1$
+ declareRegistryImage(CHECKBOX_FULL, "images/xpl/complete_tsk.gif");
//$NON-NLS-1$
+ declareRegistryImage(RELOAD, "images/reload.gif"); //$NON-NLS-1$
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/JavaPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/JavaPage.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/JavaPage.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -63,9 +63,9 @@
public void setSession(Session s) {
super.setSession(s);
try {
- if(criteriaCode.indexOf( "System.exit" )>=0) { // TODO: externalize
run so we don't need this bogus check!
+ if(criteriaCode.indexOf( "System.exit" )>=0) { // TODO: externalize
run so we don't need this bogus check! //$NON-NLS-1$
list = Collections.EMPTY_LIST;
- addException( new IllegalArgumentException("System.exit not
allowed!") );
+ addException( new IllegalArgumentException(Messages.JAVAPAGE_NOT_ALLOWED) );
return;
}
ip = setupInterpreter(getSession() );
@@ -97,7 +97,7 @@
private Interpreter setupInterpreter(Session session) throws EvalError,
HibernateException {
Interpreter interpreter = new Interpreter();
- interpreter.set("session", session);
+ interpreter.set("session", session); //$NON-NLS-1$
interpreter.setClassLoader( Thread.currentThread().getContextClassLoader() );
SessionImplementor si = (SessionImplementor)session;
@@ -108,11 +108,11 @@
String imports = new String();
while (iterator.hasNext() ) {
String element = (String) iterator.next();
- imports += "import " + element + ";\n";
+ imports += "import " + element + ";\n"; //$NON-NLS-1$
//$NON-NLS-2$
}
- imports += "import org.hibernate.criterion.*;\n";
- imports += "import org.hibernate.*;\n";
+ imports += "import org.hibernate.criterion.*;\n"; //$NON-NLS-1$
+ imports += "import org.hibernate.*;\n"; //$NON-NLS-1$
// TODO: expose the parameters as values to be used in the code.
interpreter.eval(imports);
@@ -140,7 +140,7 @@
public List getPathNames() {
List l = new ArrayList();
- l.add("<no info>");
+ l.add(Messages.JAVAPAGE_NO_INFO);
return l;
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -264,7 +264,7 @@
Object[] console = (Object[]) loggingStreams.get(name);
if(console==null) {
console = new Object[2];
- String secondaryId = "Hibernate Log - " +
(name==null?"<unknown>":name);
+ String secondaryId = Messages.KNOWNCONFIGURATIONS_HIBERNATE_LOG +
(name==null?Messages.KNOWNCONFIGURATIONS_UNKNOWN:name);
console[0] = new MessageConsole(secondaryId, null);
IConsoleManager consoleManager =
ConsolePlugin.getDefault().getConsoleManager();
consoleManager.addConsoles(new IConsole[] { (IConsole) console[0] });
@@ -302,7 +302,7 @@
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.newDocument();
- Element element = document.createElement("hibernate-console");
+ Element element = document.createElement("hibernate-console");
//$NON-NLS-1$
Node node = document.appendChild(element);
ConsoleConfiguration[] configs = getConfigurations();
@@ -314,13 +314,13 @@
writeXml(document, f);
}
catch (TransformerConfigurationException e) {
- throw new HibernateConsoleRuntimeException("Could not write state",e);
+ throw new
HibernateConsoleRuntimeException(Messages.KNOWNCONFIGURATIONS_COULD_NOT_WRITE_STATE,e);
}
catch (TransformerException e) {
- throw new HibernateConsoleRuntimeException("Could not write state",e);
+ throw new
HibernateConsoleRuntimeException(Messages.KNOWNCONFIGURATIONS_COULD_NOT_WRITE_STATE,e);
}
catch (ParserConfigurationException e) {
- throw new HibernateConsoleRuntimeException("Could not write state",e);
+ throw new
HibernateConsoleRuntimeException(Messages.KNOWNCONFIGURATIONS_COULD_NOT_WRITE_STATE,e);
}
}
@@ -333,7 +333,7 @@
// Write the DOM document to the file
Transformer xformer = TransformerFactory.newInstance().newTransformer();
- xformer.setOutputProperty(OutputKeys.INDENT, "true");
+ xformer.setOutputProperty(OutputKeys.INDENT, "true"); //$NON-NLS-1$
xformer.transform(source, result);
}
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/Messages.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/Messages.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/Messages.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -0,0 +1,30 @@
+package org.hibernate.console;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.hibernate.console.messages";
//$NON-NLS-1$
+ public static String CONSOLECONFIGURATION_COULD_NOT_ACCESS;
+ public static String CONSOLECONFIGURATION_COULD_NOT_CONFIGURE_ENTITY_RESOLVER;
+ public static String CONSOLECONFIGURATION_COULD_NOT_CONFIGURE_NAMING_STRATEGY;
+ public static String CONSOLECONFIGURATION_COULD_NOT_CREATE_JPA_BASED_CONFIGURATION;
+ public static String CONSOLECONFIGURATION_COULD_NOT_LOAD_ANNOTATIONCONFIGURATION;
+ public static String CONSOLECONFIGURATION_COULD_NOT_LOAD_JPA_CONFIGURATION;
+ public static String CONSOLECONFIGURATION_COULD_NOT_PARSE_CONFIGURATION;
+ public static String CONSOLECONFIGURATION_FACTORY_NOT_CLOSED_BEFORE_BUILD_NEW_FACTORY;
+ public static String CONSOLECONFIGURATION_INVALID_CONFIGURATION;
+ public static String CONSOLECONFIGURATION_PERSISTENCE_UNIT_NOT_FOUND;
+ public static String CONSOLECONFIGURATION_PROBLEMS_WHILE_LOADING_DATABASE_DRIVERCLASS;
+ public static String JAVAPAGE_NO_INFO;
+ public static String JAVAPAGE_NOT_ALLOWED;
+ public static String KNOWNCONFIGURATIONS_COULD_NOT_WRITE_STATE;
+ public static String KNOWNCONFIGURATIONS_HIBERNATE_LOG;
+ public static String KNOWNCONFIGURATIONS_UNKNOWN;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryInputModel.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryInputModel.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryInputModel.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -87,13 +87,13 @@
public void addParameter(ConsoleQueryParameter cqp) {
parameters.add(cqp);
setChanged();
- notifyObservers("addParameter");
+ notifyObservers("addParameter"); //$NON-NLS-1$
}
public void removeParameter(ConsoleQueryParameter cqp) {
parameters.remove(cqp);
setChanged();
- notifyObservers("removeParameter");
+ notifyObservers("removeParameter"); //$NON-NLS-1$
}
public void moveUp(ConsoleQueryParameter cqp) {
@@ -114,13 +114,13 @@
}
}
setChanged();
- notifyObservers("move");
+ notifyObservers("move"); //$NON-NLS-1$
}
/** create a parameter which does not collide with any other parameter */
public ConsoleQueryParameter createUniqueParameter(String paramName) {
if(parameters.isEmpty()) {
- return new ConsoleQueryParameter(paramName, Hibernate.STRING, "");
+ return new ConsoleQueryParameter(paramName, Hibernate.STRING, "");
//$NON-NLS-1$
} else {
ConsoleQueryParameter cqp = (ConsoleQueryParameter)
parameters.get(parameters.size()-1);
ConsoleQueryParameter c = new ConsoleQueryParameter(cqp);
@@ -141,7 +141,7 @@
while( uniqueNames.contains(propertyName) ) {
cnt++;
- propertyName = originalPropertyName + "-" + cnt;
+ propertyName = originalPropertyName + "-" + cnt; //$NON-NLS-1$
}
return propertyName;
@@ -161,7 +161,7 @@
public void clear() {
parameters.clear();
setChanged();
- notifyObservers("clear");
+ notifyObservers("clear"); //$NON-NLS-1$
}
public void setMaxResults(Integer maxResults) {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/DefaultExecutionContext.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/DefaultExecutionContext.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/DefaultExecutionContext.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -22,12 +22,10 @@
package org.hibernate.console.execution;
import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.List;
import java.util.Map;
import java.util.WeakHashMap;
-import org.apache.log4j.NDC;
+import org.eclipse.osgi.util.NLS;
import org.hibernate.eclipse.logging.CurrentContext;
public class DefaultExecutionContext implements ExecutionContext {
@@ -79,7 +77,8 @@
if(installs==0) {
ClassLoader cl = (ClassLoader) previousLoaders.get(Thread.currentThread() );
if(configurationClassLoader!=null &&
Thread.currentThread().getContextClassLoader() != configurationClassLoader) {
- throw new IllegalStateException("Existing classloader is not equal to the
previously installed classloader! Existing=" +
Thread.currentThread().getContextClassLoader() + " Previous=" +
configurationClassLoader);
+ String out = NLS.bind(Messages.DEFAULTEXECUTIONCONTEXT_EXISTING_CLASSLOADER,
Thread.currentThread().getContextClassLoader(), configurationClassLoader);
+ throw new IllegalStateException(out);
}
if(cl!=null) {
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/Messages.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/Messages.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/Messages.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -0,0 +1,15 @@
+package org.hibernate.console.execution;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME =
"org.hibernate.console.execution.messages"; //$NON-NLS-1$
+ public static String DEFAULTEXECUTIONCONTEXT_EXISTING_CLASSLOADER;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/messages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/messages.properties
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/messages.properties 2008-06-04
15:02:34 UTC (rev 8549)
@@ -0,0 +1 @@
+DEFAULTEXECUTIONCONTEXT_EXISTING_CLASSLOADER=Existing classloader is not equal to the
previously installed classloader\! Existing={0} Previous={1}
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/messages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/messages.properties
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/messages.properties 2008-06-04
15:02:34 UTC (rev 8549)
@@ -0,0 +1,16 @@
+CONSOLECONFIGURATION_COULD_NOT_ACCESS=Could not access
+CONSOLECONFIGURATION_COULD_NOT_CONFIGURE_ENTITY_RESOLVER=Could not configure entity
resolver
+CONSOLECONFIGURATION_COULD_NOT_CONFIGURE_NAMING_STRATEGY=Could not configure naming
strategy
+CONSOLECONFIGURATION_COULD_NOT_CREATE_JPA_BASED_CONFIGURATION=Could not create JPA based
Configuration
+CONSOLECONFIGURATION_COULD_NOT_LOAD_ANNOTATIONCONFIGURATION=Could not load
AnnotationConfiguration
+CONSOLECONFIGURATION_COULD_NOT_LOAD_JPA_CONFIGURATION=Could not load JPA Configuration
+CONSOLECONFIGURATION_COULD_NOT_PARSE_CONFIGURATION=Could not parse configuration:
+CONSOLECONFIGURATION_FACTORY_NOT_CLOSED_BEFORE_BUILD_NEW_FACTORY=Factory were not closed
before attempting to built a new factory.
+CONSOLECONFIGURATION_INVALID_CONFIGURATION=invalid configuration
+CONSOLECONFIGURATION_PERSISTENCE_UNIT_NOT_FOUND=Persistence unit not found:
'{0}'.
+CONSOLECONFIGURATION_PROBLEMS_WHILE_LOADING_DATABASE_DRIVERCLASS=Problems while loading
database driverclass ({0})
+JAVAPAGE_NO_INFO=<no info>
+JAVAPAGE_NOT_ALLOWED=System.exit not allowed\!
+KNOWNCONFIGURATIONS_COULD_NOT_WRITE_STATE=Could not write state
+KNOWNCONFIGURATIONS_HIBERNATE_LOG=Hibernate Log -
+KNOWNCONFIGURATIONS_UNKNOWN=<unknown>
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/BaseNode.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/BaseNode.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/BaseNode.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -43,7 +43,7 @@
protected BaseNode parent;
protected NodeFactory factory;
protected List children = new ArrayList();
- protected String name = "!";
+ protected String name = "!"; //$NON-NLS-1$
String iconName = ImageConstants.UNKNOWNPROPERTY;
abstract protected void checkChildren();
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ClassNode.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ClassNode.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ClassNode.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -109,17 +109,17 @@
// currentParent is the root
String cname = (
(ClassNode)currentParent).md.getMappedClass(EntityMode.POJO).getName();
- if (cname.lastIndexOf(".") != -1) {
- cname = cname.substring(cname.lastIndexOf(".") + 1);
+ if (cname.lastIndexOf(".") != -1) { //$NON-NLS-1$
+ cname = cname.substring(cname.lastIndexOf(".") + 1); //$NON-NLS-1$
}
String alias = cname.toLowerCase();
- String path = "";
+ String path = ""; //$NON-NLS-1$
for (int i = parents.size()-2; i >= 0; i--) {
- path += "." + ( (BaseNode) parents.get(i) ).getName();
+ path += "." + ( (BaseNode) parents.get(i) ).getName(); //$NON-NLS-1$
}
- return "select " + alias + path + " from " + cname + " as
" + alias;
+ return "select " + alias + path + " from " + cname + " as
" + alias; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
public ClassMetadata getClassMetadata() {
@@ -130,9 +130,9 @@
if(objectGraph) {
Object o = getValue();
if(Hibernate.isInitialized(o) ) {
- return super.renderLabel(fullyQualifiedNames) + " = " + o;
+ return super.renderLabel(fullyQualifiedNames) + " = " + o; //$NON-NLS-1$
} else {
- return super.renderLabel(fullyQualifiedNames) + " = " +
"(uninitialized proxy)";
+ return super.renderLabel(fullyQualifiedNames) + " = " +
Messages.CLASSNODE_UNINITIALIZED_PROXY; //$NON-NLS-1$
}
} else {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationEntitiesNode.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationEntitiesNode.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationEntitiesNode.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -45,6 +45,6 @@
}
public String getHQL() {
- return "";
+ return ""; //$NON-NLS-1$
}
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationNode.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationNode.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationNode.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -63,7 +63,7 @@
if(!childrenCreated) {
if(configuration.isSessionFactoryCreated() ) {
NodeFactory fac = new NodeFactory(configuration);
- children.add(fac.createConfigurationEntitiesNode("Mapped entities") );
+ children.add(fac.createConfigurationEntitiesNode(Messages.CONFIGURATIONNODE_MAPPED_ENTITIES)
);
childrenCreated=true;
/*Configuration cfg = configuration.getConfiguration();
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/Messages.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/Messages.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/Messages.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -0,0 +1,18 @@
+package org.hibernate.console.node;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME =
"org.hibernate.console.node.messages"; //$NON-NLS-1$
+ public static String CLASSNODE_UNINITIALIZED_PROXY;
+ public static String CONFIGURATIONNODE_MAPPED_ENTITIES;
+ public static String NODEFACTORY_UNKNOWN;
+ public static String PERSISTENTCOLLECTIONNODE_COULD_NOT_ACCESS_PROPERTY_VALUE;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/NodeFactory.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/NodeFactory.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/NodeFactory.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -149,7 +149,7 @@
}
public String getName() {
- return "Unknown -> " + clazz;
+ return Messages.NODEFACTORY_UNKNOWN + clazz;
}
protected void checkChildren() {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PersistentCollectionNode.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PersistentCollectionNode.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PersistentCollectionNode.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -72,7 +72,7 @@
try {
collectionObject = md.getPropertyValue(baseObject, name, EntityMode.POJO);
} catch (HibernateException e) {
- IllegalArgumentException iae = new IllegalArgumentException("Could not access
property value");
+ IllegalArgumentException iae = new
IllegalArgumentException(Messages.PERSISTENTCOLLECTIONNODE_COULD_NOT_ACCESS_PROPERTY_VALUE);
iae.initCause(e);
throw iae;
}
@@ -80,7 +80,7 @@
}
public String getHQL() {
- return "";
+ return ""; //$NON-NLS-1$
}
public TreeNode getChildAt(int childIndex) {
@@ -150,7 +150,7 @@
}
public String renderLabel(boolean b) {
- return getLabel(getName(),b) + " : " +
getLabel(type.getReturnedClass().getName(),b) + "<" +
getLabel(elementType.getReturnedClass().getName(),b) + ">";
+ return getLabel(getName(),b) + " : " +
getLabel(type.getReturnedClass().getName(),b) + "<" +
getLabel(elementType.getReturnedClass().getName(),b) + ">";
//$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
}
public Type getType() {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ProxyFactory.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ProxyFactory.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ProxyFactory.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -35,7 +35,7 @@
public class ProxyFactory {
- private static final String GET_EXECUTION_CONTEXT = "getExecutionContext";
+ private static final String GET_EXECUTION_CONTEXT = "getExecutionContext";
//$NON-NLS-1$
private static final MethodInterceptor EXECUTIONCONTEXTHOLDER_METHOD_INTERCEPTOR = new
MethodInterceptor() {
public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy)
throws Throwable {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TypeNode.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TypeNode.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TypeNode.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -40,7 +40,7 @@
public String renderLabel(boolean b) {
- return super.renderLabel(b) + " : " +
getLabel(type.getReturnedClass().getName(),b);
+ return super.renderLabel(b) + " : " +
getLabel(type.getReturnedClass().getName(),b); //$NON-NLS-1$
}
/**
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/messages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/messages.properties
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/messages.properties 2008-06-04
15:02:34 UTC (rev 8549)
@@ -0,0 +1,4 @@
+CLASSNODE_UNINITIALIZED_PROXY=(uninitialized proxy)
+CONFIGURATIONNODE_MAPPED_ENTITIES=Mapped entities
+NODEFACTORY_UNKNOWN=Unknown ->
+PERSISTENTCOLLECTIONNODE_COULD_NOT_ACCESS_PROPERTY_VALUE=Could not access property value
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/AbstractConsoleConfigurationPreferences.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/AbstractConsoleConfigurationPreferences.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/AbstractConsoleConfigurationPreferences.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -40,13 +40,13 @@
public abstract class AbstractConsoleConfigurationPreferences implements
ConsoleConfigurationPreferences {
- static final String PROJECT_ATTRIB = "project";
- static final String USE_PROJECT_CLASSPATH_ATTRIB = "use-project-classpath";
+ static final String PROJECT_ATTRIB = "project"; //$NON-NLS-1$
+ static final String USE_PROJECT_CLASSPATH_ATTRIB = "use-project-classpath";
//$NON-NLS-1$
private String projectName;
- private String name = "<unknown>";
+ private String name = Messages.ACCP_UNKNOWN;
protected String entityResolverName = null;
private boolean useProjectClasspath;
private ConfigurationMode configurationMode;
@@ -81,7 +81,7 @@
public void setName(String name) {
if(name==null || name.trim().length()==0) {
- throw new IllegalArgumentException("Name cannot be null or empty");
+ throw new IllegalArgumentException(Messages.ACCP_NAME_NOT_NULL_OR_EMPTY);
}
this.name = name;
@@ -100,7 +100,7 @@
return p;
}
catch(IOException io) {
- throw new HibernateConsoleRuntimeException("Could not load property file " +
propFile, io);
+ throw new HibernateConsoleRuntimeException(Messages.ACCP_COULD_NOT_LOAD_PROP_FILE +
propFile, io);
}
}
@@ -119,7 +119,7 @@
}
if(useProjectClasspath) {
- n.setAttribute( USE_PROJECT_CLASSPATH_ATTRIB, "true" );
+ n.setAttribute( USE_PROJECT_CLASSPATH_ATTRIB, "true" ); //$NON-NLS-1$
}
if(StringHelper.isNotEmpty(projectName)) {
@@ -189,7 +189,7 @@
String attribute = node.getAttribute(ANNOTATIONS_ATTRIB);
if(StringHelper.isNotEmpty( attribute )) {
- boolean oldAnnotationFlag = ((attribute != null) &&
attribute.equalsIgnoreCase("true"));
+ boolean oldAnnotationFlag = ((attribute != null) &&
attribute.equalsIgnoreCase("true")); //$NON-NLS-1$
if(oldAnnotationFlag) {
configurationMode = ConfigurationMode.ANNOTATIONS;
} else {
@@ -205,7 +205,7 @@
setProjectName( attribute );
attribute = node.getAttribute( USE_PROJECT_CLASSPATH_ATTRIB );
- setUseProjectClasspath((attribute != null) &&
attribute.equalsIgnoreCase("true"));
+ setUseProjectClasspath((attribute != null) &&
attribute.equalsIgnoreCase("true")); //$NON-NLS-1$
attribute = node.getAttribute(ENTITYRESOLVER_ATTRIB);
if(attribute!=null && attribute.trim().length()>0) {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/ConsoleConfigurationPreferences.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/ConsoleConfigurationPreferences.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/ConsoleConfigurationPreferences.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -36,27 +36,27 @@
*/
public interface ConsoleConfigurationPreferences {
- static final String PATH_TAG = "path";
- static final String CLASSPATH_TAG = "classpath";
- static final String MAPPING_TAG = "mapping";
- static final String MAPPINGS_TAG = "mappings";
- static final String HIBERNATE_PROPERTIES_TAG = "hibernate-properties";
- static final String LOCATION_ATTRIB = "location";
- static final String HIBERNATE_CONFIG_XML_TAG = "hibernate-config-xml";
- static final String NAME_ATTRIB = "name";
- static final String CONFIGURATION_TAG = "configuration";
- static final String ANNOTATIONS_ATTRIB = "annotations";
- static final String ENTITYRESOLVER_ATTRIB = "entityresolver";
- static final String CONFIGURATION_MODE_ATTRIB = "configuration-factory";
+ static final String PATH_TAG = "path"; //$NON-NLS-1$
+ static final String CLASSPATH_TAG = "classpath"; //$NON-NLS-1$
+ static final String MAPPING_TAG = "mapping"; //$NON-NLS-1$
+ static final String MAPPINGS_TAG = "mappings"; //$NON-NLS-1$
+ static final String HIBERNATE_PROPERTIES_TAG = "hibernate-properties";
//$NON-NLS-1$
+ static final String LOCATION_ATTRIB = "location"; //$NON-NLS-1$
+ static final String HIBERNATE_CONFIG_XML_TAG = "hibernate-config-xml";
//$NON-NLS-1$
+ static final String NAME_ATTRIB = "name"; //$NON-NLS-1$
+ static final String CONFIGURATION_TAG = "configuration"; //$NON-NLS-1$
+ static final String ANNOTATIONS_ATTRIB = "annotations"; //$NON-NLS-1$
+ static final String ENTITYRESOLVER_ATTRIB = "entityresolver"; //$NON-NLS-1$
+ static final String CONFIGURATION_MODE_ATTRIB = "configuration-factory";
//$NON-NLS-1$
// TODO: we should move this to some classhandler
static public class ConfigurationMode implements Serializable {
private static final Map INSTANCES = new HashMap();
- public static final ConfigurationMode CORE = new ConfigurationMode( "CORE"
);
- public static final ConfigurationMode ANNOTATIONS = new ConfigurationMode(
"ANNOTATIONS" );
- public static final ConfigurationMode JPA = new ConfigurationMode( "JPA" );
+ public static final ConfigurationMode CORE = new ConfigurationMode( "CORE" );
//$NON-NLS-1$
+ public static final ConfigurationMode ANNOTATIONS = new ConfigurationMode(
"ANNOTATIONS" ); //$NON-NLS-1$
+ public static final ConfigurationMode JPA = new ConfigurationMode( "JPA" );
//$NON-NLS-1$
static {
INSTANCES.put( CORE.name, CORE );
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/Messages.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/Messages.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/Messages.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -0,0 +1,19 @@
+package org.hibernate.console.preferences;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME =
"org.hibernate.console.preferences.messages"; //$NON-NLS-1$
+ public static String ACCP_COULD_NOT_LOAD_PROP_FILE;
+ public static String ACCP_NAME_NOT_NULL_OR_EMPTY;
+ public static String ACCP_UNKNOWN;
+ public static String
STANDALONECONSOLECONFIGURATIONPREFERENCES_COULD_NOT_RESOLVE_CLASSPATHS;
+ public static String STANDALONECONSOLECONFIGURATIONPREFERENCES_ERRORS_WHILE_PARSING;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/StandAloneConsoleConfigurationPreferences.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/StandAloneConsoleConfigurationPreferences.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/StandAloneConsoleConfigurationPreferences.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -72,7 +72,7 @@
result[i] = file.toURL();
}
catch (MalformedURLException mue) {
- throw new HibernateConsoleRuntimeException("Could not resolve classpaths",
mue);
+ throw new
HibernateConsoleRuntimeException(Messages.STANDALONECONSOLECONFIGURATIONPREFERENCES_COULD_NOT_RESOLVE_CLASSPATHS,
mue);
}
}
return result;
@@ -142,13 +142,13 @@
return result;
}
catch(SAXException sa) {
- throw new HibernateConsoleRuntimeException("Errors while parsing " + f,sa);
+ throw new
HibernateConsoleRuntimeException(Messages.STANDALONECONSOLECONFIGURATIONPREFERENCES_ERRORS_WHILE_PARSING
+ f,sa);
}
catch (ParserConfigurationException e) {
- throw new HibernateConsoleRuntimeException("Errors while parsing " + f,e);
+ throw new
HibernateConsoleRuntimeException(Messages.STANDALONECONSOLECONFIGURATIONPREFERENCES_ERRORS_WHILE_PARSING
+ f,e);
}
catch (IOException e) {
- throw new HibernateConsoleRuntimeException("Errors while parsing " +
f,e);
+ throw new
HibernateConsoleRuntimeException(Messages.STANDALONECONSOLECONFIGURATIONPREFERENCES_ERRORS_WHILE_PARSING
+ f,e);
}
}
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/messages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/messages.properties
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/messages.properties 2008-06-04
15:02:34 UTC (rev 8549)
@@ -0,0 +1,5 @@
+ACCP_COULD_NOT_LOAD_PROP_FILE=Could not load property file
+ACCP_NAME_NOT_NULL_OR_EMPTY=Name cannot be null or empty
+ACCP_UNKNOWN=<unknown>
+STANDALONECONSOLECONFIGURATIONPREFERENCES_COULD_NOT_RESOLVE_CLASSPATHS=Could not resolve
classpaths
+STANDALONECONSOLECONFIGURATIONPREFERENCES_ERRORS_WHILE_PARSING=Errors while parsing
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/HibernatePlugin.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/HibernatePlugin.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/HibernatePlugin.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -40,13 +40,13 @@
super.start(context);
configureLog4jHooks();
Log log = LogFactory.getLog(HibernatePlugin.class);
- log.info("HibernatePlugin Started");
+ log.info("HibernatePlugin Started"); //$NON-NLS-1$
}
private void configureLog4jHooks() {
- URL entry = getBundle().getEntry("hibernate-log4j.xml");
+ URL entry = getBundle().getEntry("hibernate-log4j.xml"); //$NON-NLS-1$
if(entry==null) {
- entry = getBundle().getEntry("hibernate-log4j.properties");
+ entry = getBundle().getEntry("hibernate-log4j.properties"); //$NON-NLS-1$
}
if(entry==null) {
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/Messages.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/Messages.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/Messages.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -0,0 +1,16 @@
+package org.hibernate.eclipse.logging;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME =
"org.hibernate.eclipse.logging.messages"; //$NON-NLS-1$
+ public static String PLUGINFILEAPPENDER_MISSING_PLUGIN_STATE_LOCATION;
+ public static String PLUGINLOGAPPENDER_MISSING_LAYOUT_FOR_APPENDER;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginFileAppender.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginFileAppender.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginFileAppender.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -121,7 +121,7 @@
*/
public void setFile(String fileName,boolean append,boolean bufferedIO,int bufferSize)
throws IOException {
if (this.stateLocation == null)
- throw new IOException("Missing Plugin State Location.");
+ throw new IOException(Messages.PLUGINFILEAPPENDER_MISSING_PLUGIN_STATE_LOCATION);
fileName = (this.translatePath) ? getTranslatedFileName(fileName) : fileName;
super.setFile(fileName,append,bufferedIO,bufferSize);
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogAppender.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogAppender.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogAppender.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -66,7 +66,7 @@
public void append(LoggingEvent event) {
if (this.layout == null) {
- this.errorHandler.error("Missing layout for appender " +
+ this.errorHandler.error(Messages.PLUGINLOGAPPENDER_MISSING_LAYOUT_FOR_APPENDER +
this.name,null,ErrorCode.MISSING_LAYOUT);
return;
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogListener.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogListener.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogListener.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -96,16 +96,16 @@
StringBuffer message = new StringBuffer();
if (plugin != null) {
message.append(plugin);
- message.append(" - ");
+ message.append(" - "); //$NON-NLS-1$
}
if (statusPlugin != null &&
(plugin == null || !statusPlugin.equals(plugin))) {
message.append(statusPlugin);
- message.append(" - ");
+ message.append(" - "); //$NON-NLS-1$
}
message.append(status.getCode());
if (statusMessage != null) {
- message.append(" - ");
+ message.append(" - "); //$NON-NLS-1$
message.append(statusMessage);
}
this.logger.log(level,message.toString(),status.getException());
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogManager.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogManager.java 2008-06-04
14:59:39 UTC (rev 8548)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogManager.java 2008-06-04
15:02:34 UTC (rev 8549)
@@ -102,7 +102,7 @@
return hierarchy;
}
- }, "hibernate-tools");
+ }, "hibernate-tools"); //$NON-NLS-1$
OptionConverter.selectAndConfigure(log4jUrl, null, this.hierarchy);
this.helper = helper;
helper.addLogManager(this);
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/messages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/messages.properties
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/messages.properties 2008-06-04
15:02:34 UTC (rev 8549)
@@ -0,0 +1,2 @@
+PLUGINFILEAPPENDER_MISSING_PLUGIN_STATE_LOCATION=Missing Plugin State Location.
+PLUGINLOGAPPENDER_MISSING_LAYOUT_FOR_APPENDER=Missing layout for appender