IntelliJ IDEA hint parameters of method - intellij-idea

I'm just swapping from eclipse to IntelliJ, and I can't find this particular feature.
In Eclipse, when the cursor is inside the brackets of a method-call and I press Ctrl+Space, it tells me which parameters this method takes. Is there something similiar in IDEA?

Use Ctrl+P (Cmd+P for Mac), it should show something similar.
You may also find the reference card (PDF) handy.

Except CTRL+P (or CMD+P for Mac)
There is new feature in IntelliJ IDEA EAP:
Parameter name hints
Settings > Editor > General > Appearance
preview:
Video from JetBrains about this feature: https://youtu.be/ZfYOddEmaRw
Related question - IntelliJ shows method parameter hints on usage - How to disable it
I'm using:
IntelliJ IDEA 2016.3 EAP
Build #IU-163.5219.11, built on September 27, 2016

Yes - just press CTRL-P.

Display the parameter-helper automatically, by adjusting the "Autopopup"-timer in IntelliJ / PhpStorm settings.
Navigate to:
File -> Settings -> Editor -> General -> Code Completion -> Autopopup in (ms)
Set it to whatever you like. Etc. 5 ms.

Ctrl+P if the keybinding is set to "default".

Related

IntelliJ IDEA 14 Copy and Paste not working with other applications

Couldn't find the simple solution on SO, so thought I would add this here for anyone looking in the future.
My symptom was that I could copy and paste within the IJ editor, but not from the editor to another application or from another app to the editor.
This was on Windows 10 with IntelliJ IDEA 14.1.6.
I have found the best solution yet (for me in any case). I have tried everything! Including adding and removing Keymap options. And this is actually where the problem lies...sort of.
When you have the Vim plugin installed, Ctrl + c and Ctrl + v is allocated to Vim.
To change that, go to Setting>>Other Settings>>Vim Emulation and set the Handler to IDE. Apply and OK, and Voila!
My solution (thanks to a similar issue reported with Android Studio) was to run IntelliJ as an admin.
Steps to always run IntelliJ in admin mode:
Right-click on IntelliJ icon in start menu search (or wherever you started it) -> Open file location
Right-click IntelliJ shortcut -> Open file location (yes, again to get to the .exe, not the shortcut.)
Right-click idea.exe -> Properties
Compatibility tab -> check Run this program as an Administrator
Right-click idea64.exe -> Properties (if you run IntelliJ in 64 bit mode)
Compatibility tab -> check Run this program as an Administrator
Same problem drove me completely insane but this
https://www.quora.com/Why-doesnt-Ctrl+V-and-Ctrl+C-work-in-IntelliJ-IDEA-14-0-2-on-Linux
worked for me:
You might try Ctrl+INS for copy and Shift+INS for paste and see if they work. They are the traditional cut and paste and have been around a lot longer than Ctrl+c/Ctrl+v.
i don't know why, but this worked!
To make copy/paste through shortcut keys working with Vim Plugin you need to change some settings of Intellij IDE's editor regarding vim emulation, you need to follow these steps for it:
Click Menu File > Settings... (or use shortcut Ctrl + Alt + S)
Select Editor -> Vim Emulation and find the shortcuts and change their Handler column value to IDE as shown in the screenshot below.
The Shortcuts will start working, happy coding :)
Another solution i've found
https://code.google.com/p/android/issues/detail?id=173201
was:
Try to minimize Idea window and move it on the same monitor where is the code that you want to copy and paste it. After this small minimize and move exercise the clipboard starts working.
Ctrl-Shft-V starts working after this for me!!!!!
Try to enable "Use national layouts". Settings- Keymap.
For some reason it worked for me.
PyCharm - Setting>>Vim Emulation Set - Control + V/P/A to IDE

How do I disable the Search Everywhere shortcut?

