Beginner questions (Learning IJ)

I've asked a few of my friends that are strict IJ folks about this and so far none of them know, so I am getting the feeling that it's not something obvious; but maybe it is.

#1: When typing the ";" character, is there a way to have it insert at the end of the line? This helps when having the IDE autoinsert the () pairs, and you get inside of a listener impl or something and hit ;, it's really nice to have your cursor jump out to the proper point and add it, instead of need to press End, or jump around to the end fo the line to insert it.


#2: When selecting a method from autocomplete, is there a way to have IntelliJ automatically (intelligently) attempt at auto-filling all the arguments?


#3: When formatting a source file where the comments are TOO SHORT, is there a way to have IntelliJ unroll the comments and combine their lines so they fill it out?

e.g. BEFORE
-


/* This is a short
comment with no leading
stars */
public void doSomethingImpressive(Object o); |<-- margin

e.g. AFTER
-


/* This is a short comment with no leading

  • stars

*/
public void doSomethingImpressive(Object o); |<-- margin


The idea being that the comments are formatted and alinged with learding stars nicely?





Thanks for your feedback and help.

5 comments

Riyad Kalla wrote:

#1: When typing the ";" character, is there a way to have it insert at the end of the line?


Not that I know of, but you can press ctrl-shift-enter to auto-complete
the current statement.

#2: When selecting a method from autocomplete, is there a way to have IntelliJ automatically (intelligently) attempt at auto-filling all the arguments?


No, repeatedly pressing ctrl-shift-space is the only way (and in my
experience there's often more than one possible choice in any case).

0

I've asked a few of my friends that are strict IJ
folks about this and so far none of them know, so I
am getting the feeling that it's not something
obvious; but maybe it is.

#1: When typing the ";" character, is there a way to
have it insert at the end of the line? This helps
when having the IDE autoinsert the () pairs, and you
get inside of a listener impl or something and hit ;,
it's really nice to have your cursor jump out to the
proper point and add it, instead of need to press
End, or jump around to the end fo the line to insert
it.


#2: When selecting a method from autocomplete, is
there a way to have IntelliJ automatically
(intelligently) attempt at auto-filling all the
arguments?


#3: When formatting a source file where the comments
are TOO SHORT, is there a way to have IntelliJ unroll
the comments and combine their lines so they fill it
out?

e.g. BEFORE
-------------
/* This is a short
comment with no leading
stars */
public void doSomethingImpressive(Object o); |<--
margin

e.g. AFTER
-------------
/* This is a short comment with no leading

  • stars

*/
public void doSomethingImpressive(Object o); |<--
margin


There are some settings for format comments, you can check it out


The idea being that the comments are formatted and
alinged with learding stars nicely?





Thanks for your feedback and help.


0

#1: When typing the ";" character, is there a way to have it insert at the end of the line? This helps when having the IDE autoinsert the () pairs, and you get inside of a listener impl or something and hit ;, it's really nice to have your cursor jump out to the proper point and add it, instead of need to press End, or jump around to the end fo the line to insert it.


Try Ctrl-Shift-Enter, it will add required ) and ; automatically.

#2: When selecting a method from autocomplete, is there a way to have IntelliJ automatically (intelligently) attempt at auto-filling all the arguments?


You are an Eclipse guy, are you? It's one of Eclipse' anti-features I hate,
because it is not that intelligent with its suggestions.

Try Ctrl-Shift-Space for each parameter and you will get suggestions for
matching entries (if more than one). If there is just one matching entry, it
will be auto-completed.

#3: When formatting a source file where the comments are TOO SHORT, is there a way to have IntelliJ unroll the comments and combine their lines so they fill it out?


Since you are an Eclipse guy: is there a way to tell Eclipse NOT to unroll,
e.g., too short method parameters (in other words: to keep line breaks)?
Example:

BEFORE (and expected AFTER):
-


aMethodCall(parameter1, |<--- margin
parameter2);

AFTER (now):
-


aMethodCall(parameter1, parameter2); |<--- margin

Thanks in advance.

Tom

0

To the gentleman that replies about "check the comment formatting options", I have... over and over, and there doesn't seem to be a way to haev the formatter even look at comments when they are short. Not a huge issue, just curious.



Now Tom,
Yes I'm an Eclipse guy and as far telling it to leave your lines breaks alone, I'm not sure, I've never wanted to do that. So you have the inverse situation I do :)

0

Riyad Kalla wrote:

#3: When formatting a source file where the comments are TOO SHORT, is there a way to have IntelliJ unroll the comments and combine their lines so they fill it out?


IDEA doesn't do this with normal multi-line comments, you can however configure
it to format Javadoc comments (/** ... */) in such a way (see the Javadoc
codestyle settings).

Sascha

0

Please sign in to leave a comment.