Author: ruschein
Date: 2011-08-05 11:05:03 -0700 (Fri, 05 Aug 2011)
New Revision: 26390

Modified:
   csplugins/trunk/ucsd/mes/GoogleChartFunctions/build.xml
   
csplugins/trunk/ucsd/mes/GoogleChartFunctions/src/org/cytoscape/equations/internal/googlechart/GooglePieChartFunction.java
Log:
Fixed argument processing for GPIECHART function.

Modified: csplugins/trunk/ucsd/mes/GoogleChartFunctions/build.xml
===================================================================
--- csplugins/trunk/ucsd/mes/GoogleChartFunctions/build.xml     2011-08-05 
17:37:10 UTC (rev 26389)
+++ csplugins/trunk/ucsd/mes/GoogleChartFunctions/build.xml     2011-08-05 
18:05:03 UTC (rev 26390)
@@ -9,7 +9,7 @@
     <property name="name" value="GoogleChartFunctions"/>
 
        <!-- to support plugin.props, make sure the version is only two 
digits!-->
-    <property name="version" value="1.0"/>
+    <property name="version" value="1.1"/>
 
     <echo message="Building ${name} version ${version} ..."/>
 

Modified: 
csplugins/trunk/ucsd/mes/GoogleChartFunctions/src/org/cytoscape/equations/internal/googlechart/GooglePieChartFunction.java
===================================================================
--- 
csplugins/trunk/ucsd/mes/GoogleChartFunctions/src/org/cytoscape/equations/internal/googlechart/GooglePieChartFunction.java
  2011-08-05 17:37:10 UTC (rev 26389)
+++ 
csplugins/trunk/ucsd/mes/GoogleChartFunctions/src/org/cytoscape/equations/internal/googlechart/GooglePieChartFunction.java
  2011-08-05 18:05:03 UTC (rev 26390)
@@ -114,27 +114,22 @@
        @Override
        public Class validateArgTypes(final Class[] argTypes) {
                // Two lists is the minimum required arguments
-               if (argTypes.length < 2)
+               if (argTypes.length < 2 || argTypes.length > 6)
                        return null;
 
                // Labels and percentages
-               if (!FunctionUtil.isSomeKindOfList(argTypes[0])
-                               || !FunctionUtil.isSomeKindOfList(argTypes[1]))
+               if (!FunctionUtil.isSomeKindOfList(argTypes[0]) 
+                   || !FunctionUtil.isSomeKindOfList(argTypes[1]))
                        return null;
 
                // Contains required parameters only.
                if (argTypes.length == 2)
                        return String.class;
 
-               int nextArg = MINIMUM_NUM_ARGUMENTS;
-               int argLen = argTypes.length;
-               while (FunctionUtil.isSomeKindOfList(argTypes[nextArg])) {
-                       nextArg++;
-                       if (nextArg == argLen)
-                               return String.class;
-               }
-
+               //
                // Title and extra arguments for query URL
+               //
+
                if (argTypes[2] != String.class)
                        return null;
 

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