IntelliJ IDEA 13 has the new Search Anywhere feature. It sounds like it might be useful, but so far it just gets in the way. It's mapped to some kind of magical shift-based shortcut, and it comes up every time I try to shift-click to select text. When this happens, the pop-up flickers and gets into some stuck state, so the only way to get rid of it is to click in the editor pane, which of course loses the selection.
I call the shortcut "magical" because the Search Everywhere action appears in the Settings → Keymap list with no mapping, so I can't remove this mapping the usual way. Searching the dialog for search gives no relevant results.
How can I disable this buggy feature until it's ready for production use, and get back the ability to select text?
To disable the "Search everywhere" feature, you need to invoke "Go to action" (Ctrl+Shift+A), then type "Registry...".
Scroll down to "ide.suppress.double.click.handler" and check the box.
Source: https://youtrack.jetbrains.com/issue/IDEA-161094
After updating to build 133.331, I tried assigning a normal shortcut to it in Settings → Keymap, and that made it stop appearing on double-shift.
The settings for the new version have changed
Version: IDEA 2021.2.3
Preference > Advanced Settings
Scroll down to "User Interface", find "Disable double modifier key shortcuts" and check the box.
It's called Search Everywhere, and it's present in keymap.
For me it's perfectly disabled.
EDIT As I'v found it is hardcoded now, and will popup at doubleshift source
There is also an issue at jira, about this problem.
I hope it will be fixed soon.
from: https://youtrack.jetbrains.com/issue/IDEA-161094
In IDEA 2021.2:
You could enable the Settings (Preference on macOS) |
Advanced Settings | Disable double modifier key shortcuts option to
disable it.
This problem is still present under linux (ubuntu amd64 16.10 ) on Android Studio using X11Rdp for remote connection, maybe in other situations too - the Search Everywhere dialog appear on single Shift press.
The answer is here
https://youtrack.jetbrains.com/issue/IDEA-114933#comment=27-603899
Basically you need to
Open lib/resources.jar/idea/PlatformActions.xml and remove or comment such line:
<action id="SearchEverywhere" class="com.intellij.ide.actions.SearchEverywhereAction" />
and repack the jar.
Since end of 2017 you can add -Dide.suppress.double.click.handler=true to the custom VM options: cf. the answer from JetBrains.

Intellij: Search console output

Up until version 10, intellij enabled searching text in the console window. From version 11 this option is not available anymore.
Is there any configuration to enable that? A plugin maybe? This is very useful for me and I miss this function...
-- EDIT --
I'm using the community edition of Intellij
Override the keymap for Ctrl+F to "Find" which was mapped to some other find.
To be more specific, in Settings - Keymap go to Main Menu - Edit - Find - Find... and make sure that a Shortcut is assigned here.
Press Ctrl+F in the console:
Check you key map settings. Like in my case - I have eclipse key mapping and there is CTRL+F set to "edit\Replace" not to "edit\Find", and the "edit\Find" has no key binding at all, that's why it is not working in console.
Go to File -> Settings -> Keymap -> Main menu -> Edit -> Find -> Find... (right click on it) -> add keyboard shortcut.
It's not set by default so you have to set it manually.
CTRL+F is by default for Replace that is not supported in console for IntelliJ.
Click on console and Use CTRL+K it is used for find in intelliJ
I was encountering the same issue while I was using vim in IntelliJ 2018.3.4.
After I disabled the Tools -> Vim Emulator, I could then search in Console using Ctrl+F.
Updated
In macOS, I just could use Command+F without disabling the emulator.
Perhaps that's why developers are using macOS more.
For those who have vim plug-in enabled.
Go to Editor->Vim Emulation and check keymaps. Make sure Ctrl + F is handled by IDE and not by Vim.
After setting that, I am able to search the console by Ctrl + F and keep vim enabled.
I'm using Eclipse key mapping in IntelliJ. The shortcut to search the console is Ctrl + Shift + G. By default it would search the word where the cursor is pointing.

Intellij ignores the selected keyboard layout

