Simplify projects
authorMathieu Baudier <mbaudier@argeo.org>
Sun, 21 Sep 2008 13:34:02 +0000 (13:34 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Sun, 21 Sep 2008 13:34:02 +0000 (13:34 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@1610 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

sandbox/argeo.slc.jemmytest/pom.xml
sandbox/argeo.slc.jemmytest/src/main/java/org/argeo/slc/jemmytest/AutoUiApplicationJemmy.java
sandbox/argeo.slc.jemmytest/src/main/java/org/argeo/slc/jemmytest/JemmyTestActivator.java

index e31d0bfb2fda5443fbb1a3e3e409ad729cf41267..2649e4b2f2a1a631b926187abc40e7c787a246ce 100644 (file)
                                                        org.argeo.slc.jemmytest.JemmyTestActivator
                                                </Bundle-Activator>
                                                <Import-Package>
-                                                       !org.apache.felix.*,*,javax.swing.*
+                                                       !org.apache.felix.*,*
                                                </Import-Package>
                                                <Export-Package>
                                                        org.argeo.slc.jemmytest.*
                                                </Export-Package>
-                                               <!-- 
-                                                       <Require-Bundle>
-                                                       org.argeo.slc.autoui
-                                                       </Require-Bundle> -->
                                        </instructions>
                                </configuration>
                        </plugin>
                <!-- OSGi -->
                <dependency>
                        <groupId>org.apache.felix</groupId>
-                       <artifactId>org.apache.felix.main</artifactId>
-                       <version>1.2.1</version>
+                       <artifactId>org.osgi.core</artifactId>
+                       <version>1.0.0</version>
                </dependency>
        </dependencies>
        <repositories>
index d15b4fef764a26597e0aa78b4bd9703cf83990db..b9678c5f4bffe6e3d7a73a8c859b6303a50ed11f 100644 (file)
@@ -2,22 +2,11 @@ package org.argeo.slc.jemmytest;
 
 import org.argeo.slc.autoui.AutoUiActivator;
 import org.argeo.slc.autoui.AutoUiApplication;
-import org.netbeans.jemmy.ClassReference;
 import org.netbeans.jemmy.operators.JButtonOperator;
 import org.netbeans.jemmy.operators.JFrameOperator;
 import org.netbeans.jemmy.operators.JLabelOperator;
 
 public class AutoUiApplicationJemmy implements AutoUiApplication {
-       public void run() {
-               try {
-                       execute(new Object());
-               } catch (Exception e) {
-                       e.printStackTrace();
-                       throw new RuntimeException("Could not execute as Runnable"
-                                       + e.getMessage());
-               }
-       }
-
        public Object execute(Object object) throws Exception {
 
                // Find components
index f33855fbc32cec44c859989a39e0bd768e39a68c..ec1e56a7d1f1ab65fdb32b1ff470ce5c4ecd2c9f 100644 (file)
@@ -5,38 +5,21 @@ import java.util.Properties;
 import org.argeo.slc.autoui.AutoUiApplication;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceEvent;
-import org.osgi.framework.ServiceListener;
 
-public class JemmyTestActivator implements BundleActivator, ServiceListener {
+public class JemmyTestActivator implements BundleActivator {
 
        public void start(BundleContext context) throws Exception {
-               stdOut("JemmyTest started");
                Properties properties = new Properties();
                AutoUiApplicationJemmy applicationJemmy = new AutoUiApplicationJemmy();
                context.registerService(AutoUiApplication.class.getName(),
                                applicationJemmy, properties);
-               context.registerService(Runnable.class.getName(), applicationJemmy,
-                               properties);
-
-//             ServiceReference ref = context
-//                             .getServiceReference("org.argeo.slc.autoui.AutoUiApplication");
-//             Object service = context.getService(ref);
-//             // JemmyTestActivator.stdOut("service=" + service.getClass());
-//             AutoUiApplication app = (AutoUiApplication) service;
-//             app.execute(null);
-
+               stdOut("JemmyTest started");
        }
 
        public void stop(BundleContext context) throws Exception {
                stdOut("JemmyTest stopped");
        }
 
-       public void serviceChanged(ServiceEvent serviceEvent) {
-               stdOut("serviceEvent=" + serviceEvent);
-
-       }
-
        public static void stdOut(Object obj) {
                System.out.println(obj);
        }