Author: mes
Date: 2011-09-16 15:41:29 -0700 (Fri, 16 Sep 2011)
New Revision: 26844

Added:
   
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/internal/CyActivator.java
   
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/internal/RegisterUtil.java
   
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml-legacy
   
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context.xml-legacy
   
core3/api/branches/no-spring/swing-util-api/src/main/java/org/cytoscape/util/swing/internal/CyActivator.java
   
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml-legacy
   
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context.xml-legacy
Removed:
   
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml
   
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context.xml
   
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml
   
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context.xml
Modified:
   core3/api/branches/no-spring/di-util-api/pom.xml
   
core3/api/branches/no-spring/di-util-api/src/main/java/org/cytoscape/di/util/DIUtil.java
   core3/api/branches/no-spring/service-api/osgi.bnd
   
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/AbstractCyActivator.java
   
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/internal/CyServiceListener.java
   
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/internal/CyServiceRegistrarImpl.java
   core3/api/branches/no-spring/swing-util-api/pom.xml
Log:
various tweaks to get things working

Modified: core3/api/branches/no-spring/di-util-api/pom.xml
===================================================================
--- core3/api/branches/no-spring/di-util-api/pom.xml    2011-09-16 22:39:37 UTC 
(rev 26843)
+++ core3/api/branches/no-spring/di-util-api/pom.xml    2011-09-16 22:41:29 UTC 
(rev 26844)
@@ -65,11 +65,13 @@
        </build>
 
        <dependencies>
+       <!--
                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.core</artifactId>
                        <version>${spring.version}</version>
                        <scope>provided</scope>
                </dependency>
+               -->
        </dependencies>
 </project>

Modified: 
core3/api/branches/no-spring/di-util-api/src/main/java/org/cytoscape/di/util/DIUtil.java
===================================================================
--- 
core3/api/branches/no-spring/di-util-api/src/main/java/org/cytoscape/di/util/DIUtil.java
    2011-09-16 22:39:37 UTC (rev 26843)
+++ 
core3/api/branches/no-spring/di-util-api/src/main/java/org/cytoscape/di/util/DIUtil.java
    2011-09-16 22:41:29 UTC (rev 26844)
@@ -1,7 +1,7 @@
 package org.cytoscape.di.util;
 
 
-import org.springframework.core.InfrastructureProxy;
+//import org.springframework.core.InfrastructureProxy;
 
 
 public final class DIUtil {
@@ -14,9 +14,9 @@
         *  @return If "possibleProxy" was a proxy, the underlying wrapped 
object otherwise "possibleProxy" itself.
         */
        public static <T> T stripProxy(final T possibleProxy) {
-               if (possibleProxy instanceof InfrastructureProxy)
-                       return 
(T)((InfrastructureProxy)possibleProxy).getWrappedObject();
-               else
+//             if (possibleProxy instanceof InfrastructureProxy)
+//                     return 
(T)((InfrastructureProxy)possibleProxy).getWrappedObject();
+//             else
                        return possibleProxy;
        }
 
@@ -27,11 +27,12 @@
         *  @return the unwrapped proxy objects if they were proxies otherwise 
the original objects
         */
        public static <T> T[] stripProxies(final T... possibleProxies) {
-               final Object[] unwrappedObjs = new 
Object[possibleProxies.length];
-               int i = 0;
-               for (final T possibleProxy : possibleProxies)
-                       unwrappedObjs[i++] = stripProxy(possibleProxy);
+//             final Object[] unwrappedObjs = new 
Object[possibleProxies.length];
+//             int i = 0;
+//             for (final T possibleProxy : possibleProxies)
+//                     unwrappedObjs[i++] = stripProxy(possibleProxy);
 
-               return (T[])unwrappedObjs;
+//             return (T[])unwrappedObjs;
+               return possibleProxies;
        }
 }

Modified: core3/api/branches/no-spring/service-api/osgi.bnd
===================================================================
--- core3/api/branches/no-spring/service-api/osgi.bnd   2011-09-16 22:39:37 UTC 
(rev 26843)
+++ core3/api/branches/no-spring/service-api/osgi.bnd   2011-09-16 22:41:29 UTC 
(rev 26844)
@@ -2,8 +2,7 @@
 # Use this file to add customized Bnd instructions for the bundle
 #-----------------------------------------------------------------
 
