IntelliJ Idea Plugin Property Sorter updated

I’m pretty busy at work right now but I could find some time to add one more feature to my little property sorter plugin for IntelliJ Idea.

Comments above property entries will now be preserved when you sort the file.

The plugin is available from within Idea or at Google Code.

From unsorted ...

From unsorted ...

... to sorted with comments.

... to sorted with comments.

3 Responses to “IntelliJ Idea Plugin Property Sorter updated”

  1. Rayk says:

    How do you did the assignment of comment and object, which is commented? I assume that simple variable name matching does not work alone.

  2. Oliver says:

    Rather simple solution (much simpler than I thought initially). After sorting the properties and converting them back into lines of strings (without comments) I go through the original text and look at the properties which do have comments and put them in a map. Then I just iterate through the sorted text line by line and insert the comments where appropriate.

  3. Rayk says:

    In case of a line 0 “# comment at the beginning” I suppose that this line will be sorted into the comment section for variable C. Hmmm. But, those little helpers make life easier, I’m pretty sure. Again, ABAP workbench, very old school. Auto completion is hard to switch on. Highlighting? Colouring? The answer is no. And you always have a programming task beside the work. Go for it!

Leave a Reply

Additional comments powered by BackType