Refactoring: change "// BUNCH: xxx" format
It wasn't obvious how to use this comment properly. Now it should be clear
This commit is contained in:
committed by
Nikita Bobko
parent
b34fe77760
commit
aa5a5c954f
@@ -8,7 +8,7 @@ package org.jetbrains.kotlin.idea.caches
|
||||
import com.intellij.psi.PsiMethod
|
||||
import com.intellij.util.Processor
|
||||
|
||||
// BUNCH 193
|
||||
// FIX ME WHEN BUNCH 193 REMOVED
|
||||
typealias StringProcessor = Processor<String>
|
||||
typealias PsiMethodProcessor = Processor<PsiMethod>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ package org.jetbrains.kotlin.idea.caches
|
||||
import com.intellij.psi.PsiMethod
|
||||
import com.intellij.util.Processor
|
||||
|
||||
// BUNCH 193
|
||||
// FIX ME WHEN BUNCH 193 REMOVED
|
||||
typealias StringProcessor = Processor<in String>
|
||||
typealias PsiMethodProcessor = Processor<in PsiMethod>
|
||||
|
||||
|
||||
+2
-2
@@ -15,7 +15,7 @@ import org.jetbrains.kotlin.idea.KotlinLanguage
|
||||
/**
|
||||
* Tested in OutOfBlockModificationTestGenerated
|
||||
*/
|
||||
// BUNCH: 193
|
||||
// FIX ME WHEN BUNCH 193 REMOVED
|
||||
class KotlinCodeBlockModificationListener(
|
||||
project: Project,
|
||||
treeAspect: TreeAspect
|
||||
@@ -24,7 +24,7 @@ class KotlinCodeBlockModificationListener(
|
||||
@Suppress("UnstableApiUsage")
|
||||
private val isLanguageTrackerEnabled = modificationTrackerImpl.isEnableLanguageTrackerCompat
|
||||
|
||||
// BUNCH: 191
|
||||
// FIX ME WHEN BUNCH 191 REMOVED
|
||||
// When there're we no per-language trackers we had to increment global tracker first and process result afterward
|
||||
private val customIncrement = if (isLanguageTrackerEnabled) 0 else 1
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import org.jetbrains.kotlin.psi.KtFile
|
||||
/**
|
||||
* Tested in OutOfBlockModificationTestGenerated
|
||||
*/
|
||||
// BUNCH: 193
|
||||
// FIX ME WHEN BUNCH 193 REMOVED
|
||||
class KotlinCodeBlockModificationListener(project: Project) : KotlinCodeBlockModificationListenerCompat(project) {
|
||||
|
||||
init {
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ val KOTLIN_CONSOLE_KEY = Key.create<Boolean>("kotlin.console")
|
||||
/**
|
||||
* Tested in OutOfBlockModificationTestGenerated
|
||||
*/
|
||||
// BUNCH: 193
|
||||
// FIX ME WHEN BUNCH 193 REMOVED
|
||||
abstract class KotlinCodeBlockModificationListenerCompat(protected val project: Project) : PsiTreeChangePreprocessor {
|
||||
protected val modificationTrackerImpl: PsiModificationTrackerImpl =
|
||||
PsiModificationTracker.SERVICE.getInstance(project) as PsiModificationTrackerImpl
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ package org.jetbrains.kotlin.idea.caches.trackers
|
||||
|
||||
import com.intellij.psi.impl.PsiModificationTrackerImpl
|
||||
|
||||
// BUNCH: 191
|
||||
// FIX ME WHEN BUNCH 191 REMOVED
|
||||
@Suppress("unused")
|
||||
val PsiModificationTrackerImpl.isEnableLanguageTrackerCompat
|
||||
get() = true
|
||||
+1
-1
@@ -7,6 +7,6 @@ package org.jetbrains.kotlin.idea.caches.trackers
|
||||
|
||||
import com.intellij.psi.impl.PsiModificationTrackerImpl
|
||||
|
||||
// BUNCH: 191
|
||||
// FIX ME WHEN BUNCH 191 REMOVED
|
||||
@Suppress("unused")
|
||||
val PsiModificationTrackerImpl.isEnableLanguageTrackerCompat get() = isEnableLanguageTracker
|
||||
+1
-1
@@ -39,7 +39,7 @@ abstract class AbstractKotlinInspection : LocalInspectionTool() {
|
||||
registerProblem(problemDescriptor)
|
||||
}
|
||||
|
||||
// BUNCH: 191
|
||||
// FIX ME WHEN BUNCH 191 REMOVED
|
||||
// a workaround for IDEA-211491
|
||||
override fun getProblemElement(psiElement: PsiElement): PsiNamedElement? {
|
||||
val parent = psiElement.parents().firstOrNull { parent ->
|
||||
|
||||
@@ -7,7 +7,7 @@ package org.jetbrains.kotlin.idea.klib
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
|
||||
// BUNCH: 192
|
||||
// FIX ME WHEN BUNCH 192 REMOVED
|
||||
class KlibLoadingMetadataCache : KlibLoadingMetadataCacheCompat() {
|
||||
|
||||
companion object {
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ package org.jetbrains.kotlin.idea.klib
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.components.BaseComponent
|
||||
|
||||
// BUNCH: 192
|
||||
// FIX ME WHEN BUNCH 192 REMOVED
|
||||
class KlibLoadingMetadataCache : KlibLoadingMetadataCacheCompat(), BaseComponent {
|
||||
|
||||
companion object {
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import org.jetbrains.kotlin.metadata.deserialization.BinaryVersion
|
||||
import java.io.IOException
|
||||
import java.util.*
|
||||
|
||||
// BUNCH: 192
|
||||
// FIX ME WHEN BUNCH 192 REMOVED
|
||||
abstract class KlibLoadingMetadataCacheCompat {
|
||||
|
||||
// Use special CacheKey class instead of VirtualFile for cache keys. Certain types of VirtualFiles (for example, obtained from JarFileSystem)
|
||||
|
||||
Reference in New Issue
Block a user