Skip to content

Commit

Permalink
Merge pull request #2285 from Haehnchen/feature/thread-model
Browse files Browse the repository at this point in the history
fix "Threading Model Changes": Thread context was already set: com.intellij.openapi.actionSystem.ex.ActionContextElement
  • Loading branch information
Haehnchen authored Feb 26, 2024
2 parents a9512fd + 5eebdfe commit d05fbb6
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,12 @@ private static SymfonyCreateService prepare(@Nullable Component component, @NotN
service.setLocationRelativeTo(component);
}

service.setVisible(true);
// https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html#read-access
// fix: "Thread context was already set: com.intellij.openapi.actionSystem.ex.ActionContextElement"
// https://intellij-support.jetbrains.com/hc/en-us/community/posts/14397678486418--Thread-context-was-already-set-CoroutineName-commit-workflow-when-showing-window-during-commit-check?page=1#community_comment_15082225353874
try (var ignored = com.intellij.concurrency.ThreadContext.resetThreadContext()) {
service.setVisible(true);
}

return service;
}
Expand Down

0 comments on commit d05fbb6

Please sign in to comment.