Re: Using annotations for actions and toolbar positions

Benno Markiewicz <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <CAA_aP4j+PvaQ6dTkPf4dru1ohW-4ke2pBRD0RbQh9rcm4fmjeg@mail.gmail.com>
Use a mixed approach!
https://blogs.oracle.com/geertjan/entry/ordering_of_netbeans_platform_menu

Den 30 okt. 2016 8:56 fm skrev "mccorb" <[email protected]>:

> I have an annotation for a netbeans action that is similar to:
>
> Code:
>
> @ActionID(category = "Projects", id = "com.myapp.actions.
> ProjectOpenAction")
> @ActionRegistration(iconBase = "com/myapp/resources/icons/openProject.png",
> displayName = "#CTL_ProjectOpenAction")
> @ActionReferences({
>   @ActionReference(path="Toolbars/Projects", position = 4),
>   @ActionReference(path="Menu/Projects", position=6)
> })
> @Messages("CTL_ProjectOpenAction=Open Project File...")
>
>
>
>
> This all works however, on the action reference for the toolbar I specify
> position 4 which gives the relative position within the 'Projects' toolbar
> for this action.
>
> How can I specify the position of the Projects toolbar with respect to the
> other toolbars that are created? Do I have to go back to the layer.xml file
> to define an empty toolbar or can I do it using annotations?
>
> Of course the same question would apply to the Project menu also.
>
> Thanks
>
>
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.