This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 229295

Summary: Reorder positions automatically in layer.xml file
Product: apisupport Reporter: tdanard
Component: ProjectAssignee: Martin Kozeny <mkozeny>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description tdanard 2013-05-02 18:45:06 UTC
The <this layer in context> view is very convenient. I would like to add a contextual menu to each folder in that view that allows developers to reorder all position attributes automatically.

for example, if I have two modules:

Module A:
        <folder name="MyFolder">
            <file name="com-mycompany-MyAction1.instance">
                <attr name="position" intvalue="100"/>
            </file>
            <file name="com-mycompany-MyAction2.instance">
                <attr name="position" intvalue="150"/>
            </file>
        </folder>


Module B:

        <folder name="MyFolder">
            <file name="com-mycompany-MyAction3.instance">
                <attr name="position" intvalue="170"/>
            </file>
            <file name="com-mycompany-MyAction4.instance">
                <attr name="position" intvalue="171"/>
            </file>
        </folder>



The result of the reorder would be (with a position interval of 10):


Module A:

        <folder name="MyFolder">
            <file name="com-mycompany-MyAction1.instance">
                <attr name="position" intvalue="100"/>
            </file>
            <file name="com-mycompany-MyAction2.instance">
                <attr name="position" intvalue="110"/>
            </file>
        </folder>


Module B:

        <folder name="MyFolder">
            <file name="com-mycompany-MyAction3.instance">
                <attr name="position" intvalue="120"/>
            </file>
            <file name="com-mycompany-MyAction4.instance">
                <attr name="position" intvalue="130"/>
            </file>
        </folder>


I need this because I have dozens of modules, and overtime, I end up with less and less "pluggable positions" between each instance. Refactoring positions manually across all modules is painful and error prone.