diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-13 00:21:57 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-13 00:21:57 +0000 |
commit | 6d363b499e5f96377b3db0dbdf0f31aaa93692d3 (patch) | |
tree | 79b3b0ba2ca594e4ff107f270c71533d05769393 /branches/sca-equinox/samples | |
parent | e5dbe5bb4ab274cfedf026d156ab48c8100810b5 (diff) |
Merge changes from trunk
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@694854 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/samples')
-rw-r--r-- | branches/sca-equinox/samples/calculator-rcp/META-INF/MANIFEST.MF | 4 | ||||
-rw-r--r-- | branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java | 15 |
2 files changed, 18 insertions, 1 deletions
diff --git a/branches/sca-equinox/samples/calculator-rcp/META-INF/MANIFEST.MF b/branches/sca-equinox/samples/calculator-rcp/META-INF/MANIFEST.MF index 57ecdff710..4a2e7380a9 100644 --- a/branches/sca-equinox/samples/calculator-rcp/META-INF/MANIFEST.MF +++ b/branches/sca-equinox/samples/calculator-rcp/META-INF/MANIFEST.MF @@ -9,7 +9,9 @@ Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-ActivationPolicy: lazy -Import-Package: org.osoa.sca;version="1.4.0", +Import-Package: org.apache.tuscany.sca.extensibility.equinox;version="1.4.0", + org.apache.tuscany.sca.node;version="1.4.0", + org.osoa.sca;version="1.4.0", org.osoa.sca.annotations;version="1.4.0" Bundle-ClassPath: ., cglib-nodep-2.1_3.jar, 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 index 1dcf5b4e88..50f68dcb01 100644 --- 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 @@ -18,6 +18,12 @@ */ package calculator.rcp; +import java.io.File; + +import org.apache.tuscany.sca.extensibility.equinox.EquinoxServiceDiscoverer; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; @@ -33,6 +39,8 @@ public class Activator extends AbstractUIPlugin { // The shared instance private static Activator plugin; + private SCANode node; + /** * The constructor */ @@ -46,6 +54,10 @@ public class Activator extends AbstractUIPlugin { public void start(BundleContext context) throws Exception { super.start(context); plugin = this; + Class<?> cls = EquinoxServiceDiscoverer.class; + SCANodeFactory factory = SCANodeFactory.newInstance(); + node = factory.createSCANode("Calculator.composite", new SCAContribution("c1", new File("target/classes").toURI().toString())); + node.start(); } /* @@ -55,6 +67,9 @@ public class Activator extends AbstractUIPlugin { public void stop(BundleContext context) throws Exception { plugin = null; super.stop(context); + if (node != null) { + node.stop(); + } } /** |