Open k-dominik opened 4 years ago
I think the issue is not only lower-case vs. upper-case. In addition, SciJava Command
s have a default menu weight of POSITIVE_INFINITY
.
See also https://github.com/imagej/imagej-legacy/issues/179.
Instead of:
you can use something like:
@Plugin(type = Command.class, headless = true, menu = {
@Menu(label = MenuConstants.PLUGINS_LABEL, MenuConstants.PLUGINS_WEIGHT, mnemonic = MenuConstants.PLUGINS_MNEMONIC),
@Menu(label = "ilastik", weight = YOUR_ILASTIK_MENU_WEIGHT_CONSTANT),
@Menu(label = "Import", weight = YOUR_DESIRED_POSITION_IN_SUBMENU)})
See https://github.com/imagej/op-finder/blob/e69c0613395b6398085fad09e1e227e10b1a4f8c/src/main/java/net/imagej/ui/swing/ops/FindOps.java#L38-L42 for an example.
Is it a good ecosystem behavior to change plugin priority like that? It's not like our plugin is more important than other plugins installed in a system...
Hey @imagejan,
thank you very much for the insight! Really cool that you keep an eye on this repo :+1:
As for the menu weight I'd also be concerned on what the etiquette on these things is?
@emilmelnikov mentioned that it's because we're lower-case with our plugin name.