private void updateArgumentPreview(IArgumentsInfo launcherArguments) {
   StringBuffer buffer = new StringBuffer();
   String delim = System.getProperty("line.separator"); // $NON-NLS-1$
   String args =
       launcherArguments.getCompleteProgramArguments(
           TAB_LABELS[fLastTab], TAB_ARCHLABELS[fLastArch[fLastTab]]);
   if (args.length() > 0) {
     buffer.append(PDEUIMessages.ArgumentsSection_program);
     buffer.append(delim);
     buffer.append(args);
     buffer.append(delim);
     buffer.append(delim);
   }
   args =
       launcherArguments.getCompleteVMArguments(
           TAB_LABELS[fLastTab], TAB_ARCHLABELS[fLastArch[fLastTab]]);
   if (args.length() > 0) {
     buffer.append(PDEUIMessages.ArgumentsSection_vm);
     buffer.append(delim);
     buffer.append(args);
   }
   fPreviewArgs.setValue(buffer.toString());
 }
    /** Returns the next lexical token in the document. */
    public int nextToken() {
      int c;
      fStartToken = fPos;
      while (true) {
        switch (c = read()) {
          case EOF:
            return EOF;
          case '/': // comment
            c = read();
            if (c == '/') {
              while (true) {
                c = read();
                if ((c == EOF) || (c == EOL)) {
                  unread(c);
                  return COMMENT;
                }
              }
            } else {
              unread(c);
            }
            return OTHER;
          case '\'': // char const
            character:
            for (; ; ) {
              c = read();
              switch (c) {
                case '\'':
                  return STRING;
                case EOF:
                  unread(c);
                  return STRING;
                case '\\':
                  c = read();
                  break;
              }
            }

          case '"': // string
            string:
            for (; ; ) {
              c = read();
              switch (c) {
                case '"':
                  return STRING;
                case EOF:
                  unread(c);
                  return STRING;
                case '\\':
                  c = read();
                  break;
              }
            }

          case '0':
          case '1':
          case '2':
          case '3':
          case '4':
          case '5':
          case '6':
          case '7':
          case '8':
          case '9':
            do {
              c = read();
            } while (Character.isDigit((char) c));
            unread(c);
            return NUMBER;
          default:
            if (Character.isWhitespace((char) c)) {
              do {
                c = read();
              } while (Character.isWhitespace((char) c));
              unread(c);
              return WHITE;
            }
            if (Character.isJavaIdentifierStart((char) c)) {
              fBuffer.setLength(0);
              do {
                fBuffer.append((char) c);
                c = read();
              } while (Character.isJavaIdentifierPart((char) c));
              unread(c);
              Integer i = (Integer) fgKeys.get(fBuffer.toString());
              if (i != null) return i.intValue();
              return WORD;
            }
            return OTHER;
        }
      }
    }
 protected void log(final String msg) {
   content.insert(0, msg.trim() + text.getLineDelimiter());
   text.setText(content.toString());
 }