What is the IntelliJ shortcut key to create a javadoc comment? - intellij-idea

In Eclipse, I can press Alt+Shift+J and get a javadoc comment automatically generated with fields, returns, or whatever would be applicable for that specific javadoc comment. I'm assuming that IntelliJ IDEA has this feature. Can anyone tell me if there is a keyboard shortcut for this?

Typing /** + then pressing Enter above a method signature will create Javadoc stubs for you.

You can use the action 'Fix doc comment'. It doesn't have a default shortcut, but you can assign the Alt+Shift+J shortcut to it in the Keymap, because this shortcut isn't used for anything else.
By default, you can also press Ctrl+Shift+A two times and begin typing Fix doc comment in order to find the action.

Shortcut Alt+Enter shows intention actions where you can choose "Add Javadoc".

Related

Let Intellij IDEA always show parameter tooltip

Is there a way to tell Intellij IDEA 14 to always show the parameter tooltip that appears when you start writing a function? The problem is that the "bubble" disappears when you exit the parentheses and doesn't show up again when you re-enter.
As far as I know there is no configuration option to always display the parameter tooltip. However you can invoke it manually when you reenter the method using CTRL+P (or ⌘+P on Mac).
References
IntelliJ Help: Viewing Method Parameter Information
I think JetBrains should change this default behavior, or at least add an option for it.
For now, here are some workarounds:
Use CTRLP or make a custom key binding such as CTRL;.
Settings / Keymaps / Parameter Info / Add Mouse Shortcut.
Delete and then retype the opening parenthesis.

how to return run default content for intellij

I used one of the best shortcuts for Intellij:
Ctrl+Shift+F10
And it runs default content, which will be open.
I don't know how, but now it really do nothing.
All other short cuts are ok. And this one is dead (doesn't work anymore).
How to return to this useful short cut (or general set to Intellij default)?
Well since you have a psvm method, and your focus is in the code for that class when you press the shortcut, and given your caps key isn't on, then you should see IntelliJ try to make before running your code.
Do you see it Making ?
If not, it's likely another plugin or action has stolen the key shortcut.
Go to Settings -> Ide Settings / Keymap, and type RunClass in the search box.
You should see this: Run context configuration -> Ctrl + Shift + F10
If the key shortcut is missing, assign it.
Hope this helps.
P.S. I was recently using the Haskell IntelliJ plugin which conflicted with this shortcut. Disabling it did the trick to restore it.

Keyboard shorcut for documentation in xcode

In Eclipse, if I set the caret above a method and write:
/** and click enter, there is an auto documentation of the method with the params that I can easily change.
Is there an equivalent way to do it in xocde?
There is no shortcut for that.
However you can create your own shortcut by using AppleScript.
Put documentation and comment them by selecting them and pressing cmd+/
You can find more info here : How to add custom keyboard shortcut to xcode targeting a script.
And for better documentation tool HeadDoc and AutoGSDoc.

How to bind an action to multiple shortcut keys in Intellij?

I want to bind some of IntelliJ IDEA shortcut keys, but at the same time keep the default bindings in place in case anyone wants to use my IDE (e.g. pair programming).
Is there a way to assign multiple shortcuts to one action in IntelliJ IDEA? Or is there a plugin that does this?
It's supported out of the box, just add new keyboard shortcuts to the action, old shortcuts will be kept. Note that you can't add a shortcut that conflicts with some other action.
In Settings -> Keymap, there isn't anything preventing multiple shortcuts from being assigned to the same action. Select "Add Keyboard Shortcut" and assign your shortcut. After it is saved, select "Add Keyboard Shortcut" again with your next shortcut. Both should now work.
This was testing with Intellij IDEA 9.0.

How to close a file in Intellij using a keyboard shortcut?

I know this is a simplistic question; but I've been using IntelliJ for months now, and can't find this simple feature.
Any idea? Thank you.
Idiot me. CMD-F4 or, as mentioned before, CTRL-F4.
Thank you all. I'll just bury myself now :)
hmm you can't because there is no default key binding for that, at least on OSX, however you can go here and define one:
The standard tip if you don't know how to do something in Idea is "Find Action..." (ctrl+shift+A in Windows) then type what you want to do, in this case close.
You will get a lot of different "close" actions and simply "Close" (ctrl+F4 in Windows) will be one of them.
You can also set a custom key combination in the settings menu
Click on File > Settings and select Keymap from the menu on the left, then scroll down to the Other section and set your preferred key combination for Close Active Editor:
When you double-click on Close Active Editor, a menu pops up allowing you to set a key combination, a mouse gesture, or even an abbreviation for the action. If the shortcut is already set somewhere else (as in my case with Ctrl-W) you'll get a notification and won't be able to set the shortcut until you remove the other one.
As with Matt Ball, I don't use IntelliJ but may also be CTRL+F4...
For MAC user, Cmd-W will close the active tab (file).
On Mac, you might like to use CMD + W, as this is the conventional shortcut for closing things e.g. Tabs in Chrome.
But by default this is usually associated with highlighting the current cursor block, so instead I use CTRL + W, rather than re-assigning.
e.g. (bottom right)
Also works for other IntelliJ IDEs, like WebStorm, etc.
IDEA->File->Setting->Search for "Close Active Editor".
Click on 'Add Keyboard Shortcut' -> Change it to "Ctrl+W". (Overwrite).
BOOM! you are universal now!
I'm on version 2020.4 and this has changed to Ctrl+4