hey Iago,
please don't top post
On 06.03.2018 17:59, Iago Alonso Alonso wrote:
> Hi ede,
>
> thanks for your respone, after following that guide the plugin now loads! The
> problem I see now if that although I specifies the position of the menu, it's
> ignored beacuse I've followed the code and found this comment: // we silently
> ignore the pos argument as positions are defined in xml or not at all
>
> So, the menu entry it's set now to the first position (before File, ..., etc
> and I want it at the end) and on the XML I've tried something like:
>
> <workbench>
> <plug-in>.........xxxPlugin</plug-in>
> <position>10</position>
> </workbench>
>
> But not works. Which XML file refers the comment I have found?
check bin/default-plugins.xml for examples. actually the properties file is
like default-plugins.xml but just loaded later. something like for the
AboutPlugIn
<plug-in>
com.vividsolutions.jump.workbench.ui.plugin.AboutPlugIn
<menus>
<main-menu menupath="MenuNames.HELP" install="true" />
</menus>
</plug-in>
should do the trick. that won't work when packaged as an extension though. in
that case yoiu have to give the path during installation in the extension class
like
context.getFeatureInstaller().addMainMenuPlugin(executable, menuPath,
menuItemName, checkBox, icon, enableCheck, pos);
you can check
com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller.addMainMenuPlugin(...)
javadoc for some explanations. or see eg.
com.vividsolutions.jump.plugin.edit.AffineTransformationPlugIn.initialize(...)
how it is used.
..ede
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel