mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
highlighting tests optimization: do not run highlighting pass if its results are going to be ignored in tests
GitOrigin-RevId: c6926fef6c415e1ba257cb164bd4a5e0648bccf1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
318ad51f37
commit
abc3b389c4
+6
-5
@@ -24,7 +24,12 @@ abstract class AbstractHighlightingPassBase(
|
||||
|
||||
override fun doCollectInformation(progress: ProgressIndicator) {
|
||||
val holder = HighlightInfoHolder(file)
|
||||
runAnnotatorWithContext(file, holder)
|
||||
if (IGNORE_IN_TESTS) {
|
||||
assert(ApplicationManager.getApplication().isUnitTestMode)
|
||||
}
|
||||
else {
|
||||
runAnnotatorWithContext(file, holder)
|
||||
}
|
||||
applyInformationInBackground(holder)
|
||||
}
|
||||
|
||||
@@ -55,10 +60,6 @@ abstract class AbstractHighlightingPassBase(
|
||||
}
|
||||
|
||||
private fun applyInformationInBackground(holder: HighlightInfoHolder) {
|
||||
if (IGNORE_IN_TESTS) {
|
||||
assert(ApplicationManager.getApplication().isUnitTestMode)
|
||||
return
|
||||
}
|
||||
val result:MutableList<HighlightInfo> = ArrayList(holder.size())
|
||||
for (i in 0 until holder.size()) {
|
||||
result.add(holder.get(i))
|
||||
|
||||
Reference in New Issue
Block a user