Author: mes
Date: 2010-11-05 18:21:55 -0700 (Fri, 05 Nov 2010)
New Revision: 22750

Removed:
   core3/swing-application-impl/trunk/src/main/resources/cytoscape.props
Modified:
   
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/CyVersion.java
   
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/util/OpenBrowserImpl.java
   
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/util/undo/UndoMonitor.java
   
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/view/NetworkViewManager.java
   
core3/swing-application-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
   
core3/swing-application-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
Log:
updated props handling

Modified: 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/CyVersion.java
===================================================================
--- 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/CyVersion.java
      2010-11-06 01:21:36 UTC (rev 22749)
+++ 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/CyVersion.java
      2010-11-06 01:21:55 UTC (rev 22750)
@@ -41,6 +41,8 @@
 import java.util.regex.Pattern;
 import org.cytoscape.CytoscapeVersion; 
 
+import org.cytoscape.property.CyProperty;
+
 /** 
  * Identify the version of cytoscape. 
  */
@@ -54,8 +56,8 @@
        private final String qualifier;
        private final String version;
 
-       public CyVersion(final Properties props) {
-               version = 
props.getProperty(CytoscapeVersion.VERSION_PROPERTY_NAME);
+       public CyVersion(final CyProperty<Properties> props) {
+               version = 
props.getProperties().getProperty(CytoscapeVersion.VERSION_PROPERTY_NAME);
 
                if ( version == null )
                        throw new NullPointerException("No version number found 
in the provided properties with property name: " + 
CytoscapeVersion.VERSION_PROPERTY_NAME);

Modified: 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/util/OpenBrowserImpl.java
===================================================================
--- 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/util/OpenBrowserImpl.java
   2010-11-06 01:21:36 UTC (rev 22749)
+++ 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/util/OpenBrowserImpl.java
   2010-11-06 01:21:55 UTC (rev 22750)
@@ -47,15 +47,16 @@
 import java.util.Properties;
 
 import org.cytoscape.util.OpenBrowser;
+import org.cytoscape.property.CyProperty;
 
 public class OpenBrowserImpl implements OpenBrowser {
 
        private Properties props;
 
-       public OpenBrowserImpl(Properties props) {
-               if ( props == null )
+       public OpenBrowserImpl(CyProperty<Properties> cyProps) {
+               if ( cyProps == null )
                        throw new NullPointerException("Properties is null");   
-               this.props = props;
+               this.props = cyProps.getProperties();
        }
 
        /**

Modified: 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/util/undo/UndoMonitor.java
===================================================================
--- 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/util/undo/UndoMonitor.java
  2010-11-06 01:21:36 UTC (rev 22749)
+++ 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/util/undo/UndoMonitor.java
  2010-11-06 01:21:55 UTC (rev 22750)
@@ -41,6 +41,7 @@
 import org.cytoscape.session.events.SetCurrentNetworkViewEvent;
 import org.cytoscape.session.events.SetCurrentNetworkViewListener;
 import org.cytoscape.work.undo.UndoSupport;
+import org.cytoscape.property.CyProperty;
 
 /**
  * This class monitors the undoable edit stack and implements whatever
@@ -52,10 +53,10 @@
        private UndoSupport undo;
        private Properties props;
 
-       public UndoMonitor(UndoSupport undo,Properties props) {
+       public UndoMonitor(UndoSupport undo,CyProperty<Properties> cyProps) {
 
                this.undo = undo;
-               this.props = props;
+               this.props = cyProps.getProperties();
 
                undo.getUndoManager().setLimit( getLimit() );
        }

Modified: 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/view/NetworkViewManager.java
===================================================================
--- 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/view/NetworkViewManager.java
        2010-11-06 01:21:36 UTC (rev 22749)
+++ 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/view/NetworkViewManager.java
        2010-11-06 01:21:55 UTC (rev 22750)
@@ -64,6 +64,7 @@
 import org.cytoscape.view.model.events.NetworkViewAddedListener;
 import org.cytoscape.view.presentation.RenderingEngine;
 import org.cytoscape.view.presentation.RenderingEngineFactory;
+import org.cytoscape.property.CyProperty;
 
 import org.cytoscape.event.CyEventHelper;
 import org.slf4j.Logger;
@@ -119,13 +120,13 @@
         * @param desktop
         *            DOCUMENT ME!
         */
-       public NetworkViewManager(CyApplicationManager appMgr, 
CyNetworkViewManager netViewMgr, Properties props,
+       public NetworkViewManager(CyApplicationManager appMgr, 
CyNetworkViewManager netViewMgr, CyProperty<Properties> cyProps,
                        CyHelpBroker help, CyEventHelper eventHelper) {
                this.factories = new HashMap<String, 
RenderingEngineFactory<CyNetwork>>();
                
                this.networkViewManager = netViewMgr;
                this.applicationManager = appMgr;
-               this.props = props;
+               this.props = cyProps.getProperties();
                this.eventHelper = eventHelper;
                desktopPane = new JDesktopPane();
 

Modified: 
core3/swing-application-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
===================================================================
--- 
core3/swing-application-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
       2010-11-06 01:21:36 UTC (rev 22749)
+++ 
core3/swing-application-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
       2010-11-06 01:21:55 UTC (rev 22750)
@@ -7,6 +7,10 @@
 
        <!-- Import OSGi services -->
 
+       <osgi:reference id="cytoscapePropertiesServiceRef" 
+               interface="org.cytoscape.property.CyProperty"
+               filter="(cyPropertyName=coreSettings)" />
+
        <osgi:reference id="cyApplicationManagerServiceRef"
                interface="org.cytoscape.session.CyApplicationManager" />
 
@@ -70,18 +74,6 @@
 
        <!-- define services that application provides -->
 
-       <!-- Props are manages in this service -->
-       <osgi:service id="cyMainPropsService" ref="cyMainProps"
-               interface="org.cytoscape.property.CyProperty">
-               <osgi:service-properties>
-                       <entry key="serviceType" value="property" />
-                       <entry key="cyPropertyName" value="application" />
-               </osgi:service-properties>
-       </osgi:service>
-
-<!-- <osgi:service id="cyMenusService" ref="cytoscapeMenus"
-               interface="org.cytoscape.view.CyMenus" /> -->
-
        <!-- <osgi:service id="proxyHandlerService" ref="proxyHandler"> -->
        <!-- <osgi:interfaces> -->
        <!-- <value>cytoscape.util.ProxyHandler</value> -->

Modified: 
core3/swing-application-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
===================================================================
--- 
core3/swing-application-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
    2010-11-06 01:21:36 UTC (rev 22749)
+++ 
core3/swing-application-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
    2010-11-06 01:21:55 UTC (rev 22750)
@@ -21,16 +21,9 @@
 
        <context:annotation-config />
 
-       <!-- Cytoscape Properties (cytoscape.props) -->
-       <util:properties id="cytoscapeProperties" 
location="classpath:cytoscape.props" />
-       
-       <bean id="cyMainProps" class="org.cytoscape.property.BasicCyProperty">
-               <constructor-arg ref="cytoscapeProperties" />
-       </bean>
-
        <!-- Cytoscape Version -->
        <bean name="cytoscapeVersion" class="org.cytoscape.internal.CyVersion">
-               <constructor-arg ref="cytoscapeProperties" />
+               <constructor-arg ref="cytoscapePropertiesServiceRef" />
        </bean>
 
        <!-- shutdown support -->
@@ -41,10 +34,10 @@
 
        <!-- Various Utilities -->
        <bean name="openBrowser" 
class="org.cytoscape.internal.util.OpenBrowserImpl">
-               <constructor-arg ref="cytoscapeProperties" />
+               <constructor-arg ref="cytoscapePropertiesServiceRef" />
        </bean>
        <bean name="cyOperatingContext" 
class="org.cytoscape.internal.CyOperatingContextImpl">
-               <constructor-arg ref="cyMainProps" />
+               <constructor-arg ref="cytoscapePropertiesServiceRef" />
        </bean>
        
        <bean name="cyHelpBroker" 
class="org.cytoscape.internal.view.CyHelpBrokerImpl">
@@ -71,7 +64,7 @@
        <bean name="networkViewManager" 
class="org.cytoscape.internal.view.NetworkViewManager">
                <constructor-arg ref="cyApplicationManagerServiceRef" />
                <constructor-arg ref="cyNetworkViewManagerServiceRef" />
-               <constructor-arg ref="cytoscapeProperties" />
+               <constructor-arg ref="cytoscapePropertiesServiceRef" />
                <constructor-arg ref="cyHelpBroker" />
                <constructor-arg ref="cyEventHelperServiceRef" />
        </bean>
@@ -110,7 +103,7 @@
        <!--
        <bean id="printAction" 
class="org.cytoscape.internal.actions.PrintAction">
                <constructor-arg ref="cyNetworkManagerServiceRef" />
-               <constructor-arg ref="cytoscapeProperties" />
+               <constructor-arg ref="cytoscapePropertiesServiceRef" />
                <constructor-arg ref="presentationManagerServiceRef" />
        </bean>
        -->
@@ -155,7 +148,7 @@
        </bean>
        <bean id="showGraphicsDetailsAction" 
class="org.cytoscape.internal.actions.ShowGraphicsDetailsAction">
                <constructor-arg ref="cyNetworkManagerServiceRef" />
-               <constructor-arg ref="cytoscapeProperties" />
+               <constructor-arg ref="cytoscapePropertiesServiceRef" />
        </bean>
        -->
        <!-- not a CyAction, but adds menu -->
@@ -232,7 +225,7 @@
        <!-- Other stuff to be started -->
        <bean id="undoMonitor" 
class="org.cytoscape.internal.util.undo.UndoMonitor">
                <constructor-arg ref="undoSupportServiceRef" />
-               <constructor-arg ref="cytoscapeProperties" />
+               <constructor-arg ref="cytoscapePropertiesServiceRef" />
        </bean>
 
        <bean id="selectRegisterListener" 
class="org.cytoscape.internal.select.SelectRegisterListener">

Deleted: core3/swing-application-impl/trunk/src/main/resources/cytoscape.props
===================================================================
--- core3/swing-application-impl/trunk/src/main/resources/cytoscape.props       
2010-11-06 01:21:36 UTC (rev 22749)
+++ core3/swing-application-impl/trunk/src/main/resources/cytoscape.props       
2010-11-06 01:21:55 UTC (rev 22750)
@@ -1,22 +0,0 @@
-#Cytoscape Property File
-#Wed Apr 06 15:28:22 PDT 2005
-secondaryViewThreshold=30000
-defaultSpeciesName=Saccharomyces cerevisiae
-bioDataServer=PleaseSpecify
-viewThreshold=10000
-defaultVisualStyle=default
-canonicalizeNames=true
-render.coarseDetailThreshold=2000
-render.nodeBorderThreshold=200
-render.nodeLabelThreshold=100
-render.edgeArrowThreshold=300
-render.edgeLabelThreshold=120
-maximizeViewOnCreate=false
-proxy.server=
-proxy.server.port=
-proxy.server.type=
-cytoscape.version.number=3.0.0
-exportTextAsShape=true
-vizmapper.cntMapperUpperLimit=2000
-undo.limit=10
-defaultPluginDownloadUrl=http://cytoscape.org/plugins/plugins.xml

-- 
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