Author: vyemialyanchyk
Date: 2009-04-07 09:03:43 -0400 (Tue, 07 Apr 2009)
New Revision: 14569
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/ViewPlugin.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ObjectEditorInput.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java
Log:
JBIDE-4137
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/ViewPlugin.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/ViewPlugin.java 2009-04-07
13:02:51 UTC (rev 14568)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/ViewPlugin.java 2009-04-07
13:03:43 UTC (rev 14569)
@@ -49,7 +49,7 @@
public ViewPlugin() {
super();
- plugin = this;
+ setPlugin(this);
try {
resourceBundle = ResourceBundle.getBundle(PLUGIN_ID +
".EditPluginResources"); //$NON-NLS-1$
@@ -75,11 +75,15 @@
public void stop(BundleContext context) throws Exception {
super.stop(context);
+ setPlugin(null);
}
public static ViewPlugin getDefault() {
return plugin;
}
+ private static void setPlugin(ViewPlugin plugin) {
+ ViewPlugin.plugin = plugin;
+ }
public static String getResourceString(String key) {
ResourceBundle bundle = ViewPlugin.getDefault().getResourceBundle();
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ObjectEditorInput.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ObjectEditorInput.java 2009-04-07
13:02:51 UTC (rev 14568)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ObjectEditorInput.java 2009-04-07
13:03:43 UTC (rev 14569)
@@ -78,4 +78,8 @@
public boolean equals(Object obj) {
return (obj instanceof ObjectEditorInput && ((ObjectEditorInput)obj).fObject ==
fObject);
}
+
+ public int hashCode() {
+ return fObject.hashCode();
+ }
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2009-04-07
13:02:51 UTC (rev 14568)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2009-04-07
13:03:43 UTC (rev 14569)
@@ -52,7 +52,7 @@
if (type != null) {
name.append(" ["); //$NON-NLS-1$
- name.append(type != null ? type.toUpperCase() : ""); //$NON-NLS-1$
+ name.append(type.toUpperCase());
name.append(column.isNullable() ? " Nullable" : ""); //$NON-NLS-1$
//$NON-NLS-2$
name.append(HibernateUtils.getTable(column) != null
&& HibernateUtils.isPrimaryKey(column) ? " PK" : "");
//$NON-NLS-1$ //$NON-NLS-2$