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 

                <main-menu menupath="MenuNames.HELP" install="true" />

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 

context.getFeatureInstaller().addMainMenuPlugin(executable, menuPath, 
menuItemName, checkBox, icon, enableCheck, pos);

you can check 
 javadoc for some explanations. or see eg. 
how it is used.


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

Reply via email to