コード例 #1
0
ファイル: TodoParser.java プロジェクト: zonghuiyouren/ArgoUML
  /**
   * Called by the XML implementation to signal the end of an XML entity.
   *
   * @param e The XML entity that ends.
   * @throws SAXException on any error
   */
  public void handleEndElement(XMLElement e) throws SAXException {

    try {
      switch (tokens.toToken(e.getName(), false)) {
        case TodoTokenTable.TOKEN_TO_DO:
        case TodoTokenTable.TOKEN_RESOLVEDCRITICS:
        case TodoTokenTable.TOKEN_TO_DO_LIST:
          // NOP
          break;

        case TodoTokenTable.TOKEN_TO_DO_ITEM:
          handleTodoItemEnd(e);
          break;

        case TodoTokenTable.TOKEN_HEADLINE:
          handleHeadline(e);
          break;

        case TodoTokenTable.TOKEN_DESCRIPTION:
          handleDescription(e);
          break;

        case TodoTokenTable.TOKEN_PRIORITY:
          handlePriority(e);
          break;

        case TodoTokenTable.TOKEN_MOREINFOURL:
          handleMoreInfoURL(e);
          break;

        case TodoTokenTable.TOKEN_ISSUE:
          handleIssueEnd(e);
          break;

        case TodoTokenTable.TOKEN_POSTER:
          handlePoster(e);
          break;

        case TodoTokenTable.TOKEN_OFFENDER:
          handleOffender(e);
          break;

        default:
          LOG.log(Level.WARNING, "WARNING: unknown end tag:" + e.getName());
          break;
      }
    } catch (Exception ex) {
      throw new SAXException(ex);
    }
  }
コード例 #2
0
ファイル: TodoParser.java プロジェクト: zonghuiyouren/ArgoUML
  /**
   * Called by the XML implementation to signal the start of an XML entity.
   *
   * @param e The entity being started.
   */
  public void handleStartElement(XMLElement e) {
    // cat.debug("NOTE: TodoParser handleStartTag:" + e.getName());

    try {
      switch (tokens.toToken(e.getName(), true)) {
        case TodoTokenTable.TOKEN_HEADLINE:
        case TodoTokenTable.TOKEN_DESCRIPTION:
        case TodoTokenTable.TOKEN_PRIORITY:
        case TodoTokenTable.TOKEN_MOREINFOURL:
        case TodoTokenTable.TOKEN_POSTER:
        case TodoTokenTable.TOKEN_OFFENDER:
          // NOP
          break;

        case TodoTokenTable.TOKEN_TO_DO:
          handleTodo(e);
          break;

        case TodoTokenTable.TOKEN_TO_DO_LIST:
          handleTodoList(e);
          break;

        case TodoTokenTable.TOKEN_TO_DO_ITEM:
          handleTodoItemStart(e);
          break;

        case TodoTokenTable.TOKEN_RESOLVEDCRITICS:
          handleResolvedCritics(e);
          break;

        case TodoTokenTable.TOKEN_ISSUE:
          handleIssueStart(e);
          break;

        default:
          LOG.log(Level.WARNING, "WARNING: unknown tag:" + e.getName());
          break;
      }
    } catch (Exception ex) {
      LOG.log(Level.SEVERE, "Exception in startelement", ex);
    }
  }