| Summary: | [formatter] Single line comment inside annotation is wrongly formatted | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Holger Klene <h.klene> | ||||
| Component: | Core | Assignee: | Mateusz Matela <mateusz.matela> | ||||
| Status: | VERIFIED DUPLICATE | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | daniel_megert, jarthana, mateusz.matela | ||||
| Version: | 4.5 | ||||||
| Target Milestone: | 4.11 M1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Holger Klene
Besides the fact that it should not toggle, what would you expect as the correct result? Currently the formatter based on your profile and the indenter disagree on the correct solution. If I can choose, I'd like it to be indented to 4 spaces :-)
This would be consistent with commenting out more DefaultLocations as in:
@NonNullByDefault({
DefaultLocation.ARRAY_CONTENTS,
DefaultLocation.FIELD,
DefaultLocation.PARAMETER,
// DefaultLocation.RETURN_TYPE, // B
DefaultLocation.TYPE_ARGUMENT,
DefaultLocation.TYPE_BOUND,
// DefaultLocation.TYPE_PARAMETER, // A
})
Where B does not toggle in my setup and stays indented.
(In reply to Holger Klene from comment #2) > If I can choose, I'd like it to be indented to 4 spaces :-) I assume there's no way to tweak the formatter profile so that it happens? I can switch off additional save action > Code Organizing > Correct Indentation Or I can tell the Formatter Comments > Never indent line comments on first column Both will leave the comment alone in column 0. Fixing the formatter will fix this problem. 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. This problem no longer occurs after the formatter redesign. *** This bug has been marked as a duplicate of bug 303519 *** Verified for 4.11 M1 using build I20190107-2050. |