[Analysis API] ExpressionMarkerProvider: do not expose implementation details
And add API for selected expressions ^KT-64805
This commit is contained in:
committed by
Space Team
parent
663b7fb76f
commit
a7984c6794
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -26,7 +26,7 @@ abstract class AbstractAnalysisApiKtTypeByPsiTypeProviderTest : AbstractAnalysis
|
||||
val psiMethod = moduleStructure.modules.map { module ->
|
||||
val psiFiles = testServices.ktModuleProvider.getModuleFiles(module).filterIsInstance<PsiJavaFile>()
|
||||
val javaFile = psiFiles.first()
|
||||
val offset = testServices.expressionMarkerProvider.carets.getCaretOffset(javaFile.name, null)!!
|
||||
val offset = testServices.expressionMarkerProvider.getCaretPosition(javaFile)
|
||||
PsiTreeUtil.getParentOfType(javaFile.findElementAt(offset), PsiMethod::class.java)
|
||||
}.single()!!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user