Author: mcreech
Date: 2010-02-02 07:28:52 -0800 (Tue, 02 Feb 2010)
New Revision: 19113

Modified:
   csplugins/trunk/agilent/Cytoscape/release-notes.html
   csplugins/trunk/agilent/Cytoscape/src/cytoscape/CyMain.java
   csplugins/trunk/agilent/Cytoscape/src/cytoscape/CytoscapeInit.java
   
csplugins/trunk/agilent/Cytoscape/src/cytoscape/data/webservice/ui/WebServiceContextMenu.java
   csplugins/trunk/agilent/Cytoscape/src/cytoscape/plugin/PluginManager.java
Log:
version 0.03

Modified: csplugins/trunk/agilent/Cytoscape/release-notes.html
===================================================================
--- csplugins/trunk/agilent/Cytoscape/release-notes.html        2010-02-02 
04:13:52 UTC (rev 19112)
+++ csplugins/trunk/agilent/Cytoscape/release-notes.html        2010-02-02 
15:28:52 UTC (rev 19113)
@@ -1,11 +1,36 @@
 <HTML>
 <HEAD>
-<TITLE>Cytoscape-AG Release Notes (version 0.01)</TITLE>
+<TITLE>Cytoscape-AG Release Notes (version 0.03)</TITLE>
 </HEAD>
 <BODY>
 
-<H1>Cytoscape-AG Release Notes (version 0.01)</H1>
+<H1>Cytoscape-AG Release Notes (version 0.03)</H1>
+Following is a list of the modifications (see comments with "MLC 01/31/10"):
+<OL>
+<LI>Added temporary ability to remove popup context menu for "WikiPathways Web 
Service Client", controlled by the runstring parameter ("W").
+<P>This is a temporary patch to stop the menu items for "WikiPathways Web 
Service Client" from showing up on node and edge popup menus. This must be 
changed here, versus in the code for the web service client because setting the 
menu item to empty still causes the menu item to appear, although blank.</P>
+<P>The reason for removing the menu is that the node interactions menu item 
hasn't worked
+   at times and when it has, the nodes returned caused the visual style to 
change.
+   So, we remove the menu items to avoid testing and debugging these issues 
and wait for fixes and will remove this Cytoscape patch in the future.</P> 
+<P>Changes were made in 
cytoscape.data.webservice.ui.WebServiceContextMenu.java.</P>
+</LI>
+</OL>
 
+<H1>Prior Notes</H1>
+
+<H2>Cytoscape-AG Release Notes (version 0.02)</H2>
+Following is a list of the modifications (see comments with "MLC 01/21/10"):
+<OL>
+<LI>Changed the "Lobotomized" plugin manager, described in version 0.01, to 
have its functionality set based on the runstring parameter ("L"). This change 
included:
+<OL type=a>
+<LI>Adding an LMode instance variable that is set by the runstring parameter 
("L") to CyMain.java.</LI>
+<LI>Adding the static method CyMain.isLobomizedPluginManagerMode().</LI>
+<LI>Changing the code in CytoscapeInit.init(), and 
PluginManager.registerPlugin() to use 
CyMain.isLobomizedPluginManagerMode().</LI>
+</OL>
+</OL>
+
+<H2>Cytoscape-AG Release Notes (version 0.01)</H2>
+
 This is a modified version of Cytoscape 2.6.3 for use where Cytoscape is not
 the top-level application and a parent application wishes to only use
 certain parts of the Cytoscape UI.  For example, making the network
@@ -21,7 +46,7 @@
 parent application. The problem is that the pluginManager will
 remember what plugins were loaded in passed runs of Cytoscape.
 <P>This change is performed in CytoscapeInit.init().</P></LI>
-<LI>Added a AGMode that is set by the runstring parameter ("A").
+<LI>Added an AGMode that is set by the runstring parameter ("A").
 <P>This is done in CyMain.java and includes the additional static
   method CyMain.isAGMode(). When in this mode, Cytoscape's GUI will
   not be presented, and Agilent-specific behavior will be executed. This
