Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding coroutines to analysis process #128

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Adding coroutines to analysis process #128

wants to merge 2 commits into from

Conversation

sellophane
Copy link
Contributor

No description provided.

import kotlinx.coroutines.runBlocking
import kotlin.coroutines.CoroutineContext

object KotlinCoroutinesScope : CoroutineScope {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't like name of this object.
It can by KotlinAnalyzisScope or KotlinSupervisedScope if we want to use it somewhere else.

@@ -30,13 +30,13 @@ import org.jetbrains.kotlin.progress.CompilationCanceledException
import org.jetbrains.kotlin.progress.CompilationCanceledStatus
import org.jetbrains.kotlin.progress.ProgressIndicatorAndCompilationCanceledStatus

public class KotlinAnalysisJob(private val javaProject: IJavaProject) : Job("Kotlin Analysis") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this class as it doesn't have any purpose now.

@@ -97,14 +100,18 @@ class KotlinBuilder : IncrementalProjectBuilder() {
val ktFiles = existingAffectedFiles.map { KotlinPsiManager.getParsedFile(it) }

val analysisResultWithProvider = if (ktFiles.isEmpty())
KotlinAnalyzer.analyzeProject(project)
runBlocking {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runBlocking here is completely unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants