FIR IDE: add check canceled between diagnostics
This commit is contained in:
+3
@@ -62,9 +62,12 @@ abstract class AbstractDiagnosticCollector(
|
||||
componentsInitialized = true
|
||||
}
|
||||
|
||||
protected open fun beforeCollecting() {}
|
||||
|
||||
private inner class Visitor : FirDefaultVisitor<Unit, Nothing?>() {
|
||||
private fun <T : FirElement> T.runComponents() {
|
||||
components.forEach {
|
||||
beforeCollecting()
|
||||
this.accept(it, context)
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -48,6 +48,10 @@ internal abstract class AbstractFirIdeDiagnosticsCollector(
|
||||
reporter = Reporter()
|
||||
}
|
||||
|
||||
override fun beforeCollecting() {
|
||||
checkCanceled()
|
||||
}
|
||||
|
||||
override fun getCollectedDiagnostics(): Iterable<FirDiagnostic<*>> {
|
||||
// Not necessary in IDE
|
||||
return emptyList()
|
||||
|
||||
Reference in New Issue
Block a user