X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.eclipse.ui.workbench%2Fsrc%2Forg%2Fargeo%2Feclipse%2Fui%2Fworkbench%2FWorkbenchUiPlugin.java;h=6fd8e5d3b995488294c00d4e84f8349c1197bf7d;hb=0e465414ea4fc79aa4961461efdc0201e1bee154;hp=4898e80d73f6a9df2d1c44f0e5062a7cce4db1d0;hpb=7f945886dbd3cd0cf5b0e06b481b78ba1e2c9db9;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/WorkbenchUiPlugin.java b/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/WorkbenchUiPlugin.java index 4898e80d7..6fd8e5d3b 100644 --- a/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/WorkbenchUiPlugin.java +++ b/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/WorkbenchUiPlugin.java @@ -45,43 +45,21 @@ public class WorkbenchUiPlugin extends AbstractUIPlugin implements ILogListener public WorkbenchUiPlugin() { } - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext - * ) - */ public void start(BundleContext context) throws Exception { super.start(context); - // weirdly, the start method is called twice... - // TODO check if it is still the case. - if (plugin == null) { - plugin = this; - messages = ResourceBundle.getBundle(ID + ".messages"); - Platform.addLogListener(this); - log.debug("Eclipse logging now directed to standard logging"); - } else - log.warn("Trying to start an already started plugin."); + plugin = this; + messages = ResourceBundle.getBundle(ID + ".messages"); + Platform.addLogListener(this); + if (log.isTraceEnabled()) + log.trace("Eclipse logging now directed to standard logging"); } - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext - * ) - */ public void stop(BundleContext context) throws Exception { try { - // weirdly, the stop method is called twice... - // TODO check if it is still the case. - if (plugin != null) { - Platform.removeLogListener(this); - log.debug("Eclipse logging not directed anymore to standard logging"); - plugin = null; - } else - log.warn("Trying to stop an already stopped plugin."); + Platform.removeLogListener(this); + if (log.isTraceEnabled()) + log.trace("Eclipse logging not directed anymore to standard logging"); + plugin = null; } finally { super.stop(context); } @@ -134,7 +112,5 @@ public class WorkbenchUiPlugin extends AbstractUIPlugin implements ILogListener else if (severity == IStatus.CANCEL) if (pluginLog.isDebugEnabled()) pluginLog.debug(status.getMessage(), status.getException()); - } - }