当前位置: 首页>>代码示例>>Java>>正文


Java TestTreeView类代码示例

本文整理汇总了Java中com.intellij.execution.testframework.TestTreeView的典型用法代码示例。如果您正苦于以下问题:Java TestTreeView类的具体用法?Java TestTreeView怎么用?Java TestTreeView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TestTreeView类属于com.intellij.execution.testframework包,在下文中一共展示了TestTreeView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: openDiff

import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
public static boolean openDiff(DataContext context, @Nullable DiffHyperlink currentHyperlink) {
  final AbstractTestProxy testProxy = AbstractTestProxy.DATA_KEY.getData(context);
  final Project project = CommonDataKeys.PROJECT.getData(context);
  if (testProxy != null) {
    DiffHyperlink diffViewerProvider = testProxy.getDiffViewerProvider();
    if (diffViewerProvider != null) {
      final List<DiffHyperlink> providers = collectAvailableProviders(TestTreeView.MODEL_DATA_KEY.getData(context));
      int index = currentHyperlink != null ? providers.indexOf(currentHyperlink) : -1;
      if (index == -1) index = providers.indexOf(diffViewerProvider);
      new MyDiffWindow(project, providers, Math.max(0, index)).show();
      return true;
    }
  }
  if (currentHyperlink != null) {
    new MyDiffWindow(project, currentHyperlink).show();
    return true;
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:ViewAssertEqualsDiffAction.java

示例2: setModel

import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
public void setModel(final JUnitRunningModel model) {
  stopStartingProgress();
  final TestTreeView treeView = model.getTreeView();
  treeView.setLargeModel(true);
  setLeftComponent(treeView);
  myToolbarPanel.setModel(model);
  myStatusLine.setModel(model);

  model.addListener(new JUnitAdapter() {
    @Override
    public void onTestSelected(final TestProxy test) {
      if (myPrinter != null) myPrinter.updateOnTestSelected(test);
    }
  });
  myStatisticsPanel.attachTo(model);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:ConsolePanel.java

示例3: openDiff

import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
public static boolean openDiff(DataContext context, @javax.annotation.Nullable DiffHyperlink currentHyperlink) {
  final AbstractTestProxy testProxy = context.getData(AbstractTestProxy.DATA_KEY);
  final Project project = context.getData(CommonDataKeys.PROJECT);
  if (testProxy != null) {
    DiffHyperlink diffViewerProvider = testProxy.getDiffViewerProvider();
    if (diffViewerProvider != null) {
      final List<DiffHyperlink> providers = collectAvailableProviders(context.getData(TestTreeView.MODEL_DATA_KEY));
      int index = currentHyperlink != null ? providers.indexOf(currentHyperlink) : -1;
      if (index == -1) index = providers.indexOf(diffViewerProvider);
      new MyDiffWindow(project, providers, Math.max(0, index)).show();
      return true;
    }
  }
  if (currentHyperlink != null) {
    new MyDiffWindow(project, currentHyperlink).show();
    return true;
  }
  return false;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:20,代码来源:ViewAssertEqualsDiffAction.java

示例4: getPreferredSize

import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
@NotNull
@Override
public Dimension getPreferredSize() {
  final Dimension preferredSize = super.getPreferredSize();
  return myDurationWidth < 0 || ((TestTreeView)myTree).isExpandableHandlerVisibleForCurrentRow(myRow) 
         ? preferredSize 
         : JBUI.size(preferredSize.width + myDurationWidth, preferredSize.height);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:TestTreeRenderer.java

示例5: getData

import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
@Nullable
@Override
public Object getData(@NonNls String dataId) {
  final TestTreeView view = getTreeView();
  if (view != null) {
    return view.getData(dataId);
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:TestResultsPanel.java

示例6: initUI

import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
@Override
public void initUI() {
  super.initUI();
  final TestTreeView testTreeView = testNGResults.getTreeView();
  testTreeView.getSelectionModel().addTreeSelectionListener(new TreeSelectionListener() {
    public void valueChanged(TreeSelectionEvent e) {
      getPrinter().updateOnTestSelected(testTreeView.getSelectedTest());
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:TestNGConsoleView.java

示例7: attachToTree

import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
public void attachToTree(final TestTreeView treeView) {
  myTreeBuilder = new TestTreeBuilder(treeView, this, myProperties);
  Disposer.register(this, myTreeBuilder);
  myAnimator.setModel(this);
  myTreeView = treeView;
  selectTest(getRoot());
  myTreeListener.install();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:9,代码来源:JUnitRunningModel.java

示例8: getPreferredSize

import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
@Nonnull
@Override
public Dimension getPreferredSize() {
  final Dimension preferredSize = super.getPreferredSize();
  return myDurationWidth < 0 || ((TestTreeView)myTree).isExpandableHandlerVisibleForCurrentRow(myRow)
         ? preferredSize
         : JBUI.size(preferredSize.width + myDurationWidth, preferredSize.height);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:9,代码来源:TestTreeRenderer.java

示例9: getData

import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
@javax.annotation.Nullable
@Override
public Object getData(@Nonnull Key<?> dataId) {
  final TestTreeView view = getTreeView();
  if (view != null) {
    return view.getData(dataId);
  }
  return null;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:TestResultsPanel.java

示例10: customizeCellRenderer

import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
public void customizeCellRenderer(final JTree tree,
                                  final Object value,
                                  final boolean selected,
                                  final boolean expanded,
                                  final boolean leaf,
                                  final int row,
                                  final boolean hasFocus) {
  myRow = row;
  myDurationWidth = -1;
  final DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
  final Object userObj = node.getUserObject();
  if (userObj instanceof SMTRunnerNodeDescriptor) {
    final SMTRunnerNodeDescriptor desc = (SMTRunnerNodeDescriptor)userObj;
    final SMTestProxy testProxy = desc.getElement();

    if (testProxy instanceof SMTestProxy.SMRootTestProxy) {
      SMTestProxy.SMRootTestProxy rootTestProxy = (SMTestProxy.SMRootTestProxy) testProxy;
      if (node.isLeaf()) {
        TestsPresentationUtil.formatRootNodeWithoutChildren(rootTestProxy, this);
      } else {
        TestsPresentationUtil.formatRootNodeWithChildren(rootTestProxy, this);
      }
      if (myAdditionalRootFormatter != null) {
        myAdditionalRootFormatter.format(rootTestProxy, this);
      }
    } else {
      TestsPresentationUtil.formatTestProxy(testProxy, this);
    }

    if (TestConsoleProperties.SHOW_INLINE_STATISTICS.value(myConsoleProperties)) {
      String durationString = testProxy.getDurationString(myConsoleProperties);
      if (durationString != null) {
        durationString = "  " + durationString;
        myDurationWidth = getFontMetrics(getFont()).stringWidth(durationString);
        if (((TestTreeView)myTree).isExpandableHandlerVisibleForCurrentRow(myRow)) {
          append(durationString);
        }
      }
    }
    //Done
    return;
  }

  //strange node
  final String text = node.toString();
  //no icon
  append(text != null ? text : SPACE_STRING, SimpleTextAttributes.GRAYED_ATTRIBUTES);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:49,代码来源:TestTreeRenderer.java

示例11: getTreeView

import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
@Nullable
protected TestTreeView getTreeView() {
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:TestResultsPanel.java

示例12: getUnitTestTree

import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
@NotNull
public UnitTestTreeFixture getUnitTestTree() {
  return new UnitTestTreeFixture(this, myRobot.finder().findByType(myContent.getComponent(), TestTreeView.class));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ExecutionToolWindowFixture.java

示例13: UnitTestTreeFixture

import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
public UnitTestTreeFixture(@NotNull ExecutionToolWindowFixture.ContentFixture contentFixture,
                           @NotNull TestTreeView treeView) {
  myContentFixture = contentFixture;
  myTreeView = treeView;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:UnitTestTreeFixture.java

示例14: getModel

import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
@Nullable
public JUnitRunningModel getModel() {
  return (JUnitRunningModel)myTreeView.getData(TestTreeView.MODEL_DATA_KEY.getName());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:UnitTestTreeFixture.java

示例15: getTreeView

import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
public TestTreeView getTreeView() {
  return myTreeView;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ConsolePanel.java


注:本文中的com.intellij.execution.testframework.TestTreeView类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。