Changeset 41 for trunk/src/org/expeditee/actions/Actions.java
- Timestamp:
- 05/14/08 12:34:46 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/actions/Actions.java
r21 r41 244 244 */ 245 245 public static void PerformAction(Frame source, Item launcher, String command) { 246 FrameIO.SaveFrame(source, false); 246 if (!command.equalsIgnoreCase("Restore")) 247 FrameIO.SaveFrame(source, false); 247 248 248 249 // separate method name and parameter names … … 426 427 // while (_Agent.isRunning()) 427 428 // ; 428 429 429 // FrameGraphics.DisplayMessage("Agent Stopped."); 430 430 } … … 436 436 } 437 437 } 438 439 /**440 * Takes a list of Methods and finds one that accepts the given list of441 * objects as parameters442 *443 * @param possibleMethods444 * The list of Methods to search through445 * @param parameters446 * The array of parameters that the Method should accept447 * @return The Method found if one was found, otherwise null448 */449 /*450 * private static Method FindCompatibleMethods(List<Method>451 * possibleMethods, Object[] parameters){ Method toRun = null;452 *453 * for(Method m : possibleMethods){ //the number of parameters must be the454 * same if(parameters.length == m.getParameterTypes().length){ //if no455 * methods are required, there is nothing else to check if(parameters.length ==456 * 0) toRun = m; else //check that the list of parameters are of the right457 * types for(int i = 0; i < parameters.length; i++){458 * if(m.getParameterTypes()[i].isInstance(parameters[i])) toRun = m; else459 * toRun = null; }460 *461 * //if a method has been found already, there is no need to keep searching462 * if(toRun != null) break; } }463 *464 * return toRun; }465 */466 438 467 439 /** … … 527 499 528 500 return objects; 529 530 // strip off the first parameter531 532 /*533 * //the list of objects to return List<Object> returnParams = new534 * ArrayList<Object>(); if(launcher != null)535 * returnParams.add(launcher);536 *537 * while(param != null){ /* //the parameter is a String538 * if(param.charAt(0) == '"') returnParams.add(param.substring(1,539 * param.length() - 1)); else{ //try to parse an int try{ int val =540 * Integer.parseInt(param); returnParams.add(val);541 * }catch(NumberFormatException nfe){ System.out.println("Type not found542 * for: " + param); } }543 *544 * if(param.length() < values.length()) values =545 * values.substring(param.length() + 1); else values = "";546 */547 548 // returnParams.add(KMSConversion.Convert(type, value))549 // get the next value550 /*551 * param = ParseValue(values); }552 *553 * return returnParams.toArray();554 */555 501 } 556 502
Note:
See TracChangeset
for help on using the changeset viewer.