Skip to content

Commit

Permalink
Merge pull request #2082 from piotrkwiecinski/hotfix-thread-exists
Browse files Browse the repository at this point in the history
fix: workaround for "thread context was already set" exception
  • Loading branch information
VitaliyBoyko authored Jul 14, 2024
2 parents ac57672 + 9515a03 commit e5b0966
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 e5b0966

Please sign in to comment.