Author: mmichaud
Date: 2009-06-09 10:41:39 -0700 (Tue, 09 Jun 2009)
New Revision: 16878
Modified:
csplugins/trunk/ucsd/mes/anntun/src/main/java/org/example/command/PrintSomething.java
csplugins/trunk/ucsd/mes/anntun/src/main/java/org/example/tunable/internal/cl/CLHandlerFactory.java
csplugins/trunk/ucsd/mes/anntun/src/main/java/org/example/tunable/internal/cl/IntCLHandler.java
Log:
[]
Modified:
csplugins/trunk/ucsd/mes/anntun/src/main/java/org/example/command/PrintSomething.java
===================================================================
---
csplugins/trunk/ucsd/mes/anntun/src/main/java/org/example/command/PrintSomething.java
2009-06-09 17:28:54 UTC (rev 16877)
+++
csplugins/trunk/ucsd/mes/anntun/src/main/java/org/example/command/PrintSomething.java
2009-06-09 17:41:39 UTC (rev 16878)
@@ -1,5 +1,6 @@
package org.example.command;
+import java.io.File;
import java.util.Map;
import org.example.tunable.Handler;
@@ -118,9 +119,20 @@
public ListMultipleSelection<Integer> getNumbers(){return numbers;}
+ //Tests with FileHandler
+ @Tunable(description="a file")
+ public File file1 = new File("");
+ private File file2 = new File("");
+ @Tunable(description="to set the file2")
+ public void setFile2(File fil){
+ file2 = fil;
+ }
+ @Tunable(description="to get the file2")
+ public File getFile2(){return file2;}
+
public void execute() {
System.out.println("\t name : " + firstName + " " + lastName +
"\n \t age : " + age + "\n \t foot size : " + footSize.getValue() + "\n \t kids
= " + kids.getValue() + "\n \t income : $" + income.getValue() + "\n \t result
for boolean = " + bool + "\n \t listsingleselection = "+lss.getSelectedValue()
+ "\n \t listmultipleselection = "+lms.getSelectedValues() + "\n \t height =
"+height.getValue());
System.out.println("\n\nRESULT FOR GETSET METHODS = ");
@@ -135,6 +147,10 @@
System.out.println("testListSingleSelection =
"+colors.getSelectedValue());
System.out.println("testListMultipleSelection =
"+numbers.getPossibleValues());
System.out.println("testListMultipleSelection =
"+numbers.getSelectedValues());
+
+ System.out.println("testFile1 = "+file1.getAbsolutePath());
+ System.out.println("testFile2 = "+file2.getAbsolutePath());
+
}
Modified:
csplugins/trunk/ucsd/mes/anntun/src/main/java/org/example/tunable/internal/cl/CLHandlerFactory.java
===================================================================
---
csplugins/trunk/ucsd/mes/anntun/src/main/java/org/example/tunable/internal/cl/CLHandlerFactory.java
2009-06-09 17:28:54 UTC (rev 16877)
+++
csplugins/trunk/ucsd/mes/anntun/src/main/java/org/example/tunable/internal/cl/CLHandlerFactory.java
2009-06-09 17:41:39 UTC (rev 16878)
@@ -1,5 +1,6 @@
package org.example.tunable.internal.cl;
+import java.io.File;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
@@ -52,6 +53,9 @@
return new
ListSingleSelectionCLHandler<Object>(gmethod,smethod,o,tg,ts);
else if(type == ListMultipleSelection.class)
return new
ListMultipleSelectionCLHandler<Object>(gmethod,smethod,o,tg,ts);
+
+ else if(type == File.class)
+ return new FileCLHandler(gmethod,smethod,o,tg,ts);
else
return null;
}
@@ -82,6 +86,9 @@
return new ListSingleSelectionCLHandler<Object>(f,o,t);
else if ( type == ListMultipleSelection.class)
return new
ListMultipleSelectionCLHandler<Object>(f,o,t);
+
+ else if (type == File.class)
+ return new FileCLHandler(f,o,t);
else
return null;
}
Modified:
csplugins/trunk/ucsd/mes/anntun/src/main/java/org/example/tunable/internal/cl/IntCLHandler.java
===================================================================
---
csplugins/trunk/ucsd/mes/anntun/src/main/java/org/example/tunable/internal/cl/IntCLHandler.java
2009-06-09 17:28:54 UTC (rev 16877)
+++
csplugins/trunk/ucsd/mes/anntun/src/main/java/org/example/tunable/internal/cl/IntCLHandler.java
2009-06-09 17:41:39 UTC (rev 16878)
@@ -19,16 +19,12 @@
public IntCLHandler(Method gmethod, Method smethod, Object o, Tunable
tg, Tunable ts){
super(gmethod,smethod,o,tg,ts);
}
-
public void handleLine( CommandLine line ) {
String n = getName();
int ind = n.lastIndexOf(".")+1;
- String fc;
- //if(n.substring(ind).length()<3)fc = n.substring(ind);
- //else fc = n.substring(ind,ind+3);
- fc = n.substring(ind);
+ String fc = n.substring(ind);
try {
if ( line.hasOption( fc ) ) {
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---