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

update IDEA version to 2024.1 #131

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ plugins {
// Java support
id("java")
// Kotlin support
id("org.jetbrains.kotlin.jvm") version "1.7.20"
id("org.jetbrains.kotlin.jvm") version "1.9.0"
// Gradle IntelliJ Plugin
id("org.jetbrains.intellij") version "1.13.3"
// Gradle Changelog Plugin
Expand Down Expand Up @@ -47,8 +47,8 @@ dependencies {

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.6.4")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.7.10")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.9.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0")
implementation("io.ktor:ktor-client-core:$ktor_version")
implementation("io.ktor:ktor-client-java:$ktor_version")

Expand Down
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ pluginRepositoryUrl = https://github.com/Pushpavel/AutoCp
pluginVersion=v0.7.10
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild=232
pluginSinceBuild=241

platformType=CL
platformVersion=LATEST-EAP-SNAPSHOT
# Using not EAP now because EAP requires breaking change(Java 21 requirement from 2024.2 EAP)
platformVersion=2024.1.1
# LATEST-EAP-SNAPSHOT
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.github.pushpavel.autocp.common.compat.autocpFile
import com.github.pushpavel.autocp.common.compat.base.AutoCpFileConverter
import com.google.gson.JsonParser
import com.intellij.util.io.delete
import com.intellij.util.io.readText
import kotlin.io.path.readText
import java.nio.file.Path

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.github.pushpavel.autocp.common.res.R
import com.google.gson.JsonObject
import com.google.gson.JsonParser
import com.intellij.openapi.project.Project
import com.intellij.util.io.readText
import kotlin.io.path.readText
import com.intellij.util.io.write
import java.nio.file.Path
import kotlin.io.path.Path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,9 @@ class RunAutoCpAction : AnAction("Run with AutoCp", "Run the currently focused f
override fun update(e: AnActionEvent) {
e.presentation.isEnabled = e.project != null && e.getData(CommonDataKeys.VIRTUAL_FILE) != null
}

/* TODO: I have no idea what this means but at least it works */
override fun getActionUpdateThread(): ActionUpdateThread {
return ActionUpdateThread.EDT
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@ import com.intellij.openapi.project.Project
import com.intellij.openapi.project.ProjectManager
import com.intellij.openapi.vfs.VfsUtil
import com.intellij.psi.PsiManager
import com.intellij.util.io.readText
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
import java.nio.file.Paths
import kotlin.io.path.Path
import kotlin.io.path.exists
import kotlin.io.path.pathString
import kotlin.io.path.readText


@Service
@Service(Service.Level.PROJECT)
class AutoCpStorage(val project: Project) {

val database by lazy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import java.nio.file.Path
import kotlin.io.path.Path
import kotlin.io.path.pathString

@Service
@Service(Service.Level.PROJECT)
class SolutionFiles(val project: Project) {
private val db = project.autoCp()
private val solutionFiles get() = db.solutionFilesFlow.value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,22 @@ import com.github.pushpavel.autocp.common.res.R
import com.github.pushpavel.autocp.gather.models.ProblemJson
import com.intellij.openapi.project.DumbAware
import com.intellij.openapi.project.Project
import com.intellij.openapi.startup.StartupActivity
import com.intellij.openapi.startup.ProjectActivity
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.serialization.SerializationException
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.json.Json
import java.net.SocketTimeoutException

/**
* Bridge between Competitive Companion extension and [BatchProcessor]
*/
class ProblemGatheringBridge : StartupActivity, DumbAware {
class ProblemGatheringBridge : ProjectActivity, DumbAware {
private val scope = ioScope()
private val serializer = Json { ignoreUnknownKeys = true }

override fun runActivity(project: Project) {
fun runActivity(project: Project) {
// initialize server
scope.launch {
try {
Expand Down Expand Up @@ -58,4 +57,6 @@ class ProblemGatheringBridge : StartupActivity, DumbAware {
}
}
}

override suspend fun execute(project: Project) = runActivity(project)
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ fun testcaseHeader(
ActionManager
.getInstance()
.createActionToolbar(ActionPlaces.TOOLWINDOW_CONTENT, actionGroup, true).apply {
layoutPolicy = ActionToolbar.NOWRAP_LAYOUT_POLICY
// TODO Nah?? deprecated API...
// layoutPolicy = ActionToolbar.NOWRAP_LAYOUT_POLICY
targetComponent = jbPanel
}
.component,
Expand Down
Loading