Author: pwang
Date: 2011-01-20 16:44:58 -0800 (Thu, 20 Jan 2011)
New Revision: 23533

Modified:
   
core3/table-import-impl/trunk/src/main/java/org/cytoscape/tableimport/internal/ui/ImportNetworkTask.java
Log:
Clean up

Modified: 
core3/table-import-impl/trunk/src/main/java/org/cytoscape/tableimport/internal/ui/ImportNetworkTask.java
===================================================================
--- 
core3/table-import-impl/trunk/src/main/java/org/cytoscape/tableimport/internal/ui/ImportNetworkTask.java
    2011-01-21 00:40:24 UTC (rev 23532)
+++ 
core3/table-import-impl/trunk/src/main/java/org/cytoscape/tableimport/internal/ui/ImportNetworkTask.java
    2011-01-21 00:44:58 UTC (rev 23533)
@@ -32,7 +32,7 @@
  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.tableimport.internal.ui;
 
@@ -66,7 +66,7 @@
 
        protected CyNetworkView[] cyNetworkViews;
        protected VisualStyle[] visualstyles;
-       
+
        private final GraphReader reader;
        private final URL source;
 
@@ -87,38 +87,31 @@
        @Override
        public void run(TaskMonitor tm) throws IOException {
 
-               try {
-                       tm.setProgress(0.10);
-                       this.reader.setNetwork(network);
-                       
-                       if (this.cancelled){
-                               return;
-                       }
-                       
-                       this.reader.read();
-                       
-                       tm.setProgress(0.80);
-                       
-                       if (this.cancelled){
-                               return;
-                       }
-                       
-                       final CyNetworkView view = 
CytoscapeServices.cyNetworkViewFactoryServiceRef.getNetworkView(network);
-                       
-                       CytoscapeServices.netMgr.addNetwork(network);
-                       
CytoscapeServices.networkViewManager.addNetworkView(view);
+               tm.setProgress(0.10);
+               this.reader.setNetwork(network);
 
-                       tm.setProgress(0.95);
-                       
-                       view.fitContent();
-                       
-               } finally { 
-                       //
+               if (this.cancelled){
+                       return;
                }
-               
+
+               this.reader.read();
+
+               tm.setProgress(0.80);
+
+               if (this.cancelled){
+                       return;
+               }
+
+               final CyNetworkView view = 
CytoscapeServices.cyNetworkViewFactoryServiceRef.getNetworkView(network);
+
+               CytoscapeServices.netMgr.addNetwork(network);
+               CytoscapeServices.networkViewManager.addNetworkView(view);
+
+               //view.fitContent();
+
                tm.setProgress(1.0);
-               
-               informUserOfGraphStats(network, tm);
+
+               //informUserOfGraphStats(network, tm);
        }
 
        /**
@@ -136,7 +129,7 @@
                sb.append(" nodes and " + 
formatter.format(newNetwork.getEdgeCount()));
                sb.append(" edges.\n\n");
 
-               String thresh = "100"; 
//CytoscapeServices.cytoscapePropertiesServiceRef.getProperties().getProperty("viewThreshold");
+               String thresh = "0"; 
//CytoscapeServices.cytoscapePropertiesServiceRef.getProperties().getProperty("viewThreshold");
 
                if (newNetwork.getNodeCount() < Integer.parseInt(thresh)) {
                        sb.append("Network is under " + thresh
@@ -150,5 +143,5 @@
 
                taskMonitor.setStatusMessage(sb.toString());
        }       
-       
+
 }

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