diff --git a/CHANGELOG.md b/CHANGELOG.md index 42345808..a7619c0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## [Unreleased] +## [0.13.15-2] +- \#413 0.13.15-2022.2 - still not working with Intellij 2022.3 + ## [0.13.15] - maximum timeout increased to 300 - add Support for 2022.3 diff --git a/gradle.properties b/gradle.properties index 3dbb243f..84c2dd56 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ pluginGroup = org.codinjutsu pluginName = jenkins-control-plugin # SemVer format -> https://semver.org -pluginVersion = 0.13.15 +pluginVersion = 0.13.15-2 # See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html # for insight into build numbers and IntelliJ Platform versions. @@ -22,8 +22,9 @@ platformType = IC #platformType = CWMG #Jetbrains Gateway #platformType = GW -platformVersion = 222-EAP-SNAPSHOT +#platformVersion = 222-EAP-SNAPSHOT #platformVersion = 223-EAP-SNAPSHOT +platformVersion = 2022.3 platformVersionToVerify = 222.2964.55 # Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html diff --git a/src/main/java/org/codinjutsu/tools/jenkins/logic/BrowserPanelAuthenticationHandler.java b/src/main/java/org/codinjutsu/tools/jenkins/logic/BrowserPanelAuthenticationHandler.java index 666918e5..7ab31636 100644 --- a/src/main/java/org/codinjutsu/tools/jenkins/logic/BrowserPanelAuthenticationHandler.java +++ b/src/main/java/org/codinjutsu/tools/jenkins/logic/BrowserPanelAuthenticationHandler.java @@ -5,6 +5,7 @@ import com.intellij.openapi.project.Project; import com.intellij.util.messages.MessageBusConnection; import org.codinjutsu.tools.jenkins.model.Jenkins; +import org.codinjutsu.tools.jenkins.util.GuiUtil; import org.codinjutsu.tools.jenkins.view.BrowserPanel; public class BrowserPanelAuthenticationHandler implements AuthenticationNotifier, Disposable { @@ -27,19 +28,21 @@ public static BrowserPanelAuthenticationHandler getInstance(Project project) { @Override public void emptyConfiguration(){ - browser.handleEmptyConfiguration(); + GuiUtil.runInSwingThread(browser::handleEmptyConfiguration); } @Override public void afterLogin(Jenkins jenkinsWorkspace) { - browser.updateWorkspace(jenkinsWorkspace); - browser.postAuthenticationInitialization(); - browser.initScheduledJobs(); + GuiUtil.runInSwingThread(() -> { + browser.updateWorkspace(jenkinsWorkspace); + browser.postAuthenticationInitialization(); + browser.initScheduledJobs(); + }); } @Override public void loginCancelled() { - browser.handleEmptyConfiguration(); + emptyConfiguration(); } @Override diff --git a/src/main/java/org/codinjutsu/tools/jenkins/util/GuiUtil.java b/src/main/java/org/codinjutsu/tools/jenkins/util/GuiUtil.java index 83ea7201..d711a789 100644 --- a/src/main/java/org/codinjutsu/tools/jenkins/util/GuiUtil.java +++ b/src/main/java/org/codinjutsu/tools/jenkins/util/GuiUtil.java @@ -37,6 +37,7 @@ public class GuiUtil { public static void runInSwingThread(Runnable runnable) { + // maxbe use ModalityUiUtil.invokeLaterIfNeeded Application application = ApplicationManager.getApplication(); if (application.isDispatchThread()) { runnable.run(); diff --git a/src/main/java/org/codinjutsu/tools/jenkins/view/BrowserPanel.java b/src/main/java/org/codinjutsu/tools/jenkins/view/BrowserPanel.java index bcd97067..481c61f4 100644 --- a/src/main/java/org/codinjutsu/tools/jenkins/view/BrowserPanel.java +++ b/src/main/java/org/codinjutsu/tools/jenkins/view/BrowserPanel.java @@ -167,7 +167,7 @@ private static void visit(Job job, BuildStatusVisitor buildStatusVisitor) { } private void updateDoubleClickAction(@NotNull JobAction doubleClickAction) { - jobTree.updateDoubleClickAction(doubleClickAction); + GuiUtil.runInSwingThread(() -> jobTree.updateDoubleClickAction(doubleClickAction)); } /*whole method could be moved inside of ExecutorProvider (executor would expose interface that would allow to schedule @@ -274,10 +274,9 @@ public void refreshJob(Job job) { } private void updateJobNode(Job job) { - jobTree.updateJobNode(job); - BuildStatusAggregator buildStatusAggregator = new BuildStatusAggregator(); GuiUtil.runInSwingThread(() -> { + jobTree.updateJobNode(job); CollectionUtil.flattenedJobs(jenkins.getJobs()).forEach(j -> visit(j, buildStatusAggregator)); JenkinsWidget.getInstance(project).updateStatusIcon(buildStatusAggregator); }); @@ -501,9 +500,9 @@ public void reloadConfiguration(@NotNull JenkinsAppSettings newJenkinsAppSetting } public void expandSelectedJob() { - Optional.ofNullable(jobTree.getLastSelectedPathComponent()) + GuiUtil.runInSwingThread(() -> Optional.ofNullable(jobTree.getLastSelectedPathComponent()) .filter(node -> node.getUserObject() instanceof JenkinsTreeNode.JobNode) - .ifPresent(node -> jobTree.getTree().expandPath(new TreePath(node.getPath()))); + .ifPresent(node -> jobTree.getTree().expandPath(new TreePath(node.getPath())))); } private class LoadSelectedViewJob implements JenkinsBackgroundTask.JenkinsTask {