summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/samples/calculator-rcp
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-09-19 05:31:14 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-09-19 05:31:14 +0000
commit6a633dee838417ed68cf91fbd2e9b3b9fa07bd8f (patch)
tree658d78b2087d2f851518be4d27ed9d913ac47ebb /branches/sca-equinox/samples/calculator-rcp
parentbd126f649a92dd53cd3b3ccef5029ab273436291 (diff)
Simplified ServiceDiscoverer. Started to use it to create factories to resolve ClassNotFoundExceptions. Renamed calculator-osgi to calculator-equinox and a few fixes to get it working in Eclipse.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@696924 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/samples/calculator-rcp')
-rw-r--r--branches/sca-equinox/samples/calculator-rcp/pom.xml78
-rw-r--r--branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java13
2 files changed, 80 insertions, 11 deletions
diff --git a/branches/sca-equinox/samples/calculator-rcp/pom.xml b/branches/sca-equinox/samples/calculator-rcp/pom.xml
index a487076de6..c50048c028 100644
--- a/branches/sca-equinox/samples/calculator-rcp/pom.xml
+++ b/branches/sca-equinox/samples/calculator-rcp/pom.xml
@@ -25,7 +25,7 @@
<version>1.4-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
- <artifactId>sample.calculator.rcp</artifactId>
+ <artifactId>sample-calculator-rcp</artifactId>
<name>Apache Tuscany SCA Calculator RCP Sample</name>
<repositories>
<repository>
@@ -34,6 +34,7 @@
</url>
</repository>
</repositories>
+
<dependencies>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
@@ -70,13 +71,79 @@
<version>1.4-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
- <!--
+
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>ui</artifactId>
<version>3.3.0-I20070614-0800</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.eclipse</groupId>
+ <artifactId>swt</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse</groupId>
+ <artifactId>runtime</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse</groupId>
+ <artifactId>help</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse</groupId>
+ <artifactId>swt</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse</groupId>
+ <artifactId>jface</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.core</groupId>
+ <artifactId>expressions</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.core</groupId>
+ <artifactId>databinding</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.jface</groupId>
+ <artifactId>databinding</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
- -->
+
+ <dependency>
+ <groupId>org.eclipse.swt.win32.win32</groupId>
+ <artifactId>x86</artifactId>
+ <version>3.3.0-v3346</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.eclipse</groupId>
+ <artifactId>jface</artifactId>
+ <version>3.3.0-I20070606-0010</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.eclipse</groupId>
+ <artifactId>swt</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.core</groupId>
+ <artifactId>commands</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.equinox</groupId>
+ <artifactId>common</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.eclipse.core</groupId>
+ <artifactId>commands</artifactId>
+ <version>3.3.0-I20070605-0010</version>
+ </dependency>
+
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
@@ -90,6 +157,7 @@
<scope>test</scope>
</dependency>
</dependencies>
+
<build>
<finalName>${artifactId}</finalName>
<plugins>
@@ -108,8 +176,6 @@
<classpathContainers>
<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER
</classpathContainer>
- <classpathContainer>org.eclipse.pde.core.requiredPlugins
- </classpathContainer>
</classpathContainers>
</configuration>
</plugin>
@@ -123,4 +189,4 @@
</plugin>
</plugins>
</build>
-</project> \ No newline at end of file
+</project>
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 50f68dcb01..2b1bae34de 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
@@ -21,9 +21,9 @@ 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.apache.tuscany.sca.node.equinox.launcher.Contribution;
+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;
@@ -39,6 +39,7 @@ public class Activator extends AbstractUIPlugin {
// The shared instance
private static Activator plugin;
+ private NodeLauncher launcher;
private SCANode node;
/**
@@ -54,9 +55,8 @@ 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()));
+ launcher = NodeLauncher.newInstance();
+ node = launcher.createNode("Calculator.composite", new Contribution("c1", new File("target/classes").toURI().toString()));
node.start();
}
@@ -70,6 +70,9 @@ public class Activator extends AbstractUIPlugin {
if (node != null) {
node.stop();
}
+ if (launcher != null) {
+ launcher.destroy();
+ }
}
/**