mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
update statistics for root node if nothing was selected (IDEA-63231)
This commit is contained in:
@@ -79,9 +79,9 @@ class StatisticsPanel extends JPanel implements DataProvider{
|
||||
private void updateStatistics() {
|
||||
myTable.setVisible(true);
|
||||
// myTestCaseInfo.setVisible(false);
|
||||
TestProxy proxy = myCurrentTest;
|
||||
if (myCurrentTest.isLeaf() && myCurrentTest.getParent() != null) {
|
||||
proxy = myCurrentTest.getParent();
|
||||
TestProxy proxy = myCurrentTest != null ? myCurrentTest : myModel.getRoot();
|
||||
if (proxy.isLeaf() && proxy.getParent() != null) {
|
||||
proxy = proxy.getParent();
|
||||
}
|
||||
myChildInfo.updateStatistics(proxy);
|
||||
myTotalLabel.clear();
|
||||
@@ -113,7 +113,10 @@ class StatisticsPanel extends JPanel implements DataProvider{
|
||||
private class MyJUnitListener extends JUnitAdapter {
|
||||
public void onTestChanged(final TestEvent event) {
|
||||
if (!StatisticsPanel.this.isShowing()) return;
|
||||
if (myCurrentTest == event.getSource()) updateStatistics();
|
||||
final TestProxy source = event.getSource();
|
||||
if (myCurrentTest == source || myCurrentTest == null && source == myModel.getRoot()) {
|
||||
updateStatistics();
|
||||
}
|
||||
}
|
||||
|
||||
public void onTestSelected(final TestProxy test) {
|
||||
|
||||
Reference in New Issue
Block a user