From 8e60f4f8183ffe6fc3d9124352a566b62a9b96f1 Mon Sep 17 00:00:00 2001 From: Ivan Migalev Date: Tue, 11 Aug 2020 11:21:40 +0700 Subject: [PATCH] =?UTF-8?q?Update=20supported=20IntelliJ=20version=20range?= =?UTF-8?q?=20to=202019.1=E2=80=932020.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- gradle.properties | 2 +- plugin/resources/META-INF/plugin.xml | 2 +- .../external/reactive/ReactiveTfvcClientHolder.java | 2 -- .../plugin/idea/tfvc/actions/SingleItemAction.java | 2 +- .../idea/tfvc/core/TfvcIntegrationEnabler.java | 12 +++++------- .../plugin/idea/tfvc/tfignore/TfIgnoreLanguage.java | 2 +- vsts-ci.yml | 2 +- 8 files changed, 11 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index a63b424b..bc8a0ead 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This is a plugin for working with Git and TFVC repositories on Azure DevOps and Team Foundation Server (TFS) 2015+ inside IntelliJ, Android Studio, and various other JetBrains IDEs. It is supported on Linux, Mac OS X, and Windows. -It is compatible with IntelliJ IDEA Community and Ultimate editions (version 2018.3+) and Android Studio (version 3.4+). +It is compatible with IntelliJ IDEA Community and Ultimate editions (version 2019.1+) and Android Studio (version 3.5+). To learn more about installing and using our Azure DevOps IntelliJ plug-in, visit: https://docs.microsoft.com/en-us/azure/devops/java/download-intellij-plug-in diff --git a/gradle.properties b/gradle.properties index a1f79a5b..e77288eb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ buildNumber=1.161.0 -ideaVersion=2018.3 +ideaVersion=2019.1 kotlin.code.style=official \ No newline at end of file diff --git a/plugin/resources/META-INF/plugin.xml b/plugin/resources/META-INF/plugin.xml index 32251224..d7170f98 100644 --- a/plugin/resources/META-INF/plugin.xml +++ b/plugin/resources/META-INF/plugin.xml @@ -47,7 +47,7 @@
Compiled with Java 8
- Compatible with IntelliJ Ultimate and Community editions versions 2018.3 and later and Android Studio 3.4 and later + Compatible with IntelliJ Ultimate and Community editions versions 2019.1 and later and Android Studio 3.5 and later

End User License Agreement & Privacy Policy diff --git a/plugin/src/com/microsoft/alm/plugin/external/reactive/ReactiveTfvcClientHolder.java b/plugin/src/com/microsoft/alm/plugin/external/reactive/ReactiveTfvcClientHolder.java index eb6a372a..679d00c2 100644 --- a/plugin/src/com/microsoft/alm/plugin/external/reactive/ReactiveTfvcClientHolder.java +++ b/plugin/src/com/microsoft/alm/plugin/external/reactive/ReactiveTfvcClientHolder.java @@ -29,8 +29,6 @@ public class ReactiveTfvcClientHolder implements Disposable { } public static Path getClientBackendPath() { - // TODO: Replace with PluginManagerCore.getPlugin after migration to IDEA 2019.3 - //noinspection UnstableApiUsage return Paths.get( Objects.requireNonNull(PluginManager.getPlugin(IdeaHelper.PLUGIN_ID)).getPath().getAbsolutePath(), "backend"); diff --git a/plugin/src/com/microsoft/alm/plugin/idea/tfvc/actions/SingleItemAction.java b/plugin/src/com/microsoft/alm/plugin/idea/tfvc/actions/SingleItemAction.java index d6d3676f..ea7dc46f 100644 --- a/plugin/src/com/microsoft/alm/plugin/idea/tfvc/actions/SingleItemAction.java +++ b/plugin/src/com/microsoft/alm/plugin/idea/tfvc/actions/SingleItemAction.java @@ -121,7 +121,7 @@ public abstract class SingleItemAction extends DumbAwareAction { || !getAllowedStatuses().contains(FileStatusManager.getInstance(project).getStatus(file))) return false; - // TODO: Remove this suppression after migration to IDEA 2019.1. AbstractVcs became non-generic in newer IDEA. + // TODO: Remove this suppression after migration to IDEA 2019.3. AbstractVcs became non-generic in newer IDEA. @SuppressWarnings("rawtypes") AbstractVcs vcs = VcsUtil.getVcsFor(project, file); return vcs != null && TFSVcs.getKey().equals(vcs.getKeyInstanceMethod()); } diff --git a/plugin/src/com/microsoft/alm/plugin/idea/tfvc/core/TfvcIntegrationEnabler.java b/plugin/src/com/microsoft/alm/plugin/idea/tfvc/core/TfvcIntegrationEnabler.java index 37dab19e..518fce09 100644 --- a/plugin/src/com/microsoft/alm/plugin/idea/tfvc/core/TfvcIntegrationEnabler.java +++ b/plugin/src/com/microsoft/alm/plugin/idea/tfvc/core/TfvcIntegrationEnabler.java @@ -64,16 +64,14 @@ public class TfvcIntegrationEnabler extends VcsIntegrationEnabler { myVcs = vcs; } - // TODO: Fix the generic signatures in this method after migration to IDEA 2019.1. Currently this is crippled due to - // IDEA 2018.3 compatibility. - @SuppressWarnings("unchecked") @Override - public void enable(@NotNull Collection vcsRoots) { + public void enable(@NotNull Collection vcsRoots) { // This override does the same as base method, but tries to determine a workspace directory instead of using // project.getBaseDir(). - Collection typedRoots = (Collection)vcsRoots; - Collection existingRoots = typedRoots.stream().filter(root -> { - AbstractVcs vcs = root.getVcs(); + Collection existingRoots = vcsRoots.stream().filter(root -> { + // TODO: Remove this suppression after migration to IDEA 2019.3. AbstractVcs became non-generic in newer + // IDEA. + @SuppressWarnings("rawtypes") AbstractVcs vcs = root.getVcs(); return vcs != null && vcs.getName().equals(myVcs.getName()); }).map(VcsRoot::getPath).collect(toList()); diff --git a/plugin/src/com/microsoft/alm/plugin/idea/tfvc/tfignore/TfIgnoreLanguage.java b/plugin/src/com/microsoft/alm/plugin/idea/tfvc/tfignore/TfIgnoreLanguage.java index 9e2078f1..38633f61 100644 --- a/plugin/src/com/microsoft/alm/plugin/idea/tfvc/tfignore/TfIgnoreLanguage.java +++ b/plugin/src/com/microsoft/alm/plugin/idea/tfvc/tfignore/TfIgnoreLanguage.java @@ -5,7 +5,7 @@ package com.microsoft.alm.plugin.idea.tfvc.tfignore; import com.intellij.lang.Language; -public class TfIgnoreLanguage extends Language { // TODO: Inherit from IgnoreLanguage if we target IDEA 2019.* +public class TfIgnoreLanguage extends Language { public static TfIgnoreLanguage INSTANCE = new TfIgnoreLanguage(); private TfIgnoreLanguage() { super("TFIgnore"); diff --git a/vsts-ci.yml b/vsts-ci.yml index 5a85d438..ee3e1a3f 100644 --- a/vsts-ci.yml +++ b/vsts-ci.yml @@ -101,5 +101,5 @@ jobs: displayName: Gradle compile inputs: jdkVersionOption: 1.8 - options: '--info -PideaVersion=2020.1' + options: '--info -PideaVersion=2020.2' tasks: :plugin:compileJava