From 40d5fc27b24881e75f7547179dc5893fe36eef65 Mon Sep 17 00:00:00 2001 From: Jonathan Bisson Date: Tue, 29 Nov 2022 11:33:04 -0600 Subject: [PATCH] v0.2.5 - Bug fix, dependencies updates, support for 2022.3 --- CHANGELOG.md | 44 +++++++++++++------ build.gradle.kts | 14 +++--- gradle.properties | 4 +- .../actions/ChangePermissionsAction.kt | 8 +++- 4 files changed, 45 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab1117b..bc54021 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,61 +2,77 @@ # File Permissions Plugin Changelog -## [Unreleased] +## Unreleased + +## 0.2.5 - 2022-11-29 +- Support for 2022.3 +- Fix that nio.path error again + +## 0.2.4 -## [0.2.4] ### Changes - Support for 2022.2 -## [0.2.3] +## 0.2.3 + ### Changes - Fix error seen from time to time when the file path couldn't be converted with toNioPath -## [0.2.2] +## 0.2.2 + ### Changes - Support for 2022.1 - Update versions of packages - Integrate latest platform plugin template - Verify for latest version of IntelliJ platform -## [0.2.0] +## 0.2.0 + ### Changes - Validate for IntelliJ Idea Beta (212.x) - Bump some versions of development dependencies - Rename the plugin to remove plugin from the name (follow verifier rules) -## [0.1.8] +## 0.1.8 + ### Changes - Reduced the size of the screenshot -## [0.1.7] +## 0.1.7 + +## 0.1.6 -## [0.1.6] ### Changes - A better description to explain where to find the actions. -## [0.1.4] +## 0.1.4 + ### Changes - A better description -## [0.1.3] +## 0.1.3 + ### Changes - Cleaner documentation and especially a much better description for the project - Probably understood how the automated change log works. -## [0.1.2] +## 0.1.2 + ### Added - Licensed under GPLv3 -## [0.1.1] +## 0.1.1 + ### Added - Just to test the release process for next time -## [0.1.0] +## 0.1.0 + ### Added - Support for changing all permissions - Support for making a file executable -## [0.0.1] +## 0.0.1 + ### Added - Initial scaffold created from [IntelliJ Platform Plugin Template](https://github.com/JetBrains/intellij-platform-plugin-template) diff --git a/build.gradle.kts b/build.gradle.kts index c412995..225c567 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,13 +9,13 @@ fun properties(key: String) = project.findProperty(key).toString() plugins { id("java") - id("org.jetbrains.kotlin.jvm") version "1.7.0-RC" - id("org.jetbrains.intellij") version "1.6.0" - id("org.jetbrains.changelog") version "1.3.1" - id("io.gitlab.arturbosch.detekt") version "1.20.0" - id("org.jlleitschuh.gradle.ktlint") version "10.3.0" + id("org.jetbrains.kotlin.jvm") version "1.8.0-Beta" + id("org.jetbrains.intellij") version "1.10.0" + id("org.jetbrains.changelog") version "2.0.0" + id("io.gitlab.arturbosch.detekt") version "1.22.0" + id("org.jlleitschuh.gradle.ktlint") version "11.0.0" id("org.jetbrains.qodana") version "0.1.13" - id("com.github.ben-manes.versions") version "0.42.0" + id("com.github.ben-manes.versions") version "0.44.0" } group = properties("pluginGroup") @@ -27,7 +27,7 @@ repositories { } dependencies { - detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.20.0") + detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.22.0") } // Configure Gradle IntelliJ Plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin diff --git a/gradle.properties b/gradle.properties index 34e43ae..811de6e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,9 +3,9 @@ pluginGroup = net.bjonnh.intellij.filepermissionsplugin pluginName = File Permissions -pluginVersion = 0.2.4 +pluginVersion = 0.2.5 pluginSinceBuild = 203 -pluginUntilBuild = 222.* +pluginUntilBuild = 223.* # IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties platformType = IC diff --git a/src/main/kotlin/net/bjonnh/intellij/filepermissionsplugin/actions/ChangePermissionsAction.kt b/src/main/kotlin/net/bjonnh/intellij/filepermissionsplugin/actions/ChangePermissionsAction.kt index 92e20ed..3373a9a 100644 --- a/src/main/kotlin/net/bjonnh/intellij/filepermissionsplugin/actions/ChangePermissionsAction.kt +++ b/src/main/kotlin/net/bjonnh/intellij/filepermissionsplugin/actions/ChangePermissionsAction.kt @@ -46,7 +46,11 @@ class ChangePermissionsAction : AnAction() { */ override fun update(e: AnActionEvent) { val project = e.project - val path = e.getData(CommonDataKeys.VIRTUAL_FILE)?.canonicalFile?.toNioPath() - e.presentation.isEnabledAndVisible = (project != null) && (path != null) + try { + val path = e.getData(CommonDataKeys.VIRTUAL_FILE)?.canonicalFile?.toNioPath() + e.presentation.isEnabledAndVisible = (project != null) && (path != null) + } catch (_: UnsupportedOperationException) { // Sometimes we see that from toNioPath + e.presentation.isEnabledAndVisible = false + } } }