diff options
author | Uwe Stieber | 2012-07-19 11:06:03 +0000 |
---|---|---|
committer | Uwe Stieber | 2012-07-19 11:06:03 +0000 |
commit | d5180015caac5bc65b5fa5948c3c5bd1508053e3 (patch) | |
tree | b8b37af97607b14398bdc4bc32d5bf7ab4b77260 /plugins/org.eclipse.tcf | |
parent | 2b2b3c12129f50e946fd5d2893c4d4793b3c86e3 (diff) | |
download | org.eclipse.tcf-d5180015caac5bc65b5fa5948c3c5bd1508053e3.tar.gz org.eclipse.tcf-d5180015caac5bc65b5fa5948c3c5bd1508053e3.tar.xz org.eclipse.tcf-d5180015caac5bc65b5fa5948c3c5bd1508053e3.zip |
Target Explorer + TCF Debugger: Activate TCFLaunch with an already opened channel. This change is replacing the previous IValueAddService OSGi service implementation.
Diffstat (limited to 'plugins/org.eclipse.tcf')
4 files changed, 1 insertions, 126 deletions
diff --git a/plugins/org.eclipse.tcf/META-INF/MANIFEST.MF b/plugins/org.eclipse.tcf/META-INF/MANIFEST.MF index 8e4654e41..de77b1728 100644 --- a/plugins/org.eclipse.tcf/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.tcf/META-INF/MANIFEST.MF @@ -12,6 +12,4 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0" Bundle-Activator: org.eclipse.tcf.Activator Import-Package: org.eclipse.tcf.core;version="1.1.0", org.eclipse.tcf.protocol;version="1.1.0" -Export-Package: org.eclipse.tcf.ssl;version="1.1.0", - org.eclipse.tcf.osgi;version="1.1.0", - org.eclipse.tcf.osgi.services;version="1.1.0" +Export-Package: org.eclipse.tcf.ssl;version="1.1.0" diff --git a/plugins/org.eclipse.tcf/src/org/eclipse/tcf/Activator.java b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/Activator.java index aa187a7e1..978da4652 100644 --- a/plugins/org.eclipse.tcf/src/org/eclipse/tcf/Activator.java +++ b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/Activator.java @@ -22,7 +22,6 @@ import org.eclipse.core.runtime.Status; import org.eclipse.osgi.util.NLS; import org.eclipse.tcf.core.ChannelTCP; import org.eclipse.tcf.internal.nls.TcfPluginMessages; -import org.eclipse.tcf.osgi.OSGIServices; import org.eclipse.tcf.protocol.ILogger; import org.eclipse.tcf.protocol.IServiceProvider; import org.eclipse.tcf.protocol.Protocol; @@ -80,7 +79,6 @@ public class Activator extends Plugin { @Override public void start(BundleContext context) throws Exception { super.start(context); - OSGIServices.getInstance().start(context); debug = Platform.inDebugMode(); TRACE = "true".equals(Platform.getDebugOption("org.eclipse.tcf/debug")); //$NON-NLS-1$ @@ -129,7 +127,6 @@ public class Activator extends Plugin { public void stop(BundleContext context) throws Exception { context.removeBundleListener(bundle_listener); queue.shutdown(); - OSGIServices.getInstance().stop(context); plugin = null; super.stop(context); } diff --git a/plugins/org.eclipse.tcf/src/org/eclipse/tcf/osgi/OSGIServices.java b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/osgi/OSGIServices.java deleted file mode 100644 index 030e4e807..000000000 --- a/plugins/org.eclipse.tcf/src/org/eclipse/tcf/osgi/OSGIServices.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. 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: - * Wind River Systems - initial API and implementation - *******************************************************************************/ -package org.eclipse.tcf.osgi; - -import org.eclipse.tcf.osgi.services.IValueAddService; -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; -import org.osgi.util.tracker.ServiceTracker; - -/** - * OSGi service manager implementation. - */ -public class OSGIServices implements BundleActivator { - // Reference to the value-add service tracker - private ServiceTracker<IValueAddService, IValueAddService> valueAddServiceTracker = null; - - /* - * Thread save singleton instance creation. - */ - private static class LazyInstance { - public static OSGIServices instance = new OSGIServices(); - } - - /** - * Constructor. - */ - /* default */ OSGIServices() { - super(); - } - - /** - * Returns the singleton instance of the extension point manager. - */ - public static OSGIServices getInstance() { - return LazyInstance.instance; - } - - /* (non-Javadoc) - * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - /* - * Register the service tracker for the value-add service. - */ - valueAddServiceTracker = new ServiceTracker<IValueAddService, IValueAddService>(context, IValueAddService.class, null); - valueAddServiceTracker.open(); - } - - /* (non-Javadoc) - * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - valueAddServiceTracker.close(); - valueAddServiceTracker = null; - } - - /** - * Returns the value-add service if registered. - * - * @return The value-add service instance or <code>null</code>. - */ - public static IValueAddService getValueAddService() { - return getInstance().valueAddServiceTracker != null ? getInstance().valueAddServiceTracker.getService() : null; - } -} diff --git a/plugins/org.eclipse.tcf/src/org/eclipse/tcf/osgi/services/IValueAddService.java b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/osgi/services/IValueAddService.java deleted file mode 100644 index 0febb5c3e..000000000 --- a/plugins/org.eclipse.tcf/src/org/eclipse/tcf/osgi/services/IValueAddService.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. 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: - * Wind River Systems - initial API and implementation - *******************************************************************************/ -package org.eclipse.tcf.osgi.services; - -import org.eclipse.tcf.protocol.IPeer; - -/** - * A service whose purpose is to provide value-add related information for a - * given peer. - */ -public interface IValueAddService { - - /** - * Returns the redirection path to use for the given peer. The redirection - * path is encoded as string where the id's to redirect the communication - * through, are separated by '/'. - * <p> - * If there are no value-adds to redirect through, the passed in peer id is - * returned as is. - * <p> - * If there are value-add's to redirect through, the passed in peer id will - * be prefixed with the value-add id's to redirect through. - * - * @param peerId The peer id. Must not be <code>null</code>. - * @param done The client callback. Must not be <code>null</code>. - */ - public void getRedirectionPath(IPeer peer, DoneGetRedirectionPath done); - - /** - * Client call back interface for getRedirectionPath(...). - */ - interface DoneGetRedirectionPath { - /** - * Called when the redirection path has been fully determined. - * - * @param error The error description if operation failed, <code>null</code> if succeeded. - * @param redirectionPath The redirection path or <code>null</code>. - */ - void doneGetRedirectionPath(Throwable error, String redirectionPath); -} -} |