diff options
author | Eike Stepper | 2007-07-15 05:29:08 +0000 |
---|---|---|
committer | Eike Stepper | 2007-07-15 05:29:08 +0000 |
commit | b7c05607719837ff08a91d8ea4f8b052bb9722f8 (patch) | |
tree | 645136d329b783ba182a66307a236bb00e8448e3 /plugins/org.eclipse.net4j.debug/src | |
parent | de95b6053435686194d369dd7706137afa3cbe31 (diff) | |
download | cdo-b7c05607719837ff08a91d8ea4f8b052bb9722f8.tar.gz cdo-b7c05607719837ff08a91d8ea4f8b052bb9722f8.tar.xz cdo-b7c05607719837ff08a91d8ea4f8b052bb9722f8.zip |
*** empty log message ***
Diffstat (limited to 'plugins/org.eclipse.net4j.debug/src')
-rw-r--r-- | plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/bundle/Activator.java | 56 | ||||
-rw-r--r-- | plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/bundle/OM.java | 53 |
2 files changed, 53 insertions, 56 deletions
diff --git a/plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/bundle/Activator.java b/plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/bundle/Activator.java deleted file mode 100644 index f80c89b32d..0000000000 --- a/plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/bundle/Activator.java +++ /dev/null @@ -1,56 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2004 - 2007 Eike Stepper, Germany. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Eike Stepper - initial API and implementation - **************************************************************************/ -package org.eclipse.net4j.internal.debug.bundle; - -import org.eclipse.net4j.internal.debug.RemoteTraceManager; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; - -import org.osgi.framework.BundleContext; - -/** - * @author Eike Stepper - */ -public class Activator extends AbstractUIPlugin -{ - public static final String PLUGIN_ID = "org.eclipse.net4j.debug"; - - private static Activator plugin; - - public Activator() - { - plugin = this; - } - - public void start(BundleContext context) throws Exception - { - super.start(context); - RemoteTraceManager.INSTANCE.activate(); - } - - public void stop(BundleContext context) throws Exception - { - RemoteTraceManager.INSTANCE.deactivate(); - plugin = null; - super.stop(context); - } - - public static Activator getDefault() - { - return plugin; - } - - public static ImageDescriptor getImageDescriptor(String path) - { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } -} diff --git a/plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/bundle/OM.java b/plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/bundle/OM.java new file mode 100644 index 0000000000..aaac1c64c0 --- /dev/null +++ b/plugins/org.eclipse.net4j.debug/src/org/eclipse/net4j/internal/debug/bundle/OM.java @@ -0,0 +1,53 @@ +/*************************************************************************** + * Copyright (c) 2004-2007 Eike Stepper, Germany. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + **************************************************************************/ +package org.eclipse.net4j.internal.debug.bundle; + +import org.eclipse.net4j.internal.debug.RemoteTraceManager; +import org.eclipse.net4j.util.om.OMBundle; +import org.eclipse.net4j.util.om.OMPlatform; +import org.eclipse.net4j.util.om.OSGiActivator; +import org.eclipse.net4j.util.om.log.OMLogger; +import org.eclipse.net4j.util.om.trace.OMTracer; + +/** + * @author Eike Stepper + */ +public abstract class OM +{ + public static final String BUNDLE_ID = "org.eclipse.net4j.debug"; //$NON-NLS-1$ + + public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class); + + public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$ + + public static final OMLogger LOG = BUNDLE.logger(); + + static void start() throws Exception + { + RemoteTraceManager.INSTANCE.activate(); + } + + static void stop() throws Exception + { + RemoteTraceManager.INSTANCE.deactivate(); + } + + /** + * @author Eike Stepper + */ + static final class Activator extends OSGiActivator + { + public Activator() + { + super(BUNDLE); + } + } +} |