0

How can we move menuitem "IDE Log" of NetBeans RCP from "View" menu to other menu ?

  • Please try to elaborate your question with more details like: 1) Are you trying to create a Platform Application and want to shift this menu in resulting platform application? 2) Or you want this menu to be shifted while working in IDE for the platform application This can be done using the layer.xml file, please elaborate your question by adding some more details – Tushar Joshi Jan 11 '16 at 09:12
  • I've created an application using an RCP. Currently IDE Log menu item is located under View menu and I want to move it to some other Menu. @TusharJoshi – Rajesh Acharya Jan 11 '16 at 09:46

1 Answers1

1

Hiding existing menu

  1. Use the layer.xml file (add if not there) and _hidden suffix to hide the required menu
  2. Refer the answer https://stackoverflow.com/a/10291239/446251 for detailed explanation

Adding menu like existing menu

  1. Note the action class for the current menu in the layer file
  2. Add your own menu where needed and set the action class to the earlier noted action

Example Layer file

<filesystem>
<folder name="Menu">
    <folder name="View">
        <file name="Separator2.instance_hidden"/>
        <file name="org-netbeans-core-actions-LogAction.shadow_hidden"/>
    </folder>
    <folder name="Other">
        <file name="org-netbeans-core-actions-LogAction.shadow">
            <!--org.netbeans.core.actions.LogAction-->
            <attr name="originalFile" stringvalue="Actions/View/org-netbeans-core-actions-LogAction.instance"/>
            <attr intvalue="500" name="position"/>
        </file>
    </folder>
</folder>
</filesystem>

Example Project code You can check the bare minimum NetBeans Platform application here https://archive.org/download/application1_201601/application1.zip

Community
  • 1
  • 1
Tushar Joshi
  • 2,206
  • 21
  • 20