Add additional items in Designer > TagBrowser > PopupMenu

I want to add additional menu entries in the Designer > TagBrowser contextual menu (the one appearing on right mouse of a tag) in Ignition 8.1.

In Ignition 7 I was able to do this using designerContext.getTagBrowser() and accessing popup field and tree field. This doesn’t work anymore in Ignition 8.1.

It seems that I’ve found a way to obtain the tree from designerContext.getTagBrowser().getTabbedPanel().getTagPanel() but I don’t find the popup: JPopupMenu anymore.

Reading I only see how to add menu items in the main menu and in the toolbar. I do not want to register my action in the main menu or toolbar.

Is there any way to register custom actions to tag contextual menu?

Thank you

Adding menu items like that was never supported. Are you trying to add things for a tag provider you’re managing, or to add/updates item on the tag browser’s menu for all tag providers?

I try to select one or multiple tags and push their paths to another system.

I think getToolbar() is what you want on the TagBrowserFrame - but, again, this isn’t supported, and is very subject to breaking between Ignition versions.

I think this is the toolbar. I want to access the contextual menu.

Well, the SDK API isn’t guaranteed to not change between versions. “Supported” is a rather nebulous thing on the SDK side of the house. ):

Marius, I wouldn’t let the lack of “support” interfere with solving the problem at hand.

It looks like TagBrowserFrame has two useful methods:

    fun addTagPopupMenuAction(action: BaseAction?, index: Int)
    fun addTagPopupMenuComponent(c: Component?, index: Int)
1 Like

Great. Thx. I’ll give it a try.