Author: vyemialyanchyk
Date: 2009-04-07 08:44:48 -0400 (Tue, 07 Apr 2009)
New Revision: 14548
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterFactory.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterProperty.java
Log:
JBIDE-4137
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java 2009-04-07
12:43:40 UTC (rev 14547)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java 2009-04-07
12:44:48 UTC (rev 14548)
@@ -99,7 +99,7 @@
*/
public HibernateConsolePlugin() {
super();
- plugin = this;
+ setPlugin(this);
}
@@ -301,7 +301,7 @@
public void stop(BundleContext context) throws Exception {
super.stop(context);
stopListeningForConfigurations();
- plugin = null;
+ setPlugin(null);
resourceBundle = null;
}
@@ -315,6 +315,10 @@
return plugin;
}
+ private static void setPlugin(HibernateConsolePlugin plugin) {
+ HibernateConsolePlugin.plugin = plugin;
+ }
+
/**
* Returns the string from the plugin's resource bundle,
* or 'key' if not found.
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java 2009-04-07
12:43:40 UTC (rev 14547)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java 2009-04-07
12:44:48 UTC (rev 14548)
@@ -222,11 +222,9 @@
return editor;
}
}
- if (editorPart == null) {
- String out =
NLS.bind(HibernateConsoleMessages.OpenMappingAction_mapping_file_for_property_not_found,
compositeProperty.getNodeName());
- throw new FileNotFoundException(out);
- }
- return null;
+ // here editorPart := null
+ String out =
NLS.bind(HibernateConsoleMessages.OpenMappingAction_mapping_file_for_property_not_found,
compositeProperty.getNodeName());
+ throw new FileNotFoundException(out);
}
/**
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterFactory.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterFactory.java 2009-04-07
12:43:40 UTC (rev 14547)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterFactory.java 2009-04-07
12:44:48 UTC (rev 14548)
@@ -206,7 +206,7 @@
if(props.containsKey("template_path")) { //$NON-NLS-1$
String resolveTemplatePath = resolve(props.getProperty("template_path"));
//$NON-NLS-1$
StringTokenizer st = new StringTokenizer(resolveTemplatePath, ";");
//$NON-NLS-1$
- String out = new String();
+ String out = ""; //$NON-NLS-1$
while (st.hasMoreTokens()) {
String locationAsStringPath = PathHelper.getLocationAsStringPath(st.nextToken());
if(locationAsStringPath==null) {
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterProperty.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterProperty.java 2009-04-07
12:43:40 UTC (rev 14547)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterProperty.java 2009-04-07
12:44:48 UTC (rev 14548)
@@ -88,6 +88,10 @@
}
return false;
}
+
+ public int hashCode() {
+ return getName().hashCode();
+ }
public boolean isRequired() {
return required;
Show replies by date