mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cosmetics
This commit is contained in:
committed by
Dennis Ushakov
parent
d55090905f
commit
4c7f838dff
+2
-15
@@ -42,11 +42,10 @@ public class SMTRunnerConsoleView extends BaseTestsOutputConsoleView {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param consoleProperties
|
||||
* @param runnerSettings
|
||||
* @param configurationPerRunnerSettings
|
||||
* @param splitterProperty Key to store(project level) latest value of testTree/consoleTab splitter. E.g. "RSpec.Splitter.Proportion"
|
||||
* @param splitterProperty Key to store(project level) latest value of testTree/consoleTab splitter. E.g. "RSpec.Splitter.Proportion"
|
||||
*/
|
||||
public SMTRunnerConsoleView(final TestConsoleProperties consoleProperties, final RunnerSettings runnerSettings,
|
||||
final ConfigurationPerRunnerSettings configurationPerRunnerSettings,
|
||||
@@ -73,19 +72,7 @@ public class SMTRunnerConsoleView extends BaseTestsOutputConsoleView {
|
||||
super.initUI();
|
||||
|
||||
// Console
|
||||
myResultsViewer.addEventsListener(new TestResultsViewer.EventsListener() {
|
||||
public void onTestNodeAdded(TestResultsViewer sender, SMTestProxy test) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
public void onTestingStarted(TestResultsViewer sender) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
public void onTestingFinished(TestResultsViewer sender) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
myResultsViewer.addEventsListener(new TestResultsViewer.SMEventsAdapter() {
|
||||
public void onSelected(@Nullable final SMTestProxy selectedTestProxy,
|
||||
@NotNull final TestResultsViewer viewer,
|
||||
@NotNull final TestFrameworkRunningModel model) {
|
||||
|
||||
+7
-9
@@ -32,7 +32,7 @@ import java.util.List;
|
||||
/**
|
||||
* @author Roman Chernyatchik
|
||||
*/
|
||||
public class SMTRunnerUIActionsHandler implements TestResultsViewer.EventsListener {
|
||||
public class SMTRunnerUIActionsHandler extends TestResultsViewer.SMEventsAdapter {
|
||||
private final TestConsoleProperties myConsoleProperties;
|
||||
|
||||
public SMTRunnerUIActionsHandler(final TestConsoleProperties consoleProperties) {
|
||||
@@ -45,10 +45,6 @@ public class SMTRunnerUIActionsHandler implements TestResultsViewer.EventsListen
|
||||
}
|
||||
}
|
||||
|
||||
public void onTestingStarted(TestResultsViewer sender) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
public void onTestingFinished(final TestResultsViewer sender) {
|
||||
// select first defect at the end (my be TRACK_RUNNING_TEST was enabled and affects on the fly selection)
|
||||
final SMTestProxy testsRootNode = sender.getTestsRootNode();
|
||||
@@ -60,12 +56,14 @@ public class SMTRunnerUIActionsHandler implements TestResultsViewer.EventsListen
|
||||
final List<SMTestProxy> allTests = testsRootNode.getAllTests();
|
||||
final AbstractTestProxy firstError = ProxyFilters.ERROR_LEAF.detectIn(allTests);
|
||||
if (firstError != null) {
|
||||
firstDefect = firstError;
|
||||
} else {
|
||||
firstDefect = firstError;
|
||||
}
|
||||
else {
|
||||
final AbstractTestProxy firstFailure = ProxyFilters.FAILURE_LEAF.detectIn(allTests);
|
||||
if (firstFailure != null) {
|
||||
firstDefect = firstFailure;
|
||||
} else {
|
||||
firstDefect = firstFailure;
|
||||
}
|
||||
else {
|
||||
firstDefect = null;
|
||||
}
|
||||
}
|
||||
|
||||
+13
-5
@@ -28,12 +28,14 @@ import org.jetbrains.annotations.Nullable;
|
||||
public interface TestResultsViewer extends Disposable {
|
||||
/**
|
||||
* Fake Root for toplevel test suits/tests
|
||||
*
|
||||
* @return root
|
||||
*/
|
||||
SMTestProxy getTestsRootNode();
|
||||
|
||||
/**
|
||||
* Selects test or suite in Tests tree and notify about selection changed
|
||||
*
|
||||
* @param proxy
|
||||
*/
|
||||
void selectAndNotify(@Nullable AbstractTestProxy proxy);
|
||||
@@ -49,24 +51,30 @@ public interface TestResultsViewer extends Disposable {
|
||||
|
||||
interface EventsListener extends TestProxyTreeSelectionListener {
|
||||
void onTestingStarted(TestResultsViewer sender);
|
||||
|
||||
void onTestingFinished(TestResultsViewer sender);
|
||||
|
||||
void onTestNodeAdded(TestResultsViewer sender, SMTestProxy test);
|
||||
}
|
||||
|
||||
class SMEventsAdapter implements EventsListener {
|
||||
class SMEventsAdapter implements EventsListener {
|
||||
|
||||
@Override
|
||||
public void onTestingStarted(TestResultsViewer sender) {}
|
||||
public void onTestingStarted(TestResultsViewer sender) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTestingFinished(TestResultsViewer sender) {}
|
||||
public void onTestingFinished(TestResultsViewer sender) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTestNodeAdded(TestResultsViewer sender, SMTestProxy test) {}
|
||||
public void onTestNodeAdded(TestResultsViewer sender, SMTestProxy test) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSelected(@Nullable SMTestProxy selectedTestProxy,
|
||||
@NotNull TestResultsViewer viewer,
|
||||
@NotNull TestFrameworkRunningModel model) {}
|
||||
@NotNull TestFrameworkRunningModel model) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user