eclipse-rbe icon indicating copy to clipboard operation
eclipse-rbe copied to clipboard

Is there a way to avoid reformatting at all?

Open da3x opened this issue 10 years ago • 11 comments

I've just tried v1.0.2 with Eclipse Luna and found no obvious way to avoid reformatting or sorting at all. Do I miss something?

da3x avatar Aug 07 '14 08:08 da3x

You did not miss anything. Sorting and formatting was one of the original goal of the plugin and there is no way around it for now. You only option now would be to open files you do not want formatted with the regular Eclipse Properties editor instead.

To implement this, the tricky part would be where to insert new keys in files. Do you envision having up/down arrows (or drag-n-drop) to manage the order of your keys? Also, what about if the key order is different in each language files? Which order should prevail when we present the keys in the plugin UI?

I am marking this as a enhancement request and if enough demand, myself or someone else, may pick it up and add this feature.

essiembre avatar Aug 08 '14 02:08 essiembre

There should be an option to avoid sorting at all... new entries would add to the end of the file. A better approach would be to add new entries right after the currently selected line (if applicable). This is the most important enhancement because it avoids resorting in a larger developer base using different plugins. I don't want one developer break the sort order of another.

The same for formatting... only format lines that have changed (per option).

A very nice addition could be that the affected group is sorted and ordered with every change. Often developers work on different parts and one developer might want his group of entries sorted this way... the second another way.

Right now I can't really use the plugin because it would cause to much merge conflicts with other branches.

da3x avatar Aug 08 '14 06:08 da3x

Same problem here

fhoess avatar Dec 18 '15 12:12 fhoess

Forced formatting creates a real problem for merging 2 two branches with different max key length.

kraiz avatar Apr 20 '16 09:04 kraiz

This feature is scheduled for the next release.

k0ner avatar Apr 20 '16 17:04 k0ner

Forced formatting is the only thing stopping me to use it. Thank you for considering this issue. :+1:

samirck avatar Dec 14 '16 09:12 samirck

Yes please, I can't make the comments stay with their respective lines.

anfe0690 avatar Feb 01 '17 16:02 anfe0690

When is the next release scheduled?

aaron13100 avatar Feb 10 '17 05:02 aaron13100

Hi all. Also for me it is a problem! My solution should be to insert some sections block markers (ex. # [Section1-begin] ... #[Section1-end]) and use them to split the file into sorted sections. In the plugin, some options could allow to user to enable/disable the feature and toggle the view from splitted sections / all in a view. Thanks and best regards. R.A.

Roby73 avatar Feb 12 '18 09:02 Roby73

I just installed the plugin and edited property files in my project with it. It changed every single line of my property files because it sorted them alphabetically. I had to do a git reset and uninstall the plugin. It's a pity because the looked nice otherwise.

rbi avatar Nov 09 '20 13:11 rbi

This still hasn't been implemented? Everything else is great with this plugin, there should be a configuration parameter that you can check or uncheck to enable/disable sorting. Unfortunately, I'm uninstalling this plugin for now.

sunil-samuel avatar Feb 10 '24 17:02 sunil-samuel