Author: scooter
Date: 2010-02-11 09:25:24 -0800 (Thu, 11 Feb 2010)
New Revision: 19293
Modified:
cytoscape/trunk/src/cytoscape/command/CyCommandManager.java
Log:
Remove unregister as suggested
Modified: cytoscape/trunk/src/cytoscape/command/CyCommandManager.java
===================================================================
--- cytoscape/trunk/src/cytoscape/command/CyCommandManager.java 2010-02-11
10:45:18 UTC (rev 19292)
+++ cytoscape/trunk/src/cytoscape/command/CyCommandManager.java 2010-02-11
17:25:24 UTC (rev 19293)
@@ -49,7 +49,6 @@
import cytoscape.layout.Tunable;
-
/**
* CyCommandManager is a singleton Cytoscape class that provides a global
registry
* of {...@link CyCommand}s and {...@link CyCommandNamespace}s. Each
CyCommand is added to the registry through the register
@@ -86,7 +85,8 @@
* @param com the command handler for the command we want to register
* @throws RuntimeException if the command is already registered
*/
- public static void register(CyCommandNamespace ns, String command,
CyCommandHandler com) throws RuntimeException {
+ public static void register(CyCommandNamespace ns, String command,
CyCommandHandler com)
+ throws RuntimeException {
if (com == null)
return;
@@ -179,22 +179,6 @@
}
/**
- * Unregister a command
- *
- * @param ns the namespace of the command to unregister
- * @param command the command name to unregister
- */
- public static void unRegister(CyCommandNamespace ns, String command) {
-
- if (!comMap.containsKey(ns))
- return;
-
- Map<String,CyCommandHandler> subComMap = comMap.get(ns);
-
- subComMap.remove( command );
- }
-
- /**
* Execute a command.
*
* @param namespace the namespace for this command
@@ -204,7 +188,8 @@
* @throws RuntimeException is the namespace or command is not yet
registered
* @throws CyCommandException if there is an error with the execution
*/
- public static CyCommandResult execute(String namespace, String command,
Map<String,Object>arguments) throws CyCommandException, RuntimeException {
+ public static CyCommandResult execute(String namespace, String command,
Map<String,Object>arguments)
+ throws CyCommandException,
RuntimeException {
CyCommandHandler handler = getHandler(namespace, command);
return handler.execute(command, arguments);
@@ -220,7 +205,8 @@
* @throws RuntimeException is the namespace or command is not yet
registered
* @throws CyCommandException if there is an error with the execution
*/
- public static CyCommandResult execute(String namespace, String command,
List<Tunable>arguments) throws CyCommandException, RuntimeException {
+ public static CyCommandResult execute(String namespace, String command,
List<Tunable>arguments)
+ throws CyCommandException,
RuntimeException {
CyCommandHandler handler = getHandler(namespace, command);
return handler.execute(command, arguments);
--
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.