Community
Participate
Working Groups
HEAD, follow up to bug 27079 comment 39 We should add a master switch to enable/disable the tags in the FORMATTER_DISABLING_TAG and FORMATTER_ENABLING_TAG preferences (disabled by default). Without that, we can never introduce defaults for the tags, since the defaults would become active immediately. When we have the master switch, we can also set a default as per the arguments in bug 27079 comment 39. The hard thing is to come up with good defaults, since we have only one chance. Unless we have convincing arguments for a specific pair of defaults, we can also defer this decision to later versions of Eclipse.
When bug 311578 is fixed, my favorite defaults would be "//J-" and "//J+", since that seems to be "industry standard". But I'm open to other suggestions.
Frédéric, Could you please add the master switch? If we don't do it for 3.6, it will be a nightmare to introduce it later without breaking existing clients.
A new code formatter option needs to be added to do this. PMC, please approve addition of a new option. Frédéric will post a patch with the new option name.
Created attachment 167087 [details] Proposed patch The proposed name is FORMATTER_USE_ON_OFF_TAGS. I initially thought about FORMATTER_USE_TAGS but that sounded a little bit too much generic...
Markus, Olivier, please review
Created attachment 167117 [details] New proposed patch This patch slightly improves the formatter when the tags are not used...
Patch looks good. Could you just add at least one test that is setting the value to false with some tags?
Created attachment 167178 [details] New proposed patch + tests Added two tests to verify that the code is formatted by default even if disabling and enabling tags are defined and used.
Looks good, but the FORMATTER_DISABLING_TAG and FORMATTER_ENABLING_TAG APIs need to tell that they are ignored if FORMATTER_USE_ON_OFF_TAGS is FALSE.
Created attachment 167276 [details] Last proposed patch + tests Last patch addressing the Markus' remarks made in comment 9.
(In reply to comment #10) > Created an attachment (id=167276) [details] > Last proposed patch + tests > Released for 3.6RC1 in HEAD stream.
Verified for 3.6RC1 using Build id: I20100513-1500
*** Bug 197153 has been marked as a duplicate of this bug. ***