idea-plugin / arrow.meta.ide.dsl.ui.popups / PopupSyntax

PopupSyntax

interface PopupSyntax

Popup’s can be created at any time. Either in AnActionSyntax, InspectionSyntax or IntentionExtensionProviderSyntax and many other places. Once the PopUp is created the user needs to call a show() method like com.intellij.openapi.ui.popup.JBPopup.showUnderneathOf, this is an effectfull operation.

Functions

balloon open fun IdeMetaPlugin.balloon(f: JBPopupFactory.() -> BalloonBuilder): BalloonBuilder
balloonBuilder open fun IdeMetaPlugin.balloonBuilder(content: JComponent, transform: BalloonBuilder.() -> BalloonBuilder): BalloonBuilder
open fun IdeMetaPlugin.balloonBuilder(content: JComponent, title: String, transform: BalloonBuilder.() -> BalloonBuilder): BalloonBuilder
open fun IdeMetaPlugin.balloonBuilder(html: String, fillColor: Color, transform: BalloonBuilder.() -> BalloonBuilder, icon: Icon? = null, textColor: Color? = null, link: (HyperlinkEvent) -> Unit = Noop.effect1): BalloonBuilder
open fun IdeMetaPlugin.balloonBuilder(html: String, messageType: MessageType, transform: BalloonBuilder.() -> BalloonBuilder, link: (HyperlinkEvent) -> Unit = Noop.effect1): BalloonBuilder
componentPopUp open fun IdeMetaPlugin.componentPopUp(content: JComponent, focus: JComponent, transform: ComponentPopupBuilder.() -> ComponentPopupBuilder): ComponentPopupBuilder
open fun IdeMetaPlugin.componentPopUp(f: JBPopupFactory.() -> ComponentPopupBuilder): ComponentPopupBuilder
listPopUp  

``` kotlin:ank:playground import arrow.meta.Plugin import arrow.meta.ide.IdeMetaPlugin import arrow.meta.ide.dsl.ui.popups.IdeListPopupItem import arrow.meta.ide.resources.ArrowIcons import arrow.meta.invoke import com.intellij.openapi.actionSystem.PlatformDataKeys

val IdeMetaPlugin.showListPlugin: Plugin get() = “Action to create ListPopUp” { meta( addAnAction( “Unique”, anAction( title = “Show ListPopUp”, description = “Shows one item of a ListPopUp”, icon = ArrowIcons.ICON4, actionPerformed = { e -> PlatformDataKeys.CONTEXT_COMPONENT.getData(e.dataContext)?.run { listPopUp( title = “TopLevelTitle”, sameIcon = ArrowIcons.ICON3, // every PopUp item will have this Icon popUps = listOf( IdeListPopupItem( this, text = { “Teach your users about this Component: $this” } ) ) ).show(this) } } ) ) ) }
```
open fun <A> IdeMetaPlugin.listPopUp(popUps: List<IdeListPopupItem<A>>, title: String? = null, sameIcon: Icon? = null, canceled: () -> Unit = {}): ListPopup | | message | open fun IdeMetaPlugin.message(text: String): JBPopup | | popUp | open fun <P : JBPopup> IdeMetaPlugin.popUp(f: JBPopupFactory.() -> P): P | | treePopUp | open fun <A> IdeMetaPlugin.treePopUp(root: TreePopupStep<A>, tree: JBPopupFactory.(root: TreePopupStep<A>) -> TreePopup = { createTree(root) }): TreePopup |

Inheritors

IdeSyntax interface IdeSyntax : IntentionSyntax, IconProviderSyntax, SyntaxHighlighterSyntax, InspectionSyntax, AnActionSyntax, ColorSettingsSyntax, HintingSyntax, LanguageSyntax, LineMarkerSyntax, LiveTemplateSyntax, NavigationSyntax, SearchSyntax, StructureViewSyntax, UsageSyntax, ExtensionProviderSyntax, DocumentationSyntax, KotlinExtensionSyntax, DialogSyntax, PopupSyntax, NotificationSyntax, ToolWindowSyntax, GotoRelatedSyntax, AnnotatorSyntax, ParserSyntax, ApplicationSyntax

Do you like Arrow?

Arrow Org
<