Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
24517bb6
Commit
24517bb6
authored
6 years ago
by
Anna.Kozlova
Browse files
Options
Download
Email Patches
Plain Diff
tests tree -> async: remove redundant EDT relocation
parent
78b40d63
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
platform/smRunner/src/com/intellij/execution/testframework/sm/SMRunnerUtil.java
+0
-42
...com/intellij/execution/testframework/sm/SMRunnerUtil.java
platform/smRunner/src/com/intellij/execution/testframework/sm/runner/ui/SMTRunnerConsoleView.java
+1
-3
...tion/testframework/sm/runner/ui/SMTRunnerConsoleView.java
platform/smRunner/src/com/intellij/execution/testframework/sm/runner/ui/SMTestRunnerResultsForm.java
+4
-8
...n/testframework/sm/runner/ui/SMTestRunnerResultsForm.java
with
5 additions
and
53 deletions
+5
-53
platform/smRunner/src/com/intellij/execution/testframework/sm/SMRunnerUtil.java
deleted
100644 → 0
+
0
-
42
View file @
78b40d63
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package
com.intellij.execution.testframework.sm
;
import
com.intellij.openapi.application.Application
;
import
com.intellij.openapi.application.ApplicationManager
;
import
com.intellij.openapi.application.ModalityState
;
import
com.intellij.openapi.diagnostic.Logger
;
import
com.intellij.util.ui.UIUtil
;
/**
* @author Roman Chernyatchik
*/
public
class
SMRunnerUtil
{
private
static
final
Logger
LOG
=
Logger
.
getInstance
(
SMRunnerUtil
.
class
.
getName
());
private
SMRunnerUtil
()
{
}
/**
* Adds runnable to Event Dispatch Queue
* if we aren't in UnitTest of Headless environment mode
* @param runnable Runnable
*/
public
static
void
addToInvokeLater
(
final
Runnable
runnable
)
{
final
Application
application
=
ApplicationManager
.
getApplication
();
if
(
application
.
isHeadlessEnvironment
()
&&
!
application
.
isUnitTestMode
())
{
runnable
.
run
();
}
else
{
UIUtil
.
invokeLaterIfNeeded
(
runnable
);
}
}
public
static
void
runInEventDispatchThread
(
final
Runnable
runnable
,
final
ModalityState
state
)
{
try
{
ApplicationManager
.
getApplication
().
invokeAndWait
(
runnable
,
state
);
}
catch
(
Exception
e
)
{
LOG
.
warn
(
e
);
}
}
}
This diff is collapsed.
Click to expand it.
platform/smRunner/src/com/intellij/execution/testframework/sm/runner/ui/SMTRunnerConsoleView.java
+
1
-
3
View file @
24517bb6
...
...
@@ -19,12 +19,10 @@ import com.intellij.execution.filters.HyperlinkInfo;
import
com.intellij.execution.process.ProcessHandler
;
import
com.intellij.execution.runners.ExecutionEnvironment
;
import
com.intellij.execution.testframework.*
;
import
com.intellij.execution.testframework.sm.SMRunnerUtil
;
import
com.intellij.execution.testframework.sm.runner.SMTestProxy
;
import
com.intellij.execution.testframework.ui.BaseTestsOutputConsoleView
;
import
com.intellij.execution.testframework.ui.TestResultsPanel
;
import
com.intellij.execution.ui.ConsoleViewContentType
;
import
com.intellij.openapi.application.ModalityState
;
import
com.intellij.util.containers.ContainerUtil
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.Nullable
;
...
...
@@ -98,7 +96,7 @@ public class SMTRunnerConsoleView extends BaseTestsOutputConsoleView {
}
// print selected content
SMRunnerUtil
.
runInEventDispatchThread
(()
->
getPrinter
().
updateOnTestSelected
(
selectedTestProxy
)
,
ModalityState
.
NON_MODAL
)
;
getPrinter
().
updateOnTestSelected
(
selectedTestProxy
);
}
});
}
...
...
This diff is collapsed.
Click to expand it.
platform/smRunner/src/com/intellij/execution/testframework/sm/runner/ui/SMTestRunnerResultsForm.java
+
4
-
8
View file @
24517bb6
...
...
@@ -25,7 +25,6 @@ import com.intellij.execution.process.ProcessOutputTypes;
import
com.intellij.execution.testframework.*
;
import
com.intellij.execution.testframework.actions.ScrollToTestSourceAction
;
import
com.intellij.execution.testframework.export.TestResultsXmlFormatter
;
import
com.intellij.execution.testframework.sm.SMRunnerUtil
;
import
com.intellij.execution.testframework.sm.TestHistoryConfiguration
;
import
com.intellij.execution.testframework.sm.runner.*
;
import
com.intellij.execution.testframework.sm.runner.history.ImportedTestConsoleProperties
;
...
...
@@ -38,7 +37,6 @@ import com.intellij.ide.util.treeView.IndexComparator;
import
com.intellij.openapi.Disposable
;
import
com.intellij.openapi.actionSystem.AnAction
;
import
com.intellij.openapi.actionSystem.LangDataKeys
;
import
com.intellij.openapi.application.ModalityState
;
import
com.intellij.openapi.diagnostic.Logger
;
import
com.intellij.openapi.editor.colors.EditorColorsManager
;
import
com.intellij.openapi.progress.ProcessCanceledException
;
...
...
@@ -622,12 +620,10 @@ public class SMTestRunnerResultsForm extends TestResultsPanel
return
;
}
SMRunnerUtil
.
runInEventDispatchThread
(()
->
{
if
(
myTreeBuilder
.
isDisposed
())
{
return
;
}
myTreeBuilder
.
select
(
testProxy
,
onDone
);
},
ModalityState
.
NON_MODAL
);
if
(
myTreeBuilder
.
isDisposed
())
{
return
;
}
myTreeBuilder
.
select
(
testProxy
,
onDone
);
}
private
void
updateStatusLabel
(
final
boolean
testingFinished
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment