Community
Participate
Working Groups
Following the steps in bug 185928 comment 0, I still don't get what I expect, but the comment is properly indented.
It would help if you indicated what YOU expected. Closing as WORKSFORME as it is what's expected as reported in bug 185928.
I expect the method to also be indented as my formatter prefs specify that methods should be indented from the class definition.
(In reply to comment #1) > It would help if you indicated what YOU expected. Closing as WORKSFORME as it > is what's expected as reported in bug 185928. I indicated what I expected to see in bug 185928 comment 80.
We insert the new code formatted but we do not change your chosen input position. If you type 'foo' at the beginning of the line then we won't indent the method. Similar as if you do code assist somewhere inside a method: we insert the proposal and never correct the indentation.
Reopening as enhancement request: provide an option to correct indentation while doing code assist. Olivier, what about this: correctlyIndentedLine(); foo.bar.co<code assist> Would you also want the indentation fixed in this case?
(In reply to comment #5) > Olivier, what about this: > > correctlyIndentedLine(); > foo.bar.co<code assist> Ideally yes, but I would expect that this line is already indented when I start typing "foo....".
>Ideally yes, but I would expect that this line is already indented when I start >typing "foo....". This would be the case if you pressed Return after the correctlyIndentedLine(). Do you mean it should also auto-indent if you start typing <here>? correctlyIndentedLine(); <type 'f' here> ==> correctlyIndentedLine(); f i.e. auto-indentation on typing?
Ideally I'd like the resulting source to be as close as possible from what the formatter would return once it is invoked. If you set your formatter options to indent method declaration relative to the type declaration and this is not respected when a new method is added, then this is as serious as the problem with the two new options (NEVER...) for positioning the comments on first columns. If this means having auto-indentation on typing, then yes.
>and this is not respected when a new method is added Just to clarify: I was talking about the general case i.e. you just start typing 'f' and for the editor it's of course not obvious what you're going to do (like maybe inserting a method via code assist). So - would you want 'f' to get auto-indented as soon as you type it? Or is it rather that you only want larger code snippets be auto-indented but not when inserting a method name (and its parameters) via code assist?