Skip to content

Commit

Permalink
Run inspections after completion of general highlight pass in 201
Browse files Browse the repository at this point in the history
#KT-37553 Fixed

(cherry picked from commit e1ae81e)
  • Loading branch information
vladimirdolzhenko committed Mar 18, 2020
1 parent 52cb5bf commit 5519806
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions idea/src/org/jetbrains/kotlin/idea/PluginStartupActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public void runActivity(@NotNull Project project) {
registerAdditionalResourceBundleInTests();
}

StartupCompatKt.runActivity(project);

registerPathVariable();

try {
Expand Down
13 changes: 13 additions & 0 deletions idea/src/org/jetbrains/kotlin/idea/startupCompat.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright 2010-2020 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.
*/

package org.jetbrains.kotlin.idea

import com.intellij.openapi.project.Project

// BUNCH: 193
fun runActivity(project: Project) {
// nothing for 193
}
19 changes: 19 additions & 0 deletions idea/src/org/jetbrains/kotlin/idea/startupCompat.kt.201
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright 2010-2020 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.
*/

package org.jetbrains.kotlin.idea

import com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl
import com.intellij.openapi.project.Project
import org.jetbrains.kotlin.idea.util.runWhenSmart

// BUNCH: 201

fun runActivity(project: Project) {
project.runWhenSmart {
val daemonCodeAnalyzer = DaemonCodeAnalyzerImpl.getInstanceEx(project) as DaemonCodeAnalyzerImpl
daemonCodeAnalyzer.runLocalInspectionPassAfterCompletionOfGeneralHighlightPass(true)
}
}

0 comments on commit 5519806

Please sign in to comment.