mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[kotlin] clear focusMode used in tests
GitOrigin-RevId: 47f318492a84af8bc07e225a36b45eb529f3b6b1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f920cccc5c
commit
fc97b3c3fb
@@ -65,6 +65,9 @@ import java.nio.file.Path
|
||||
import java.nio.file.Paths
|
||||
import kotlin.io.path.exists
|
||||
|
||||
/**
|
||||
* @property focusMode should be cleared explicitly by caller
|
||||
*/
|
||||
@Ignore
|
||||
class CodeMetaInfoTestCase(
|
||||
val codeMetaInfoTypes: Collection<AbstractCodeMetaInfoRenderConfiguration>,
|
||||
|
||||
@@ -3,7 +3,9 @@ package org.jetbrains.kotlin.idea.highlighter
|
||||
|
||||
import com.intellij.codeInsight.daemon.impl.HighlightInfoType
|
||||
import com.intellij.lang.annotation.HighlightSeverity
|
||||
import com.intellij.openapi.editor.ex.EditorSettingsExternalizable
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.Disposer
|
||||
import com.intellij.psi.PsiFile
|
||||
import it.unimi.dsi.fastutil.Hash
|
||||
import it.unimi.dsi.fastutil.objects.ObjectOpenCustomHashSet
|
||||
@@ -51,7 +53,12 @@ fun checkHighlighting(
|
||||
focusMode = expectedHighlightingFile.parentFile.name == "focusMode"
|
||||
)
|
||||
|
||||
codeMetaInfoTestCase.checkFile(file.virtualFile, expectedHighlightingFile, project)
|
||||
val oldMode = EditorSettingsExternalizable.getInstance().isFocusMode
|
||||
try {
|
||||
codeMetaInfoTestCase.checkFile(file.virtualFile, expectedHighlightingFile, project)
|
||||
} finally {
|
||||
EditorSettingsExternalizable.getInstance().isFocusMode = oldMode
|
||||
}
|
||||
}
|
||||
|
||||
private fun Directives.highlightSeverity(): HighlightSeverity? {
|
||||
|
||||
Reference in New Issue
Block a user