Summary: | [formatter] Master switch to enable/disable on/off tags | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> | ||||||||||
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> | ||||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||||
Severity: | normal | ||||||||||||
Priority: | P3 | CC: | daniel_megert, deepakazad, nils.hammar, Olivier_Thomann, srikanth_sankaran | ||||||||||
Version: | 3.6 | Flags: | daniel_megert:
pmc_approved+
Olivier_Thomann: review+ |
||||||||||
Target Milestone: | 3.6 RC1 | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | Windows XP | ||||||||||||
Whiteboard: | |||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 311617, 311835 | ||||||||||||
Attachments: |
|
Description
Markus Keller
2010-05-04 12:14:55 EDT
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. *** |