This seems like a bug in IntelliJ 12: Every couple of times when I switch between keyboard layouts (English and Hebrew) IntelliJ get stuck on one of them and ignore the windows selected keyboard layout. This happens only for intelliJ, all other programs respond as usual to the windows selected keyboard layout.
Is there at least a workaround, or a way to reset IntelliJ's keyboard layout? The only thing that seems to work for me so far is restarting my machine...
(My OS is Windows 7 Enterprise 64bit)
This is 100% reproduced when you switch keyboard layout in quick class search (Ctrl+N). Also in intellij idea 13.
Something like:
Open quick search menu when keyboard is not in English layout (Russian e.g.)
Type anything
Switch to English
Congratulations! you stuck in russian layout :) restart your intellij idea!
When I ceased to switch layout in search, I forgot about this problem.
UPD: it's suitable for most part of text inputs (even for search and file creation)
I've just had this problem on PyCharm 2020.2.3
Here's how I've solved it:
Go to Settings -> Keymap
At the bottom of the window, check the option Use national layouts for shortcuts (require restart)
That did the trick
restarting IntelliJ also works.
I wonder how they managed to get such a stupid bug, this is not an easy bug to write, especially in Java.
That was found to be more like a global Microsoft/Oracle bug. Simple workaround from IntelliJ's issue tracker: use Windows' language parameters to assign a hotkey (Ctrl + number) for changing the layout directly to a desired language. This suddenly will affect both Windows And IDEA. It's said that bug was fixed in Win8. A bit more info: here
In 2020 bug is still relevant in the most IDEs based on IntelliJ. For example I observe this in PyCharm now.
There is workaround for Windows:
Go to Language Bar - Settings... - Advanced Key Settings
Set key sequence of To English action to Ctrl + 1
Set key sequence of to other your language to Ctrl + 2
Apply
Go to IntelliJ/PyCharm and switch language by new sequences
After that bug disappears and you can switch language by traditional method
For me the following actions seem to resolve the issue:
Go to Control Panel
Select Clock, Language & Region
Press Region
In the opened window choose English for Format.
Also all my settings except the location are set to English (locale, default keyboard etc.)
This fix worked on my mac, access Preferences -> Editor -> Typing Corrector from the intellij IDEA menu. If you are able to navigate to the same window on your OS, you can try this.
Uncheck Enable keyboard layout correction in the Typing Corrector window
I got the same issue in Ubuntu 16.04. Restarting IDEA doesn't change anything. But Changing the default layout to be the one I want by default ensured ubuntu work well with it.
Go to the search textfield above file editor.
Switch layout.
Type smth.
Click somwhere in the file editor.
Write smth with swithed layout.

Eclipse Indigo: shift+tab outdent (indentation) does not work anymore

After installing the new Eclipse Indigo, the outdent does not work anymore when I press shift+tab on a line. Is there any setting which activates this again?
Problem still actual for Eclipse Kepler
in Main Menu -> Window -> Preferences -> PHP -> Formatter -> {your formatter profile} -> Edit -> Identation -> General Settings:
change tab policy to Spaces and indentation size to 4 (or any desired amount).
Source: https://bugs.eclipse.org/bugs/show_bug.cgi?id=210108
Okay, so I am currently using Eclipse Luna Service Release 1a (4.4.1) and I was experiencing this problem too after switching from whitespace tabbing (4 spaces) instead of standard tab spacing.
The problem for me was that the area I was trying to de-tab/outdent/shift-tab (or whatever you want to call it) had a mix of 4xspaces and actual tabs in it.
Check if this is the case for you. If it is, you should do the conversion from one to the other. To do this, highlight everything in the effected area, then CTRL+F and replace all instances of however many spaces you are using, with "\t".
Make sure that the "Regular expressions" flag is checked.
SHIFT+TAB only seems to work correctly if only tabs or only spaces are used for indentation and won't do anything at all if there is a mix.
Also, naturally, ensure that the correct settings are applied for your tab policy in Main Menu -> Window -> Preferences -> PHP -> Formatter -> {your formatter profile} -> Edit -> Identation -> General Settings.
The functionality works fine and as intended for me since I did this. Make sure to restart the IDE as I have observed that it will subtly tend to stick to old tabbing habits in strange ways if you do not.
It may have something to do with the formatter settings (preferences->java->code style->formatter). I've experienced today the same problem on Eclipse Juno and managed to solve it by setting the indentation size to 4 and the tab size to 4 in the indentation tab. It might be worth to give it a go and play with these settings.
For those who none of the other answers worked, just try to install PDT (Php Development Tools). It has the right hot keys for performing this action. I solved this way.