Skip to content

Commit

Permalink
fix: workaround for "thread context was already set" exception
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrkwiecinski committed Jul 7, 2024
1 parent ad86638 commit 5425f82
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ public static void open(final Project project, final PsiDirectory directory) {
final NewGraphQlResolverDialog dialog = new NewGraphQlResolverDialog(project, directory);
dialog.pack();
dialog.centerDialog(dialog);
dialog.setVisible(true);

// TODO: It's a workaround. Proper fix should be done as:
// https://github.com/magento/magento2-phpstorm-plugin/issues/2080
try (var token = com.intellij.concurrency.ThreadContext.resetThreadContext()) {
dialog.setVisible(true);
}
}

protected void onOK() {
Expand Down

0 comments on commit 5425f82

Please sign in to comment.