diff --git a/.circleci/config.yml b/.circleci/config.yml index 03132dd14..e012f1661 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -267,7 +267,7 @@ jobs: tr '\n' ',' | sed 's/,$//' | sed 's/,/, /g' - labels: intellij-support + labels: "intellij range" - run: # These updates don't seem to be supported by dependabot as of August 2023, @@ -276,8 +276,6 @@ jobs: # language=sh command: | latest_gradle_version=$(curl -fsSL https://services.gradle.org/versions/current | jq -r .version) - # TODO (#1744): bump Gradle wrapper (8.4 fails the configuration phase) - if [[ $latest_gradle_version == 8.4 ]]; then exit 0; fi ./gradlew wrapper --gradle-version=$latest_gradle_version # this only updates gradle-wrapper.properties ./gradlew dependencies # to actually pull the new wrapper script/jar echo "$latest_gradle_version" > /tmp/gradle-version diff --git a/CHANGE-NOTES.md b/CHANGE-NOTES.md index ca56c2517..f58d9d6d7 100644 --- a/CHANGE-NOTES.md +++ b/CHANGE-NOTES.md @@ -1,7 +1,7 @@ # Changelog ## v4.1.0 -- Added support for IntelliJ 2023.3. +- Added: support for IntelliJ 2023.3. ## v4.0.3 - Fixed: all `com.intellij.diagnostic.PluginException: ... ms to call on EDT ...#update@...` errors, hopefully for good (reported by @itxshakil) diff --git a/buildSrc/gradle/libs.versions.toml b/buildSrc/gradle/libs.versions.toml index 939f735e1..848c6d938 100644 --- a/buildSrc/gradle/libs.versions.toml +++ b/buildSrc/gradle/libs.versions.toml @@ -7,7 +7,6 @@ junit-api = "org.junit.jupiter:junit-jupiter-api:5.10.0" pluginPackages-checkerFramework = "org.checkerframework:checkerframework-gradle-plugin:0.6.30" pluginPackages-grgit = "org.ajoberstar.grgit:grgit-gradle:5.2.1" pluginPackages-jetbrains-changelog = "org.jetbrains.intellij.plugins:gradle-changelog-plugin:2.1.2" -# TODO (#1743): bump gradle-intellij-plugin (1.16.0 failing at backend:impl:test) pluginPackages-jetbrains-intellij = "org.jetbrains.intellij.plugins:gradle-intellij-plugin:1.16.0" pluginPackages-jetbrains-kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21" pluginPackages-spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.22.0" diff --git a/frontend/actions/src/main/java/com/virtuslab/gitmachete/frontend/actions/base/BaseSlideInBelowAction.java b/frontend/actions/src/main/java/com/virtuslab/gitmachete/frontend/actions/base/BaseSlideInBelowAction.java index c2e59d8b6..6ccea343c 100644 --- a/frontend/actions/src/main/java/com/virtuslab/gitmachete/frontend/actions/base/BaseSlideInBelowAction.java +++ b/frontend/actions/src/main/java/com/virtuslab/gitmachete/frontend/actions/base/BaseSlideInBelowAction.java @@ -8,12 +8,15 @@ import static git4idea.ui.branch.GitBranchPopupActions.RemoteBranchActions.CheckoutRemoteBranchAction.checkoutRemoteBranch; import static org.apache.commons.text.StringEscapeUtils.escapeHtml4; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; import java.util.Collections; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.vcs.VcsNotifier; import git4idea.GitRemoteBranch; +import git4idea.branch.GitNewBranchOptions; import git4idea.repo.GitRepository; import git4idea.ui.branch.GitBranchCheckoutOperation; import io.vavr.Tuple; @@ -189,9 +192,29 @@ public void actionPerformed(AnActionEvent anActionEvent) { if (remoteBranch == null) { return Tuple.of(branchName, () -> { - //noinspection KotlinInternalInJava val gitBranchCheckoutOperation = new GitBranchCheckoutOperation(project, Collections.singletonList(gitRepository)); - gitBranchCheckoutOperation.perform(startPoint, options.toGit4IdeaOptions()); + val git4IdeaOptions = options.toGit4IdeaOptions(); + try { + // Since 233.10527.20-EAP-SNAPSHOT + Method perform = GitBranchCheckoutOperation.class.getDeclaredMethod("perform", String.class, + GitNewBranchOptions.class, Runnable.class); + try { + // TODO (#1755): replace with a non-reflective call once 2023.2 is no longer supported + @SuppressWarnings("nullness:argument") val ignore = perform.invoke(gitBranchCheckoutOperation, startPoint, + git4IdeaOptions, /* callInAwtLater */ null); + } catch (IllegalAccessException | InvocationTargetException e) { + throw new RuntimeException(e); + } + } catch (NoSuchMethodException e) { + // Before 233.10527.20-EAP-SNAPSHOT + try { + Method perform = GitBranchCheckoutOperation.class.getDeclaredMethod("perform", String.class, + GitNewBranchOptions.class); + perform.invoke(gitBranchCheckoutOperation, startPoint, git4IdeaOptions); + } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e1) { + throw new RuntimeException(e1); + } + } }); } else if (options.shouldCheckout()) { diff --git a/frontend/ui/impl/src/main/java/com/virtuslab/gitmachete/frontend/ui/impl/table/EnhancedGraphTable.java b/frontend/ui/impl/src/main/java/com/virtuslab/gitmachete/frontend/ui/impl/table/EnhancedGraphTable.java index 7c5c0a121..69e6d14b3 100644 --- a/frontend/ui/impl/src/main/java/com/virtuslab/gitmachete/frontend/ui/impl/table/EnhancedGraphTable.java +++ b/frontend/ui/impl/src/main/java/com/virtuslab/gitmachete/frontend/ui/impl/table/EnhancedGraphTable.java @@ -311,7 +311,7 @@ private void trackCurrentBranchChange(GitRepository repository) { // (not all snapshots of all repositories!). // 2. The unmanaged branch notification works on the same snapshot as the one selected in Git Machete panel. // Hence, we must assure that the current branch changed belongs to the same repository as the given snapshot. - // TODO (#1542): A handling of all repositories (not only selected) is a subject to of improvement. + // TODO (#1542): Handling of all repositories (not only selected) is a subject to improvement. if (snapshot != null && snapshot.getMainGitDirectoryPath().equals(mainGitDirectory)) { val entry = snapshot.getBranchLayout().getEntryByName(repositoryCurrentBranchName); if (entry == null) { diff --git a/intellij-versions.properties b/intellij-versions.properties index 7264d617a..e63931f14 100644 --- a/intellij-versions.properties +++ b/intellij-versions.properties @@ -1,4 +1,4 @@ -eapOfLatestSupportedMajor=233.9802.14-EAP-SNAPSHOT +eapOfLatestSupportedMajor=233.10527.20-EAP-SNAPSHOT earliestSupportedMajor=2022.2 latestMinorsOfOldSupportedMajors=2022.2.5,2022.3.3,2023.1.5 -latestStable=2023.2.3 +latestStable=2023.2.4