ilastik / ilastik4ij

ImageJ plugins to run ilastik workflows
MIT License
22 stars 17 forks source link

move ilastik up in the plugins menu #60

Open k-dominik opened 4 years ago

k-dominik commented 4 years ago

@emilmelnikov mentioned that it's because we're lower-case with our plugin name.

imagejan commented 4 years ago

I think the issue is not only lower-case vs. upper-case. In addition, SciJava Commands have a default menu weight of POSITIVE_INFINITY.

See also https://github.com/imagej/imagej-legacy/issues/179.

Instead of:

https://github.com/ilastik/ilastik4ij/blob/d3e9ec6c25d329c5357f93cd343adbf074cdfafa/src/main/java/org/ilastik/ilastik4ij/ui/IlastikImportCommand.java#L29

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.

emilmelnikov commented 4 years ago

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...

k-dominik commented 4 years ago

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?