Author: dgeraskov
Date: 2011-10-31 09:21:07 -0400 (Mon, 31 Oct 2011)
New Revision: 36088
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJptPlugin.java
Log:
https://issues.jboss.org/browse/JBIDE-10078
Fix wrong default instance initialization
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJptPlugin.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJptPlugin.java 2011-10-31
13:06:47 UTC (rev 36087)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJptPlugin.java 2011-10-31
13:21:07 UTC (rev 36088)
@@ -42,9 +42,6 @@
private static HibernateJptPlugin inst = null;
public static HibernateJptPlugin getDefault() {
- if (inst == null) {
- inst = new HibernateJptPlugin();
- }
return inst;
}
@@ -95,6 +92,11 @@
public static void logInfo(String message) {
log(IStatus.INFO, message, null);
}
+
+ public HibernateJptPlugin(){
+ if (inst == null)
+ inst = this;//init default plugin
+ }
@Override
public void start(BundleContext context) throws Exception {
@@ -136,6 +138,12 @@
});
}
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ inst = null;
+ }
private void rebuildJpaProject(final IProject project){
try {