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

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

val MetaIde.showListPlugin: IdePlugin 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> MetaIde.listPopUp(popUps: List<IdeListPopupItem<A>>, title: String? = null, sameIcon: Icon? = null, canceled: () -> Unit = {}): ListPopup | | message | open fun MetaIde.message(text: String): JBPopup | | popUp | open fun <P : JBPopup> MetaIde.popUp(f: JBPopupFactory.() -> P): P | | treePopUp | open fun <A> MetaIde.treePopUp(root: TreePopupStep<A>, tree: JBPopupFactory.(root: TreePopupStep<A>) -> TreePopup = { createTree(root) }): TreePopup |

Inheritors

IdeSyntax interface IdeSyntax : IconProviderSyntax, SyntaxHighlighterSyntax, InspectionSyntax, AnActionSyntax, ColorSettingsSyntax, HintingSyntax, LanguageSyntax, LineMarkerSyntax, LiveTemplateSyntax, NavigationSyntax, SearchSyntax, StructureViewSyntax, UsageSyntax, ExtensionProviderSyntax, DocumentationSyntax, DialogSyntax, PopupSyntax, NotificationSyntax, ToolWindowSyntax, GotoRelatedSyntax, AnnotatorSyntax, ParserSyntax, ApplicationSyntax, FoldingSyntax, EditorSyntax, ResolveScopeSyntax, ResolveProviderSyntax, IntegrationSyntax

Do you like Arrow?

Arrow Org
<