Switch to 202 platform

This commit is contained in:
Dmitriy Novozhilov
2020-11-28 14:25:19 +03:00
parent 89bba93615
commit eeb9b3214c
86 changed files with 262 additions and 263 deletions
+5 -6
View File
@@ -1,7 +1,6 @@
201
202 202
203_202 201
193 193_201
as40_193 as40_193_201
as41 as41_201
as42_202 as42
@@ -8,4 +8,4 @@ package org.jetbrains.kotlin.codegen.optimization.common
import org.jetbrains.org.objectweb.asm.tree.analysis.BasicValue import org.jetbrains.org.objectweb.asm.tree.analysis.BasicValue
import org.jetbrains.org.objectweb.asm.tree.analysis.Frame import org.jetbrains.org.objectweb.asm.tree.analysis.Frame
typealias TypeAnnotatedFrames = Array<Frame<BasicValue>?> typealias TypeAnnotatedFrames = Array<Frame<BasicValue>>
@@ -8,4 +8,4 @@ package org.jetbrains.kotlin.codegen.optimization.common
import org.jetbrains.org.objectweb.asm.tree.analysis.BasicValue import org.jetbrains.org.objectweb.asm.tree.analysis.BasicValue
import org.jetbrains.org.objectweb.asm.tree.analysis.Frame import org.jetbrains.org.objectweb.asm.tree.analysis.Frame
typealias TypeAnnotatedFrames = Array<Frame<BasicValue>> typealias TypeAnnotatedFrames = Array<Frame<BasicValue>?>
@@ -5,4 +5,4 @@
package org.jetbrains.kotlin.codegen.state package org.jetbrains.kotlin.codegen.state
typealias JvmMethodExceptionTypes = Array<out String>? typealias JvmMethodExceptionTypes = Array<out String?>?
@@ -5,4 +5,4 @@
package org.jetbrains.kotlin.codegen.state package org.jetbrains.kotlin.codegen.state
typealias JvmMethodExceptionTypes = Array<out String?>? typealias JvmMethodExceptionTypes = Array<out String>?
@@ -31,6 +31,6 @@ interface MessageCollectorBasedReporter : DiagnosticMessageReporter {
override fun report(diagnostic: Diagnostic, file: PsiFile, render: String) = messageCollector.report( override fun report(diagnostic: Diagnostic, file: PsiFile, render: String) = messageCollector.report(
AnalyzerWithCompilerReport.convertSeverity(diagnostic.severity), AnalyzerWithCompilerReport.convertSeverity(diagnostic.severity),
render, render,
MessageUtil.psiFileToMessageLocation(file, file.name, DiagnosticUtils.getLineAndColumnRange(diagnostic)) MessageUtil.psiFileToMessageLocation(file, file.name, DiagnosticUtils.getLineAndColumn(diagnostic))
) )
} }
@@ -31,6 +31,6 @@ interface MessageCollectorBasedReporter : DiagnosticMessageReporter {
override fun report(diagnostic: Diagnostic, file: PsiFile, render: String) = messageCollector.report( override fun report(diagnostic: Diagnostic, file: PsiFile, render: String) = messageCollector.report(
AnalyzerWithCompilerReport.convertSeverity(diagnostic.severity), AnalyzerWithCompilerReport.convertSeverity(diagnostic.severity),
render, render,
MessageUtil.psiFileToMessageLocation(file, file.name, DiagnosticUtils.getLineAndColumn(diagnostic)) MessageUtil.psiFileToMessageLocation(file, file.name, DiagnosticUtils.getLineAndColumnRange(diagnostic))
) )
} }
@@ -17,8 +17,6 @@
package org.jetbrains.kotlin.cli.common.messages; package org.jetbrains.kotlin.cli.common.messages;
import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.impl.jar.CoreJarVirtualFile;
import com.intellij.openapi.vfs.local.CoreLocalVirtualFile;
import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile; import com.intellij.psi.PsiFile;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@@ -32,31 +30,25 @@ public class MessageUtil {
private MessageUtil() {} private MessageUtil() {}
@Nullable @Nullable
public static CompilerMessageSourceLocation psiElementToMessageLocation(@Nullable PsiElement element) { public static CompilerMessageLocation psiElementToMessageLocation(@Nullable PsiElement element) {
if (element == null) return null; if (element == null) return null;
PsiFile file = element.getContainingFile(); PsiFile file = element.getContainingFile();
return psiFileToMessageLocation(file, "<no path>", DiagnosticUtils.getLineAndColumnRangeInPsiFile(file, element.getTextRange())); return psiFileToMessageLocation(file, "<no path>", DiagnosticUtils.getLineAndColumnInPsiFile(file, element.getTextRange()));
} }
@Nullable @Nullable
public static CompilerMessageSourceLocation psiFileToMessageLocation( public static CompilerMessageLocation psiFileToMessageLocation(
@NotNull PsiFile file, @NotNull PsiFile file,
@Nullable String defaultValue, @Nullable String defaultValue,
@NotNull PsiDiagnosticUtils.LineAndColumnRange range @NotNull PsiDiagnosticUtils.LineAndColumn lineAndColumn
) { ) {
VirtualFile virtualFile = file.getVirtualFile(); VirtualFile virtualFile = file.getVirtualFile();
String path = virtualFile != null ? virtualFileToPath(virtualFile) : defaultValue; String path = virtualFile != null ? virtualFileToPath(virtualFile) : defaultValue;
PsiDiagnosticUtils.LineAndColumn start = range.getStart(); return CompilerMessageLocation.create(path, lineAndColumn.getLine(), lineAndColumn.getColumn(), lineAndColumn.getLineContent());
PsiDiagnosticUtils.LineAndColumn end = range.getEnd();
return CompilerMessageLocationWithRange.create(path, start.getLine(), start.getColumn(), end.getLine(), end.getColumn(), start.getLineContent());
} }
@NotNull @NotNull
public static String virtualFileToPath(@NotNull VirtualFile virtualFile) { public static String virtualFileToPath(@NotNull VirtualFile virtualFile) {
// Convert path to platform-dependent format when virtualFile is local file. return toSystemDependentName(virtualFile.getPath());
if (virtualFile instanceof CoreLocalVirtualFile || virtualFile instanceof CoreJarVirtualFile) {
return toSystemDependentName(virtualFile.getPath());
}
return virtualFile.getPath();
} }
} }
@@ -17,6 +17,8 @@
package org.jetbrains.kotlin.cli.common.messages; package org.jetbrains.kotlin.cli.common.messages;
import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.impl.jar.CoreJarVirtualFile;
import com.intellij.openapi.vfs.local.CoreLocalVirtualFile;
import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile; import com.intellij.psi.PsiFile;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@@ -30,25 +32,31 @@ public class MessageUtil {
private MessageUtil() {} private MessageUtil() {}
@Nullable @Nullable
public static CompilerMessageLocation psiElementToMessageLocation(@Nullable PsiElement element) { public static CompilerMessageSourceLocation psiElementToMessageLocation(@Nullable PsiElement element) {
if (element == null) return null; if (element == null) return null;
PsiFile file = element.getContainingFile(); PsiFile file = element.getContainingFile();
return psiFileToMessageLocation(file, "<no path>", DiagnosticUtils.getLineAndColumnInPsiFile(file, element.getTextRange())); return psiFileToMessageLocation(file, "<no path>", DiagnosticUtils.getLineAndColumnRangeInPsiFile(file, element.getTextRange()));
} }
@Nullable @Nullable
public static CompilerMessageLocation psiFileToMessageLocation( public static CompilerMessageSourceLocation psiFileToMessageLocation(
@NotNull PsiFile file, @NotNull PsiFile file,
@Nullable String defaultValue, @Nullable String defaultValue,
@NotNull PsiDiagnosticUtils.LineAndColumn lineAndColumn @NotNull PsiDiagnosticUtils.LineAndColumnRange range
) { ) {
VirtualFile virtualFile = file.getVirtualFile(); VirtualFile virtualFile = file.getVirtualFile();
String path = virtualFile != null ? virtualFileToPath(virtualFile) : defaultValue; String path = virtualFile != null ? virtualFileToPath(virtualFile) : defaultValue;
return CompilerMessageLocation.create(path, lineAndColumn.getLine(), lineAndColumn.getColumn(), lineAndColumn.getLineContent()); PsiDiagnosticUtils.LineAndColumn start = range.getStart();
PsiDiagnosticUtils.LineAndColumn end = range.getEnd();
return CompilerMessageLocationWithRange.create(path, start.getLine(), start.getColumn(), end.getLine(), end.getColumn(), start.getLineContent());
} }
@NotNull @NotNull
public static String virtualFileToPath(@NotNull VirtualFile virtualFile) { public static String virtualFileToPath(@NotNull VirtualFile virtualFile) {
return toSystemDependentName(virtualFile.getPath()); // Convert path to platform-dependent format when virtualFile is local file.
if (virtualFile instanceof CoreLocalVirtualFile || virtualFile instanceof CoreJarVirtualFile) {
return toSystemDependentName(virtualFile.getPath());
}
return virtualFile.getPath();
} }
} }
@@ -12,4 +12,6 @@ fun setupIdeaStandaloneExecution() {
System.getProperties().setProperty("psi.incremental.reparse.depth.limit", "1000") System.getProperties().setProperty("psi.incremental.reparse.depth.limit", "1000")
System.getProperties().setProperty("ide.hide.excluded.files", "false") System.getProperties().setProperty("ide.hide.excluded.files", "false")
System.getProperties().setProperty("ast.loading.filter", "false") System.getProperties().setProperty("ast.loading.filter", "false")
System.getProperties().setProperty("idea.ignore.disabled.plugins", "true")
System.getProperties().setProperty("idea.home.path", System.getProperty("java.io.tmpdir"))
} }
@@ -12,6 +12,4 @@ fun setupIdeaStandaloneExecution() {
System.getProperties().setProperty("psi.incremental.reparse.depth.limit", "1000") System.getProperties().setProperty("psi.incremental.reparse.depth.limit", "1000")
System.getProperties().setProperty("ide.hide.excluded.files", "false") System.getProperties().setProperty("ide.hide.excluded.files", "false")
System.getProperties().setProperty("ast.loading.filter", "false") System.getProperties().setProperty("ast.loading.filter", "false")
System.getProperties().setProperty("idea.ignore.disabled.plugins", "true")
System.getProperties().setProperty("idea.home.path", System.getProperty("java.io.tmpdir"))
} }
@@ -14,9 +14,9 @@ sdax = {
compiler/testData/multiplatform/regressions/kt28385/jvm.kt:5:8: error: expecting a top level declaration compiler/testData/multiplatform/regressions/kt28385/jvm.kt:5:8: error: expecting a top level declaration
sdax = { sdax = {
^ ^
compiler/testData/multiplatform/regressions/kt28385/jvm.kt:3:1: error: property must be initialized
val dasda
^
compiler/testData/multiplatform/regressions/kt28385/jvm.kt:5:8: error: function declaration must have a name compiler/testData/multiplatform/regressions/kt28385/jvm.kt:5:8: error: function declaration must have a name
sdax = { sdax = {
^ ^
compiler/testData/multiplatform/regressions/kt28385/jvm.kt:3:1: error: property must be initialized
val dasda
^
@@ -12,11 +12,11 @@ compiler/testData/multiplatform/regressions/kt28385/jvm.kt:5:6: error: expecting
sdax = { sdax = {
^ ^
compiler/testData/multiplatform/regressions/kt28385/jvm.kt:5:8: error: expecting a top level declaration compiler/testData/multiplatform/regressions/kt28385/jvm.kt:5:8: error: expecting a top level declaration
sdax = {
^
compiler/testData/multiplatform/regressions/kt28385/jvm.kt:5:8: error: function declaration must have a name
sdax = { sdax = {
^ ^
compiler/testData/multiplatform/regressions/kt28385/jvm.kt:3:1: error: property must be initialized compiler/testData/multiplatform/regressions/kt28385/jvm.kt:3:1: error: property must be initialized
val dasda val dasda
^ ^
compiler/testData/multiplatform/regressions/kt28385/jvm.kt:5:8: error: function declaration must have a name
sdax = {
^
@@ -140,7 +140,6 @@ public abstract class KtParsingTestCase extends KtPlatformLiteFixture {
// That's for reparse routines // That's for reparse routines
final PomModelImpl pomModel = new PomModelImpl(myProject); final PomModelImpl pomModel = new PomModelImpl(myProject);
myProject.registerService(PomModel.class, pomModel); myProject.registerService(PomModel.class, pomModel);
new TreeAspect(pomModel);
} }
public void configureFromParserDefinition(ParserDefinition definition, String extension) { public void configureFromParserDefinition(ParserDefinition definition, String extension) {
@@ -140,6 +140,7 @@ public abstract class KtParsingTestCase extends KtPlatformLiteFixture {
// That's for reparse routines // That's for reparse routines
final PomModelImpl pomModel = new PomModelImpl(myProject); final PomModelImpl pomModel = new PomModelImpl(myProject);
myProject.registerService(PomModel.class, pomModel); myProject.registerService(PomModel.class, pomModel);
new TreeAspect(pomModel);
} }
public void configureFromParserDefinition(ParserDefinition definition, String extension) { public void configureFromParserDefinition(ParserDefinition definition, String extension) {
@@ -82,6 +82,9 @@ import java.util.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.function.Supplier; import java.util.function.Supplier;
/**
* @author peter
*/
@SuppressWarnings("ALL") @SuppressWarnings("ALL")
public abstract class KtUsefulTestCase extends TestCase { public abstract class KtUsefulTestCase extends TestCase {
public static final boolean IS_UNDER_TEAMCITY = System.getenv("TEAMCITY_VERSION") != null; public static final boolean IS_UNDER_TEAMCITY = System.getenv("TEAMCITY_VERSION") != null;
@@ -1081,8 +1084,7 @@ public abstract class KtUsefulTestCase extends TestCase {
if (shouldOccur) { if (shouldOccur) {
wasThrown = true; wasThrown = true;
final String errorMessage = exceptionCase.getAssertionErrorMessage(); assertInstanceOf(cause, exceptionCase.getExpectedExceptionClass());
assertEquals(errorMessage, exceptionCase.getExpectedExceptionClass(), cause.getClass());
if (expectedErrorMsgPart != null) { if (expectedErrorMsgPart != null) {
assertTrue(cause.getMessage(), cause.getMessage().contains(expectedErrorMsgPart)); assertTrue(cause.getMessage(), cause.getMessage().contains(expectedErrorMsgPart));
} }
@@ -1103,7 +1105,7 @@ public abstract class KtUsefulTestCase extends TestCase {
} }
finally { finally {
if (shouldOccur && !wasThrown) { if (shouldOccur && !wasThrown) {
fail(exceptionCase.getAssertionErrorMessage()); fail(exceptionCase.getExpectedExceptionClass().getName() + " must be thrown.");
} }
} }
} }
@@ -82,9 +82,6 @@ import java.util.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.function.Supplier; import java.util.function.Supplier;
/**
* @author peter
*/
@SuppressWarnings("ALL") @SuppressWarnings("ALL")
public abstract class KtUsefulTestCase extends TestCase { public abstract class KtUsefulTestCase extends TestCase {
public static final boolean IS_UNDER_TEAMCITY = System.getenv("TEAMCITY_VERSION") != null; public static final boolean IS_UNDER_TEAMCITY = System.getenv("TEAMCITY_VERSION") != null;
@@ -1084,7 +1081,8 @@ public abstract class KtUsefulTestCase extends TestCase {
if (shouldOccur) { if (shouldOccur) {
wasThrown = true; wasThrown = true;
assertInstanceOf(cause, exceptionCase.getExpectedExceptionClass()); final String errorMessage = exceptionCase.getAssertionErrorMessage();
assertEquals(errorMessage, exceptionCase.getExpectedExceptionClass(), cause.getClass());
if (expectedErrorMsgPart != null) { if (expectedErrorMsgPart != null) {
assertTrue(cause.getMessage(), cause.getMessage().contains(expectedErrorMsgPart)); assertTrue(cause.getMessage(), cause.getMessage().contains(expectedErrorMsgPart));
} }
@@ -1105,7 +1103,7 @@ public abstract class KtUsefulTestCase extends TestCase {
} }
finally { finally {
if (shouldOccur && !wasThrown) { if (shouldOccur && !wasThrown) {
fail(exceptionCase.getExpectedExceptionClass().getName() + " must be thrown."); fail(exceptionCase.getAssertionErrorMessage());
} }
} }
} }
+4 -4
View File
@@ -1,9 +1,9 @@
versions.intellijSdk=201.7223.91 versions.intellijSdk=202.5103-EAP-CANDIDATE-SNAPSHOT
versions.androidBuildTools=r23.0.1 versions.androidBuildTools=r23.0.1
versions.idea.NodeJS=193.6494.7 versions.idea.NodeJS=193.6494.7
versions.jar.asm-all=7.0.1 versions.jar.asm-all=8.0.1
versions.jar.guava=28.2-jre versions.jar.guava=29.0-jre
versions.jar.groovy-all=2.4.17 versions.jar.groovy=2.5.11
versions.jar.lombok-ast=0.2.3 versions.jar.lombok-ast=0.2.3
versions.jar.swingx-core=1.6.2-2 versions.jar.swingx-core=1.6.2-2
versions.jar.kxml2=2.3.0 versions.jar.kxml2=2.3.0
@@ -1,9 +1,9 @@
versions.intellijSdk=202.5103-EAP-CANDIDATE-SNAPSHOT versions.intellijSdk=201.7223.91
versions.androidBuildTools=r23.0.1 versions.androidBuildTools=r23.0.1
versions.idea.NodeJS=193.6494.7 versions.idea.NodeJS=193.6494.7
versions.jar.asm-all=8.0.1 versions.jar.asm-all=7.0.1
versions.jar.guava=29.0-jre versions.jar.guava=28.2-jre
versions.jar.groovy=2.5.11 versions.jar.groovy-all=2.4.17
versions.jar.lombok-ast=0.2.3 versions.jar.lombok-ast=0.2.3
versions.jar.swingx-core=1.6.2-2 versions.jar.swingx-core=1.6.2-2
versions.jar.kxml2=2.3.0 versions.jar.kxml2=2.3.0
@@ -6,8 +6,8 @@ fun test() {
message("<caret>") message("<caret>")
} }
// EXIST: { lookupString: "foo.bar", itemText: "foo.bar", tailText: "1", typeText: "PropertyKeysEmptyString" } // EXIST: { lookupString: "foo.bar", itemText: "foo.bar", tailText: "=1", typeText: "PropertyKeysEmptyString" }
// EXIST: { lookupString: "bar.baz", itemText: "bar.baz", tailText: "2", typeText: "PropertyKeysEmptyString" } // EXIST: { lookupString: "bar.baz", itemText: "bar.baz", tailText: "=2", typeText: "PropertyKeysEmptyString" }
// EXIST: { lookupString: "foo.bar.baz", itemText: "foo.bar.baz", tailText: "3", typeText: "PropertyKeysEmptyString" } // EXIST: { lookupString: "foo.bar.baz", itemText: "foo.bar.baz", tailText: "=3", typeText: "PropertyKeysEmptyString" }
// EXIST: { lookupString: "foo.test", itemText: "foo.test", tailText: "4", typeText: "PropertyKeysEmptyString" } // EXIST: { lookupString: "foo.test", itemText: "foo.test", tailText: "=4", typeText: "PropertyKeysEmptyString" }
// NOTHING_ELSE // NOTHING_ELSE
@@ -6,8 +6,8 @@ fun test() {
message("<caret>") message("<caret>")
} }
// EXIST: { lookupString: "foo.bar", itemText: "foo.bar", tailText: "=1", typeText: "PropertyKeysEmptyString" } // EXIST: { lookupString: "foo.bar", itemText: "foo.bar", tailText: "1", typeText: "PropertyKeysEmptyString" }
// EXIST: { lookupString: "bar.baz", itemText: "bar.baz", tailText: "=2", typeText: "PropertyKeysEmptyString" } // EXIST: { lookupString: "bar.baz", itemText: "bar.baz", tailText: "2", typeText: "PropertyKeysEmptyString" }
// EXIST: { lookupString: "foo.bar.baz", itemText: "foo.bar.baz", tailText: "=3", typeText: "PropertyKeysEmptyString" } // EXIST: { lookupString: "foo.bar.baz", itemText: "foo.bar.baz", tailText: "3", typeText: "PropertyKeysEmptyString" }
// EXIST: { lookupString: "foo.test", itemText: "foo.test", tailText: "=4", typeText: "PropertyKeysEmptyString" } // EXIST: { lookupString: "foo.test", itemText: "foo.test", tailText: "4", typeText: "PropertyKeysEmptyString" }
// NOTHING_ELSE // NOTHING_ELSE
@@ -6,8 +6,8 @@ fun test() {
message("<caret>foo") message("<caret>foo")
} }
// EXIST: { lookupString: "foo.bar", itemText: "foo.bar", tailText: "1", typeText: "PropertyKeysNoPrefix" } // EXIST: { lookupString: "foo.bar", itemText: "foo.bar", tailText: "=1", typeText: "PropertyKeysNoPrefix" }
// EXIST: { lookupString: "bar.baz", itemText: "bar.baz", tailText: "2", typeText: "PropertyKeysNoPrefix" } // EXIST: { lookupString: "bar.baz", itemText: "bar.baz", tailText: "=2", typeText: "PropertyKeysNoPrefix" }
// EXIST: { lookupString: "foo.bar.baz", itemText: "foo.bar.baz", tailText: "3", typeText: "PropertyKeysNoPrefix" } // EXIST: { lookupString: "foo.bar.baz", itemText: "foo.bar.baz", tailText: "=3", typeText: "PropertyKeysNoPrefix" }
// EXIST: { lookupString: "foo.test", itemText: "foo.test", tailText: "4", typeText: "PropertyKeysNoPrefix" } // EXIST: { lookupString: "foo.test", itemText: "foo.test", tailText: "=4", typeText: "PropertyKeysNoPrefix" }
// NOTHING_ELSE // NOTHING_ELSE
@@ -6,8 +6,8 @@ fun test() {
message("<caret>foo") message("<caret>foo")
} }
// EXIST: { lookupString: "foo.bar", itemText: "foo.bar", tailText: "=1", typeText: "PropertyKeysNoPrefix" } // EXIST: { lookupString: "foo.bar", itemText: "foo.bar", tailText: "1", typeText: "PropertyKeysNoPrefix" }
// EXIST: { lookupString: "bar.baz", itemText: "bar.baz", tailText: "=2", typeText: "PropertyKeysNoPrefix" } // EXIST: { lookupString: "bar.baz", itemText: "bar.baz", tailText: "2", typeText: "PropertyKeysNoPrefix" }
// EXIST: { lookupString: "foo.bar.baz", itemText: "foo.bar.baz", tailText: "=3", typeText: "PropertyKeysNoPrefix" } // EXIST: { lookupString: "foo.bar.baz", itemText: "foo.bar.baz", tailText: "3", typeText: "PropertyKeysNoPrefix" }
// EXIST: { lookupString: "foo.test", itemText: "foo.test", tailText: "=4", typeText: "PropertyKeysNoPrefix" } // EXIST: { lookupString: "foo.test", itemText: "foo.test", tailText: "4", typeText: "PropertyKeysNoPrefix" }
// NOTHING_ELSE // NOTHING_ELSE
@@ -6,7 +6,7 @@ fun test() {
message("foo.<caret>") message("foo.<caret>")
} }
// EXIST: { lookupString: "foo.bar", itemText: "foo.bar", tailText: "1", typeText: "PropertyKeysWithPrefix" } // EXIST: { lookupString: "foo.bar", itemText: "foo.bar", tailText: "=1", typeText: "PropertyKeysWithPrefix" }
// EXIST: { lookupString: "foo.bar.baz", itemText: "foo.bar.baz", tailText: "3", typeText: "PropertyKeysWithPrefix" } // EXIST: { lookupString: "foo.bar.baz", itemText: "foo.bar.baz", tailText: "=3", typeText: "PropertyKeysWithPrefix" }
// EXIST: { lookupString: "foo.test", itemText: "foo.test", tailText: "4", typeText: "PropertyKeysWithPrefix" } // EXIST: { lookupString: "foo.test", itemText: "foo.test", tailText: "=4", typeText: "PropertyKeysWithPrefix" }
// NOTHING_ELSE // NOTHING_ELSE
@@ -6,7 +6,7 @@ fun test() {
message("foo.<caret>") message("foo.<caret>")
} }
// EXIST: { lookupString: "foo.bar", itemText: "foo.bar", tailText: "=1", typeText: "PropertyKeysWithPrefix" } // EXIST: { lookupString: "foo.bar", itemText: "foo.bar", tailText: "1", typeText: "PropertyKeysWithPrefix" }
// EXIST: { lookupString: "foo.bar.baz", itemText: "foo.bar.baz", tailText: "=3", typeText: "PropertyKeysWithPrefix" } // EXIST: { lookupString: "foo.bar.baz", itemText: "foo.bar.baz", tailText: "3", typeText: "PropertyKeysWithPrefix" }
// EXIST: { lookupString: "foo.test", itemText: "foo.test", tailText: "=4", typeText: "PropertyKeysWithPrefix" } // EXIST: { lookupString: "foo.test", itemText: "foo.test", tailText: "4", typeText: "PropertyKeysWithPrefix" }
// NOTHING_ELSE // NOTHING_ELSE
@@ -23,11 +23,11 @@ class DaemonCodeAnalyzerStatusService(project: Project) : Disposable {
init { init {
val messageBusConnection = project.messageBus.connect(this) val messageBusConnection = project.messageBus.connect(this)
messageBusConnection.subscribe(DaemonCodeAnalyzer.DAEMON_EVENT_TOPIC, object : DaemonCodeAnalyzer.DaemonListener { messageBusConnection.subscribe(DaemonCodeAnalyzer.DAEMON_EVENT_TOPIC, object : DaemonCodeAnalyzer.DaemonListener {
override fun daemonStarting(fileEditors: MutableCollection<FileEditor>) { override fun daemonStarting(fileEditors: MutableCollection<out FileEditor>) {
daemonRunning = true daemonRunning = true
} }
override fun daemonFinished(fileEditors: MutableCollection<FileEditor>) { override fun daemonFinished(fileEditors: MutableCollection<out FileEditor>) {
daemonRunning = false daemonRunning = false
} }
@@ -23,11 +23,11 @@ class DaemonCodeAnalyzerStatusService(project: Project) : Disposable {
init { init {
val messageBusConnection = project.messageBus.connect(this) val messageBusConnection = project.messageBus.connect(this)
messageBusConnection.subscribe(DaemonCodeAnalyzer.DAEMON_EVENT_TOPIC, object : DaemonCodeAnalyzer.DaemonListener { messageBusConnection.subscribe(DaemonCodeAnalyzer.DAEMON_EVENT_TOPIC, object : DaemonCodeAnalyzer.DaemonListener {
override fun daemonStarting(fileEditors: MutableCollection<out FileEditor>) { override fun daemonStarting(fileEditors: MutableCollection<FileEditor>) {
daemonRunning = true daemonRunning = true
} }
override fun daemonFinished(fileEditors: MutableCollection<out FileEditor>) { override fun daemonFinished(fileEditors: MutableCollection<FileEditor>) {
daemonRunning = false daemonRunning = false
} }
@@ -45,7 +45,7 @@ class ShowKotlinGradleDslLogs : IntentionAction, AnAction(), DumbAware {
RevealFileAction.openDirectory(logsDir) RevealFileAction.openDirectory(logsDir)
} else { } else {
val parent = WindowManager.getInstance().getStatusBar(project)?.component val parent = WindowManager.getInstance().getStatusBar(project)?.component
?: WindowManager.getInstance().findVisibleFrame().rootPane ?: WindowManager.getInstance().findVisibleFrame()?.rootPane
JBPopupFactory.getInstance() JBPopupFactory.getInstance()
.createHtmlTextBalloonBuilder( .createHtmlTextBalloonBuilder(
KotlinIdeaGradleBundle.message( KotlinIdeaGradleBundle.message(
@@ -45,7 +45,7 @@ class ShowKotlinGradleDslLogs : IntentionAction, AnAction(), DumbAware {
RevealFileAction.openDirectory(logsDir) RevealFileAction.openDirectory(logsDir)
} else { } else {
val parent = WindowManager.getInstance().getStatusBar(project)?.component val parent = WindowManager.getInstance().getStatusBar(project)?.component
?: WindowManager.getInstance().findVisibleFrame()?.rootPane ?: WindowManager.getInstance().findVisibleFrame().rootPane
JBPopupFactory.getInstance() JBPopupFactory.getInstance()
.createHtmlTextBalloonBuilder( .createHtmlTextBalloonBuilder(
KotlinIdeaGradleBundle.message( KotlinIdeaGradleBundle.message(
@@ -25,6 +25,7 @@ import com.intellij.openapi.projectRoots.impl.JavaSdkImpl;
import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess; import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess;
import com.intellij.testFramework.IdeaTestUtil;
import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function0;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.TestOnly; import org.jetbrains.annotations.TestOnly;
@@ -49,7 +50,7 @@ public class PluginTestCaseBase {
@NotNull @NotNull
@TestOnly @TestOnly
private static Sdk createMockJdk(@NotNull String name, String path) { private static Sdk createMockJdk(@NotNull String name, String path) {
return ((JavaSdkImpl)JavaSdk.getInstance()).createMockJdk(name, path, false); return IdeaTestUtil.createMockJdk(name, path, false);
} }
@NotNull @NotNull
@@ -25,7 +25,6 @@ import com.intellij.openapi.projectRoots.impl.JavaSdkImpl;
import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess; import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess;
import com.intellij.testFramework.IdeaTestUtil;
import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function0;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.TestOnly; import org.jetbrains.annotations.TestOnly;
@@ -50,7 +49,7 @@ public class PluginTestCaseBase {
@NotNull @NotNull
@TestOnly @TestOnly
private static Sdk createMockJdk(@NotNull String name, String path) { private static Sdk createMockJdk(@NotNull String name, String path) {
return IdeaTestUtil.createMockJdk(name, path, false); return ((JavaSdkImpl)JavaSdk.getInstance()).createMockJdk(name, path, false);
} }
@NotNull @NotNull
@@ -5,11 +5,7 @@
package org.jetbrains.kotlin.idea.test package org.jetbrains.kotlin.idea.test
import com.intellij.ide.startup.impl.StartupManagerImpl
import com.intellij.openapi.project.Project import com.intellij.openapi.project.Project
import com.intellij.openapi.startup.StartupManager
// FIX ME WHEN BUNCH 201 REMOVED
fun runPostStartupActivitiesOnce(project: Project) { fun runPostStartupActivitiesOnce(project: Project) {
(StartupManager.getInstance(project) as StartupManagerImpl).runPostStartupActivitiesRegisteredDynamically() }
}
@@ -5,7 +5,11 @@
package org.jetbrains.kotlin.idea.test package org.jetbrains.kotlin.idea.test
import com.intellij.ide.startup.impl.StartupManagerImpl
import com.intellij.openapi.project.Project import com.intellij.openapi.project.Project
import com.intellij.openapi.startup.StartupManager
// FIX ME WHEN BUNCH 201 REMOVED
fun runPostStartupActivitiesOnce(project: Project) { fun runPostStartupActivitiesOnce(project: Project) {
} (StartupManager.getInstance(project) as StartupManagerImpl).runPostStartupActivitiesRegisteredDynamically()
}
@@ -63,9 +63,10 @@ class KotlinClassWithDelegatedPropertyRenderer : ClassRenderer() {
): String? { ): String? {
val toStringRenderer = rendererSettings.toStringRenderer val toStringRenderer = rendererSettings.toStringRenderer
if (toStringRenderer.isEnabled && DebuggerManagerEx.getInstanceEx(evaluationContext.project).context.canRunEvaluation) { if (toStringRenderer.isEnabled && DebuggerManagerEx.getInstanceEx(evaluationContext.project).context.canRunEvaluation) {
if (toStringRenderer.isApplicable(descriptor.type)) { val label = toStringRenderer.isApplicableAsync(descriptor.type).thenApply { applicable: Boolean ->
return toStringRenderer.calcLabel(descriptor, evaluationContext, listener) if (applicable) toStringRenderer.calcLabel(descriptor, evaluationContext, listener) else null
} }.get()
return label
} }
return null return null
} }
@@ -63,10 +63,9 @@ class KotlinClassWithDelegatedPropertyRenderer : ClassRenderer() {
): String? { ): String? {
val toStringRenderer = rendererSettings.toStringRenderer val toStringRenderer = rendererSettings.toStringRenderer
if (toStringRenderer.isEnabled && DebuggerManagerEx.getInstanceEx(evaluationContext.project).context.canRunEvaluation) { if (toStringRenderer.isEnabled && DebuggerManagerEx.getInstanceEx(evaluationContext.project).context.canRunEvaluation) {
val label = toStringRenderer.isApplicableAsync(descriptor.type).thenApply { applicable: Boolean -> if (toStringRenderer.isApplicable(descriptor.type)) {
if (applicable) toStringRenderer.calcLabel(descriptor, evaluationContext, listener) else null return toStringRenderer.calcLabel(descriptor, evaluationContext, listener)
}.get() }
return label
} }
return null return null
} }
@@ -13,11 +13,13 @@ import com.intellij.openapi.externalSystem.util.ExternalSystemUtil
import com.intellij.openapi.project.DumbService import com.intellij.openapi.project.DumbService
import com.intellij.openapi.project.Project import com.intellij.openapi.project.Project
import com.intellij.openapi.roots.ProjectRootManager import com.intellij.openapi.roots.ProjectRootManager
import org.gradle.util.GradleVersion
import org.jetbrains.plugins.gradle.service.project.open.setupGradleSettings import org.jetbrains.plugins.gradle.service.project.open.setupGradleSettings
import org.jetbrains.plugins.gradle.settings.GradleProjectSettings import org.jetbrains.plugins.gradle.settings.GradleProjectSettings
import org.jetbrains.plugins.gradle.settings.GradleSettings import org.jetbrains.plugins.gradle.settings.GradleSettings
import org.jetbrains.plugins.gradle.util.GradleConstants import org.jetbrains.plugins.gradle.util.GradleConstants
import org.jetbrains.plugins.gradle.util.GradleLog import org.jetbrains.plugins.gradle.util.GradleLog
import org.jetbrains.plugins.gradle.util.suggestGradleVersion
import java.io.File import java.io.File
import kotlin.test.assertNotNull import kotlin.test.assertNotNull
@@ -34,14 +36,13 @@ const val GRADLE_JDK_NAME = "Gradle JDK"
*/ */
private fun _importProject(projectPath: String, project: Project) { private fun _importProject(projectPath: String, project: Project) {
GradleLog.LOG.info("Import project at $projectPath") GradleLog.LOG.info("Import project at $projectPath")
val projectSdk = ProjectRootManager.getInstance(project).projectSdk
assertNotNull(projectSdk, "project SDK not found for ${project.name} at $projectPath")
val gradleProjectSettings = GradleProjectSettings() val gradleProjectSettings = GradleProjectSettings()
val gradleVersion = suggestGradleVersion(project) ?: GradleVersion.current()
GradleSettings.getInstance(project).gradleVmOptions = GradleSettings.getInstance(project).gradleVmOptions =
"-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${System.getProperty("user.dir")}" "-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${System.getProperty("user.dir")}"
setupGradleSettings(gradleProjectSettings, projectPath, project, projectSdk) setupGradleSettings(project, gradleProjectSettings, projectPath, gradleVersion)
gradleProjectSettings.gradleJvm = GRADLE_JDK_NAME gradleProjectSettings.gradleJvm = GRADLE_JDK_NAME
GradleSettings.getInstance(project).getLinkedProjectSettings(projectPath)?.let { linkedProjectSettings -> GradleSettings.getInstance(project).getLinkedProjectSettings(projectPath)?.let { linkedProjectSettings ->
@@ -13,13 +13,11 @@ import com.intellij.openapi.externalSystem.util.ExternalSystemUtil
import com.intellij.openapi.project.DumbService import com.intellij.openapi.project.DumbService
import com.intellij.openapi.project.Project import com.intellij.openapi.project.Project
import com.intellij.openapi.roots.ProjectRootManager import com.intellij.openapi.roots.ProjectRootManager
import org.gradle.util.GradleVersion
import org.jetbrains.plugins.gradle.service.project.open.setupGradleSettings import org.jetbrains.plugins.gradle.service.project.open.setupGradleSettings
import org.jetbrains.plugins.gradle.settings.GradleProjectSettings import org.jetbrains.plugins.gradle.settings.GradleProjectSettings
import org.jetbrains.plugins.gradle.settings.GradleSettings import org.jetbrains.plugins.gradle.settings.GradleSettings
import org.jetbrains.plugins.gradle.util.GradleConstants import org.jetbrains.plugins.gradle.util.GradleConstants
import org.jetbrains.plugins.gradle.util.GradleLog import org.jetbrains.plugins.gradle.util.GradleLog
import org.jetbrains.plugins.gradle.util.suggestGradleVersion
import java.io.File import java.io.File
import kotlin.test.assertNotNull import kotlin.test.assertNotNull
@@ -36,13 +34,14 @@ const val GRADLE_JDK_NAME = "Gradle JDK"
*/ */
private fun _importProject(projectPath: String, project: Project) { private fun _importProject(projectPath: String, project: Project) {
GradleLog.LOG.info("Import project at $projectPath") GradleLog.LOG.info("Import project at $projectPath")
val projectSdk = ProjectRootManager.getInstance(project).projectSdk
assertNotNull(projectSdk, "project SDK not found for ${project.name} at $projectPath")
val gradleProjectSettings = GradleProjectSettings() val gradleProjectSettings = GradleProjectSettings()
val gradleVersion = suggestGradleVersion(project) ?: GradleVersion.current()
GradleSettings.getInstance(project).gradleVmOptions = GradleSettings.getInstance(project).gradleVmOptions =
"-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${System.getProperty("user.dir")}" "-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${System.getProperty("user.dir")}"
setupGradleSettings(project, gradleProjectSettings, projectPath, gradleVersion) setupGradleSettings(gradleProjectSettings, projectPath, project, projectSdk)
gradleProjectSettings.gradleJvm = GRADLE_JDK_NAME gradleProjectSettings.gradleJvm = GRADLE_JDK_NAME
GradleSettings.getInstance(project).getLinkedProjectSettings(projectPath)?.let { linkedProjectSettings -> GradleSettings.getInstance(project).getLinkedProjectSettings(projectPath)?.let { linkedProjectSettings ->
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.idea.testFramework
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzerSettings import com.intellij.codeInsight.daemon.DaemonCodeAnalyzerSettings
import com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl import com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl
import com.intellij.ide.impl.OpenProjectTask
import com.intellij.ide.startup.impl.StartupManagerImpl import com.intellij.ide.startup.impl.StartupManagerImpl
import com.intellij.lang.LanguageAnnotators import com.intellij.lang.LanguageAnnotators
import com.intellij.lang.LanguageExtensionPoint import com.intellij.lang.LanguageExtensionPoint
@@ -20,6 +21,7 @@ import com.intellij.openapi.fileEditor.FileDocumentManager
import com.intellij.openapi.project.Project import com.intellij.openapi.project.Project
import com.intellij.openapi.project.ex.ProjectManagerEx import com.intellij.openapi.project.ex.ProjectManagerEx
import com.intellij.openapi.startup.StartupManager import com.intellij.openapi.startup.StartupManager
import com.intellij.platform.PlatformProjectOpenProcessor
import com.intellij.psi.PsiDocumentManager import com.intellij.psi.PsiDocumentManager
import com.intellij.psi.impl.PsiDocumentManagerBase import com.intellij.psi.impl.PsiDocumentManagerBase
import com.intellij.testFramework.ExtensionTestUtil import com.intellij.testFramework.ExtensionTestUtil
@@ -27,7 +29,6 @@ import com.intellij.testFramework.TestApplicationManager
import com.intellij.testFramework.runInEdtAndWait import com.intellij.testFramework.runInEdtAndWait
import com.intellij.util.ui.UIUtil import com.intellij.util.ui.UIUtil
import org.jetbrains.kotlin.idea.perf.util.logMessage import org.jetbrains.kotlin.idea.perf.util.logMessage
import org.jetbrains.kotlin.idea.test.runPostStartupActivitiesOnce
import java.nio.file.Paths import java.nio.file.Paths
fun commitAllDocuments() { fun commitAllDocuments() {
@@ -69,7 +70,7 @@ fun dispatchAllInvocationEvents() {
} }
fun loadProjectWithName(path: String, name: String): Project? = fun loadProjectWithName(path: String, name: String): Project? =
ProjectManagerEx.getInstanceEx().loadProject(Paths.get(path), name) PlatformProjectOpenProcessor.openExistingProject(Paths.get(path), Paths.get(path), OpenProjectTask(projectName = name))
fun TestApplicationManager.closeProject(project: Project) { fun TestApplicationManager.closeProject(project: Project) {
val name = project.name val name = project.name
@@ -90,11 +91,7 @@ fun TestApplicationManager.closeProject(project: Project) {
} }
fun runStartupActivities(project: Project) { fun runStartupActivities(project: Project) {
with(StartupManager.getInstance(project) as StartupManagerImpl) { // obsolete
//scheduleInitialVfsRefresh()
runStartupActivities()
}
runPostStartupActivitiesOnce(project)
} }
fun waitForAllEditorsFinallyLoaded(project: Project) { fun waitForAllEditorsFinallyLoaded(project: Project) {
@@ -8,7 +8,6 @@ package org.jetbrains.kotlin.idea.testFramework
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzerSettings import com.intellij.codeInsight.daemon.DaemonCodeAnalyzerSettings
import com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl import com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl
import com.intellij.ide.impl.OpenProjectTask
import com.intellij.ide.startup.impl.StartupManagerImpl import com.intellij.ide.startup.impl.StartupManagerImpl
import com.intellij.lang.LanguageAnnotators import com.intellij.lang.LanguageAnnotators
import com.intellij.lang.LanguageExtensionPoint import com.intellij.lang.LanguageExtensionPoint
@@ -21,7 +20,6 @@ import com.intellij.openapi.fileEditor.FileDocumentManager
import com.intellij.openapi.project.Project import com.intellij.openapi.project.Project
import com.intellij.openapi.project.ex.ProjectManagerEx import com.intellij.openapi.project.ex.ProjectManagerEx
import com.intellij.openapi.startup.StartupManager import com.intellij.openapi.startup.StartupManager
import com.intellij.platform.PlatformProjectOpenProcessor
import com.intellij.psi.PsiDocumentManager import com.intellij.psi.PsiDocumentManager
import com.intellij.psi.impl.PsiDocumentManagerBase import com.intellij.psi.impl.PsiDocumentManagerBase
import com.intellij.testFramework.ExtensionTestUtil import com.intellij.testFramework.ExtensionTestUtil
@@ -29,6 +27,7 @@ import com.intellij.testFramework.TestApplicationManager
import com.intellij.testFramework.runInEdtAndWait import com.intellij.testFramework.runInEdtAndWait
import com.intellij.util.ui.UIUtil import com.intellij.util.ui.UIUtil
import org.jetbrains.kotlin.idea.perf.util.logMessage import org.jetbrains.kotlin.idea.perf.util.logMessage
import org.jetbrains.kotlin.idea.test.runPostStartupActivitiesOnce
import java.nio.file.Paths import java.nio.file.Paths
fun commitAllDocuments() { fun commitAllDocuments() {
@@ -70,7 +69,7 @@ fun dispatchAllInvocationEvents() {
} }
fun loadProjectWithName(path: String, name: String): Project? = fun loadProjectWithName(path: String, name: String): Project? =
PlatformProjectOpenProcessor.openExistingProject(Paths.get(path), Paths.get(path), OpenProjectTask(projectName = name)) ProjectManagerEx.getInstanceEx().loadProject(Paths.get(path), name)
fun TestApplicationManager.closeProject(project: Project) { fun TestApplicationManager.closeProject(project: Project) {
val name = project.name val name = project.name
@@ -91,7 +90,11 @@ fun TestApplicationManager.closeProject(project: Project) {
} }
fun runStartupActivities(project: Project) { fun runStartupActivities(project: Project) {
// obsolete with(StartupManager.getInstance(project) as StartupManagerImpl) {
//scheduleInitialVfsRefresh()
runStartupActivities()
}
runPostStartupActivitiesOnce(project)
} }
fun waitForAllEditorsFinallyLoaded(project: Project) { fun waitForAllEditorsFinallyLoaded(project: Project) {
@@ -13,7 +13,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
<version>@snapshot@</version> <version>@snapshot@</version>
<vendor url="http://www.jetbrains.com">JetBrains</vendor> <vendor url="http://www.jetbrains.com">JetBrains</vendor>
<idea-version since-build="201.7223.91" until-build="201.*"/> <idea-version since-build="202.1" until-build="202.*"/>
<change-notes><![CDATA[ <change-notes><![CDATA[
<h3>1.4.20</h3> <h3>1.4.20</h3>
@@ -69,7 +69,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
<!-- ULTIMATE-PLUGIN-PLACEHOLDER --> <!-- ULTIMATE-PLUGIN-PLACEHOLDER -->
<!-- CIDR-PLUGIN-PLACEHOLDER-START --> <!-- CIDR-PLUGIN-PLACEHOLDER-START -->
<depends>com.intellij.modules.idea</depends> <incompatible-with>com.intellij.modules.androidstudio</incompatible-with>
<depends>com.intellij.modules.java</depends> <depends>com.intellij.modules.java</depends>
<depends optional="true" config-file="javaScriptDebug.xml">JavaScriptDebugger</depends> <depends optional="true" config-file="javaScriptDebug.xml">JavaScriptDebugger</depends>
<depends optional="true" config-file="kotlin-copyright.xml">com.intellij.copyright</depends> <depends optional="true" config-file="kotlin-copyright.xml">com.intellij.copyright</depends>
@@ -110,7 +110,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
<extensions defaultExtensionNs="com.intellij"> <extensions defaultExtensionNs="com.intellij">
<pathMacroContributor implementation="org.jetbrains.kotlin.idea.KotlinPluginMacros"/> <pathMacroContributor implementation="org.jetbrains.kotlin.idea.KotlinPluginMacros"/>
<applicationService serviceImplementation="org.jetbrains.kotlin.idea.PluginStartupApplicationService"/> <applicationService serviceImplementation="org.jetbrains.kotlin.idea.PluginStartupApplicationService" />
<postStartupActivity implementation="org.jetbrains.kotlin.idea.PluginStartupActivity"/> <postStartupActivity implementation="org.jetbrains.kotlin.idea.PluginStartupActivity"/>
<projectService serviceImplementation="org.jetbrains.kotlin.idea.PluginStartupService"/> <projectService serviceImplementation="org.jetbrains.kotlin.idea.PluginStartupService"/>
@@ -145,14 +145,11 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
<statistics.projectUsagesCollector implementation="org.jetbrains.kotlin.idea.formatter.KotlinFormatterUsageCollector"/> <statistics.projectUsagesCollector implementation="org.jetbrains.kotlin.idea.formatter.KotlinFormatterUsageCollector"/>
<statistics.projectUsagesCollector implementation="org.jetbrains.kotlin.idea.statistics.ProjectConfigurationCollector"/> <statistics.projectUsagesCollector implementation="org.jetbrains.kotlin.idea.statistics.ProjectConfigurationCollector"/>
<fileTypeUsageSchemaDescriptor schema="Gradle Script" <fileTypeUsageSchemaDescriptor schema="Gradle Script" implementationClass="org.jetbrains.kotlin.idea.core.script.KotlinGradleScriptFileTypeSchemaDetector"/>
implementationClass="org.jetbrains.kotlin.idea.core.script.KotlinGradleScriptFileTypeSchemaDetector"/>
<completion.ml.model implementation="org.jetbrains.kotlin.idea.completion.ml.KotlinMLRankingProvider"/> <completion.ml.model implementation="org.jetbrains.kotlin.idea.completion.ml.KotlinMLRankingProvider"/>
<completion.ml.contextFeatures language="kotlin" <completion.ml.contextFeatures language="kotlin" implementationClass="org.jetbrains.kotlin.idea.completion.ml.KotlinContextFeatureProvider"/>
implementationClass="org.jetbrains.kotlin.idea.completion.ml.KotlinContextFeatureProvider"/> <suggestedRefactoringSupport language="kotlin" implementationClass="org.jetbrains.kotlin.idea.refactoring.suggested.KotlinSuggestedRefactoringSupport"/>
<suggestedRefactoringSupport language="kotlin"
implementationClass="org.jetbrains.kotlin.idea.refactoring.suggested.KotlinSuggestedRefactoringSupport"/>
<refactoring.moveInnerHandler language="kotlin" <refactoring.moveInnerHandler language="kotlin"
implementationClass="org.jetbrains.kotlin.idea.refactoring.move.MoveKotlinInnerHandler"/> implementationClass="org.jetbrains.kotlin.idea.refactoring.move.MoveKotlinInnerHandler"/>
@@ -13,7 +13,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
<version>@snapshot@</version> <version>@snapshot@</version>
<vendor url="http://www.jetbrains.com">JetBrains</vendor> <vendor url="http://www.jetbrains.com">JetBrains</vendor>
<idea-version since-build="202.1" until-build="202.*"/> <idea-version since-build="201.7223.91" until-build="201.*"/>
<change-notes><![CDATA[ <change-notes><![CDATA[
<h3>1.4.20</h3> <h3>1.4.20</h3>
@@ -69,7 +69,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
<!-- ULTIMATE-PLUGIN-PLACEHOLDER --> <!-- ULTIMATE-PLUGIN-PLACEHOLDER -->
<!-- CIDR-PLUGIN-PLACEHOLDER-START --> <!-- CIDR-PLUGIN-PLACEHOLDER-START -->
<incompatible-with>com.intellij.modules.androidstudio</incompatible-with> <depends>com.intellij.modules.idea</depends>
<depends>com.intellij.modules.java</depends> <depends>com.intellij.modules.java</depends>
<depends optional="true" config-file="javaScriptDebug.xml">JavaScriptDebugger</depends> <depends optional="true" config-file="javaScriptDebug.xml">JavaScriptDebugger</depends>
<depends optional="true" config-file="kotlin-copyright.xml">com.intellij.copyright</depends> <depends optional="true" config-file="kotlin-copyright.xml">com.intellij.copyright</depends>
@@ -110,7 +110,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
<extensions defaultExtensionNs="com.intellij"> <extensions defaultExtensionNs="com.intellij">
<pathMacroContributor implementation="org.jetbrains.kotlin.idea.KotlinPluginMacros"/> <pathMacroContributor implementation="org.jetbrains.kotlin.idea.KotlinPluginMacros"/>
<applicationService serviceImplementation="org.jetbrains.kotlin.idea.PluginStartupApplicationService" /> <applicationService serviceImplementation="org.jetbrains.kotlin.idea.PluginStartupApplicationService"/>
<postStartupActivity implementation="org.jetbrains.kotlin.idea.PluginStartupActivity"/> <postStartupActivity implementation="org.jetbrains.kotlin.idea.PluginStartupActivity"/>
<projectService serviceImplementation="org.jetbrains.kotlin.idea.PluginStartupService"/> <projectService serviceImplementation="org.jetbrains.kotlin.idea.PluginStartupService"/>
@@ -145,11 +145,14 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
<statistics.projectUsagesCollector implementation="org.jetbrains.kotlin.idea.formatter.KotlinFormatterUsageCollector"/> <statistics.projectUsagesCollector implementation="org.jetbrains.kotlin.idea.formatter.KotlinFormatterUsageCollector"/>
<statistics.projectUsagesCollector implementation="org.jetbrains.kotlin.idea.statistics.ProjectConfigurationCollector"/> <statistics.projectUsagesCollector implementation="org.jetbrains.kotlin.idea.statistics.ProjectConfigurationCollector"/>
<fileTypeUsageSchemaDescriptor schema="Gradle Script" implementationClass="org.jetbrains.kotlin.idea.core.script.KotlinGradleScriptFileTypeSchemaDetector"/> <fileTypeUsageSchemaDescriptor schema="Gradle Script"
implementationClass="org.jetbrains.kotlin.idea.core.script.KotlinGradleScriptFileTypeSchemaDetector"/>
<completion.ml.model implementation="org.jetbrains.kotlin.idea.completion.ml.KotlinMLRankingProvider"/> <completion.ml.model implementation="org.jetbrains.kotlin.idea.completion.ml.KotlinMLRankingProvider"/>
<completion.ml.contextFeatures language="kotlin" implementationClass="org.jetbrains.kotlin.idea.completion.ml.KotlinContextFeatureProvider"/> <completion.ml.contextFeatures language="kotlin"
<suggestedRefactoringSupport language="kotlin" implementationClass="org.jetbrains.kotlin.idea.refactoring.suggested.KotlinSuggestedRefactoringSupport"/> implementationClass="org.jetbrains.kotlin.idea.completion.ml.KotlinContextFeatureProvider"/>
<suggestedRefactoringSupport language="kotlin"
implementationClass="org.jetbrains.kotlin.idea.refactoring.suggested.KotlinSuggestedRefactoringSupport"/>
<refactoring.moveInnerHandler language="kotlin" <refactoring.moveInnerHandler language="kotlin"
implementationClass="org.jetbrains.kotlin.idea.refactoring.move.MoveKotlinInnerHandler"/> implementationClass="org.jetbrains.kotlin.idea.refactoring.move.MoveKotlinInnerHandler"/>
@@ -46,7 +46,7 @@ abstract class AbstractScratchLineMarkersTest : FileEditorManagerTestCase() {
val project = myFixture.project val project = myFixture.project
val document = myFixture.editor.document val document = myFixture.editor.document
val data = ExpectedHighlightingData(document, false, false, false, myFixture.file) val data = ExpectedHighlightingData(document, false, false, false)
data.init() data.init()
PsiDocumentManager.getInstance(project).commitAllDocuments() PsiDocumentManager.getInstance(project).commitAllDocuments()
@@ -69,7 +69,7 @@ abstract class AbstractScratchLineMarkersTest : FileEditorManagerTestCase() {
): List<LineMarkerInfo<*>> { ): List<LineMarkerInfo<*>> {
myFixture.doHighlighting() myFixture.doHighlighting()
return AbstractLineMarkersTest.checkHighlighting(myFixture.project, documentToAnalyze, expectedHighlighting, expectedFile) return AbstractLineMarkersTest.checkHighlighting(myFixture.file, documentToAnalyze, expectedHighlighting, expectedFile)
} }
} }
@@ -46,7 +46,7 @@ abstract class AbstractScratchLineMarkersTest : FileEditorManagerTestCase() {
val project = myFixture.project val project = myFixture.project
val document = myFixture.editor.document val document = myFixture.editor.document
val data = ExpectedHighlightingData(document, false, false, false) val data = ExpectedHighlightingData(document, false, false, false, myFixture.file)
data.init() data.init()
PsiDocumentManager.getInstance(project).commitAllDocuments() PsiDocumentManager.getInstance(project).commitAllDocuments()
@@ -69,7 +69,7 @@ abstract class AbstractScratchLineMarkersTest : FileEditorManagerTestCase() {
): List<LineMarkerInfo<*>> { ): List<LineMarkerInfo<*>> {
myFixture.doHighlighting() myFixture.doHighlighting()
return AbstractLineMarkersTest.checkHighlighting(myFixture.file, documentToAnalyze, expectedHighlighting, expectedFile) return AbstractLineMarkersTest.checkHighlighting(myFixture.project, documentToAnalyze, expectedHighlighting, expectedFile)
} }
} }
@@ -78,11 +78,11 @@ class KotlinHighlightExitPointsHandlerFactory : HighlightUsagesHandlerFactoryBas
override fun getTargets() = listOf(target) override fun getTargets() = listOf(target)
override fun selectTargets(targets: MutableList<PsiElement>, selectionConsumer: Consumer<MutableList<PsiElement>>) { override fun selectTargets(targets: MutableList<out PsiElement>, selectionConsumer: Consumer<in MutableList<out PsiElement>>) {
selectionConsumer.consume(targets) selectionConsumer.consume(targets)
} }
override fun computeUsages(targets: MutableList<PsiElement>?) { override fun computeUsages(targets: MutableList<out PsiElement>) {
val relevantFunction: KtDeclarationWithBody? = val relevantFunction: KtDeclarationWithBody? =
if (target is KtFunctionLiteral) { if (target is KtFunctionLiteral) {
target target
@@ -78,11 +78,11 @@ class KotlinHighlightExitPointsHandlerFactory : HighlightUsagesHandlerFactoryBas
override fun getTargets() = listOf(target) override fun getTargets() = listOf(target)
override fun selectTargets(targets: MutableList<out PsiElement>, selectionConsumer: Consumer<in MutableList<out PsiElement>>) { override fun selectTargets(targets: MutableList<PsiElement>, selectionConsumer: Consumer<MutableList<PsiElement>>) {
selectionConsumer.consume(targets) selectionConsumer.consume(targets)
} }
override fun computeUsages(targets: MutableList<out PsiElement>) { override fun computeUsages(targets: MutableList<PsiElement>?) {
val relevantFunction: KtDeclarationWithBody? = val relevantFunction: KtDeclarationWithBody? =
if (target is KtFunctionLiteral) { if (target is KtFunctionLiteral) {
target target
@@ -38,11 +38,11 @@ class KotlinHighlightImplicitItHandlerFactory : HighlightUsagesHandlerFactoryBas
override fun getTargets() = listOf(refExpr) override fun getTargets() = listOf(refExpr)
override fun selectTargets( override fun selectTargets(
targets: MutableList<KtNameReferenceExpression>, targets: MutableList<out KtNameReferenceExpression>,
selectionConsumer: Consumer<MutableList<KtNameReferenceExpression>> selectionConsumer: Consumer<in MutableList<out KtNameReferenceExpression>>
) = selectionConsumer.consume(targets) ) = selectionConsumer.consume(targets)
override fun computeUsages(targets: MutableList<KtNameReferenceExpression>?) { override fun computeUsages(targets: MutableList<out KtNameReferenceExpression>) {
lambda.accept( lambda.accept(
object : KtTreeVisitorVoid() { object : KtTreeVisitorVoid() {
override fun visitSimpleNameExpression(expression: KtSimpleNameExpression) { override fun visitSimpleNameExpression(expression: KtSimpleNameExpression) {
@@ -38,11 +38,11 @@ class KotlinHighlightImplicitItHandlerFactory : HighlightUsagesHandlerFactoryBas
override fun getTargets() = listOf(refExpr) override fun getTargets() = listOf(refExpr)
override fun selectTargets( override fun selectTargets(
targets: MutableList<out KtNameReferenceExpression>, targets: MutableList<KtNameReferenceExpression>,
selectionConsumer: Consumer<in MutableList<out KtNameReferenceExpression>> selectionConsumer: Consumer<MutableList<KtNameReferenceExpression>>
) = selectionConsumer.consume(targets) ) = selectionConsumer.consume(targets)
override fun computeUsages(targets: MutableList<out KtNameReferenceExpression>) { override fun computeUsages(targets: MutableList<KtNameReferenceExpression>?) {
lambda.accept( lambda.accept(
object : KtTreeVisitorVoid() { object : KtTreeVisitorVoid() {
override fun visitSimpleNameExpression(expression: KtSimpleNameExpression) { override fun visitSimpleNameExpression(expression: KtSimpleNameExpression) {
@@ -46,7 +46,7 @@ import java.util.*
class KotlinRecursiveCallLineMarkerProvider : LineMarkerProvider { class KotlinRecursiveCallLineMarkerProvider : LineMarkerProvider {
override fun getLineMarkerInfo(element: PsiElement) = null override fun getLineMarkerInfo(element: PsiElement) = null
override fun collectSlowLineMarkers(elements: MutableList<PsiElement>, result: LineMarkerInfos) { override fun collectSlowLineMarkers(elements: MutableList<out PsiElement>, result: LineMarkerInfos) {
val markedLineNumbers = HashSet<Int>() val markedLineNumbers = HashSet<Int>()
for (element in elements) { for (element in elements) {
@@ -46,7 +46,7 @@ import java.util.*
class KotlinRecursiveCallLineMarkerProvider : LineMarkerProvider { class KotlinRecursiveCallLineMarkerProvider : LineMarkerProvider {
override fun getLineMarkerInfo(element: PsiElement) = null override fun getLineMarkerInfo(element: PsiElement) = null
override fun collectSlowLineMarkers(elements: MutableList<out PsiElement>, result: LineMarkerInfos) { override fun collectSlowLineMarkers(elements: MutableList<PsiElement>, result: LineMarkerInfos) {
val markedLineNumbers = HashSet<Int>() val markedLineNumbers = HashSet<Int>()
for (element in elements) { for (element in elements) {
@@ -48,7 +48,7 @@ class KotlinSuspendCallLineMarkerProvider : LineMarkerProvider {
override fun getLineMarkerInfo(element: PsiElement): LineMarkerInfo<*>? = null override fun getLineMarkerInfo(element: PsiElement): LineMarkerInfo<*>? = null
override fun collectSlowLineMarkers( override fun collectSlowLineMarkers(
elements: MutableList<PsiElement>, elements: MutableList<out PsiElement>,
result: LineMarkerInfos result: LineMarkerInfos
) { ) {
val markedLineNumbers = HashSet<Int>() val markedLineNumbers = HashSet<Int>()
@@ -48,7 +48,7 @@ class KotlinSuspendCallLineMarkerProvider : LineMarkerProvider {
override fun getLineMarkerInfo(element: PsiElement): LineMarkerInfo<*>? = null override fun getLineMarkerInfo(element: PsiElement): LineMarkerInfo<*>? = null
override fun collectSlowLineMarkers( override fun collectSlowLineMarkers(
elements: MutableList<out PsiElement>, elements: MutableList<PsiElement>,
result: LineMarkerInfos result: LineMarkerInfos
) { ) {
val markedLineNumbers = HashSet<Int>() val markedLineNumbers = HashSet<Int>()
@@ -7,4 +7,4 @@ package org.jetbrains.kotlin.idea.highlighter.markers
import com.intellij.codeInsight.daemon.LineMarkerInfo import com.intellij.codeInsight.daemon.LineMarkerInfo
typealias LineMarkerInfos = MutableCollection<LineMarkerInfo<*>> typealias LineMarkerInfos = MutableCollection<in LineMarkerInfo<*>>
@@ -7,4 +7,4 @@ package org.jetbrains.kotlin.idea.highlighter.markers
import com.intellij.codeInsight.daemon.LineMarkerInfo import com.intellij.codeInsight.daemon.LineMarkerInfo
typealias LineMarkerInfos = MutableCollection<in LineMarkerInfo<*>> typealias LineMarkerInfos = MutableCollection<LineMarkerInfo<*>>
@@ -161,9 +161,9 @@ class TrailingCommaInspection(
val settings = CodeStyle.getSettings(project).clone() val settings = CodeStyle.getSettings(project).clone()
settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA = true settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA = true
settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA_ON_CALL_SITE = true settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA_ON_CALL_SITE = true
CodeStyle.doWithTemporarySettings(project, settings) { CodeStyle.doWithTemporarySettings(project, settings, Runnable {
CodeStyleManager.getInstance(project).reformatRange(element, range.startOffset, range.endOffset) CodeStyleManager.getInstance(project).reformatRange(element, range.startOffset, range.endOffset)
} })
} }
} }
@@ -161,9 +161,9 @@ class TrailingCommaInspection(
val settings = CodeStyle.getSettings(project).clone() val settings = CodeStyle.getSettings(project).clone()
settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA = true settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA = true
settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA_ON_CALL_SITE = true settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA_ON_CALL_SITE = true
CodeStyle.doWithTemporarySettings(project, settings, Runnable { CodeStyle.doWithTemporarySettings(project, settings) {
CodeStyleManager.getInstance(project).reformatRange(element, range.startOffset, range.endOffset) CodeStyleManager.getInstance(project).reformatRange(element, range.startOffset, range.endOffset)
}) }
} }
} }
@@ -101,7 +101,7 @@ class KotlinTargetElementEvaluator : TargetElementEvaluatorEx, TargetElementUtil
return null return null
} }
override fun isIdentifierPart(file: PsiFile, text: CharSequence?, offset: Int): Boolean { override fun isIdentifierPart(file: PsiFile, text: CharSequence, offset: Int): Boolean {
val elementAtCaret = file.findElementAt(offset) val elementAtCaret = file.findElementAt(offset)
if (elementAtCaret?.node?.elementType == KtTokens.IDENTIFIER) return true if (elementAtCaret?.node?.elementType == KtTokens.IDENTIFIER) return true
@@ -101,7 +101,7 @@ class KotlinTargetElementEvaluator : TargetElementEvaluatorEx, TargetElementUtil
return null return null
} }
override fun isIdentifierPart(file: PsiFile, text: CharSequence, offset: Int): Boolean { override fun isIdentifierPart(file: PsiFile, text: CharSequence?, offset: Int): Boolean {
val elementAtCaret = file.findElementAt(offset) val elementAtCaret = file.findElementAt(offset)
if (elementAtCaret?.node?.elementType == KtTokens.IDENTIFIER) return true if (elementAtCaret?.node?.elementType == KtTokens.IDENTIFIER) return true
@@ -73,7 +73,7 @@ class KotlinSliceProvider : SliceLanguageSupportProvider, SliceUsageTransformer
override fun transform(usage: SliceUsage): Collection<SliceUsage>? { override fun transform(usage: SliceUsage): Collection<SliceUsage>? {
if (usage is KotlinSliceUsage) return null if (usage is KotlinSliceUsage) return null
return listOf(KotlinSliceUsage(usage.element, usage.parent, KotlinSliceAnalysisMode.Default, false)) return listOf(KotlinSliceUsage(usage.element ?: return null, usage.parent, KotlinSliceAnalysisMode.Default, false))
} }
override fun getExpressionAtCaret(atCaret: PsiElement, dataFlowToThis: Boolean): KtElement? { override fun getExpressionAtCaret(atCaret: PsiElement, dataFlowToThis: Boolean): KtElement? {
@@ -73,7 +73,7 @@ class KotlinSliceProvider : SliceLanguageSupportProvider, SliceUsageTransformer
override fun transform(usage: SliceUsage): Collection<SliceUsage>? { override fun transform(usage: SliceUsage): Collection<SliceUsage>? {
if (usage is KotlinSliceUsage) return null if (usage is KotlinSliceUsage) return null
return listOf(KotlinSliceUsage(usage.element ?: return null, usage.parent, KotlinSliceAnalysisMode.Default, false)) return listOf(KotlinSliceUsage(usage.element, usage.parent, KotlinSliceAnalysisMode.Default, false))
} }
override fun getExpressionAtCaret(atCaret: PsiElement, dataFlowToThis: Boolean): KtElement? { override fun getExpressionAtCaret(atCaret: PsiElement, dataFlowToThis: Boolean): KtElement? {
@@ -12,6 +12,7 @@ import com.intellij.openapi.editor.Document
import com.intellij.openapi.project.Project import com.intellij.openapi.project.Project
import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.io.FileUtil
import com.intellij.psi.PsiDocumentManager import com.intellij.psi.PsiDocumentManager
import com.intellij.psi.PsiFile
import com.intellij.rt.execution.junit.FileComparisonFailure import com.intellij.rt.execution.junit.FileComparisonFailure
import com.intellij.testFramework.ExpectedHighlightingData import com.intellij.testFramework.ExpectedHighlightingData
import com.intellij.testFramework.LightProjectDescriptor import com.intellij.testFramework.LightProjectDescriptor
@@ -40,14 +41,14 @@ abstract class AbstractLineMarkersTest : KotlinLightCodeInsightFixtureTestCase()
fun doTest(path: String) = doTest(path) {} fun doTest(path: String) = doTest(path) {}
protected fun doAndCheckHighlighting( protected fun doAndCheckHighlighting(
project: Project, psiFile: PsiFile,
documentToAnalyze: Document, documentToAnalyze: Document,
expectedHighlighting: ExpectedHighlightingData, expectedHighlighting: ExpectedHighlightingData,
expectedFile: File expectedFile: File
): List<LineMarkerInfo<*>> { ): List<LineMarkerInfo<*>> {
myFixture.doHighlighting() myFixture.doHighlighting()
return checkHighlighting(project, documentToAnalyze, expectedHighlighting, expectedFile) return checkHighlighting(psiFile, documentToAnalyze, expectedHighlighting, expectedFile)
} }
fun doTest(path: String, additionalCheck: () -> Unit) { fun doTest(path: String, additionalCheck: () -> Unit) {
@@ -62,12 +63,12 @@ abstract class AbstractLineMarkersTest : KotlinLightCodeInsightFixtureTestCase()
val project = myFixture.project val project = myFixture.project
val document = myFixture.editor.document val document = myFixture.editor.document
val data = ExpectedHighlightingData(document, false, false, false, myFixture.file) val data = ExpectedHighlightingData(document, false, false, false)
data.init() data.init()
PsiDocumentManager.getInstance(project).commitAllDocuments() PsiDocumentManager.getInstance(project).commitAllDocuments()
val markers = doAndCheckHighlighting(myFixture.project, document, data, testDataFile()) val markers = doAndCheckHighlighting(myFixture.file, document, data, testDataFile())
assertNavigationElements(myFixture.project, myFixture.file as KtFile, markers) assertNavigationElements(myFixture.project, myFixture.file as KtFile, markers)
additionalCheck() additionalCheck()
@@ -150,15 +151,15 @@ abstract class AbstractLineMarkersTest : KotlinLightCodeInsightFixtureTestCase()
} }
fun checkHighlighting( fun checkHighlighting(
project: Project, psiFile: PsiFile,
documentToAnalyze: Document, documentToAnalyze: Document,
expectedHighlighting: ExpectedHighlightingData, expectedHighlighting: ExpectedHighlightingData,
expectedFile: File expectedFile: File
): MutableList<LineMarkerInfo<*>> { ): MutableList<LineMarkerInfo<*>> {
val markers = DaemonCodeAnalyzerImpl.getLineMarkers(documentToAnalyze, project) val markers = DaemonCodeAnalyzerImpl.getLineMarkers(documentToAnalyze, psiFile.project)
try { try {
expectedHighlighting.checkLineMarkers(markers, documentToAnalyze.text) expectedHighlighting.checkLineMarkers(psiFile, markers, documentToAnalyze.text)
// This is a workaround for sad bug in ExpectedHighlightingData: // This is a workaround for sad bug in ExpectedHighlightingData:
// the latter doesn't throw assertion error when some line markers are expected, but none are present. // the latter doesn't throw assertion error when some line markers are expected, but none are present.
@@ -12,7 +12,6 @@ import com.intellij.openapi.editor.Document
import com.intellij.openapi.project.Project import com.intellij.openapi.project.Project
import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.io.FileUtil
import com.intellij.psi.PsiDocumentManager import com.intellij.psi.PsiDocumentManager
import com.intellij.psi.PsiFile
import com.intellij.rt.execution.junit.FileComparisonFailure import com.intellij.rt.execution.junit.FileComparisonFailure
import com.intellij.testFramework.ExpectedHighlightingData import com.intellij.testFramework.ExpectedHighlightingData
import com.intellij.testFramework.LightProjectDescriptor import com.intellij.testFramework.LightProjectDescriptor
@@ -41,14 +40,14 @@ abstract class AbstractLineMarkersTest : KotlinLightCodeInsightFixtureTestCase()
fun doTest(path: String) = doTest(path) {} fun doTest(path: String) = doTest(path) {}
protected fun doAndCheckHighlighting( protected fun doAndCheckHighlighting(
psiFile: PsiFile, project: Project,
documentToAnalyze: Document, documentToAnalyze: Document,
expectedHighlighting: ExpectedHighlightingData, expectedHighlighting: ExpectedHighlightingData,
expectedFile: File expectedFile: File
): List<LineMarkerInfo<*>> { ): List<LineMarkerInfo<*>> {
myFixture.doHighlighting() myFixture.doHighlighting()
return checkHighlighting(psiFile, documentToAnalyze, expectedHighlighting, expectedFile) return checkHighlighting(project, documentToAnalyze, expectedHighlighting, expectedFile)
} }
fun doTest(path: String, additionalCheck: () -> Unit) { fun doTest(path: String, additionalCheck: () -> Unit) {
@@ -63,12 +62,12 @@ abstract class AbstractLineMarkersTest : KotlinLightCodeInsightFixtureTestCase()
val project = myFixture.project val project = myFixture.project
val document = myFixture.editor.document val document = myFixture.editor.document
val data = ExpectedHighlightingData(document, false, false, false) val data = ExpectedHighlightingData(document, false, false, false, myFixture.file)
data.init() data.init()
PsiDocumentManager.getInstance(project).commitAllDocuments() PsiDocumentManager.getInstance(project).commitAllDocuments()
val markers = doAndCheckHighlighting(myFixture.file, document, data, testDataFile()) val markers = doAndCheckHighlighting(myFixture.project, document, data, testDataFile())
assertNavigationElements(myFixture.project, myFixture.file as KtFile, markers) assertNavigationElements(myFixture.project, myFixture.file as KtFile, markers)
additionalCheck() additionalCheck()
@@ -151,15 +150,15 @@ abstract class AbstractLineMarkersTest : KotlinLightCodeInsightFixtureTestCase()
} }
fun checkHighlighting( fun checkHighlighting(
psiFile: PsiFile, project: Project,
documentToAnalyze: Document, documentToAnalyze: Document,
expectedHighlighting: ExpectedHighlightingData, expectedHighlighting: ExpectedHighlightingData,
expectedFile: File expectedFile: File
): MutableList<LineMarkerInfo<*>> { ): MutableList<LineMarkerInfo<*>> {
val markers = DaemonCodeAnalyzerImpl.getLineMarkers(documentToAnalyze, psiFile.project) val markers = DaemonCodeAnalyzerImpl.getLineMarkers(documentToAnalyze, project)
try { try {
expectedHighlighting.checkLineMarkers(psiFile, markers, documentToAnalyze.text) expectedHighlighting.checkLineMarkers(markers, documentToAnalyze.text)
// This is a workaround for sad bug in ExpectedHighlightingData: // This is a workaround for sad bug in ExpectedHighlightingData:
// the latter doesn't throw assertion error when some line markers are expected, but none are present. // the latter doesn't throw assertion error when some line markers are expected, but none are present.
@@ -65,9 +65,7 @@ abstract class AbstractLineMarkersTestInLibrarySources : AbstractLineMarkersTest
val project = myFixture.project val project = myFixture.project
for (file in libraryOriginal.walkTopDown().filter { !it.isDirectory }) { for (file in libraryOriginal.walkTopDown().filter { !it.isDirectory }) {
myFixture.openFileInEditor(fileSystem.findFileByPath(file.absolutePath)!!) myFixture.openFileInEditor(fileSystem.findFileByPath(file.absolutePath)!!)
val data = ExpectedHighlightingData( val data = ExpectedHighlightingData(myFixture.editor.document, false, false, false)
myFixture.editor.document, false, false, false, myFixture.file
)
data.init() data.init()
val librarySourceFile = libraryClean!!.resolve(file.relativeTo(libraryOriginal).path) val librarySourceFile = libraryClean!!.resolve(file.relativeTo(libraryOriginal).path)
@@ -79,7 +77,7 @@ abstract class AbstractLineMarkersTestInLibrarySources : AbstractLineMarkersTest
throw AssertionError("File ${myFixture.file.virtualFile.path} should be in library sources!") throw AssertionError("File ${myFixture.file.virtualFile.path} should be in library sources!")
} }
doAndCheckHighlighting(myFixture.project, document, data, file) doAndCheckHighlighting(myFixture.file, document, data, file)
} }
} }
} }
@@ -65,7 +65,9 @@ abstract class AbstractLineMarkersTestInLibrarySources : AbstractLineMarkersTest
val project = myFixture.project val project = myFixture.project
for (file in libraryOriginal.walkTopDown().filter { !it.isDirectory }) { for (file in libraryOriginal.walkTopDown().filter { !it.isDirectory }) {
myFixture.openFileInEditor(fileSystem.findFileByPath(file.absolutePath)!!) myFixture.openFileInEditor(fileSystem.findFileByPath(file.absolutePath)!!)
val data = ExpectedHighlightingData(myFixture.editor.document, false, false, false) val data = ExpectedHighlightingData(
myFixture.editor.document, false, false, false, myFixture.file
)
data.init() data.init()
val librarySourceFile = libraryClean!!.resolve(file.relativeTo(libraryOriginal).path) val librarySourceFile = libraryClean!!.resolve(file.relativeTo(libraryOriginal).path)
@@ -77,7 +79,7 @@ abstract class AbstractLineMarkersTestInLibrarySources : AbstractLineMarkersTest
throw AssertionError("File ${myFixture.file.virtualFile.path} should be in library sources!") throw AssertionError("File ${myFixture.file.virtualFile.path} should be in library sources!")
} }
doAndCheckHighlighting(myFixture.file, document, data, file) doAndCheckHighlighting(myFixture.project, document, data, file)
} }
} }
} }
@@ -24,7 +24,7 @@ abstract class AbstractUsageHighlightingTest : KotlinLightCodeInsightFixtureTest
protected fun doTest(unused: String) { protected fun doTest(unused: String) {
myFixture.configureByFile(fileName()) myFixture.configureByFile(fileName())
val document = myFixture.editor.document val document = myFixture.editor.document
val data = ExpectedHighlightingData(document, false, false, true, false, myFixture.file) val data = ExpectedHighlightingData(document, false, false, true, false)
data.init() data.init()
val caret = document.extractMarkerOffset(project, CARET_TAG) val caret = document.extractMarkerOffset(project, CARET_TAG)
@@ -48,7 +48,7 @@ abstract class AbstractUsageHighlightingTest : KotlinLightCodeInsightFixtureTest
.create() .create()
} }
data.checkResult(infos, StringBuilder(document.text).insert(caret, CARET_TAG).toString()) data.checkResult(myFixture.file, infos, StringBuilder(document.text).insert(caret, CARET_TAG).toString())
} }
private fun isUsageHighlighting(info: RangeHighlighter): Boolean { private fun isUsageHighlighting(info: RangeHighlighter): Boolean {
@@ -24,7 +24,7 @@ abstract class AbstractUsageHighlightingTest : KotlinLightCodeInsightFixtureTest
protected fun doTest(unused: String) { protected fun doTest(unused: String) {
myFixture.configureByFile(fileName()) myFixture.configureByFile(fileName())
val document = myFixture.editor.document val document = myFixture.editor.document
val data = ExpectedHighlightingData(document, false, false, true, false) val data = ExpectedHighlightingData(document, false, false, true, false, myFixture.file)
data.init() data.init()
val caret = document.extractMarkerOffset(project, CARET_TAG) val caret = document.extractMarkerOffset(project, CARET_TAG)
@@ -48,7 +48,7 @@ abstract class AbstractUsageHighlightingTest : KotlinLightCodeInsightFixtureTest
.create() .create()
} }
data.checkResult(myFixture.file, infos, StringBuilder(document.text).insert(caret, CARET_TAG).toString()) data.checkResult(infos, StringBuilder(document.text).insert(caret, CARET_TAG).toString())
} }
private fun isUsageHighlighting(info: RangeHighlighter): Boolean { private fun isUsageHighlighting(info: RangeHighlighter): Boolean {
@@ -53,7 +53,7 @@ class InspectionDescriptionTest : LightPlatformTestCase() {
private fun loadKotlinInspections(): List<InspectionToolWrapper<InspectionProfileEntry, InspectionEP>> { private fun loadKotlinInspections(): List<InspectionToolWrapper<InspectionProfileEntry, InspectionEP>> {
return InspectionToolRegistrar.getInstance().createTools().filter { return InspectionToolRegistrar.getInstance().createTools().filter {
it.extension.pluginDescriptor.pluginId == KotlinPluginUtil.KOTLIN_PLUGIN_ID it.extension.pluginDescriptor.pluginId == KotlinPluginUtil.KOTLIN_PLUGIN_ID
} } as List<InspectionToolWrapper<InspectionProfileEntry, InspectionEP>>
} }
private fun loadKotlinInspectionExtensions() = private fun loadKotlinInspectionExtensions() =
@@ -53,7 +53,7 @@ class InspectionDescriptionTest : LightPlatformTestCase() {
private fun loadKotlinInspections(): List<InspectionToolWrapper<InspectionProfileEntry, InspectionEP>> { private fun loadKotlinInspections(): List<InspectionToolWrapper<InspectionProfileEntry, InspectionEP>> {
return InspectionToolRegistrar.getInstance().createTools().filter { return InspectionToolRegistrar.getInstance().createTools().filter {
it.extension.pluginDescriptor.pluginId == KotlinPluginUtil.KOTLIN_PLUGIN_ID it.extension.pluginDescriptor.pluginId == KotlinPluginUtil.KOTLIN_PLUGIN_ID
} as List<InspectionToolWrapper<InspectionProfileEntry, InspectionEP>> }
} }
private fun loadKotlinInspectionExtensions() = private fun loadKotlinInspectionExtensions() =
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.idea.intentions
import com.intellij.codeInsight.intention.IntentionActionBean import com.intellij.codeInsight.intention.IntentionActionBean
import com.intellij.codeInsight.intention.IntentionManager import com.intellij.codeInsight.intention.IntentionManager
import com.intellij.codeInsight.intention.impl.config.IntentionManagerImpl
import com.intellij.openapi.extensions.Extensions import com.intellij.openapi.extensions.Extensions
import com.intellij.testFramework.LightPlatformTestCase import com.intellij.testFramework.LightPlatformTestCase
import com.intellij.testFramework.UsefulTestCase import com.intellij.testFramework.UsefulTestCase
@@ -56,7 +57,7 @@ class IntentionDescriptionTest : LightPlatformTestCase() {
private fun String.isXmlIntentionName() = startsWith("Add") && endsWith("ToManifest") private fun String.isXmlIntentionName() = startsWith("Add") && endsWith("ToManifest")
private fun loadKotlinIntentions(): List<IntentionActionBean> { private fun loadKotlinIntentions(): List<IntentionActionBean> {
val extensionPoint = Extensions.getRootArea().getExtensionPoint(IntentionManager.EP_INTENTION_ACTIONS) val extensionPoint = Extensions.getRootArea().getExtensionPoint(IntentionManagerImpl.EP_INTENTION_ACTIONS)
return extensionPoint.extensions.toList().filter { return extensionPoint.extensions.toList().filter {
it.pluginDescriptor.pluginId == KotlinPluginUtil.KOTLIN_PLUGIN_ID it.pluginDescriptor.pluginId == KotlinPluginUtil.KOTLIN_PLUGIN_ID
} }
@@ -7,7 +7,6 @@ package org.jetbrains.kotlin.idea.intentions
import com.intellij.codeInsight.intention.IntentionActionBean import com.intellij.codeInsight.intention.IntentionActionBean
import com.intellij.codeInsight.intention.IntentionManager import com.intellij.codeInsight.intention.IntentionManager
import com.intellij.codeInsight.intention.impl.config.IntentionManagerImpl
import com.intellij.openapi.extensions.Extensions import com.intellij.openapi.extensions.Extensions
import com.intellij.testFramework.LightPlatformTestCase import com.intellij.testFramework.LightPlatformTestCase
import com.intellij.testFramework.UsefulTestCase import com.intellij.testFramework.UsefulTestCase
@@ -57,7 +56,7 @@ class IntentionDescriptionTest : LightPlatformTestCase() {
private fun String.isXmlIntentionName() = startsWith("Add") && endsWith("ToManifest") private fun String.isXmlIntentionName() = startsWith("Add") && endsWith("ToManifest")
private fun loadKotlinIntentions(): List<IntentionActionBean> { private fun loadKotlinIntentions(): List<IntentionActionBean> {
val extensionPoint = Extensions.getRootArea().getExtensionPoint(IntentionManagerImpl.EP_INTENTION_ACTIONS) val extensionPoint = Extensions.getRootArea().getExtensionPoint(IntentionManager.EP_INTENTION_ACTIONS)
return extensionPoint.extensions.toList().filter { return extensionPoint.extensions.toList().filter {
it.pluginDescriptor.pluginId == KotlinPluginUtil.KOTLIN_PLUGIN_ID it.pluginDescriptor.pluginId == KotlinPluginUtil.KOTLIN_PLUGIN_ID
} }
@@ -6,7 +6,7 @@
package org.jetbrains.kotlin.idea.navigation package org.jetbrains.kotlin.idea.navigation
import com.intellij.ide.util.gotoByName.FilteringGotoByModel import com.intellij.ide.util.gotoByName.FilteringGotoByModel
import com.intellij.lang.Language import com.intellij.ide.util.gotoByName.LanguageRef
import com.intellij.openapi.editor.Editor import com.intellij.openapi.editor.Editor
import com.intellij.psi.PsiElement import com.intellij.psi.PsiElement
import com.intellij.testFramework.UsefulTestCase import com.intellij.testFramework.UsefulTestCase
@@ -20,7 +20,7 @@ object GotoCheck {
@JvmStatic @JvmStatic
@JvmOverloads @JvmOverloads
fun checkGotoDirectives( fun checkGotoDirectives(
model: FilteringGotoByModel<Language>, model: FilteringGotoByModel<LanguageRef>,
editor: Editor, editor: Editor,
nonProjectSymbols: Boolean = false, nonProjectSymbols: Boolean = false,
checkNavigation: Boolean = false checkNavigation: Boolean = false
@@ -6,7 +6,7 @@
package org.jetbrains.kotlin.idea.navigation package org.jetbrains.kotlin.idea.navigation
import com.intellij.ide.util.gotoByName.FilteringGotoByModel import com.intellij.ide.util.gotoByName.FilteringGotoByModel
import com.intellij.ide.util.gotoByName.LanguageRef import com.intellij.lang.Language
import com.intellij.openapi.editor.Editor import com.intellij.openapi.editor.Editor
import com.intellij.psi.PsiElement import com.intellij.psi.PsiElement
import com.intellij.testFramework.UsefulTestCase import com.intellij.testFramework.UsefulTestCase
@@ -20,7 +20,7 @@ object GotoCheck {
@JvmStatic @JvmStatic
@JvmOverloads @JvmOverloads
fun checkGotoDirectives( fun checkGotoDirectives(
model: FilteringGotoByModel<LanguageRef>, model: FilteringGotoByModel<Language>,
editor: Editor, editor: Editor,
nonProjectSymbols: Boolean = false, nonProjectSymbols: Boolean = false,
checkNavigation: Boolean = false checkNavigation: Boolean = false
@@ -23,17 +23,15 @@ import org.jetbrains.kotlin.resolve.BindingContext
import org.jetbrains.kotlin.resolve.TargetEnvironment import org.jetbrains.kotlin.resolve.TargetEnvironment
import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
import org.jetbrains.kotlin.resolve.lazy.ResolveSession import org.jetbrains.kotlin.resolve.lazy.ResolveSession
import org.picocontainer.MutablePicoContainer
abstract class AbstractAdditionalResolveDescriptorRendererTest : AbstractDescriptorRendererTest() { abstract class AbstractAdditionalResolveDescriptorRendererTest : AbstractDescriptorRendererTest() {
override fun setUp() { override fun setUp() {
super.setUp() super.setUp()
val pomModelImpl = PomModelImpl(project)
val treeAspect = TreeAspect(pomModelImpl)
val mockProject = project as MockProject val mockProject = project as MockProject
createAndRegisterKotlinCodeBlockModificationListener(mockProject, pomModelImpl, treeAspect) mockProject.registerService(TreeAspect::class.java, TreeAspect())
mockProject.registerService(PomModel::class.java, PomModelImpl(project))
mockProject.registerService(KotlinCodeBlockModificationListener::class.java, KotlinCodeBlockModificationListener(mockProject))
} }
override fun tearDown() { override fun tearDown() {
@@ -23,15 +23,17 @@ import org.jetbrains.kotlin.resolve.BindingContext
import org.jetbrains.kotlin.resolve.TargetEnvironment import org.jetbrains.kotlin.resolve.TargetEnvironment
import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
import org.jetbrains.kotlin.resolve.lazy.ResolveSession import org.jetbrains.kotlin.resolve.lazy.ResolveSession
import org.picocontainer.MutablePicoContainer
abstract class AbstractAdditionalResolveDescriptorRendererTest : AbstractDescriptorRendererTest() { abstract class AbstractAdditionalResolveDescriptorRendererTest : AbstractDescriptorRendererTest() {
override fun setUp() { override fun setUp() {
super.setUp() super.setUp()
val pomModelImpl = PomModelImpl(project)
val treeAspect = TreeAspect(pomModelImpl)
val mockProject = project as MockProject val mockProject = project as MockProject
mockProject.registerService(TreeAspect::class.java, TreeAspect()) createAndRegisterKotlinCodeBlockModificationListener(mockProject, pomModelImpl, treeAspect)
mockProject.registerService(PomModel::class.java, PomModelImpl(project))
mockProject.registerService(KotlinCodeBlockModificationListener::class.java, KotlinCodeBlockModificationListener(mockProject))
} }
override fun tearDown() { override fun tearDown() {
@@ -9,6 +9,7 @@ import com.intellij.analysis.AnalysisScope
import com.intellij.ide.projectView.TreeStructureProvider import com.intellij.ide.projectView.TreeStructureProvider
import com.intellij.ide.util.treeView.AbstractTreeStructureBase import com.intellij.ide.util.treeView.AbstractTreeStructureBase
import com.intellij.psi.search.GlobalSearchScope import com.intellij.psi.search.GlobalSearchScope
import com.intellij.psi.search.PsiSearchScopeUtil
import com.intellij.slicer.DuplicateMap import com.intellij.slicer.DuplicateMap
import com.intellij.slicer.SliceAnalysisParams import com.intellij.slicer.SliceAnalysisParams
import com.intellij.slicer.SliceNode import com.intellij.slicer.SliceNode
@@ -63,7 +64,7 @@ internal fun buildTreeRepresentation(rootNode: SliceNode): String {
else -> { else -> {
val chunks = usage.text val chunks = usage.text
if (!projectScope.contains(usage.element)) { if (!PsiSearchScopeUtil.isInScope(projectScope, usage.element!!)) {
append("LIB ") append("LIB ")
} else { } else {
append(chunks.first().render() + " ") append(chunks.first().render() + " ")
@@ -9,7 +9,6 @@ import com.intellij.analysis.AnalysisScope
import com.intellij.ide.projectView.TreeStructureProvider import com.intellij.ide.projectView.TreeStructureProvider
import com.intellij.ide.util.treeView.AbstractTreeStructureBase import com.intellij.ide.util.treeView.AbstractTreeStructureBase
import com.intellij.psi.search.GlobalSearchScope import com.intellij.psi.search.GlobalSearchScope
import com.intellij.psi.search.PsiSearchScopeUtil
import com.intellij.slicer.DuplicateMap import com.intellij.slicer.DuplicateMap
import com.intellij.slicer.SliceAnalysisParams import com.intellij.slicer.SliceAnalysisParams
import com.intellij.slicer.SliceNode import com.intellij.slicer.SliceNode
@@ -64,7 +63,7 @@ internal fun buildTreeRepresentation(rootNode: SliceNode): String {
else -> { else -> {
val chunks = usage.text val chunks = usage.text
if (!PsiSearchScopeUtil.isInScope(projectScope, usage.element!!)) { if (!projectScope.contains(usage.element)) {
append("LIB ") append("LIB ")
} else { } else {
append(chunks.first().render() + " ") append(chunks.first().render() + " ")
@@ -40,10 +40,10 @@ abstract class AbstractMultiHighlightingTest : AbstractMultiModuleTest() {
val text = myEditor.document.text val text = myEditor.document.text
if (shouldCheckLineMarkers) { if (shouldCheckLineMarkers) {
data.checkLineMarkers(DaemonCodeAnalyzerImpl.getLineMarkers(getDocument(file), project), text) data.checkLineMarkers(myFile, DaemonCodeAnalyzerImpl.getLineMarkers(getDocument(file), project), text)
} }
if (shouldCheckResult) { if (shouldCheckResult) {
data.checkResult(infos, text) data.checkResult(myFile, infos, text)
} }
return infos return infos
} }
@@ -40,10 +40,10 @@ abstract class AbstractMultiHighlightingTest : AbstractMultiModuleTest() {
val text = myEditor.document.text val text = myEditor.document.text
if (shouldCheckLineMarkers) { if (shouldCheckLineMarkers) {
data.checkLineMarkers(myFile, DaemonCodeAnalyzerImpl.getLineMarkers(getDocument(file), project), text) data.checkLineMarkers(DaemonCodeAnalyzerImpl.getLineMarkers(getDocument(file), project), text)
} }
if (shouldCheckResult) { if (shouldCheckResult) {
data.checkResult(myFile, infos, text) data.checkResult(infos, text)
} }
return infos return infos
} }
@@ -172,7 +172,6 @@ abstract class AbstractIncrementalJpsTest(
BuilderRegistry.getInstance(), BuilderRegistry.getInstance(),
myBuildParams, myBuildParams,
CanceledStatus.NULL, CanceledStatus.NULL,
mockConstantSearch,
true true
) )
val buildResult = BuildResult() val buildResult = BuildResult()
@@ -172,6 +172,7 @@ abstract class AbstractIncrementalJpsTest(
BuilderRegistry.getInstance(), BuilderRegistry.getInstance(),
myBuildParams, myBuildParams,
CanceledStatus.NULL, CanceledStatus.NULL,
mockConstantSearch,
true true
) )
val buildResult = BuildResult() val buildResult = BuildResult()
@@ -1009,7 +1009,7 @@ open class KotlinJpsBuildTest : KotlinJpsBuildTestBase() {
descriptor.setupProject() descriptor.setupProject()
try { try {
val builder = IncProjectBuilder(descriptor, BuilderRegistry.getInstance(), this.myBuildParams, canceledStatus, null, true) val builder = IncProjectBuilder(descriptor, BuilderRegistry.getInstance(), this.myBuildParams, canceledStatus, true)
builder.addMessageHandler(buildResult) builder.addMessageHandler(buildResult)
builder.build(scopeBuilder.build(), false) builder.build(scopeBuilder.build(), false)
} }
@@ -1009,7 +1009,7 @@ open class KotlinJpsBuildTest : KotlinJpsBuildTestBase() {
descriptor.setupProject() descriptor.setupProject()
try { try {
val builder = IncProjectBuilder(descriptor, BuilderRegistry.getInstance(), this.myBuildParams, canceledStatus, true) val builder = IncProjectBuilder(descriptor, BuilderRegistry.getInstance(), this.myBuildParams, canceledStatus, null, true)
builder.addMessageHandler(buildResult) builder.addMessageHandler(buildResult)
builder.build(scopeBuilder.build(), false) builder.build(scopeBuilder.build(), false)
} }
@@ -149,7 +149,7 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
return KotlinStringULiteralExpression(psiFactory.createExpression(StringUtil.wrapWithDoubleQuote(text)), null) return KotlinStringULiteralExpression(psiFactory.createExpression(StringUtil.wrapWithDoubleQuote(text)), null)
} }
/*override*/ fun createNullLiteral(context: PsiElement?): ULiteralExpression { override fun createNullLiteral(context: PsiElement?): ULiteralExpression {
return psiFactory.createExpression("null").toUElementOfType<ULiteralExpression>()!! return psiFactory.createExpression("null").toUElementOfType<ULiteralExpression>()!!
} }
@@ -167,12 +167,12 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
override fun createIfExpression(condition: UExpression, thenBranch: UExpression, elseBranch: UExpression?): UIfExpression? { fun createIfExpression(condition: UExpression, thenBranch: UExpression, elseBranch: UExpression?): UIfExpression? {
logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter") logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter")
return createIfExpression(condition, thenBranch, elseBranch, null) return createIfExpression(condition, thenBranch, elseBranch, null)
} }
/*override*/ fun createIfExpression( override fun createIfExpression(
condition: UExpression, condition: UExpression,
thenBranch: UExpression, thenBranch: UExpression,
elseBranch: UExpression?, elseBranch: UExpression?,
@@ -186,44 +186,44 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
override fun createParenthesizedExpression(expression: UExpression): UParenthesizedExpression? { fun createParenthesizedExpression(expression: UExpression): UParenthesizedExpression? {
logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter") logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter")
return createParenthesizedExpression(expression, null) return createParenthesizedExpression(expression, null)
} }
/*override*/ fun createParenthesizedExpression(expression: UExpression, context: PsiElement?): UParenthesizedExpression? { override fun createParenthesizedExpression(expression: UExpression, context: PsiElement?): UParenthesizedExpression? {
val source = expression.sourcePsi ?: return null val source = expression.sourcePsi ?: return null
val parenthesized = psiFactory.createExpression("(${source.text})") as? KtParenthesizedExpression ?: return null val parenthesized = psiFactory.createExpression("(${source.text})") as? KtParenthesizedExpression ?: return null
return KotlinUParenthesizedExpression(parenthesized, null) return KotlinUParenthesizedExpression(parenthesized, null)
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
override fun createSimpleReference(name: String): USimpleNameReferenceExpression? { fun createSimpleReference(name: String): USimpleNameReferenceExpression? {
logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter") logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter")
return createSimpleReference(name, null) return createSimpleReference(name, null)
} }
/*override*/ fun createSimpleReference(name: String, context: PsiElement?): USimpleNameReferenceExpression? { override fun createSimpleReference(name: String, context: PsiElement?): USimpleNameReferenceExpression? {
return KotlinUSimpleReferenceExpression(psiFactory.createSimpleName(name), null) return KotlinUSimpleReferenceExpression(psiFactory.createSimpleName(name), null)
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
override fun createSimpleReference(variable: UVariable): USimpleNameReferenceExpression? { fun createSimpleReference(variable: UVariable): USimpleNameReferenceExpression? {
logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter") logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter")
return createSimpleReference(variable, null) return createSimpleReference(variable, null)
} }
/*override*/ fun createSimpleReference(variable: UVariable, context: PsiElement?): USimpleNameReferenceExpression? { override fun createSimpleReference(variable: UVariable, context: PsiElement?): USimpleNameReferenceExpression? {
return createSimpleReference(variable.name ?: return null, context) return createSimpleReference(variable.name ?: return null, context)
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
override fun createReturnExpresion(expression: UExpression?, inLambda: Boolean): UReturnExpression? { fun createReturnExpresion(expression: UExpression?, inLambda: Boolean): UReturnExpression? {
logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter") logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter")
return createReturnExpresion(expression, inLambda, null) return createReturnExpresion(expression, inLambda, null)
} }
/*override*/ fun createReturnExpresion(expression: UExpression?, inLambda: Boolean, context: PsiElement?): UReturnExpression? { override fun createReturnExpresion(expression: UExpression?, inLambda: Boolean, context: PsiElement?): UReturnExpression? {
val label = if (inLambda && context != null) getParentLambdaLabelName(context)?.let { "@$it" } ?: "" else "" val label = if (inLambda && context != null) getParentLambdaLabelName(context)?.let { "@$it" } ?: "" else ""
val returnExpression = psiFactory.createExpression("return$label 1") as KtReturnExpression val returnExpression = psiFactory.createExpression("return$label 1") as KtReturnExpression
val sourcePsi = expression?.sourcePsi val sourcePsi = expression?.sourcePsi
@@ -246,7 +246,7 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
override fun createBinaryExpression( fun createBinaryExpression(
leftOperand: UExpression, leftOperand: UExpression,
rightOperand: UExpression, rightOperand: UExpression,
operator: UastBinaryOperator operator: UastBinaryOperator
@@ -255,7 +255,7 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
return createBinaryExpression(leftOperand, rightOperand, operator, null) return createBinaryExpression(leftOperand, rightOperand, operator, null)
} }
/*override*/ fun createBinaryExpression( override fun createBinaryExpression(
leftOperand: UExpression, leftOperand: UExpression,
rightOperand: UExpression, rightOperand: UExpression,
operator: UastBinaryOperator, operator: UastBinaryOperator,
@@ -280,7 +280,7 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
override fun createFlatBinaryExpression( fun createFlatBinaryExpression(
leftOperand: UExpression, leftOperand: UExpression,
rightOperand: UExpression, rightOperand: UExpression,
operator: UastBinaryOperator operator: UastBinaryOperator
@@ -289,7 +289,7 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
return createFlatBinaryExpression(leftOperand, rightOperand, operator, null) return createFlatBinaryExpression(leftOperand, rightOperand, operator, null)
} }
/*override*/ fun createFlatBinaryExpression( override fun createFlatBinaryExpression(
leftOperand: UExpression, leftOperand: UExpression,
rightOperand: UExpression, rightOperand: UExpression,
operator: UastBinaryOperator, operator: UastBinaryOperator,
@@ -310,12 +310,12 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
override fun createBlockExpression(expressions: List<UExpression>): UBlockExpression? { fun createBlockExpression(expressions: List<UExpression>): UBlockExpression? {
logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter") logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter")
return createBlockExpression(expressions, null) return createBlockExpression(expressions, null)
} }
/*override*/ fun createBlockExpression(expressions: List<UExpression>, context: PsiElement?): UBlockExpression? { override fun createBlockExpression(expressions: List<UExpression>, context: PsiElement?): UBlockExpression? {
val sourceExpressions = expressions.flatMap { it.toSourcePsiFakeAware() } val sourceExpressions = expressions.flatMap { it.toSourcePsiFakeAware() }
val block = psiFactory.createBlock( val block = psiFactory.createBlock(
sourceExpressions.joinToString(separator = "\n") { "println()" } sourceExpressions.joinToString(separator = "\n") { "println()" }
@@ -327,19 +327,19 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
override fun createDeclarationExpression(declarations: List<UDeclaration>): UDeclarationsExpression? { fun createDeclarationExpression(declarations: List<UDeclaration>): UDeclarationsExpression? {
logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter") logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter")
return createDeclarationExpression(declarations, null) return createDeclarationExpression(declarations, null)
} }
/*override*/ fun createDeclarationExpression(declarations: List<UDeclaration>, context: PsiElement?): UDeclarationsExpression? { override fun createDeclarationExpression(declarations: List<UDeclaration>, context: PsiElement?): UDeclarationsExpression? {
return object : KotlinUDeclarationsExpression(null), KotlinFakeUElement { return object : KotlinUDeclarationsExpression(null), KotlinFakeUElement {
override var declarations: List<UDeclaration> = declarations override var declarations: List<UDeclaration> = declarations
override fun unwrapToSourcePsi(): List<PsiElement> = declarations.flatMap { it.toSourcePsiFakeAware() } override fun unwrapToSourcePsi(): List<PsiElement> = declarations.flatMap { it.toSourcePsiFakeAware() }
} }
} }
/*override*/ fun createLambdaExpression( override fun createLambdaExpression(
parameters: List<UParameterInfo>, parameters: List<UParameterInfo>,
body: UExpression, body: UExpression,
context: PsiElement? context: PsiElement?
@@ -377,12 +377,12 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
override fun createLambdaExpression(parameters: List<UParameterInfo>, body: UExpression): ULambdaExpression? { fun createLambdaExpression(parameters: List<UParameterInfo>, body: UExpression): ULambdaExpression? {
logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter") logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter")
return createLambdaExpression(parameters, body, null) return createLambdaExpression(parameters, body, null)
} }
/*override*/ fun createLocalVariable( override fun createLocalVariable(
suggestedName: String?, suggestedName: String?,
type: PsiType?, type: PsiType?,
initializer: UExpression, initializer: UExpression,
@@ -412,7 +412,7 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
override fun createLocalVariable( fun createLocalVariable(
suggestedName: String?, suggestedName: String?,
type: PsiType?, type: PsiType?,
initializer: UExpression, initializer: UExpression,
@@ -149,7 +149,7 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
return KotlinStringULiteralExpression(psiFactory.createExpression(StringUtil.wrapWithDoubleQuote(text)), null) return KotlinStringULiteralExpression(psiFactory.createExpression(StringUtil.wrapWithDoubleQuote(text)), null)
} }
override fun createNullLiteral(context: PsiElement?): ULiteralExpression { /*override*/ fun createNullLiteral(context: PsiElement?): ULiteralExpression {
return psiFactory.createExpression("null").toUElementOfType<ULiteralExpression>()!! return psiFactory.createExpression("null").toUElementOfType<ULiteralExpression>()!!
} }
@@ -167,12 +167,12 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
fun createIfExpression(condition: UExpression, thenBranch: UExpression, elseBranch: UExpression?): UIfExpression? { override fun createIfExpression(condition: UExpression, thenBranch: UExpression, elseBranch: UExpression?): UIfExpression? {
logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter") logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter")
return createIfExpression(condition, thenBranch, elseBranch, null) return createIfExpression(condition, thenBranch, elseBranch, null)
} }
override fun createIfExpression( /*override*/ fun createIfExpression(
condition: UExpression, condition: UExpression,
thenBranch: UExpression, thenBranch: UExpression,
elseBranch: UExpression?, elseBranch: UExpression?,
@@ -186,44 +186,44 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
fun createParenthesizedExpression(expression: UExpression): UParenthesizedExpression? { override fun createParenthesizedExpression(expression: UExpression): UParenthesizedExpression? {
logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter") logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter")
return createParenthesizedExpression(expression, null) return createParenthesizedExpression(expression, null)
} }
override fun createParenthesizedExpression(expression: UExpression, context: PsiElement?): UParenthesizedExpression? { /*override*/ fun createParenthesizedExpression(expression: UExpression, context: PsiElement?): UParenthesizedExpression? {
val source = expression.sourcePsi ?: return null val source = expression.sourcePsi ?: return null
val parenthesized = psiFactory.createExpression("(${source.text})") as? KtParenthesizedExpression ?: return null val parenthesized = psiFactory.createExpression("(${source.text})") as? KtParenthesizedExpression ?: return null
return KotlinUParenthesizedExpression(parenthesized, null) return KotlinUParenthesizedExpression(parenthesized, null)
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
fun createSimpleReference(name: String): USimpleNameReferenceExpression? { override fun createSimpleReference(name: String): USimpleNameReferenceExpression? {
logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter") logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter")
return createSimpleReference(name, null) return createSimpleReference(name, null)
} }
override fun createSimpleReference(name: String, context: PsiElement?): USimpleNameReferenceExpression? { /*override*/ fun createSimpleReference(name: String, context: PsiElement?): USimpleNameReferenceExpression? {
return KotlinUSimpleReferenceExpression(psiFactory.createSimpleName(name), null) return KotlinUSimpleReferenceExpression(psiFactory.createSimpleName(name), null)
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
fun createSimpleReference(variable: UVariable): USimpleNameReferenceExpression? { override fun createSimpleReference(variable: UVariable): USimpleNameReferenceExpression? {
logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter") logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter")
return createSimpleReference(variable, null) return createSimpleReference(variable, null)
} }
override fun createSimpleReference(variable: UVariable, context: PsiElement?): USimpleNameReferenceExpression? { /*override*/ fun createSimpleReference(variable: UVariable, context: PsiElement?): USimpleNameReferenceExpression? {
return createSimpleReference(variable.name ?: return null, context) return createSimpleReference(variable.name ?: return null, context)
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
fun createReturnExpresion(expression: UExpression?, inLambda: Boolean): UReturnExpression? { override fun createReturnExpresion(expression: UExpression?, inLambda: Boolean): UReturnExpression? {
logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter") logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter")
return createReturnExpresion(expression, inLambda, null) return createReturnExpresion(expression, inLambda, null)
} }
override fun createReturnExpresion(expression: UExpression?, inLambda: Boolean, context: PsiElement?): UReturnExpression? { /*override*/ fun createReturnExpresion(expression: UExpression?, inLambda: Boolean, context: PsiElement?): UReturnExpression? {
val label = if (inLambda && context != null) getParentLambdaLabelName(context)?.let { "@$it" } ?: "" else "" val label = if (inLambda && context != null) getParentLambdaLabelName(context)?.let { "@$it" } ?: "" else ""
val returnExpression = psiFactory.createExpression("return$label 1") as KtReturnExpression val returnExpression = psiFactory.createExpression("return$label 1") as KtReturnExpression
val sourcePsi = expression?.sourcePsi val sourcePsi = expression?.sourcePsi
@@ -246,7 +246,7 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
fun createBinaryExpression( override fun createBinaryExpression(
leftOperand: UExpression, leftOperand: UExpression,
rightOperand: UExpression, rightOperand: UExpression,
operator: UastBinaryOperator operator: UastBinaryOperator
@@ -255,7 +255,7 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
return createBinaryExpression(leftOperand, rightOperand, operator, null) return createBinaryExpression(leftOperand, rightOperand, operator, null)
} }
override fun createBinaryExpression( /*override*/ fun createBinaryExpression(
leftOperand: UExpression, leftOperand: UExpression,
rightOperand: UExpression, rightOperand: UExpression,
operator: UastBinaryOperator, operator: UastBinaryOperator,
@@ -280,7 +280,7 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
fun createFlatBinaryExpression( override fun createFlatBinaryExpression(
leftOperand: UExpression, leftOperand: UExpression,
rightOperand: UExpression, rightOperand: UExpression,
operator: UastBinaryOperator operator: UastBinaryOperator
@@ -289,7 +289,7 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
return createFlatBinaryExpression(leftOperand, rightOperand, operator, null) return createFlatBinaryExpression(leftOperand, rightOperand, operator, null)
} }
override fun createFlatBinaryExpression( /*override*/ fun createFlatBinaryExpression(
leftOperand: UExpression, leftOperand: UExpression,
rightOperand: UExpression, rightOperand: UExpression,
operator: UastBinaryOperator, operator: UastBinaryOperator,
@@ -310,12 +310,12 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
fun createBlockExpression(expressions: List<UExpression>): UBlockExpression? { override fun createBlockExpression(expressions: List<UExpression>): UBlockExpression? {
logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter") logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter")
return createBlockExpression(expressions, null) return createBlockExpression(expressions, null)
} }
override fun createBlockExpression(expressions: List<UExpression>, context: PsiElement?): UBlockExpression? { /*override*/ fun createBlockExpression(expressions: List<UExpression>, context: PsiElement?): UBlockExpression? {
val sourceExpressions = expressions.flatMap { it.toSourcePsiFakeAware() } val sourceExpressions = expressions.flatMap { it.toSourcePsiFakeAware() }
val block = psiFactory.createBlock( val block = psiFactory.createBlock(
sourceExpressions.joinToString(separator = "\n") { "println()" } sourceExpressions.joinToString(separator = "\n") { "println()" }
@@ -327,19 +327,19 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
fun createDeclarationExpression(declarations: List<UDeclaration>): UDeclarationsExpression? { override fun createDeclarationExpression(declarations: List<UDeclaration>): UDeclarationsExpression? {
logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter") logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter")
return createDeclarationExpression(declarations, null) return createDeclarationExpression(declarations, null)
} }
override fun createDeclarationExpression(declarations: List<UDeclaration>, context: PsiElement?): UDeclarationsExpression? { /*override*/ fun createDeclarationExpression(declarations: List<UDeclaration>, context: PsiElement?): UDeclarationsExpression? {
return object : KotlinUDeclarationsExpression(null), KotlinFakeUElement { return object : KotlinUDeclarationsExpression(null), KotlinFakeUElement {
override var declarations: List<UDeclaration> = declarations override var declarations: List<UDeclaration> = declarations
override fun unwrapToSourcePsi(): List<PsiElement> = declarations.flatMap { it.toSourcePsiFakeAware() } override fun unwrapToSourcePsi(): List<PsiElement> = declarations.flatMap { it.toSourcePsiFakeAware() }
} }
} }
override fun createLambdaExpression( /*override*/ fun createLambdaExpression(
parameters: List<UParameterInfo>, parameters: List<UParameterInfo>,
body: UExpression, body: UExpression,
context: PsiElement? context: PsiElement?
@@ -377,12 +377,12 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
fun createLambdaExpression(parameters: List<UParameterInfo>, body: UExpression): ULambdaExpression? { override fun createLambdaExpression(parameters: List<UParameterInfo>, body: UExpression): ULambdaExpression? {
logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter") logger<KotlinUastElementFactory>().error("Please switch caller to the version with a context parameter")
return createLambdaExpression(parameters, body, null) return createLambdaExpression(parameters, body, null)
} }
override fun createLocalVariable( /*override*/ fun createLocalVariable(
suggestedName: String?, suggestedName: String?,
type: PsiType?, type: PsiType?,
initializer: UExpression, initializer: UExpression,
@@ -412,7 +412,7 @@ class KotlinUastElementFactory(project: Project) : UastElementFactory {
} }
@Deprecated("use version with context parameter") @Deprecated("use version with context parameter")
fun createLocalVariable( override fun createLocalVariable(
suggestedName: String?, suggestedName: String?,
type: PsiType?, type: PsiType?,
initializer: UExpression, initializer: UExpression,
+1 -2
View File
@@ -6,7 +6,6 @@ org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testJsTestOutputFi
org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImplementWithAndroid, KT-35225,, org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImplementWithAndroid, KT-35225,,
org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImplementWithNonDefaultConfig, Gradle Tests in 201,, org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImplementWithNonDefaultConfig, Gradle Tests in 201,,
org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImplement, Gradle Tests in 201,, org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImplement, Gradle Tests in 201,,
"org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testDetectAndroidSources", Gradle Import Tests,,
"org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testAndroidDependencyOnMPP", Gradle Import Tests,, "org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testAndroidDependencyOnMPP", Gradle Import Tests,,
"org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testDependencyOnRoot", Gradle Tests in 201,, "org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testDependencyOnRoot", Gradle Tests in 201,,
"org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testImportBeforeBuild", Gradle Tests in 201,, "org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testImportBeforeBuild", Gradle Tests in 201,,
@@ -16,7 +15,6 @@ org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImpl
"org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testProjectDependency", Gradle Tests in 201,, "org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testProjectDependency", Gradle Tests in 201,,
org.jetbrains.kotlin.idea.caches.resolve.MultiModuleLineMarkerTestGenerated.testKotlinTestAnnotations, No line markers for test run,, org.jetbrains.kotlin.idea.caches.resolve.MultiModuleLineMarkerTestGenerated.testKotlinTestAnnotations, No line markers for test run,,
org.jetbrains.kotlin.idea.codeInsight.InspectionTestGenerated.Inspections.testAndroidIllegalIdentifiers_inspectionData_Inspections_test, Unprocessed,, org.jetbrains.kotlin.idea.codeInsight.InspectionTestGenerated.Inspections.testAndroidIllegalIdentifiers_inspectionData_Inspections_test, Unprocessed,,
org.jetbrains.kotlin.idea.codeInsight.gradle.GradleFacetImportTest.testAndroidGradleJsDetection, NPE during import,,
org.jetbrains.kotlin.idea.codeInsight.surroundWith.SurroundWithTestGenerated.If.MoveDeclarationsOut.Order.testTwoClasses,,, FLAKY org.jetbrains.kotlin.idea.codeInsight.surroundWith.SurroundWithTestGenerated.If.MoveDeclarationsOut.Order.testTwoClasses,,, FLAKY
org.jetbrains.kotlin.idea.codeInsight.surroundWith.SurroundWithTestGenerated.If.MoveDeclarationsOut.Order.testValAndClass,,, FLAKY org.jetbrains.kotlin.idea.codeInsight.surroundWith.SurroundWithTestGenerated.If.MoveDeclarationsOut.Order.testValAndClass,,, FLAKY
org.jetbrains.kotlin.idea.codeInsight.surroundWith.SurroundWithTestGenerated.If.MoveDeclarationsOut.Order.testValOrder,,, FLAKY org.jetbrains.kotlin.idea.codeInsight.surroundWith.SurroundWithTestGenerated.If.MoveDeclarationsOut.Order.testValOrder,,, FLAKY
@@ -115,6 +113,7 @@ org.jetbrains.kotlin.idea.refactoring.pullUp.PullUpTestGenerated.K2K.testAcciden
org.jetbrains.kotlin.idea.refactoring.move.MoveTestGenerated.testKotlin_moveTopLevelDeclarations_moveFunctionToPackage_MoveFunctionToPackage, fail on TeamCity but works well locally,, FLAKY org.jetbrains.kotlin.idea.refactoring.move.MoveTestGenerated.testKotlin_moveTopLevelDeclarations_moveFunctionToPackage_MoveFunctionToPackage, fail on TeamCity but works well locally,, FLAKY
org.jetbrains.kotlin.idea.intentions.IntentionTestGenerated.ConvertSealedClassToEnum.testInstancesOnly, Generated entries reordered,, FLAKY org.jetbrains.kotlin.idea.intentions.IntentionTestGenerated.ConvertSealedClassToEnum.testInstancesOnly, Generated entries reordered,, FLAKY
org.jetbrains.kotlin.idea.intentions.IntentionTestGenerated.ConvertSealedClassToEnum.testInstancesAndMembers, Enum reorder,, FLAKY org.jetbrains.kotlin.idea.intentions.IntentionTestGenerated.ConvertSealedClassToEnum.testInstancesAndMembers, Enum reorder,, FLAKY
org.jetbrains.kotlin.idea.navigation.GotoDeclarationTestGenerated.testImportAliasMultiDeclarations, showInBestPositionFor doesn't work in headless in 202,,
org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptListenerTest.testChangeInsideNonKtsFileInvalidatesOtherFiles, Unprocessed,, org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptListenerTest.testChangeInsideNonKtsFileInvalidatesOtherFiles, Unprocessed,,
org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptListenerTest.testTwoFilesChanged, Unprocessed,, org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptListenerTest.testTwoFilesChanged, Unprocessed,,
org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptListenerTest.testLoadedConfigurationWhenExternalFileChanged, Unprocessed,, org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptListenerTest.testLoadedConfigurationWhenExternalFileChanged, Unprocessed,,
1 Test key Issue State (optional: MUTE or FAIL) Status (optional: FLAKY)
6 org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImplementWithAndroid KT-35225
7 org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImplementWithNonDefaultConfig Gradle Tests in 201
8 org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImplement Gradle Tests in 201
org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testDetectAndroidSources Gradle Import Tests
9 org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testAndroidDependencyOnMPP Gradle Import Tests
10 org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testDependencyOnRoot Gradle Tests in 201
11 org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testImportBeforeBuild Gradle Tests in 201
15 org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testProjectDependency Gradle Tests in 201
16 org.jetbrains.kotlin.idea.caches.resolve.MultiModuleLineMarkerTestGenerated.testKotlinTestAnnotations No line markers for test run
17 org.jetbrains.kotlin.idea.codeInsight.InspectionTestGenerated.Inspections.testAndroidIllegalIdentifiers_inspectionData_Inspections_test Unprocessed
org.jetbrains.kotlin.idea.codeInsight.gradle.GradleFacetImportTest.testAndroidGradleJsDetection NPE during import
18 org.jetbrains.kotlin.idea.codeInsight.surroundWith.SurroundWithTestGenerated.If.MoveDeclarationsOut.Order.testTwoClasses FLAKY
19 org.jetbrains.kotlin.idea.codeInsight.surroundWith.SurroundWithTestGenerated.If.MoveDeclarationsOut.Order.testValAndClass FLAKY
20 org.jetbrains.kotlin.idea.codeInsight.surroundWith.SurroundWithTestGenerated.If.MoveDeclarationsOut.Order.testValOrder FLAKY
113 org.jetbrains.kotlin.idea.refactoring.move.MoveTestGenerated.testKotlin_moveTopLevelDeclarations_moveFunctionToPackage_MoveFunctionToPackage fail on TeamCity but works well locally FLAKY
114 org.jetbrains.kotlin.idea.intentions.IntentionTestGenerated.ConvertSealedClassToEnum.testInstancesOnly Generated entries reordered FLAKY
115 org.jetbrains.kotlin.idea.intentions.IntentionTestGenerated.ConvertSealedClassToEnum.testInstancesAndMembers Enum reorder FLAKY
116 org.jetbrains.kotlin.idea.navigation.GotoDeclarationTestGenerated.testImportAliasMultiDeclarations showInBestPositionFor doesn't work in headless in 202
117 org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptListenerTest.testChangeInsideNonKtsFileInvalidatesOtherFiles Unprocessed
118 org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptListenerTest.testTwoFilesChanged Unprocessed
119 org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptListenerTest.testLoadedConfigurationWhenExternalFileChanged Unprocessed
@@ -6,6 +6,7 @@ org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testJsTestOutputFi
org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImplementWithAndroid, KT-35225,, org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImplementWithAndroid, KT-35225,,
org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImplementWithNonDefaultConfig, Gradle Tests in 201,, org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImplementWithNonDefaultConfig, Gradle Tests in 201,,
org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImplement, Gradle Tests in 201,, org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImplement, Gradle Tests in 201,,
"org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testDetectAndroidSources", Gradle Import Tests,,
"org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testAndroidDependencyOnMPP", Gradle Import Tests,, "org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testAndroidDependencyOnMPP", Gradle Import Tests,,
"org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testDependencyOnRoot", Gradle Tests in 201,, "org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testDependencyOnRoot", Gradle Tests in 201,,
"org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testImportBeforeBuild", Gradle Tests in 201,, "org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testImportBeforeBuild", Gradle Tests in 201,,
@@ -15,6 +16,7 @@ org.jetbrains.kotlin.gradle.MultiplatformProjectImportingTest.testTransitiveImpl
"org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testProjectDependency", Gradle Tests in 201,, "org.jetbrains.kotlin.gradle.NewMultiplatformProjectImportingTest.testProjectDependency", Gradle Tests in 201,,
org.jetbrains.kotlin.idea.caches.resolve.MultiModuleLineMarkerTestGenerated.testKotlinTestAnnotations, No line markers for test run,, org.jetbrains.kotlin.idea.caches.resolve.MultiModuleLineMarkerTestGenerated.testKotlinTestAnnotations, No line markers for test run,,
org.jetbrains.kotlin.idea.codeInsight.InspectionTestGenerated.Inspections.testAndroidIllegalIdentifiers_inspectionData_Inspections_test, Unprocessed,, org.jetbrains.kotlin.idea.codeInsight.InspectionTestGenerated.Inspections.testAndroidIllegalIdentifiers_inspectionData_Inspections_test, Unprocessed,,
org.jetbrains.kotlin.idea.codeInsight.gradle.GradleFacetImportTest.testAndroidGradleJsDetection, NPE during import,,
org.jetbrains.kotlin.idea.codeInsight.surroundWith.SurroundWithTestGenerated.If.MoveDeclarationsOut.Order.testTwoClasses,,, FLAKY org.jetbrains.kotlin.idea.codeInsight.surroundWith.SurroundWithTestGenerated.If.MoveDeclarationsOut.Order.testTwoClasses,,, FLAKY
org.jetbrains.kotlin.idea.codeInsight.surroundWith.SurroundWithTestGenerated.If.MoveDeclarationsOut.Order.testValAndClass,,, FLAKY org.jetbrains.kotlin.idea.codeInsight.surroundWith.SurroundWithTestGenerated.If.MoveDeclarationsOut.Order.testValAndClass,,, FLAKY
org.jetbrains.kotlin.idea.codeInsight.surroundWith.SurroundWithTestGenerated.If.MoveDeclarationsOut.Order.testValOrder,,, FLAKY org.jetbrains.kotlin.idea.codeInsight.surroundWith.SurroundWithTestGenerated.If.MoveDeclarationsOut.Order.testValOrder,,, FLAKY
@@ -113,7 +115,6 @@ org.jetbrains.kotlin.idea.refactoring.pullUp.PullUpTestGenerated.K2K.testAcciden
org.jetbrains.kotlin.idea.refactoring.move.MoveTestGenerated.testKotlin_moveTopLevelDeclarations_moveFunctionToPackage_MoveFunctionToPackage, fail on TeamCity but works well locally,, FLAKY org.jetbrains.kotlin.idea.refactoring.move.MoveTestGenerated.testKotlin_moveTopLevelDeclarations_moveFunctionToPackage_MoveFunctionToPackage, fail on TeamCity but works well locally,, FLAKY
org.jetbrains.kotlin.idea.intentions.IntentionTestGenerated.ConvertSealedClassToEnum.testInstancesOnly, Generated entries reordered,, FLAKY org.jetbrains.kotlin.idea.intentions.IntentionTestGenerated.ConvertSealedClassToEnum.testInstancesOnly, Generated entries reordered,, FLAKY
org.jetbrains.kotlin.idea.intentions.IntentionTestGenerated.ConvertSealedClassToEnum.testInstancesAndMembers, Enum reorder,, FLAKY org.jetbrains.kotlin.idea.intentions.IntentionTestGenerated.ConvertSealedClassToEnum.testInstancesAndMembers, Enum reorder,, FLAKY
org.jetbrains.kotlin.idea.navigation.GotoDeclarationTestGenerated.testImportAliasMultiDeclarations, showInBestPositionFor doesn't work in headless in 202,,
org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptListenerTest.testChangeInsideNonKtsFileInvalidatesOtherFiles, Unprocessed,, org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptListenerTest.testChangeInsideNonKtsFileInvalidatesOtherFiles, Unprocessed,,
org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptListenerTest.testTwoFilesChanged, Unprocessed,, org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptListenerTest.testTwoFilesChanged, Unprocessed,,
org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptListenerTest.testLoadedConfigurationWhenExternalFileChanged, Unprocessed,, org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptListenerTest.testLoadedConfigurationWhenExternalFileChanged, Unprocessed,,