mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup [injection testFramework]: drop unnecessary ?: and !!
GitOrigin-RevId: 54773f83ef7a24528faeae93cf0bed197b61d5be
This commit is contained in:
committed by
intellij-monorepo-bot
parent
20d1b01a3e
commit
2c19d9ba1d
+2
-2
@@ -31,7 +31,7 @@ class InjectionTestFixture(private val javaFixture: CodeInsightTestFixture) {
|
||||
|
||||
val injectedElement: PsiElement?
|
||||
get() {
|
||||
return injectedLanguageManager.findInjectedElementAt(topLevelFile ?: return null, topLevelCaretPosition)
|
||||
return injectedLanguageManager.findInjectedElementAt(topLevelFile, topLevelCaretPosition)
|
||||
}
|
||||
|
||||
fun assertInjectedLangAtCaret(lang: String?) {
|
||||
@@ -118,7 +118,7 @@ class InjectionTestFixture(private val javaFixture: CodeInsightTestFixture) {
|
||||
get() = topLevelEditor.caretModel.offset
|
||||
|
||||
val topLevelEditor: Editor
|
||||
get() = (FileEditorManager.getInstance(javaFixture.project).getSelectedEditor(topLevelFile!!.virtualFile) as TextEditor).editor
|
||||
get() = (FileEditorManager.getInstance(javaFixture.project).getSelectedEditor(topLevelFile.virtualFile) as TextEditor).editor
|
||||
}
|
||||
|
||||
data class InjectionAssertionData(val text: String, val injectedLanguage: String? = null) {
|
||||
|
||||
Reference in New Issue
Block a user