Author: kono
Date: 2011-08-18 16:23:57 -0700 (Thu, 18 Aug 2011)
New Revision: 26606

Added:
   core3/impl/trunk/application-impl/src/main/resources/cytoscape.props
Modified:
   
core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/CyApplicationCoreProperty.java
Log:
Default property file had been added.

Modified: 
core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/CyApplicationCoreProperty.java
===================================================================
--- 
core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/CyApplicationCoreProperty.java
   2011-08-18 21:28:09 UTC (rev 26605)
+++ 
core3/impl/trunk/application-impl/src/main/java/org/cytoscape/application/internal/CyApplicationCoreProperty.java
   2011-08-18 23:23:57 UTC (rev 26606)
@@ -37,6 +37,16 @@
                                is = new FileInputStream(propFile);
                                props = new Properties();
                                props.load(is);
+                               if(props.size() == 0) {
+                                       // Need to load default
+                                       is = 
this.getClass().getClassLoader().getResourceAsStream(DEF_PROP_FILE_NAME);
+                                       props = new Properties();
+                                       try {
+                                               props.load(is);
+                                       } catch (IOException e1) {
+                                               logger.warn("Could not read 
core property.  Use empty one.", e1);
+                                       }
+                               }
                                logger.info("PropFile is: " + 
propFile.getAbsolutePath());
                        } else {
                                logger.warn("Could not read properties from 
config directry - trying to load default properties.");

Added: core3/impl/trunk/application-impl/src/main/resources/cytoscape.props
===================================================================
--- core3/impl/trunk/application-impl/src/main/resources/cytoscape.props        
                        (rev 0)
+++ core3/impl/trunk/application-impl/src/main/resources/cytoscape.props        
2011-08-18 23:23:57 UTC (rev 26606)
@@ -0,0 +1,20 @@
+#Cytoscape Application Default Property File
+secondaryViewThreshold=30000
+viewThreshold=4000
+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-beta1
+exportTextAsShape=true
+vizmapper.cntMapperUpperLimit=2000
+undo.limit=10
+defaultPluginDownloadUrl=http://chianti.ucsd.edu/cyto_web/plugins3/plugins3.xml
+showQuickStartAtStartup= false
\ No newline at end of file


Property changes on: 
core3/impl/trunk/application-impl/src/main/resources/cytoscape.props
___________________________________________________________________
Added: svn:executable
   + *

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