From 2aafc0a3462382a158274eb61af1a2afd05e1a5d Mon Sep 17 00:00:00 2001 From: Roberto Leinardi Date: Sat, 26 Feb 2022 14:12:15 +0100 Subject: [PATCH] Make plugin hot-reloadable --- build.gradle | 10 ++++++- .../pycharm/pylint/PylintAnnotator.java | 2 +- .../leinardi/pycharm/pylint/PylintPlugin.java | 26 +++---------------- .../pycharm/pylint/actions/BaseAction.java | 2 +- .../pycharm/pylint/actions/ClearAll.java | 2 +- .../pycharm/pylint/actions/Close.java | 2 +- .../pycharm/pylint/actions/CollapseAll.java | 2 +- .../pylint/actions/DisplayConvention.java | 4 +-- .../pycharm/pylint/actions/DisplayErrors.java | 4 +-- .../pycharm/pylint/actions/DisplayInfo.java | 4 +-- .../pylint/actions/DisplayRefactor.java | 4 +-- .../pylint/actions/DisplayWarnings.java | 4 +-- .../pycharm/pylint/actions/ExpandAll.java | 2 +- .../pylint/actions/ScanCurrentChangeList.java | 4 +-- .../pylint/actions/ScanCurrentFile.java | 6 ++--- .../pylint/actions/ScanEverythingAction.java | 2 +- .../pylint/actions/ScanModifiedFiles.java | 4 +-- .../pycharm/pylint/actions/ScanModule.java | 4 +-- .../pycharm/pylint/actions/ScanProject.java | 4 +-- .../pylint/actions/ScanSourceRootsAction.java | 2 +- .../pylint/actions/ScrollToSource.java | 4 +-- .../pycharm/pylint/actions/Settings.java | 2 +- .../pycharm/pylint/actions/StopCheck.java | 4 +-- .../ScanFilesBeforeCheckinHandler.java | 2 +- .../toolwindow/PylintToolWindowPanel.java | 2 +- src/main/resources/META-INF/plugin.xml | 10 +------ 26 files changed, 49 insertions(+), 69 deletions(-) diff --git a/build.gradle b/build.gradle index d837a43..f302a57 100644 --- a/build.gradle +++ b/build.gradle @@ -79,12 +79,20 @@ intellij { runIde { systemProperties.put("idea.log.debug.categories", "#com.leinardi.pycharm.mypy") + // Log verbose information when dynamic plugin unloading fails + systemProperties.put("ide.plugins.snapshot.on.unload.fail", "true") } +// Causes error popup when building while sandbox IDE is open. Disable in development +if (System.getenv('DEVELOP')) { + buildSearchableOptions.enabled = false +} + + patchPluginXml { version = project.property('version') sinceBuild = project.property('sinceBuild') - untilBuild = project.property('untilBuild') + untilBuild = project.property('untilBuild') pluginDescription = props.getProperty('plugin.Pylint-PyCharm.description') changeNotes = getChangelogHtml() } diff --git a/src/main/java/com/leinardi/pycharm/pylint/PylintAnnotator.java b/src/main/java/com/leinardi/pycharm/pylint/PylintAnnotator.java index 9f47560..40f6663 100644 --- a/src/main/java/com/leinardi/pycharm/pylint/PylintAnnotator.java +++ b/src/main/java/com/leinardi/pycharm/pylint/PylintAnnotator.java @@ -66,7 +66,7 @@ public class PylintAnnotator extends ExternalAnnotatorcom.leinardi.pycharm.pylint.PylintBundle - - - com.leinardi.pycharm.pylint.PylintPlugin - com.leinardi.pycharm.pylint.PylintPlugin - - - - +