[RSS]

How do I remove Menu Item, Toolbar Button from plug-in's XML Layer?

Contributed by; Varun Nischal

Refer this existing document for more details, on where to use following tricks;

Trick #1

  • If you want to remove either one of the separators, OR even both of them, then see the following code, the code present in that remove it from the XML Layer, as per your need.
 
           <file name="org-nvarun-tat-separatorAfter.instance">
                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
                <attr name="position" intvalue="175"/>
            </file>
            <file name="org-nvarun-tat-separatorBefore.instance">
                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
                <attr name="position" intvalue="125"/>
            </file>

Replace "org-nvarun-tat" with your package name, in which SayCheez resides.

Trick #2

  • If you want to remove the Action from Toolbar, then remove the following code;
    <folder name="Toolbars">
        <folder name="Build">
            <file name="org-nvarun-tat-SayCheez.shadow">
                <attr name="originalFile" stringvalue="Actions/Tools/org-nvarun-tat-SayCheez.instance"/>
                <attr name="position" intvalue="325"/>
            </file>
        </folder>
    </folder>
Replace "org-nvarun-tat" with your package name, in which SayCheez resides.

Trick #3

  • If you want to remove the Action from Tools Menu, and retain it only on the Toolbar, then remove the following code;
    <folder name="Menu">
        <folder name="Tools">
            <file name="org-nvarun-tat-SayCheez.shadow">
                <attr name="originalFile" stringvalue="Actions/Tools/org-nvarun-tat-SayCheez.instance"/>
                <attr name="position" intvalue="150"/>
            </file>
            <file name="org-nvarun-tat-separatorAfter.instance">
                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
                <attr name="position" intvalue="175"/>
            </file>
            <file name="org-nvarun-tat-separatorBefore.instance">
                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
                <attr name="position" intvalue="125"/>
            </file>
        </folder>
    </folder>
Replace "org-nvarun-tat" with your package name, in which SayCheez resides.

References