本文整理汇总了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;
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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());
}
});
}
示例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();
}
示例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);
}
示例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;
}
示例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);
}
示例11: getTreeView
import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
@Nullable
protected TestTreeView getTreeView() {
return null;
}
示例12: getUnitTestTree
import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
@NotNull
public UnitTestTreeFixture getUnitTestTree() {
return new UnitTestTreeFixture(this, myRobot.finder().findByType(myContent.getComponent(), TestTreeView.class));
}
示例13: UnitTestTreeFixture
import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
public UnitTestTreeFixture(@NotNull ExecutionToolWindowFixture.ContentFixture contentFixture,
@NotNull TestTreeView treeView) {
myContentFixture = contentFixture;
myTreeView = treeView;
}
示例14: getModel
import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
@Nullable
public JUnitRunningModel getModel() {
return (JUnitRunningModel)myTreeView.getData(TestTreeView.MODEL_DATA_KEY.getName());
}
示例15: getTreeView
import com.intellij.execution.testframework.TestTreeView; //导入依赖的package包/类
public TestTreeView getTreeView() {
return myTreeView;
}