idea-plugin / arrow.meta.ide.plugins.helloworld / helloWorld

helloWorld

val IdeMetaPlugin.helloWorld: IdePlugin

The following section exemplifies a Hello World IDE Plugin

The Hello World plugin registers a LineMarker on every helloWorld function.

val IdeMetaPlugin.helloWorld: IdePlugin
   get() = "Hello World" {
     meta(
       addLineMarkerProvider(
         icon = ArrowIcons.ICON1,
         composite = KtNamedFunction::class.java,
         message = { f: KtNamedFunction -> "Teach your users about this feature in function $f" },
         transform = {
           it.safeAs<KtNamedFunction>()?.takeIf { f ->
             f.name == "helloWorld"
           }
         }
       )
     )
   }

For every function with the name helloWorld, our IDE plugin will register a lineMarker with our custom icon. And whenever the user hovers over the Icon, it will display the message.

Take a look at arrow-meta-examples repository for more details.

See Also

LineMarkerSyntax

Do you like Arrow?

Arrow Org
<