summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Liebig2008-02-27 09:59:21 (EST)
committerStefan Liebig2008-02-27 09:59:21 (EST)
commitbfc0fd3554dd9aee662bb9ce9153424648747e4a (patch)
tree2ce2155d66cb085cb719943f0bf37663a6137ad4
parentdbd2e1fe334173f807df73cdf1ea6897db7cbcbe (diff)
downloadorg.eclipse.riena-bfc0fd3554dd9aee662bb9ce9153424648747e4a.zip
org.eclipse.riena-bfc0fd3554dd9aee662bb9ce9153424648747e4a.tar.gz
org.eclipse.riena-bfc0fd3554dd9aee662bb9ce9153424648747e4a.tar.bz2
based on abstract plugin
-rw-r--r--org.eclipse.riena.core/src/org/eclipse/riena/internal/core/Activator.java29
1 files changed, 8 insertions, 21 deletions
diff --git a/org.eclipse.riena.core/src/org/eclipse/riena/internal/core/Activator.java b/org.eclipse.riena.core/src/org/eclipse/riena/internal/core/Activator.java
index fdd8a29..41a4549 100644
--- a/org.eclipse.riena.core/src/org/eclipse/riena/internal/core/Activator.java
+++ b/org.eclipse.riena.core/src/org/eclipse/riena/internal/core/Activator.java
@@ -12,10 +12,9 @@ package org.eclipse.riena.internal.core;
import java.util.Hashtable;
-import org.eclipse.core.runtime.Plugin;
import org.eclipse.equinox.log.Logger;
+import org.eclipse.riena.core.RienaPlugin;
import org.eclipse.riena.core.RienaStartupStatus;
-import org.eclipse.riena.core.logging.LogUtil;
import org.eclipse.riena.internal.core.config.ConfigFromExtensions;
import org.eclipse.riena.internal.core.config.ConfigSymbolReplace;
import org.osgi.framework.Bundle;
@@ -26,15 +25,14 @@ import org.osgi.service.cm.ConfigurationPlugin;
import org.osgi.service.cm.ManagedService;
import org.osgi.service.log.LogService;
-public class Activator extends Plugin {
+public class Activator extends RienaPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.riena.core";
// The shared instance
private static Activator plugin;
- private static BundleContext CONTEXT;
- private LogUtil logUtil;
+
private ServiceRegistration configSymbolReplace;
private ServiceRegistration configurationPlugin;
@@ -45,8 +43,8 @@ public class Activator extends Plugin {
*/
public void start(BundleContext context) throws Exception {
super.start(context);
+
plugin = this;
- CONTEXT = context;
Logger LOGGER = getLogger(Activator.class.getName());
Bundle[] bundles = context.getBundles();
@@ -91,20 +89,19 @@ public class Activator extends Plugin {
// execute the class that reads through the extensions and executes them
// as config admin packages
new ConfigFromExtensions(context).doConfig();
- RienaStartupStatus.getInstance().setStarted(true);
+ ((RienaStartupStatusSetter) RienaStartupStatus.getInstance()).setStarted(true);
}
/*
- * (non-Javadoc)
- *
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
- super.stop(context);
+ ((RienaStartupStatusSetter) RienaStartupStatus.getInstance()).setStarted(false);
configSymbolReplace.unregister();
configurationPlugin.unregister();
plugin = null;
- CONTEXT = null;
+
+ super.stop(context);
}
/**
@@ -116,14 +113,4 @@ public class Activator extends Plugin {
return plugin;
}
- public static BundleContext getContext() {
- return CONTEXT;
- }
-
- public synchronized Logger getLogger(String name) {
- if (logUtil == null) {
- logUtil = new LogUtil(CONTEXT);
- }
- return logUtil.getLogger(name);
- }
}