Fix compilation after moving to idea 173
This commit is contained in:
committed by
Nikolay Krasko
parent
8f7a354592
commit
35fa8efbf3
+3
-2
@@ -30,14 +30,15 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.ConcurrentMap;
|
||||||
|
|
||||||
public class MockFileManager implements FileManager {
|
public class MockFileManager implements FileManager {
|
||||||
private final PsiManagerEx myManager;
|
private final PsiManagerEx myManager;
|
||||||
// in mock tests it's LightVirtualFile, they're only alive when they're referenced,
|
// in mock tests it's LightVirtualFile, they're only alive when they're referenced,
|
||||||
// and there can not be several instances representing the same file
|
// and there can not be several instances representing the same file
|
||||||
private final FactoryMap<VirtualFile, FileViewProvider> myViewProviders = new ConcurrentWeakFactoryMap<VirtualFile, FileViewProvider>() {
|
private final ConcurrentMap<VirtualFile, FileViewProvider> myViewProviders = new ConcurrentWeakFactoryMap<VirtualFile, FileViewProvider>() {
|
||||||
@Override
|
@Override
|
||||||
protected Map<VirtualFile, FileViewProvider> createMap() {
|
protected ConcurrentMap<VirtualFile, FileViewProvider> createMap() {
|
||||||
return ContainerUtil.createConcurrentWeakKeyWeakValueMap();
|
return ContainerUtil.createConcurrentWeakKeyWeakValueMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -33,7 +33,7 @@ class KtLightClassForDecompiledDeclaration(
|
|||||||
override val kotlinOrigin: KtClassOrObject?,
|
override val kotlinOrigin: KtClassOrObject?,
|
||||||
private val file: KtClsFile
|
private val file: KtClsFile
|
||||||
) : KtLightClassBase(clsDelegate.manager) {
|
) : KtLightClassBase(clsDelegate.manager) {
|
||||||
val fqName = kotlinOrigin?.fqName ?: FqName(clsDelegate.qualifiedName)
|
val fqName = kotlinOrigin?.fqName ?: FqName(clsDelegate.qualifiedName.orEmpty())
|
||||||
|
|
||||||
override fun copy() = this
|
override fun copy() = this
|
||||||
|
|
||||||
|
|||||||
-1
@@ -259,7 +259,6 @@ class GradleInspectionTest : GradleImportingTestCase() {
|
|||||||
|
|
||||||
val foundProblems = presentation.problemElements
|
val foundProblems = presentation.problemElements
|
||||||
.values
|
.values
|
||||||
.flatMap { it.toList() }
|
|
||||||
.mapNotNull { it as? ProblemDescriptorBase }
|
.mapNotNull { it as? ProblemDescriptorBase }
|
||||||
.map { it.descriptionTemplate }
|
.map { it.descriptionTemplate }
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -54,6 +54,7 @@ import org.jetbrains.kotlin.utils.getOrPutNullable
|
|||||||
import org.jetbrains.org.objectweb.asm.*
|
import org.jetbrains.org.objectweb.asm.*
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
import java.util.concurrent.ConcurrentMap
|
||||||
|
|
||||||
fun isInlineFunctionLineNumber(file: VirtualFile, lineNumber: Int, project: Project): Boolean {
|
fun isInlineFunctionLineNumber(file: VirtualFile, lineNumber: Int, project: Project): Boolean {
|
||||||
if (ProjectRootsUtil.isProjectSourceFile(project, file)) {
|
if (ProjectRootsUtil.isProjectSourceFile(project, file)) {
|
||||||
@@ -118,7 +119,7 @@ class WeakBytecodeDebugInfoStorage : ConcurrentWeakFactoryMap<BinaryCacheKey, By
|
|||||||
|
|
||||||
return BytecodeDebugInfo(smapData, lineNumberMapping)
|
return BytecodeDebugInfo(smapData, lineNumberMapping)
|
||||||
}
|
}
|
||||||
override fun createMap(): Map<BinaryCacheKey, BytecodeDebugInfo?> {
|
override fun createMap(): ConcurrentMap<BinaryCacheKey, BytecodeDebugInfo?> {
|
||||||
return ContainerUtil.createConcurrentWeakKeyWeakValueMap()
|
return ContainerUtil.createConcurrentWeakKeyWeakValueMap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-5
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.idea.maven
|
|||||||
import com.intellij.codeInspection.CommonProblemDescriptor
|
import com.intellij.codeInspection.CommonProblemDescriptor
|
||||||
import com.intellij.codeInspection.ProblemDescriptorBase
|
import com.intellij.codeInspection.ProblemDescriptorBase
|
||||||
import com.intellij.codeInspection.QuickFix
|
import com.intellij.codeInspection.QuickFix
|
||||||
|
import com.intellij.codeInspection.reference.RefEntity
|
||||||
import com.intellij.ide.highlighter.JavaFileType
|
import com.intellij.ide.highlighter.JavaFileType
|
||||||
import com.intellij.openapi.application.ApplicationManager
|
import com.intellij.openapi.application.ApplicationManager
|
||||||
import com.intellij.openapi.application.Result
|
import com.intellij.openapi.application.Result
|
||||||
@@ -64,11 +65,11 @@ abstract class AbstractKotlinMavenInspectionTest : MavenImportingTestCase() {
|
|||||||
|
|
||||||
val matcher = "<!--\\s*problem:\\s*on\\s*([^,]+),\\s*title\\s*(.+)\\s*-->".toRegex()
|
val matcher = "<!--\\s*problem:\\s*on\\s*([^,]+),\\s*title\\s*(.+)\\s*-->".toRegex()
|
||||||
val expected = pomText.lines().mapNotNull { matcher.find(it) }.map { SimplifiedProblemDescription(it.groups[2]!!.value.trim(), it.groups[1]!!.value.trim()) }
|
val expected = pomText.lines().mapNotNull { matcher.find(it) }.map { SimplifiedProblemDescription(it.groups[2]!!.value.trim(), it.groups[1]!!.value.trim()) }
|
||||||
val actualProblems =
|
val problemElements = runInspection(inspectionClass, myProject).problemElements
|
||||||
runInspection(inspectionClass, myProject)
|
val actualProblems = problemElements
|
||||||
.problemElements
|
.keys()
|
||||||
.filter { it.key.name == "pom.xml" }
|
.filter { it.name == "pom.xml" }
|
||||||
.values
|
.map { problemElements.get(it) }
|
||||||
.flatMap { it.toList() }
|
.flatMap { it.toList() }
|
||||||
.mapNotNull { it as? ProblemDescriptorBase }
|
.mapNotNull { it as? ProblemDescriptorBase }
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import com.intellij.execution.process.ProcessOutputTypes
|
|||||||
import com.intellij.openapi.util.Key
|
import com.intellij.openapi.util.Key
|
||||||
import com.intellij.openapi.util.TextRange
|
import com.intellij.openapi.util.TextRange
|
||||||
import com.intellij.openapi.util.text.StringUtil
|
import com.intellij.openapi.util.text.StringUtil
|
||||||
|
import org.jetbrains.annotations.NotNull
|
||||||
import org.jetbrains.kotlin.console.actions.logError
|
import org.jetbrains.kotlin.console.actions.logError
|
||||||
import org.jetbrains.kotlin.diagnostics.Severity
|
import org.jetbrains.kotlin.diagnostics.Severity
|
||||||
import org.w3c.dom.Element
|
import org.w3c.dom.Element
|
||||||
@@ -47,7 +48,7 @@ class ReplOutputHandler(
|
|||||||
|
|
||||||
override fun isSilentlyDestroyOnClose() = true
|
override fun isSilentlyDestroyOnClose() = true
|
||||||
|
|
||||||
override fun notifyTextAvailable(text: String, key: Key<*>?) {
|
override fun notifyTextAvailable(text: String, key: Key<*>) {
|
||||||
// hide warning about adding test folder to classpath
|
// hide warning about adding test folder to classpath
|
||||||
if (text.startsWith("warning: classpath entry points to a non-existent location")) return
|
if (text.startsWith("warning: classpath entry points to a non-existent location")) return
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,11 @@ public class MockParameterInfoUIContext implements ParameterInfoUIContext {
|
|||||||
return myParameterOwner;
|
return myParameterOwner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSingleParameterInfo() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Color getDefaultParameterColor() {
|
public Color getDefaultParameterColor() {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
+15
@@ -86,6 +86,21 @@ public class MockUpdateParameterInfoContext implements UpdateParameterInfoContex
|
|||||||
return ArrayUtil.EMPTY_OBJECT_ARRAY;
|
return ArrayUtil.EMPTY_OBJECT_ARRAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPreservedOnHintHidden() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setPreservedOnHintHidden(boolean value) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isInnermostContext() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Project getProject() {
|
public Project getProject() {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user