public void undo() { try { MethodInvocationManager.invokeMethod( // frame, parentObject, addMethod, addParams); listener.commandActionPerformed(); } catch (Exception e) { System.out.println("Could not undo: " + subtractMethod + " " + e); } }
public Object computeReadValue() { Object readValue; try { readValue = MethodInvocationManager.invokeMethod(readMethod, parentObject, readMethodParams); return Util.deepCopy(readValue); } catch (Exception e) { return null; } }
public Object execute() { try { Object subtractedValue = MethodInvocationManager.invokeMethod( // frame, parentObject, subtractMethod, subtractParams); assignToAddParams(subtractedValue); // listener.commandActionPerformed(); return subtractedValue; } catch (Exception e) { System.out.println("Could not execute: " + subtractMethod + " " + e); return null; } }
public Object execute() { try { if (readMethod != null) { /* Object readValue = uiMethodInvocationManager.invokeMethod(readMethod, parentObject, readMethodParams); */ assignToUndoWriteMethodParams(computeReadValue()); } Object retVal = MethodInvocationManager.invokeMethod( // frame, parentObject, writeMethod, params); // listener.commandActionPerformed(); return retVal; } catch (Exception e) { System.out.println("Could not execute: " + writeMethod + " " + e); return null; } }