summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/samples/calculator-rcp/src
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-09-22 01:03:53 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-09-22 01:03:53 +0000
commita770a0cd29a37998e805287dca090cae44109bdb (patch)
tree9923aa6eee1c62cdde6111c947031f41611733e7 /branches/sca-equinox/samples/calculator-rcp/src
parent5b2c0562e87008db1d69ddb3b8e3769d561aa37d (diff)
Added support for several bundle packaging and distribution schemes (jars and class folders, distribution and development workspace). Changed the RCP sample to use the node-launcher.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@697650 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/samples/calculator-rcp/src')
-rw-r--r--branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java13
-rw-r--r--branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java6
2 files changed, 1 insertions, 18 deletions
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 2b1bae34de..6a5d3cc5f4 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
@@ -20,7 +20,6 @@ package calculator.rcp;
import java.io.File;
-import org.apache.tuscany.sca.extensibility.equinox.EquinoxServiceDiscoverer;
import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.node.equinox.launcher.Contribution;
import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher;
@@ -42,28 +41,18 @@ public class Activator extends AbstractUIPlugin {
private NodeLauncher launcher;
private SCANode node;
- /**
- * The constructor
- */
public Activator() {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
+
launcher = NodeLauncher.newInstance();
node = launcher.createNode("Calculator.composite", new Contribution("c1", new File("target/classes").toURI().toString()));
node.start();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
diff --git a/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java b/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java
index 5ce6522fed..137c7307ac 100644
--- a/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java
+++ b/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Application.java
@@ -29,9 +29,6 @@ import org.eclipse.ui.PlatformUI;
*/
public class Application implements IApplication {
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
public Object start(IApplicationContext context) {
Display display = PlatformUI.createDisplay();
try {
@@ -45,9 +42,6 @@ public class Application implements IApplication {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
public void stop() {
final IWorkbench workbench = PlatformUI.getWorkbench();
if (workbench == null)