Пример #1
0
  protected boolean _expandNode(
      GuiSubitemTestObject curNode, String curPath, boolean refreshAfterExpand) {
    boolean success = true;

    try {
      logTAFDebug(" < **** > Expanding [" + curPath + "] of [" + curNode + "].....");
      curNode.setState(Action.expand(), atPath(curPath));
      // curNode.doubleClick( atPath(curPath));
      // curNode.setState(Action.expandAndSelect(), atPath(curPath));
    } catch (Exception e) {
      try {
        logTAFDebug(" < **** > Expanding exception [" + e.toString() + "].....");
        if (refreshAfterExpand) {
          refreshWindow((ITopWindow) (curNode.getTopParent()));
          curNode.setState(Action.expand(), atPath(curPath));
        } else {
          throw e;
        }

      } catch (Exception er) {
        success = false;
        // logTAFWarning(er.toString());
      }
    }
    if (!success) {
      logTAFDebug(
          " < **** > Exception while trying to expand [" + curPath + "] of [" + curNode + "]");
    } else {
      logTAFDebug(" < **** > Expand [" + curPath + "] of [" + curNode + "] Success !");
    }
    return success;
  }
Пример #2
0
  protected boolean expandNode(
      GuiSubitemTestObject curNode, String nodePath, boolean refreshWindow) {
    boolean success = true;

    String curFullPath = "";
    String tmpFullPath;
    boolean isAxAddins =
        (nodePath.startsWith(REP_WORKING) || nodePath.startsWith(REP_LIBRARY)) ? false : true;

    int i = 0;

    //		if(refreshWindow){
    //			callScript(pathToKeywordScripts + "viewMenuOperations", new Object[]{"refresh", "No"});
    //		}

    for (String curPath : nodePath.split(SEP_REP_PATH)) {
      curFullPath += curPath;
      success = _expandNode(curNode, curFullPath, refreshWindow);
      if (!success) break;
      if ((i == 2)
          && (!isAxAddins)) { // expand Related Files and Data folder as well for nodePath pointing
                              // to activity
        tmpFullPath = curFullPath + SEP_REP_PATH + NLSUtil.convert2Locale("relatedFilesContainer");
        success = _expandNode(curNode, tmpFullPath, true);
        tmpFullPath = curFullPath + SEP_REP_PATH + NLSUtil.convert2Locale("dataModel");
        success = _expandNode(curNode, tmpFullPath, true);
        tmpFullPath = curFullPath + SEP_REP_PATH + NLSUtil.convert2Locale("resultSet");
        success = _expandNode(curNode, tmpFullPath, true);
        tmpFullPath = curFullPath + SEP_REP_PATH + NLSUtil.convert2Locale("analyticsContainer");
        success = _expandNode(curNode, tmpFullPath, true);
      }

      curFullPath += SEP_REP_PATH;
      i++;
    }
    try {
      refreshWindow((ITopWindow) (curNode.getTopParent()));
    } catch (Exception e) {
      logTAFWarning("Failed to refresh window " + e.toString());
    }
    // logTAFDebug("Trying to expand '"+nodePath+" actual expanded: '"+nodePath+"' success ? =
    // "+success);

    return success;
  }