Community
Participate
Working Groups
In Preferences > Java > Code Style > Formatter, one can edit the profile. In the Indentation > align items in columns, please add the ability to align parameters. For example, please change this code... map.put("apple", "red"); map.put("banana", "yellow"); map.put("grape", "green"); map.put("orange", "orange"); map.put("pear", "green"); ... into this code ... map.put("apple", "red"); map.put("banana", "yellow"); map.put("grape", "green"); map.put("orange", "orange"); map.put("pear", "green"); This is a simple example. When there are many more parameters in a method, then aligning the parameters in columns helps a lot with readability.
This looks like a formatting that only makes sense in very few places, so it should be feasible to align the code manually and then put it between the formatter:off/on comments. If this kind of alignment was turned on globally, it would try to align instructions that don't have much in common and that would usually harm readability. > When there are many more parameters in a method, then aligning the parameters in columns helps a lot with readability. In that case there's a high change the statements would be wrapped into multiple lines - how should it align then?
> If this kind of alignment was turned on globally, it would try to align instructions that don't have much in common and that would usually harm readability. This only helps if the same method is being called. If different methods are being called, then alignment would confuse the reader more than help. > ...lines...wrapped into multiple lines - how should it align then? If the lines wrap, then do not align the parameters. Aligning them would not help.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.