Skip to content

Commit

Permalink
Fix exception when opening modal dialogues
Browse files Browse the repository at this point in the history
  • Loading branch information
jshiell committed Feb 4, 2024
1 parent 246f39e commit 410e13e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

# CheckStyle-IDEA Changel
# CheckStyle-IDEA Changelog

* **5.87.0** Fixed: Exceptions when opening modal dialogues (#628).
* **5.87.0** New: Now built against IDEA 2023.1.5 (was 2022.1.4).
* **5.86.0** New: Added Checkstyle 10.13.0, 10.12.7.
* **5.85.1** Fixed: EDT access error in commit dialogue (#626).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

/**
* Allows selection of the location of the CheckStyle file.
*
* TODO: migrate to DialogWrapper - https://plugins.jetbrains.com/docs/intellij/dialog-wrapper.html?from=jetbrains.org#input-validation
*/
public class LocationDialogue extends JDialog {

Expand Down Expand Up @@ -166,7 +168,9 @@ public void setVisible(final boolean visible) {
if (visible) {
this.committed = false;
}
super.setVisible(visible);
try (var token = com.intellij.concurrency.ThreadContext.resetThreadContext()) {
super.setVisible(visible);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

/**
* Allows setting of file properties.
*
* TODO: migrate to DialogWrapper - https://plugins.jetbrains.com/docs/intellij/dialog-wrapper.html?from=jetbrains.org#input-validation
*/
public class PropertiesDialogue extends JDialog {
private final PropertiesPanel propertiesPanel;
Expand Down Expand Up @@ -83,7 +85,9 @@ public void setVisible(final boolean visible) {
if (visible) {
this.committed = false;
}
super.setVisible(visible);
try (var token = com.intellij.concurrency.ThreadContext.resetThreadContext()) {
super.setVisible(visible);
}
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<change-notes>
<![CDATA[
<ul>
<li>5.87.0: Fixed: Exceptions when opening modal dialogues (#628).</li>
<li>5.87.0: New: Now built against IDEA 2023.1.5 (was 2022.1.4).</li>
<li>5.86.0: New: Added Checkstyle 10.13.0, 10.12.7.</li>
<li>5.85.1: Fixed: EDT access error in commit dialogue (#626).</li>
Expand Down

0 comments on commit 410e13e

Please sign in to comment.