mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
Logging of the reason of highlighting cancelled for WaitForFinishedCodeAnalysis
GitOrigin-RevId: 87bf64323264d2ea6b0c1a759d164a3482ad53c7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ff85a4fbe2
commit
0d546ea6a4
@@ -113,7 +113,11 @@ class ListenerState(val project: Project, val cs: CoroutineScope) {
|
|||||||
locked = false
|
locked = false
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sessions.forEach { printCodeAnalyzerStatistis(it.key.editor) }
|
//Printing additional information to get information why huglighting was stucked
|
||||||
|
sessions.forEach {
|
||||||
|
printCodeAnalyzerStatistis(it.key.editor)
|
||||||
|
printFileStatus(it.key.editor)
|
||||||
|
}
|
||||||
LOG.info("Highlighting still in progress: ${sessions.keys.joinToString(separator = ",\n") { it.description }}")
|
LOG.info("Highlighting still in progress: ${sessions.keys.joinToString(separator = ",\n") { it.description }}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -254,6 +258,19 @@ class ListenerState(val project: Project, val cs: CoroutineScope) {
|
|||||||
LOG.warn("Print Analyzer status failed")
|
LOG.warn("Print Analyzer status failed")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal fun printFileStatus(editor: Editor) {
|
||||||
|
try {
|
||||||
|
val fileStatus = (DaemonCodeAnalyzerImpl.getInstance(project) as DaemonCodeAnalyzerImpl)
|
||||||
|
.fileStatusMap
|
||||||
|
.toString(editor.document)
|
||||||
|
LOG.info("File status map $fileStatus")
|
||||||
|
}
|
||||||
|
catch (throwable: Throwable) {
|
||||||
|
LOG.warn("Print Analyzer status map failed")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class SimpleEditedDocumentsListener(private val project: Project) : BulkAwareDocumentListener.Simple {
|
private class SimpleEditedDocumentsListener(private val project: Project) : BulkAwareDocumentListener.Simple {
|
||||||
|
|||||||
Reference in New Issue
Block a user