Add custom custom Toolbar for specific type of files
已回答
I need to add the same behaviour the Markdown plugin currently has: a custom toolbar with 3 buttons (Show editor only, Editor & Preview, Preview only).
I want to show a preview for some types of files. So far I found this JBSplitter and JBTabs which might help to implement this, but there's no example or even preview of how these components would look.
https://jetbrains.org/intellij/sdk/docs/user_interface_components/misc_swing_components.html
Do you know of any open source projects or samples to learn from?
Also, if a plugin already added some custom buttons for specific file types like in the screenshot below, will I be able to add additional buttons to provide my version of the preview?

请先登录再写评论。
This implementation is specific to Markdown plugin, take a look at org.intellij.plugins.markdown.ui.split.SplitFileEditor and org.intellij.plugins.markdown.ui.preview.MarkdownSplitEditor in IJ Community Sources.
See com.intellij.openapi.fileEditor.TextEditorWithPreview for generic base class to implement split/preview editor.