idea-plugin / arrow.meta.ide.dsl.ui.toolwindow / ToolWindowSyntax
interface ToolWindowSyntax
Tool windows have several use-cases, though there used in two different scenario. Either, to display content resulting from an computation, which ToolWindowSyntax materializes with addToolWindowWithAction and registerToolWindow, or establishing a ‘persistently’ visible tool window the user can interact with at all time. Please refer to this link for the second scenario.
addToolWindowFromAction | registers an Action with the title toolId and actionId. When the user executes the latter a tool window with displayName toolId is activated or registered by absence. The following example enables the internal Fir Explorer , whenever the current document is a kotlin file.open fun MetaIde .addToolWindowFromAction(toolId: String , actionId: String , icon: Icon , content: (Project, ToolWindow) -> JComponent , canCloseContent: Boolean = false, anchor: ToolWindowAnchor = ToolWindowAnchor.RIGHT, isLockable: Boolean = false, update: (AnActionEvent) -> Unit = Noop.effect1): ExtensionPhase |
addToolWindowNotification | Adds a notification balloon to the Toolwindow and only disappears if the users clicks on it.open fun MetaIde .addToolWindowNotification(toolId: String , actionId: String , type: MessageType, html: String , icon: Icon ? = null, listener: ( HyperlinkEvent ) -> Unit = Noop.effect1, update: (AnActionEvent) -> Unit = Noop.effect1): ExtensionPhase |
addToolWindowWithNotification | this extension is a composition of addToolWindowFromAction and toolWindowNotificationopen fun MetaIde .addToolWindowWithNotification(toolId: String , actionId: String , icon: Icon , type: MessageType, html: String , content: (Project, ToolWindow) -> JComponent , canCloseContent: Boolean = false, anchor: ToolWindowAnchor = ToolWindowAnchor.RIGHT, isLockable: Boolean = false, listener: ( HyperlinkEvent ) -> Unit = Noop.effect1, update: (AnActionEvent) -> Unit = Noop.effect1): ExtensionPhase |
editor | creates an Editor for the specified fileType including a Document with text.open fun ToolWindowSyntax .editor(project: Project, fileType: LanguageFileType, readOnly: Boolean , text: String ): Editor |
registerToolWindow | registers a tool window with the content.open fun MetaIde .registerToolWindow(toolId: String , icon: Icon , content: (Project, ToolWindow) -> JComponent , canCloseContent: Boolean = false, anchor: ToolWindowAnchor = ToolWindowAnchor.RIGHT, isLockable: Boolean = false, project: Project): ExtensionPhase |
toolWindowAction | open fun MetaIde .toolWindowAction(toolId: String , icon: Icon , content: (Project, ToolWindow) -> JComponent , canCloseContent: Boolean = false, anchor: ToolWindowAnchor = ToolWindowAnchor.RIGHT, isLockable: Boolean = false, update: (AnActionEvent) -> Unit = Noop.effect1): AnAction |
toolWindowContent | open fun ToolWindowSyntax .toolWindowContent(project: Project, register: JPanel .(Project) -> Unit , layoutManager: LayoutManager = BorderLayout(), dispose: () -> Unit = Noop.effect0): JPanel |
toolWindowIds | open fun ToolWindowSyntax .toolWindowIds(project: Project): List < String > |
toolWindowNotification | open fun MetaIde .toolWindowNotification(toolId: String , type: MessageType, html: String , icon: Icon ? = null, listener: ( HyperlinkEvent ) -> Unit = Noop.effect1, update: (AnActionEvent) -> Unit = Noop.effect1): AnAction open fun MetaIde .toolWindowNotification(toolId: String , type: MessageType, html: String , project: Project, icon: Icon ? = null, listener: ( HyperlinkEvent ) -> Unit = Noop.effect1): ExtensionPhase |
toolWindowWithEditor | constructs a JPanel with an Editor inside.open fun ToolWindowSyntax .toolWindowWithEditor(project: Project, fileType: LanguageFileType, readOnly: Boolean , text: String , register: JPanel .(Editor, Project) -> Unit = { it, _ -> add(it.component) }, layoutManager: LayoutManager = BorderLayout(), editor: Editor = editor(project, fileType, readOnly, text), dispose: EditorFactory.(Editor) -> Unit = { releaseEditor(it) }): JPanel |
toolWindowWithNotification | open fun MetaIde .toolWindowWithNotification(toolId: String , icon: Icon , type: MessageType, html: String , content: (Project, ToolWindow) -> JComponent , canCloseContent: Boolean = false, anchor: ToolWindowAnchor = ToolWindowAnchor.RIGHT, isLockable: Boolean = false, listener: ( HyperlinkEvent ) -> Unit = Noop.effect1, update: (AnActionEvent) -> Unit = Noop.effect1): AnAction |
unregisterToolWindow | unregisters a tool window with its toolIdopen fun MetaIde .unregisterToolWindow(toolId: String , project: Project): ExtensionPhase |
Do you like Arrow?
✖