-
-Spring-Context: META-INF/spring/*.xml
+Bundle-Activator: org.cytoscape.service.util.internal.CyActivator
 Private-Package: org.cytoscape.service.util.internal.*
 Export-Package: org.cytoscape.service.util
 

Modified: 
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/AbstractCyActivator.java
===================================================================
--- 
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/AbstractCyActivator.java
  2011-09-16 22:39:37 UTC (rev 26843)
+++ 
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/AbstractCyActivator.java
  2011-09-16 22:41:29 UTC (rev 26844)
@@ -13,6 +13,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.cytoscape.service.util.internal.CyServiceListener;
+import org.cytoscape.service.util.internal.RegisterUtil;
 
 /**
  * A simple BundleActivator with convenience methods for registering
@@ -81,7 +82,6 @@
                        ServiceReference ref = 
bc.getServiceReference(serviceClass.getName());
                        if ( ref == null ) 
                                throw new 
NullPointerException("ServiceReference is null for: " + serviceClass.getName());
-
                        gottenServices.add(ref);        
                        return serviceClass.cast( bc.getService(ref) );
 
@@ -123,10 +123,13 @@
         * @param registerMethodName The name of the method to be called when a 
service is registered.
         * @param unregisterMethodName The name of the method to be called when 
a service is unregistered.
         * @param serviceClass The class defining the type of service desired.
+        * @param methodClass There are situations where, because of the use of 
generics and type
+        * erasure that the serviceClass is a subclass of the class used by the 
registration method,
+        * in which case, this extra argument allows that class to be 
specified. 
         */
