Author: vyemialyanchyk
Date: 2009-04-07 08:50:50 -0400 (Tue, 07 Apr 2009)
New Revision: 14558
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.apt.ui/src/org/hibernate/eclipse/jdt/apt/ui/Activator.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/Activator.java
Log:
JBIDE-4137
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.apt.ui/src/org/hibernate/eclipse/jdt/apt/ui/Activator.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.apt.ui/src/org/hibernate/eclipse/jdt/apt/ui/Activator.java 2009-04-07
12:50:28 UTC (rev 14557)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.apt.ui/src/org/hibernate/eclipse/jdt/apt/ui/Activator.java 2009-04-07
12:50:50 UTC (rev 14558)
@@ -39,7 +39,7 @@
* The constructor
*/
public Activator() {
- plugin = this;
+ setPlugin(this);
}
public void start(BundleContext context) throws Exception {
@@ -48,7 +48,7 @@
public void stop(BundleContext context) throws Exception {
- plugin = null;
+ setPlugin(null);
super.stop(context);
}
@@ -61,4 +61,8 @@
return plugin;
}
+ private static void setPlugin(Activator plugin) {
+ Activator.plugin = plugin;
+ }
+
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/Activator.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/Activator.java 2009-04-07
12:50:28 UTC (rev 14557)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/Activator.java 2009-04-07
12:50:50 UTC (rev 14558)
@@ -41,7 +41,7 @@
* The constructor
*/
public Activator() {
- plugin = this;
+ setPlugin(this);
}
/*
@@ -57,7 +57,7 @@
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
- plugin = null;
+ setPlugin(null);
super.stop(context);
}
@@ -69,5 +69,9 @@
public static Activator getDefault() {
return plugin;
}
+
+ private static void setPlugin(Activator plugin) {
+ Activator.plugin = plugin;
+ }
}