Summary: | [typing] Autogeneration of multiline-comment generates erranous source | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Gregor Rosenauer <gregor.rosenauer> |
Component: | Text | Assignee: | JDT-Text-Inbox <jdt-text-inbox> |
Status: | ASSIGNED --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | mlists |
Version: | 2.1.2 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Gregor Rosenauer
2004-02-24 08:24:06 EST
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. |