Skip to content

Tree node popup menu keywords can pick up wrong menu #47

Description

@mtbc

I had an interesting issue where a popup menu item was getting its enabled status wrong. The correct popup menu was being made visible but it turned out that on the application's main toolbar was a submenu with an item with the same text, and it was that item that was being picked up by the JMenuItemMatcher, which matches the menu item text alone even if the path is wrong. Setting the context to the JTree's container didn't help.

As a quick fix I am locally using mtbc/openmicroscopy@5535130 that additionally checks that the JPopupMenu's invoker is the specified JTree, but it's a bit hacked together. It might be good if the SwingLibrary tree node popup stuff also only matched menu items that come from menus invoked by the tree?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions