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 - Reorder positions automatically in layer.xml file
Summary: Reorder positions automatically in layer.xml file
Status: NEW
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Martin Kozeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-02 18:45 UTC by tdanard
Modified: 2013-05-02 19:32 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.