@@ -47,8 +72,8 @@
    look-and-feel. This change is in CyMain.parseCommandLine().</P.</LI>
 
 </OL>
-<HR>
-<SMALL><EM>This page was last updated: 12/08/09</EM></SMALL>
 
+<SMALL><EM>This page was last updated: 01/31/10</EM></SMALL>
+
 </BODY>
 </HTML>

Modified: csplugins/trunk/agilent/Cytoscape/src/cytoscape/CyMain.java
===================================================================
--- csplugins/trunk/agilent/Cytoscape/src/cytoscape/CyMain.java 2010-02-02 
04:13:52 UTC (rev 19112)
+++ csplugins/trunk/agilent/Cytoscape/src/cytoscape/CyMain.java 2010-02-02 
15:28:52 UTC (rev 19113)
@@ -96,9 +96,18 @@
 
        protected CyLogger logger = null;
 
-    // MLC 12/08/09:
+    // MLC 12/08/09 BEGIN:
+    // Are we running in "Agilent" mode?:
     static private boolean AGMode;
-
+    // MLC 12/08/09 END.
+    // MLC 01/21/10 BEGIN
+    // Are we running in "Lobomized" mode?:
+    static private boolean LMode;
+    // MLC 01/21/10 END.
+    // MLC 01/31/10 BEGIN
+    // Temporary mode to be removed after certain bug fixes:
+    static private boolean WMode;
+    // MLC 01/31/10 END.
        /**
         * DOCUMENT ME!
         * 
@@ -173,6 +182,12 @@
                options.addOption("A", "Agilent", false, "Run with only minimal 
Cytoscape available for Agilent-based applications");
                options.addOption("E", "Embedded", false, "Run in embedded 
window mode (a parent app controls Cytoscape)");
                // MLC 12/08/09 END.
+               // MLC 01/21/10 BEGIN
+               options.addOption("L", "Lobotomized", false, "Run with a 
lobotomized plugin manager that has no memory of prior runs and only loads 
plugins from a given location");
+               // MLC 01/21/10 END.
+               // MLC 01/31/10 BEGIN
+               options.addOption("W", "NoWikiContextMenus", false, "Run 
removing Wikipathways Web Service Client context menus");
+               // MLC 01/31/10 END.
                
options.addOption(OptionBuilder.withLongOpt("session").withDescription(
                                "Load a cytoscape session (.cys) 
file.").withValueSeparator(
                                '\0').withArgName("file").hasArg() // only 
allow one session!!!
@@ -300,15 +315,47 @@
                    AGMode = true;
                }
                // MLC 12/08/09 END.
+               // MLC 01/21/10 BEGIN
+               if (line.hasOption("L")) {
+                   LMode = true;
+               }               
+               // MLC 01/21/10 END.
+               // MLC 01/31/10 BEGIN
+               if (line.hasOption("W")) {
+                   WMode = true;
+               }               
+               // MLC 01/31/10 END.
        }
 
     // MLC 12/08/09 BEGIN:
-    // Are we running in Agilent mode, where we just want the
-    // birds eye viewer and network windows?
+    /**
+     * Are we running in Agilent mode, where we just want the
+     * birds eye viewer and network windows?
+     */
     static public boolean isAGMode () {
        return AGMode;
     }
     // MLC 12/08/09 END.
