Skip to content

Commit

Permalink
fix: update IntelliJ platform to 2024.1
Browse files Browse the repository at this point in the history
  • Loading branch information
monosoul committed Sep 20, 2024
1 parent 8f671fe commit 56c35a7
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ kotlin {
}

intellijPlatform {
buildSearchableOptions = true
pluginConfiguration {
name = "Git extended update-index"
ideaVersion {
Expand All @@ -37,7 +38,7 @@ intellijPlatform {

dependencies {
intellijPlatform {
create("IC", "2022.3")
create(type = "IC", version = "2024.1", useInstaller = false)
bundledPlugin("Git4Idea")

pluginVerifier()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.github.monosoul.git.updateindex.extended.ExtendedUpdateIndexCommand.N
import com.github.monosoul.git.updateindex.extended.ExtendedUpdateIndexCommand.SKIP_WORKTREE
import com.github.monosoul.git.updateindex.extended.support.CommandInvoker
import com.github.monosoul.git.updateindex.extended.support.PresentationUpdater
import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.Presentation
import com.intellij.openapi.diagnostic.debug
Expand All @@ -19,6 +20,8 @@ sealed class ExtendedUpdateIndexAction(private val command: ExtendedUpdateIndexC

private val logger = thisLogger()

override fun getActionUpdateThread() = ActionUpdateThread.BGT

Check warning on line 23 in src/main/kotlin/com/github/monosoul/git/updateindex/extended/ExtendedUpdateIndexAction.kt

View check run for this annotation

Codecov / codecov/patch

src/main/kotlin/com/github/monosoul/git/updateindex/extended/ExtendedUpdateIndexAction.kt#L23

Added line #L23 was not covered by tests

override fun update(event: AnActionEvent) {
event.run {
project?.updatePresentation(presentation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.github.monosoul.git.updateindex.extended.changes.view
import com.github.monosoul.git.updateindex.extended.changes.view.Constants.PROPERTY
import com.github.monosoul.git.updateindex.extended.support.PresentationUpdater
import com.intellij.ide.util.PropertiesComponent
import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.Presentation
import com.intellij.openapi.actionSystem.ToggleAction
Expand All @@ -15,6 +16,8 @@ class ToggleSkippedWorktreeAction : ToggleAction() {

private val logger = logger<ToggleSkippedWorktreeAction>()

override fun getActionUpdateThread() = ActionUpdateThread.BGT

Check warning on line 19 in src/main/kotlin/com/github/monosoul/git/updateindex/extended/changes/view/ToggleSkippedWorktreeAction.kt

View check run for this annotation

Codecov / codecov/patch

src/main/kotlin/com/github/monosoul/git/updateindex/extended/changes/view/ToggleSkippedWorktreeAction.kt#L19

Added line #L19 was not covered by tests

override fun update(event: AnActionEvent) {
super.update(event)
event.run {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ internal class UpdateIndexLineHandlerFactoryTest {
every { gitExecutableManager.tryGetVersion(any()) } returns CAN_NOT_OVERRIDE_GIT_CONFIG_FOR_COMMAND
every { gitExecutableManager.getExecutable(project) } returns gitExecutable
every { gitExecutable.exePath } returns exePath
every { gitExecutable.isLocal } returns true
}

@AfterEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ internal class GetSkippedWorktreeFilesTaskTest {
}

expectThat(captor.captured) {
get { printableCommandLine() } isEqualTo "git ls-files -v"
get { printableCommandLine() } isEqualTo "\"\" ls-files -v"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@ import com.intellij.mock.MockApplication
import com.intellij.mock.MockLocalFileSystem
import com.intellij.mock.MockProject
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.application.AsyncExecutionService
import com.intellij.openapi.progress.ProgressManager
import com.intellij.openapi.util.Disposer.dispose
import com.intellij.openapi.vcs.FilePath
import com.intellij.openapi.vcs.LocalFilePath
import com.intellij.openapi.vcs.actions.VcsContextFactory
import com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode
import com.intellij.openapi.vcs.changes.ui.ChangesViewModelBuilder
import com.intellij.openapi.vcs.changes.ui.NoneChangesGroupingFactory
import com.intellij.openapi.vcs.changes.ui.TreeModelBuilder
import com.intellij.openapi.vfs.LocalFileSystem
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.vfs.VirtualFileManager
import com.intellij.peer.impl.VcsContextFactoryImpl
import io.mockk.Called
import io.mockk.every
import io.mockk.impl.annotations.MockK
Expand Down Expand Up @@ -53,6 +56,10 @@ internal class SkippedWorktreeChangesViewModifierTest {
private lateinit var project: MockProject
private lateinit var propertiesComponent: AppPropertyService
private lateinit var localFileSystem: MockLocalFileSystem
private lateinit var vcsContextFactory: VcsContextFactory

@MockK(relaxed = true)
private lateinit var asyncExecutionService: AsyncExecutionService

@MockK(relaxUnitFun = true)
private lateinit var progressManager: ProgressManager
Expand Down Expand Up @@ -82,6 +89,11 @@ internal class SkippedWorktreeChangesViewModifierTest {
application.registerService(virtualFileManager, parent)
every { virtualFileManager.getFileSystem(any()) } returns localFileSystem

vcsContextFactory = VcsContextFactoryImpl()
application.registerService(vcsContextFactory, parent)

application.registerService(asyncExecutionService, parent)

modifier = SkippedWorktreeChangesViewModifier(project)
}

Expand Down

0 comments on commit 56c35a7

Please sign in to comment.