Community
Participate
Working Groups
1. You have a single-line-comment "//" which you want to translate into a multiline-comment 2. You delete the second "/" and insert a "*" 3. press RETURN 4. a multiline-comment is generated, but the content of the original line is wrongly inserted past the comment-end-tag "*/", generating an error. Solution: The original comment-content should be placed inside the multilnie-comment instead, inserting a new "* <original comment>"-line automatically.
sorry, I think I got the wrong component - Core seems more appropriate. It would be very helpful for new Eclipse-bugreporters if the Component-description-page contained a short description of the component and what it is responsible for, sothat one can decide better where to put a new bugreport (like it is on Mozilla's bugzilla).
The component was correct.
we don't keep state i.e. // + backspace + enter is the same as if you type /* + enter We could be smart. I guess in 80% of the cases when we have /* <caret> SOME TEXT and press enter after <caret> we would expect /* * <caret> SOME TEXT
Yes, this would be the expected behaviour and would not generate an error - currently the auto-formatting feature gets in my way and I have to work around it which is quite counter-productive;) Do we want to be smart? I vote for yes;), if it's not too much work in this case...
And not to forget, the end-tag of the multiline-comment should be inserted as *last* line, not before the original content. Additionally it would be nice if the caret was positioned into a new commented line inside the now multiline.comment, since this will be the desired behaviour in most cases I think. So to summarise the steps, we would have 3 states: (_ = caret) 1. // _old single-line comment 2. /*_old single-line comment 3. /* * old single-line comment * _ */ IIRC this works similarly when generating javadoc-comments (by inserting an additional asterisk '*' after the comment-open-tag), where a new comment-line is created automatically and the caret is positioned there.