+    // MLC 01/21/10 BEGIN
+    /**
+     * Are we running in Lobotomize mode, where we just want the
+     * plugin manager to not remember previous plugins and also
+     * want it to load from only one given location?
+     */
+    static public boolean isLobomizedPluginManagerMode () {
+       return LMode;
+    }
+    // MLC 01/21/10 END.
+    // MLC 01/31/10 BEGIN
+    /**
+     * Are we running in temporary remove "WikiPathways" Menu items
+     * mode, where we stop the popup menu items for WikiPathways Web
+     * Service Client from being presented?
+     */
+    static public boolean isWikiPathwaysNoContextMenusMode () {
+       return WMode;
+    }
+    // MLC 01/31/10 END.
 
        /**
         * Provides access to the session file parsed from arguments 
intercepted by

Modified: csplugins/trunk/agilent/Cytoscape/src/cytoscape/CytoscapeInit.java
===================================================================
--- csplugins/trunk/agilent/Cytoscape/src/cytoscape/CytoscapeInit.java  
2010-02-02 04:13:52 UTC (rev 19112)
+++ csplugins/trunk/agilent/Cytoscape/src/cytoscape/CytoscapeInit.java  
2010-02-02 15:28:52 UTC (rev 19113)
@@ -228,17 +228,25 @@
                        // load from those listed on the command line
                        InstalledPlugins.addAll(initParams.getPlugins());
 
-                       // MLC 12/08/09 BEGIN:
-                       //    We lobotomize the plugin manager to only
-                       //    load what is on the command line--no
-                       //    previously remembered plugins:
-                       //                      // Get all directories where 
plugins have been installed
-                       //                      // going to have to be a little 
smart...themes contain their plugins
-                       //                      // in subdirectories
-                       //                      
List<cytoscape.plugin.DownloadableInfo> MgrInstalledPlugins = 
mgr.getDownloadables(cytoscape.plugin.PluginStatus.CURRENT);
-                       // MLC: We just make an empty list:
-                       List<cytoscape.plugin.DownloadableInfo> 
MgrInstalledPlugins = new ArrayList<cytoscape.plugin.DownloadableInfo>(0);
-                       // MLC 12/08/09 END.
+                       // MLC 01/21/10 BEGIN:
+                       // // Get all directories where plugins have been 
installed
+                       // // going to have to be a little smart...themes 
contain their plugins
+                       // // in subdirectories
+                       //    List<cytoscape.plugin.DownloadableInfo> 
MgrInstalledPlugins = 
mgr.getDownloadables(cytoscape.plugin.PluginStatus.CURRENT);
+                       List<cytoscape.plugin.DownloadableInfo> 
MgrInstalledPlugins  = null;
+                       if (CyMain.isLobomizedPluginManagerMode ()) {
+                           //    We lobotomize the plugin manager to only
+                           //    load what is on the command line--no
+                           //    previously remembered plugins:
+                           // MLC: We just make an empty list:
+                           MgrInstalledPlugins = new 
ArrayList<cytoscape.plugin.DownloadableInfo>(0);
+                       } else {
+                           // Get all directories where plugins have been 
installed
+                           // going to have to be a little smart...themes 
contain their plugins
+                           // in subdirectories
+                           MgrInstalledPlugins = 
mgr.getDownloadables(cytoscape.plugin.PluginStatus.CURRENT);
+                       }
+                       // MLC 01/21/10 END.
                        for (cytoscape.plugin.DownloadableInfo dInfo : 
MgrInstalledPlugins) {
                                if 
(dInfo.getCategory().equals(cytoscape.plugin.Category.CORE.getCategoryText()))
                                        continue;

Modified: 
csplugins/trunk/agilent/Cytoscape/src/cytoscape/data/webservice/ui/WebServiceContextMenu.java
===================================================================
--- 
csplugins/trunk/agilent/Cytoscape/src/cytoscape/data/webservice/ui/WebServiceContextMenu.java
       2010-02-02 04:13:52 UTC (rev 19112)
+++ 
csplugins/trunk/agilent/Cytoscape/src/cytoscape/data/webservice/ui/WebServiceContextMenu.java
       2010-02-02 15:28:52 UTC (rev 19113)
@@ -34,6 +34,8 @@
 */
 package cytoscape.data.webservice.ui;
 
+// MLC 01/31/10:
+import cytoscape.CyMain;
 import cytoscape.data.webservice.WebServiceClient;
 import cytoscape.data.webservice.WebServiceClientManager;
 
