I develop an application on the NetBeans Platform (version 8.1). I define an action as the following example:
@ActionID(
category = "MyCategory",
id = "my.action.id"
)
@ActionRegistration(
displayName = "My Action", lazy = false
)
public final class MyAction extends AbstractAction implements ActionListener{
@Override
public void actionPerformed(ActionEvent e){
// Do some works
}
}
I want to add this action to multiple categories. In other words, I want to access this action from multiple categories. Is it possible without creating another class? For example something like this:
@ActionID(
category = {"Category1", "Category2"},
id = "my.action.id"
)
...
...