Package org.testng.eclipse.ui.tree

Examples of org.testng.eclipse.ui.tree.ITreeItem


  }

  @Override
  public void setSelectedTest(String testId) {
    if (testId == null) return;
    ITreeItem node = m_treeItemMap.get(testId);
    if (node != null) {
      m_tree.select(node.getTreeItem());
    } else {
      m_tree.deselectAll();
    }
  }
View Full Code Here


//
//    if (m_stackViewIcon != null) m_stackViewIcon.dispose();
  }

  void handleDoubleClick(MouseEvent e) {
    ITreeItem testInfo = getSelectedTreeItem();

    if (null == testInfo) {
      return;
    }

    if (testInfo instanceof TestMethodTreeItem) {
      OpenTestAction action = new OpenTestAction(m_testRunnerPart, testInfo.getRunInfo());
     
      if(action.isEnabled()) {
        action.run();
      }
    }
View Full Code Here

   */
  @Override
  public void updateTestResult(RunInfo runInfo, boolean expand) {
    m_runInfos.add(runInfo);
    if (acceptTestResult(runInfo) && matchesSearchFilter(runInfo)) {
      ITreeItem suite = m_suites.get(runInfo.getSuiteName());
      if (suite == null) {
        suite = new SuiteTreeItem(m_tree, runInfo);
        m_suites.put(runInfo.getSuiteName(), suite);
      }
      String pathToTest = runInfo.getSuiteName() + "#" + runInfo.getTestName();
      ITreeItem test = m_tests.get(pathToTest);
      if (test == null) {
        test = new TestTreeItem(suite.getTreeItem(), runInfo);
        m_tests.put(pathToTest, test);
      }
      String pathToClass = pathToTest + "#" + runInfo.getInstanceName();
      ITreeItem cls = m_classes.get(pathToClass);
      if (cls == null) {
        cls = new ClassTreeItem(test.getTreeItem(), runInfo);
        m_classes.put(pathToClass, cls);
      }
      String pathToMethod = pathToClass + "#" + runInfo.getMethodName();
      ITreeItem method = m_methods.get(pathToMethod);
      if (method == null) {
        method = new TestMethodTreeItem(cls.getTreeItem(), runInfo);
        m_methods.put(pathToMethod, method);
      }

      // Create a node for the parameter values, if applicable
      ITreeItem methodParam = null;
      if (!StringUtils.isEmptyString(runInfo.getParametersDisplay())) {
        methodParam = new TestMethodParametersTreeItem(method.getTreeItem(),
            runInfo);
        methodParam.addToCumulatedTime(runInfo);
      }
      if (expand) {
        suite.getTreeItem().setExpanded(true);
        test.getTreeItem().setExpanded(true);
        cls.getTreeItem().setExpanded(true);
        method.getTreeItem().setExpanded(true);
        if (methodParam != null) {
          methodParam.getTreeItem().setExpanded(true);
          focus(methodParam.getTreeItem());
        } else {
          focus(method.getTreeItem());
        }
      }
      suite.addToCumulatedTime(runInfo);
View Full Code Here

TOP

Related Classes of org.testng.eclipse.ui.tree.ITreeItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.