From 478d3bb51b5bb6595bf55bdf6d299f2fba2af195 Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Sun, 21 Sep 2008 13:34:02 +0000 Subject: [PATCH] Simplify projects git-svn-id: https://svn.argeo.org/slc/trunk@1610 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- sandbox/argeo.slc.jemmytest/pom.xml | 10 +++------ .../slc/jemmytest/AutoUiApplicationJemmy.java | 11 ---------- .../slc/jemmytest/JemmyTestActivator.java | 21 ++----------------- 3 files changed, 5 insertions(+), 37 deletions(-) diff --git a/sandbox/argeo.slc.jemmytest/pom.xml b/sandbox/argeo.slc.jemmytest/pom.xml index e31d0bfb2..2649e4b2f 100644 --- a/sandbox/argeo.slc.jemmytest/pom.xml +++ b/sandbox/argeo.slc.jemmytest/pom.xml @@ -24,15 +24,11 @@ org.argeo.slc.jemmytest.JemmyTestActivator - !org.apache.felix.*,*,javax.swing.* + !org.apache.felix.*,* org.argeo.slc.jemmytest.* - @@ -105,8 +101,8 @@ org.apache.felix - org.apache.felix.main - 1.2.1 + org.osgi.core + 1.0.0 diff --git a/sandbox/argeo.slc.jemmytest/src/main/java/org/argeo/slc/jemmytest/AutoUiApplicationJemmy.java b/sandbox/argeo.slc.jemmytest/src/main/java/org/argeo/slc/jemmytest/AutoUiApplicationJemmy.java index d15b4fef7..b9678c5f4 100644 --- a/sandbox/argeo.slc.jemmytest/src/main/java/org/argeo/slc/jemmytest/AutoUiApplicationJemmy.java +++ b/sandbox/argeo.slc.jemmytest/src/main/java/org/argeo/slc/jemmytest/AutoUiApplicationJemmy.java @@ -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 diff --git a/sandbox/argeo.slc.jemmytest/src/main/java/org/argeo/slc/jemmytest/JemmyTestActivator.java b/sandbox/argeo.slc.jemmytest/src/main/java/org/argeo/slc/jemmytest/JemmyTestActivator.java index f33855fbc..ec1e56a7d 100644 --- a/sandbox/argeo.slc.jemmytest/src/main/java/org/argeo/slc/jemmytest/JemmyTestActivator.java +++ b/sandbox/argeo.slc.jemmytest/src/main/java/org/argeo/slc/jemmytest/JemmyTestActivator.java @@ -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); } -- 2.39.5