@@ -103,8 +105,32 @@
                }
 
                List<JMenuItem> context = null;
-               final List<WebServiceClient> clients = 
WebServiceClientManager.getAllClients();
+               // MLC 01/31/10 BEGIN:
+               // final List<WebServiceClient> clients = 
WebServiceClientManager.getAllClients();
+               List<WebServiceClient> clients = 
WebServiceClientManager.getAllClients();
 
+               if (CyMain.isWikiPathwaysNoContextMenusMode ()) {
+                   // We remove the popup menus from "WikiPathways
+                   // Web Service Client" because node interactions
+                   // menu item hasn't worked at times and when it
+                   // has, the nodes returned caused the visual style
+                   // to change.  So, we remove the menu items to
+                   // avoid testing and debugging such issues:
+                   WebServiceClient clientToRemove = null;
+                   for (WebServiceClient client : clients) {
+                       // NOTE: VERY Implementation dependent!:
+                       if ("wikipathways".equals (client.getClientID())) {
+                           clientToRemove = client;
+                           break;
+                       }
+                   }
+                   if (clientToRemove != null) {
+                       clients.remove (clientToRemove);
+                   }
+               }
+               // MLC 01/31/10 END.
+
+
                for (WebServiceClient client : clients) {
                        if (client instanceof WebServiceClientGUI) {
                                if (view instanceof NodeView)
@@ -126,13 +152,25 @@
                }
 
                if(view instanceof NodeView) {
+                   // MLC 01/31/10 BEGIN:
+                   if ((!CyMain.isWikiPathwaysNoContextMenusMode ()) ||
+                       (nodeRootMenu.getItemCount() > 0)) {
+                       // MLC 01/31/10 END.
                        menu.add(this.nodeRootMenu);
                        if(nodeRootMenu.getItemCount() == 0)
-                               nodeRootMenu.setEnabled(false);
+                           nodeRootMenu.setEnabled(false);
+                       // MLC 01/31/10:
+                   }
                } else {
+                   // MLC 01/31/10 BEGIN:
+                   if ((!CyMain.isWikiPathwaysNoContextMenusMode ()) ||
+                       (edgeRootMenu.getItemCount() > 0)) {
+                       // MLC 01/31/10 END.
                        menu.add(this.edgeRootMenu);
                        if(edgeRootMenu.getItemCount() == 0)
-                               edgeRootMenu.setEnabled(false);
+                           edgeRootMenu.setEnabled(false);
+                       // MLC 01/31/10:
+                   }
                }
        }
 }

Modified: 
csplugins/trunk/agilent/Cytoscape/src/cytoscape/plugin/PluginManager.java
===================================================================
--- csplugins/trunk/agilent/Cytoscape/src/cytoscape/plugin/PluginManager.java   
2010-02-02 04:13:52 UTC (rev 19112)
+++ csplugins/trunk/agilent/Cytoscape/src/cytoscape/plugin/PluginManager.java   
2010-02-02 15:28:52 UTC (rev 19113)
@@ -382,13 +382,15 @@
                        // to the current list twice
                        logger.info("Track plugin: " + addToTracker);
                        if (addToTracker) {
-                           // MLC 12/08/09 BEGIN:
+                           // MLC 01/21/10 BEGIN:
                            // Stop the tracker from remembering our plugins--we
                            // don't want to affect a regular Cytoscape session
                            // and load unexpected plugins because our Agilent
                            // version of Cytoscape loaded some plugins:
-                           // pluginTracker.addDownloadable(PluginObj, 
PluginStatus.CURRENT);
-                           // MLC 12/08/09 END.
+                           if (!CyMain.isLobomizedPluginManagerMode ()) {
+                               pluginTracker.addDownloadable(PluginObj, 
PluginStatus.CURRENT);
+                           }
+                           // MLC 01/21/10 END.
                        }
                }
                return PluginObj;

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