From cde3d2629677a07aa09e3c7fbe117b680c0f5df7 Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:09:08 +0000 Subject: Moving 2.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835133 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/calculator/rcp/Activator.java | 87 ---------------------- 1 file changed, 87 deletions(-) delete mode 100644 branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java (limited to 'branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java') diff --git a/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java b/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java deleted file mode 100644 index 4fd7b8520d..0000000000 --- a/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator.rcp; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.equinox.launcher.Contribution; -import org.apache.tuscany.sca.node.equinox.launcher.ContributionLocationHelper; -import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.apache.tuscany.sca.sample.calculator.rcp"; - - // The shared instance - private static Activator plugin; - - private NodeLauncher launcher; - private Node node; - - public Activator() { - } - - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - - launcher = NodeLauncher.newInstance(); - String location = ContributionLocationHelper.getContributionLocation(getClass()); - node = launcher.createNode("Calculator.composite", new Contribution("c1", location)); - node.start(); - } - - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - if (node != null) { - node.stop(); - node.destroy(); - } - if (launcher != null) { - launcher.destroy(); - } - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given - * plug-in relative path - * - * @param path the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } -} -- cgit v1.2.3