-       protected void registerServiceListener(final BundleContext bc, final 
Object listener, final String registerMethodName, final String 
unregisterMethodName, final Class<?> serviceClass) {
+       protected void registerServiceListener(final BundleContext bc, final 
Object listener, final String registerMethodName, final String 
unregisterMethodName, final Class<?> serviceClass, final Class<?> methodClass) {
                try {
-                       CyServiceListener serviceListener = new 
CyServiceListener(bc, listener, registerMethodName, unregisterMethodName, 
serviceClass);
+                       CyServiceListener serviceListener = new 
CyServiceListener(bc, listener, registerMethodName, unregisterMethodName, 
serviceClass, methodClass);
                        serviceListener.open();
                        serviceListeners.add( serviceListener );
                } catch (Exception e) {
@@ -135,6 +138,21 @@
        }
 
        /**
+        * A method that will cause the specified register/unregister methods 
on the listener
+        * object to be called any time that a service of the specified type is 
registered or
+        * unregistered. 
+        * @param bc The BundleContext used to find services.
+        * @param listener Your object listening for service registrations.
+        * @param registerMethodName The name of the method to be called when a 
service is registered.
+        * @param unregisterMethodName The name of the method to be called when 
a service is unregistered.
+        * @param serviceClass The class defining the type of service desired.
+        */
+       protected void registerServiceListener(final BundleContext bc, final 
Object listener, final String registerMethodName, final String 
unregisterMethodName, final Class<?> serviceClass) {
+               
registerServiceListener(bc,listener,registerMethodName,unregisterMethodName,serviceClass,serviceClass);
+       }
+
+
+       /**
         * A utility method that registers the specified service object as an 
OSGi service for
         * all interfaces that the object implements.
         * @param bc The BundleContext used to find services.
@@ -142,7 +160,9 @@
         * @param props The service properties to be registered with each 
service. 
         */
        protected void registerAllServices(final BundleContext bc, final Object 
service, final Properties props) {
-               for ( Class<?> c : service.getClass().getInterfaces() ) 
+               List<Class<?>> interfaces = 
RegisterUtil.getAllInterfaces(service.getClass());
+               logger.debug("attempting to register " + interfaces.size() + " 
services for: " + service.toString());
+               for ( Class<?> c : interfaces ) 
                        registerService(bc, service, c, props);
        }
 

Added: 
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/internal/CyActivator.java
===================================================================
--- 
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/internal/CyActivator.java
                         (rev 0)
+++ 
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/internal/CyActivator.java
 2011-09-16 22:41:29 UTC (rev 26844)
@@ -0,0 +1,23 @@
+
+
+package org.cytoscape.service.util.internal;
+
+
+import org.cytoscape.service.util.internal.CyServiceRegistrarImpl;
+import org.cytoscape.service.util.CyServiceRegistrar;
+import org.osgi.framework.BundleContext;
+import org.cytoscape.service.util.AbstractCyActivator;
+import java.util.Properties;
+
+
+public class CyActivator extends AbstractCyActivator {
+       public CyActivator() {
+               super();
+       }
+
+       public void start(BundleContext bc) {
+               CyServiceRegistrarImpl cyServiceRegistrar = new 
CyServiceRegistrarImpl(bc);
+               registerService(bc,cyServiceRegistrar,CyServiceRegistrar.class, 
new Properties());
+       }
+}
+

Modified: 
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/internal/CyServiceListener.java
===================================================================
--- 
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/internal/CyServiceListener.java
   2011-09-16 22:39:37 UTC (rev 26843)
+++ 
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/internal/CyServiceListener.java
   2011-09-16 22:41:29 UTC (rev 26844)
@@ -58,13 +58,15 @@
        private final Method registerMethod;
        private final Method unregisterMethod;
        private final Class<?> serviceClass;
+       private final Class<?> methodClass;
        private static final Logger logger = 
LoggerFactory.getLogger(CyServiceListener.class);
        
-       public CyServiceListener(BundleContext bc, Object target, String 
registerMethodName, String unregisterMethodName, Class<?> serviceClass) throws 
NoSuchMethodException {
+       public CyServiceListener(BundleContext bc, Object target, String 
registerMethodName, String unregisterMethodName, Class<?> serviceClass, 
Class<?> methodClass) throws NoSuchMethodException {
                super(bc, serviceClass.getName(), null);
                this.bc = bc;
                this.target = target;
                this.serviceClass = serviceClass;
+               this.methodClass = methodClass;
                this.registerMethod = getMethod(registerMethodName);
                this.unregisterMethod = getMethod(unregisterMethodName);
        }
@@ -75,12 +77,12 @@
        private Method getMethod(String name) throws NoSuchMethodException {
                Method m; 
                try {
-                       m = target.getClass().getMethod(name, serviceClass, 
Dictionary.class);
+                       m = target.getClass().getMethod(name, methodClass, 
Dictionary.class);
                } catch (NoSuchMethodException e) {
                        // Ignore exception and try different signature.
                        // If we throw an exception here, we WANT it to 
                        // propagate, because that signals an error.
-                       m = target.getClass().getMethod(name, serviceClass, 
Map.class);
+                       m = target.getClass().getMethod(name, methodClass, 
Map.class);
                }
                return m;
        }
@@ -118,8 +120,8 @@
         */
        private Properties getProperties(ServiceReference ref) {
                Properties props = new Properties();
-               for ( String key : ref.getPropertyKeys() )
-                       props.setProperty(key,(String)(ref.getProperty(key)));
+               for ( String key : ref.getPropertyKeys() ) 
+                       props.setProperty(key,ref.getProperty(key).toString());
                return props;
        }
 }

Modified: 
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/internal/CyServiceRegistrarImpl.java
===================================================================
--- 
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/internal/CyServiceRegistrarImpl.java
      2011-09-16 22:39:37 UTC (rev 26843)
+++ 
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/internal/CyServiceRegistrarImpl.java
      2011-09-16 22:41:29 UTC (rev 26844)
@@ -23,7 +23,7 @@
        }
 
        public void registerAllServices(Object o, Dictionary props) {
-               for ( Class c : o.getClass().getInterfaces() ) 
+               for ( Class c : RegisterUtil.getAllInterfaces(o.getClass()) ) 
                        registerService(o,c,props);
        }
 

Added: 
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/internal/RegisterUtil.java
===================================================================
--- 
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/internal/RegisterUtil.java
                                (rev 0)
+++ 
core3/api/branches/no-spring/service-api/src/main/java/org/cytoscape/service/util/internal/RegisterUtil.java
        2011-09-16 22:41:29 UTC (rev 26844)
@@ -0,0 +1,71 @@
+
+/*
+ Copyright (c) 2011, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications.  In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage.  See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+*/
+package org.cytoscape.service.util.internal;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Properties;
+import org.osgi.framework.BundleContext; 
+import org.osgi.framework.BundleActivator; 
+import org.osgi.framework.ServiceRegistration; 
+import org.osgi.framework.ServiceReference; 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.cytoscape.service.util.internal.CyServiceListener;
+
+/**
+ * Various utilities for registering services. 
+ */
+public class RegisterUtil {
+
+       private static final Logger logger = 
LoggerFactory.getLogger(RegisterUtil.class);
+
+       public static List<Class<?>> getAllInterfaces(Class<?> clazz) {
+               List<Class<?>> interfaces = new ArrayList<Class<?>>();
+               for ( Class<?> c : clazz.getInterfaces() )
+                       interfaces.add(c);
+
+               // recurse into superclass
+               Class<?> superClass = clazz.getSuperclass();
+               if ( superClass != null && superClass != Object.class )
+                       interfaces.addAll( getAllInterfaces( superClass ) );
+
+               return interfaces;
+       }
+}

Deleted: 
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml
===================================================================
--- 
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml
 2011-09-16 22:39:37 UTC (rev 26843)
+++ 
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml
 2011-09-16 22:41:29 UTC (rev 26844)
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans";
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:osgi="http://www.springframework.org/schema/osgi";
-       xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-                      http://www.springframework.org/schema/osgi 
http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd";
-       default-lazy-init="false">
-
-
-       <osgi:service id="cyServiceRegistrarService" ref="cyServiceRegistrar"
-               interface="org.cytoscape.service.util.CyServiceRegistrar">
-       </osgi:service>
-
-</beans>

Copied: 
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml-legacy
 (from rev 26761, 
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml)
===================================================================
--- 
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml-legacy
                          (rev 0)
+++ 
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml-legacy
  2011-09-16 22:41:29 UTC (rev 26844)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:osgi="http://www.springframework.org/schema/osgi";
+       xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/osgi 
http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd";
+       default-lazy-init="false">
+
+
+       <osgi:service id="cyServiceRegistrarService" ref="cyServiceRegistrar"
+               interface="org.cytoscape.service.util.CyServiceRegistrar">
+       </osgi:service>
+
+</beans>

Deleted: 
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context.xml
===================================================================
--- 
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context.xml
      2011-09-16 22:39:37 UTC (rev 26843)
+++ 
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context.xml
      2011-09-16 22:41:29 UTC (rev 26844)
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans";
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-       xmlns:context="http://www.springframework.org/schema/context";
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans
-            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-        http://www.springframework.org/schema/aop
-            http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
-        http://www.springframework.org/schema/context
-            
http://www.springframework.org/schema/context/spring-context-3.0.xsd
-        http://www.springframework.org/schema/util
-            http://www.springframework.org/schema/util/spring-util-3.0.xsd
-        http://www.springframework.org/schema/lang
-            http://www.springframework.org/schema/lang/spring-lang-3.0.xsd
-        http://www.springframework.org/schema/osgi
-            http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd";
-       default-lazy-init="false">
-
-       <!-- regular spring configuration file defining the beans for this
-               bundle. We've kept the osgi definitions in a separate 
-               configuration file so that this file can easily be used
-               for integration testing outside of an OSGi environment -->
-
-       <context:annotation-config/>
-
-       <bean id="cyServiceRegistrar" 
class="org.cytoscape.service.util.internal.CyServiceRegistrarImpl">
-               <constructor-arg ref="bundleContext" />
-       </bean>
-
-</beans>

Copied: 
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context.xml-legacy
 (from rev 26761, 
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context.xml)
===================================================================
--- 
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context.xml-legacy
                               (rev 0)
+++ 
core3/api/branches/no-spring/service-api/src/main/resources/META-INF/spring/bundle-context.xml-legacy
       2011-09-16 22:41:29 UTC (rev 26844)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns:context="http://www.springframework.org/schema/context";
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans
+            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+        http://www.springframework.org/schema/aop
+            http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+        http://www.springframework.org/schema/context
+            
http://www.springframework.org/schema/context/spring-context-3.0.xsd
+        http://www.springframework.org/schema/util
+            http://www.springframework.org/schema/util/spring-util-3.0.xsd
+        http://www.springframework.org/schema/lang
+            http://www.springframework.org/schema/lang/spring-lang-3.0.xsd
+        http://www.springframework.org/schema/osgi
+            http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd";
+       default-lazy-init="false">
+
+       <!-- regular spring configuration file defining the beans for this
+               bundle. We've kept the osgi definitions in a separate 
+               configuration file so that this file can easily be used
+               for integration testing outside of an OSGi environment -->
+
+       <context:annotation-config/>
+
+       <bean id="cyServiceRegistrar" 
class="org.cytoscape.service.util.internal.CyServiceRegistrarImpl">
+               <constructor-arg ref="bundleContext" />
+       </bean>
+
+</beans>

Modified: core3/api/branches/no-spring/swing-util-api/pom.xml
===================================================================
--- core3/api/branches/no-spring/swing-util-api/pom.xml 2011-09-16 22:39:37 UTC 
(rev 26843)
+++ core3/api/branches/no-spring/swing-util-api/pom.xml 2011-09-16 22:41:29 UTC 
(rev 26844)
@@ -73,7 +73,7 @@
             <Bundle-Version>${project.version}</Bundle-Version>
             
<Export-Package>!${bundle.namespace}.internal.*,${bundle.namespace}.*;version="${project.version}"</Export-Package>
             <Private-Package>${bundle.namespace}.internal.*</Private-Package>
-            <_include>-osgi.bnd</_include>
+            
<Bundle-Activator>${bundle.namespace}.internal.CyActivator</Bundle-Activator>
           </instructions>
         </configuration>
       </plugin>
@@ -90,5 +90,15 @@
       <artifactId>property-api</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>org.cytoscape</groupId>
+      <artifactId>service-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.osgi</groupId>
+      <artifactId>org.osgi.core</artifactId>
+      <version>${osgi.api.version}</version>
+    </dependency>
   </dependencies>
 </project>

Added: 
core3/api/branches/no-spring/swing-util-api/src/main/java/org/cytoscape/util/swing/internal/CyActivator.java
===================================================================
--- 
core3/api/branches/no-spring/swing-util-api/src/main/java/org/cytoscape/util/swing/internal/CyActivator.java
                                (rev 0)
+++ 
core3/api/branches/no-spring/swing-util-api/src/main/java/org/cytoscape/util/swing/internal/CyActivator.java
        2011-09-16 22:41:29 UTC (rev 26844)
@@ -0,0 +1,33 @@
+
+
+
+
+package org.cytoscape.util.swing.internal;
+
+import org.cytoscape.property.CyProperty;
+import org.cytoscape.util.swing.internal.FileUtilImpl;
+import org.cytoscape.util.swing.internal.OpenBrowserImpl;
+import org.cytoscape.util.swing.FileUtil;
+import org.cytoscape.util.swing.OpenBrowser;
+import org.osgi.framework.BundleContext;
+import org.cytoscape.service.util.AbstractCyActivator;
+import java.util.Properties;
+
+
+public class CyActivator extends AbstractCyActivator {
+       public CyActivator() {
+               super();
+       }
+
+
+       public void start(BundleContext bc) {
+               CyProperty cytoscapePropertiesServiceRef = 
getService(bc,CyProperty.class,"(cyPropertyName=cytoscape3.props)");
+               
+               FileUtilImpl fileUtil = new 
FileUtilImpl(cytoscapePropertiesServiceRef);
+               OpenBrowserImpl openBrowser = new 
OpenBrowserImpl(cytoscapePropertiesServiceRef);
+               
+               registerService(bc,fileUtil,FileUtil.class, new Properties());
+               registerService(bc,openBrowser,OpenBrowser.class, new 
Properties());
+       }
+}
+

Deleted: 
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml
===================================================================
--- 
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml
      2011-09-16 22:39:37 UTC (rev 26843)
+++ 
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml
      2011-09-16 22:41:29 UTC (rev 26844)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans";
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:osgi="http://www.springframework.org/schema/osgi";
-       xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-                      http://www.springframework.org/schema/osgi 
http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd";
-       default-lazy-init="false">
-
-       <osgi:reference id="cytoscapePropertiesServiceRef" 
-               interface="org.cytoscape.property.CyProperty"
-               filter="(cyPropertyName=cytoscape3.props)" />
-               
-       <osgi:service id="fileUtilService" ref="fileUtil"
-               interface="org.cytoscape.util.swing.FileUtil" />
-               
-       <osgi:service id="openBrowserService" ref="openBrowser"
-               interface="org.cytoscape.util.swing.OpenBrowser" />             
-</beans>

Copied: 
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml-legacy
 (from rev 26761, 
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml)
===================================================================
--- 
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml-legacy
                               (rev 0)
+++ 
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context-osgi.xml-legacy
       2011-09-16 22:41:29 UTC (rev 26844)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:osgi="http://www.springframework.org/schema/osgi";
+       xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/osgi 
http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd";
+       default-lazy-init="false">
+
+       <osgi:reference id="cytoscapePropertiesServiceRef" 
+               interface="org.cytoscape.property.CyProperty"
+               filter="(cyPropertyName=cytoscape3.props)" />
+               
+       <osgi:service id="fileUtilService" ref="fileUtil"
+               interface="org.cytoscape.util.swing.FileUtil" />
+               
+       <osgi:service id="openBrowserService" ref="openBrowser"
+               interface="org.cytoscape.util.swing.OpenBrowser" />             
+</beans>

Deleted: 
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context.xml
===================================================================
--- 
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context.xml
   2011-09-16 22:39:37 UTC (rev 26843)
+++ 
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context.xml
   2011-09-16 22:41:29 UTC (rev 26844)
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans";
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:aop="http://www.springframework.org/schema/aop";
-       xmlns:context="http://www.springframework.org/schema/context";
-       xmlns:lang="http://www.springframework.org/schema/lang"; 
xmlns:osgi="http://www.springframework.org/schema/osgi";
-       xmlns:util="http://www.springframework.org/schema/util";
-       xsi:schemaLocation="
-               http://www.springframework.org/schema/beans 
-                       
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-               http://www.springframework.org/schema/aop 
-                       
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
-               http://www.springframework.org/schema/context 
-                       
http://www.springframework.org/schema/context/spring-context-3.0.xsd
-               http://www.springframework.org/schema/util 
-                       
http://www.springframework.org/schema/util/spring-util-3.0.xsd
-               http://www.springframework.org/schema/lang 
-                       
http://www.springframework.org/schema/lang/spring-lang-3.0.xsd
-               http://www.springframework.org/schema/osgi 
-                       
http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd";
-       default-lazy-init="false">
-
-       <context:annotation-config />
-
-       <bean name="fileUtil" 
class="org.cytoscape.util.swing.internal.FileUtilImpl">
-               <constructor-arg ref="cytoscapePropertiesServiceRef" />
-       </bean>
-       
-       <bean name="openBrowser" 
class="org.cytoscape.util.swing.internal.OpenBrowserImpl">
-               <constructor-arg ref="cytoscapePropertiesServiceRef" />
-       </bean>
-</beans>

Copied: 
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context.xml-legacy
 (from rev 26761, 
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context.xml)
===================================================================
--- 
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context.xml-legacy
                            (rev 0)
+++ 
core3/api/branches/no-spring/swing-util-api/src/main/resources/META-INF/spring/bundle-context.xml-legacy
    2011-09-16 22:41:29 UTC (rev 26844)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:aop="http://www.springframework.org/schema/aop";
+       xmlns:context="http://www.springframework.org/schema/context";
+       xmlns:lang="http://www.springframework.org/schema/lang"; 
xmlns:osgi="http://www.springframework.org/schema/osgi";
+       xmlns:util="http://www.springframework.org/schema/util";
+       xsi:schemaLocation="
+               http://www.springframework.org/schema/beans 
+                       
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+               http://www.springframework.org/schema/aop 
+                       
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+               http://www.springframework.org/schema/context 
+                       
http://www.springframework.org/schema/context/spring-context-3.0.xsd
+               http://www.springframework.org/schema/util 
+                       
http://www.springframework.org/schema/util/spring-util-3.0.xsd
+               http://www.springframework.org/schema/lang 
+                       
http://www.springframework.org/schema/lang/spring-lang-3.0.xsd
+               http://www.springframework.org/schema/osgi 
+                       
http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd";
+       default-lazy-init="false">
+
+       <context:annotation-config />
+
+       <bean name="fileUtil" 
class="org.cytoscape.util.swing.internal.FileUtilImpl">
+               <constructor-arg ref="cytoscapePropertiesServiceRef" />
+       </bean>
+       
+       <bean name="openBrowser" 
class="org.cytoscape.util.swing.internal.OpenBrowserImpl">
+               <constructor-arg ref="cytoscapePropertiesServiceRef" />
+       </bean>
+</beans>

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to