Author: ghuck
Date: 2011-05-25 17:30:23 -0700 (Wed, 25 May 2011)
New Revision: 25543

Modified:
   
csplugins/trunk/soc/ghuck/IgraphPlugin/src/cytoscape/plugins/igraph/IgraphPlugin.java
Log:


Modified: 
csplugins/trunk/soc/ghuck/IgraphPlugin/src/cytoscape/plugins/igraph/IgraphPlugin.java
===================================================================
--- 
csplugins/trunk/soc/ghuck/IgraphPlugin/src/cytoscape/plugins/igraph/IgraphPlugin.java
       2011-05-26 00:23:57 UTC (rev 25542)
+++ 
csplugins/trunk/soc/ghuck/IgraphPlugin/src/cytoscape/plugins/igraph/IgraphPlugin.java
       2011-05-26 00:30:23 UTC (rev 25543)
@@ -101,8 +101,10 @@
     } // checkLib
 
 
-    protected void loadIgraph() {
+    protected boolean loadIgraph() {
 
+       boolean res = true;
+
        // Reset the "sys_paths" field of the ClassLoader to null.
        Class clazz = ClassLoader.class;
        Field field;
@@ -120,7 +122,7 @@
            field.set(clazz, null);
            try {
                // Change the value and load the library.
-               System.setProperty("java.library.path", "./plugins" + ":" + ":" 
+ orig_path);
+               System.setProperty("java.library.path", "./plugins"  + ":" + 
orig_path);
                System.loadLibrary("igraph");
            }
 
@@ -129,13 +131,8 @@
                    + error.getMessage() 
                    + "\nPlease check your plugins folder.";
                JOptionPane.showMessageDialog(Cytoscape.getDesktop(), message);
-               
-               // Revert back the changes
-               field.set(clazz, original);
-               field.setAccessible(accessible);
-               
-               // Exit
-               return;
+                               
+               res = false;
            }           
 
            finally {
@@ -145,7 +142,12 @@
            }
        }
        catch (Exception exception){
+           res = false;
        }
+
+       finally{
+           return res;
+       }
     }
         
 }
\ No newline at end of file

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