Skip to content

Commit 5425f82

Browse files
fix: workaround for "thread context was already set" exception
1 parent ad86638 commit 5425f82

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/com/magento/idea/magento2plugin/actions/generation/dialog/NewGraphQlResolverDialog.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,12 @@ public static void open(final Project project, final PsiDirectory directory) {
113113
final NewGraphQlResolverDialog dialog = new NewGraphQlResolverDialog(project, directory);
114114
dialog.pack();
115115
dialog.centerDialog(dialog);
116-
dialog.setVisible(true);
116+
117+
// TODO: It's a workaround. Proper fix should be done as:
118+
// https://github.com/magento/magento2-phpstorm-plugin/issues/2080
119+
try (var token = com.intellij.concurrency.ThreadContext.resetThreadContext()) {
120+
dialog.setVisible(true);
121+
}
117122
}
118123

119124
protected void onOK() {

0 commit comments

Comments
 (0)