Example #1
0
  public void execute(Context context, Object[] parameterArray) throws KOMException {
    MessageLocator ml;

    // If we were passed a text number, use it..
    //
    if (null != parameterArray[0]) {
      ml = (MessageLocator) parameterArray[0];
    }

    // Otherwise, assume we're operating on the last read message.
    //
    else {
      ml = new MessageLocator(context.getSession().getCurrentMessage());
    }

    // Call the backend to get the first message in the thread, and read it.
    //
    Envelope env =
        context
            .getSession()
            .readMessage(new MessageLocator(context.getSession().getThreadIdForMessage(ml)));
    context.getMessagePrinter().printMessage(context, env);
  }
 public Object resolveFoundObject(Context context, Match match)
     throws IOException, InterruptedException, KOMException {
   Parser parser = context.getParser();
   Command command = parser.getMatchingCommand(context, match.getMatchedString());
   return command;
 }
 public void execute(Context context, Object[] parameterArray) throws KOMException {
   DisplayController dc = context.getDisplayController();
   dc.output();
   this.innerExecute(context, parameterArray);
 }