Last active
September 12, 2021 12:11
-
-
Save dkandalov/5979943 to your computer and use it in GitHub Desktop.
One-liner to show PSI viewer dialog. Normally it's only enabled in plugin projects.(This is a mini-plugin for https://github.com/dkandalov/live-plugin)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.intellij.internal.psiView.PsiViewerDialog | |
import static liveplugin.PluginUtil.* | |
registerAction("showPsiViewerDialog", "ctrl shift P") { event -> | |
new PsiViewerDialog(project, currentEditorIn(event.project)).show() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The constructor has changed at some point, it is currently
PsiViewerDialog(@NotNull Project project, @Nullable Editor selectedEditor) {
New version:
For the current file, it's