tests tree: speed search over presentable name (IDEA-199433)

inner name includes name of a containing class
This commit is contained in:
Anna.Kozlova
2018-09-25 15:59:22 +02:00
parent dc300acd69
commit e2f36741a6
2 changed files with 11 additions and 1 deletions
@@ -15,6 +15,7 @@
*/
package com.intellij.execution.testframework.sm.runner.ui;
import com.intellij.execution.testframework.AbstractTestProxy;
import com.intellij.execution.testframework.TestConsoleProperties;
import com.intellij.execution.testframework.TestTreeView;
import com.intellij.execution.testframework.sm.runner.SMTRunnerNodeDescriptor;
@@ -75,4 +76,9 @@ public class SMTRunnerTestTreeView extends TestTreeView {
}
return super.getData(dataId);
}
@Override
protected String getPresentableName(AbstractTestProxy testProxy) {
return ((SMTestProxy)testProxy).getPresentableName();
}
}
@@ -192,7 +192,7 @@ public abstract class TestTreeView extends Tree implements DataProvider, CopyPro
new TreeSpeedSearch(this, path -> {
final AbstractTestProxy testProxy = getSelectedTest(path);
if (testProxy == null) return null;
return testProxy.getName();
return getPresentableName(testProxy);
});
TreeUtil.installActions(this);
PopupHandler.installPopupHandler(this, IdeActions.GROUP_TESTTREE_POPUP, ActionPlaces.TESTTREE_VIEW_POPUP);
@@ -210,6 +210,10 @@ public abstract class TestTreeView extends Tree implements DataProvider, CopyPro
});
}
protected String getPresentableName(AbstractTestProxy testProxy) {
return testProxy.getName();
}
public boolean isExpandableHandlerVisibleForCurrentRow(int row) {
final ExpandableItemsHandler<Integer> handler = getExpandableItemsHandler();
final Collection<Integer> items = handler.getExpandedItems();