@@ -56,7 +56,7 @@ abstract class AbstractJvmLanguageService(protected val project: Project, protec
5656
5757
5858 init {
59- Log .trace(logger, " Initializing language service {}" , javaClass)
59+ Log .trace(logger,project, " Initializing language service {}" , javaClass)
6060 }
6161
6262 override fun dispose () {
@@ -93,21 +93,21 @@ abstract class AbstractJvmLanguageService(protected val project: Project, protec
9393 EDT .assertNonDispatchThread()
9494 ReadActions .assertNotInReadAccess()
9595
96- Log .trace(logger, " got buildDocumentInfo request for {}" , virtualFile)
96+ Log .trace(logger,project, " got buildDocumentInfo request for {}" , virtualFile)
9797
9898 val psiFile = smartReadAction(project) {
9999 val psiFile = PsiManager .getInstance(project).findFile(virtualFile)
100100 if (psiFile == null ) {
101- Log .trace(logger, " buildDocumentInfo: could not find psiFile for {}" , virtualFile)
101+ Log .trace(logger,project, " buildDocumentInfo: could not find psiFile for {}" , virtualFile)
102102 null
103103 } else if (! PsiUtils .isValidPsiFile(psiFile)) {
104- Log .trace(logger, " buildDocumentInfo: psiFile is not valid for {}" , virtualFile)
104+ Log .trace(logger,project, " buildDocumentInfo: psiFile is not valid for {}" , virtualFile)
105105 null
106106 } else if (! isSupportedFile(psiFile)) {
107- Log .trace(logger, " buildDocumentInfo: psiFile is not supported for {}" , virtualFile)
107+ Log .trace(logger,project, " buildDocumentInfo: psiFile is not supported for {}" , virtualFile)
108108 null
109109 } else if (! isProjectValid(project)) {
110- Log .trace(logger, " buildDocumentInfo: project is not valid for {}" , virtualFile)
110+ Log .trace(logger,project, " buildDocumentInfo: project is not valid for {}" , virtualFile)
111111 null
112112 } else {
113113 psiFile
@@ -130,7 +130,7 @@ abstract class AbstractJvmLanguageService(protected val project: Project, protec
130130
131131 // try to parse the methodId as if it is java and try to find the language
132132 if (methodId.indexOf(" \$ _$" ) <= 0 ) {
133- Log .trace(logger, " method id in getLanguageForMethodCodeObjectId does not contain \$ _$ {}" , methodId)
133+ Log .trace(logger,project, " method id in getLanguageForMethodCodeObjectId does not contain \$ _$ {}" , methodId)
134134 return null
135135 }
136136
@@ -302,7 +302,7 @@ abstract class AbstractJvmLanguageService(protected val project: Project, protec
302302 val methodInfo = documentInfo.methods[methodId]
303303 if (methodInfo != null ) {
304304 val endpointInfo = methodInfo.endpoints.firstOrNull { endpointInfo: EndpointInfo ->
305- endpointInfo.textRange? .contains(caretOffset) ? : false
305+ endpointInfo.textRange.contains(caretOffset)
306306 }
307307
308308 if (endpointInfo != null ) {
@@ -316,10 +316,10 @@ abstract class AbstractJvmLanguageService(protected val project: Project, protec
316316
317317 override suspend fun navigateToMethod (methodId : String ) {
318318
319- Log .trace(logger, " got navigate to method request {}" , methodId)
319+ Log .trace(logger,project, " got navigate to method request {}" , methodId)
320320
321321 if (methodId.indexOf(" \$ _$" ) <= 0 ) {
322- Log .trace(logger, " method id in navigateToMethod does not contain \$ _$, can not navigate {}" , methodId)
322+ Log .trace(logger,project, " method id in navigateToMethod does not contain \$ _$, can not navigate {}" , methodId)
323323 return
324324 }
325325
@@ -331,17 +331,17 @@ abstract class AbstractJvmLanguageService(protected val project: Project, protec
331331 cls?.let {
332332 val method = findMethodInClass(it, methodId)
333333 if (method?.sourcePsi is Navigatable && (method.sourcePsi as Navigatable ).canNavigate()) {
334- Log .trace(logger, " can navigate to method {}" , method)
334+ Log .trace(logger,project, " can navigate to method {}" , method)
335335 method
336336 } else {
337- Log .trace(logger, " can not navigate to method {}" , method)
337+ Log .trace(logger,project, " can not navigate to method {}" , method)
338338 null
339339 }
340340 }
341341 }
342342 method?.let {
343343 withContext(Dispatchers .EDT ) {
344- Log .trace(logger, " navigating to method {}" , method)
344+ Log .trace(logger,project, " navigating to method {}" , method)
345345 (it.sourcePsi as Navigatable ).navigate(true )
346346 }
347347 }
@@ -350,10 +350,10 @@ abstract class AbstractJvmLanguageService(protected val project: Project, protec
350350
351351 override suspend fun findMethodPsiElementByMethodId (methodId : String ): PsiElement ? {
352352
353- Log .trace(logger, " got getPsiElementForMethod request {}" , methodId)
353+ Log .trace(logger,project, " got getPsiElementForMethod request {}" , methodId)
354354
355355 if (methodId.indexOf(" \$ _$" ) <= 0 ) {
356- Log .trace(logger, " method id in getPsiElementForMethod does not contain \$ _$, can not find psi element {}" , methodId)
356+ Log .trace(logger,project, " method id in getPsiElementForMethod does not contain \$ _$, can not find psi element {}" , methodId)
357357 return null
358358 }
359359
@@ -372,10 +372,10 @@ abstract class AbstractJvmLanguageService(protected val project: Project, protec
372372
373373 override suspend fun findClassPsiElementByMethodId (methodId : String ): PsiElement ? {
374374
375- Log .trace(logger, " got getClassPsiElementByMethodId request {}" , methodId)
375+ Log .trace(logger,project, " got getClassPsiElementByMethodId request {}" , methodId)
376376
377377 if (methodId.indexOf(" \$ _$" ) <= 0 ) {
378- Log .trace(logger, " method id in getClassPsiElementByMethodId does not contain \$ _$, can not navigate {}" , methodId)
378+ Log .trace(logger,project, " method id in getClassPsiElementByMethodId does not contain \$ _$, can not navigate {}" , methodId)
379379 return null
380380 }
381381
@@ -386,7 +386,7 @@ abstract class AbstractJvmLanguageService(protected val project: Project, protec
386386
387387 override suspend fun findClassPsiElementByClassName (className : String ): PsiElement ? {
388388
389- Log .trace(logger, " got getClassPsiElementByClassName request {}" , className)
389+ Log .trace(logger,project, " got getClassPsiElementByClassName request {}" , className)
390390
391391 // the code object id for inner classes separates inner classes name with $, but intellij index them with a dot
392392 val classNameToFind = className.replace(' $' , ' .' )
0 commit comments