I have a function with parameters.
I like to use this function and would like to see the parameters that I have to provide to this function.
How can I force IntelliJ, that it shows me the parameters needed for that function when my cursor is in the () of that function ? Ctrl-Space do not help me out.
try CTRL+P
its shows you the type and the name
Press CTRL+SHIFT+A and search for Parameter Info and it will show u your hotkey
Related
Suppose I have a method:
addUser(String userid, String email, String phoneNo){..}
When I write only two arguments addUser("martin","asd#gmail.com" and press Ctrl+Space then IntelliJ IDEA does not show the arguments that are accepted by this method.
Instead I need to remove them and type api. Ctrl+Space.
Code completion is supposed to work differently, once you choose addUser from the popup, you will have something like this:
Type the parameter values and press Enter to switch to the next one.
Parameter info can be shown automatically:
or manually on Ctrl+P (View | Show Parameter Info):
Code completion popup will appear after typing , next to the second parameter and pressing Ctrl+Space.
Suppose I type a Java method call with an argument that I intend to make into a field:
knownObject.knownMethod(newField);
At this point, newField is highlighted as compilation error. I can press Alt+Enter and select "Create Filed 'newField'" from the menu.
That brings me up to the beginning of the class file where other fields are defined.
I can press Enter to confirm the new field's type.
Now I'd like to go back to my knownMethod() call and continue coding. How do I do that?
Bonus question: in the above situation, Ctrl+Shift+Backspace may help because I just edited the the knownMethod() call. What if I decide to first type in multiple arguments to the method? How do I get back to the argument I've just created a field for in that case?
For getting back to a previous caret location the Navigate > Back menu item usually works (CtrlAltLeft Arrow on Windows). Another option may be to use Edit > Find > Find Usages on the field (enable the Skip results tab with one usage checkbox setting)
Is there any way to jump to the method parameters from any point inside of this method?
You can use Navigate Between Methods and Tags and while with the cursor in the function:
On OSX: ^+↑
On Windows: alt+Up
which will move you to the next method header upwards — actually the current method — and then ctrl+Right or ⌥+→ to your parameters. No mouse / parameter usage lookup needed
Place the cursor on a parameter name within the method and press the following key combination.
On OSX: cmd +b
On Windows: ctrl + b
I know it is possible to inactivate functions codes in ABAP.
In my reports I can code it:
DATA pf_exclude TYPE TABLE OF repid.
APPEND 'MYFUNC' TO pf_exclude.
SET PF-STATUS 'LIST' EXCLUDING pf_exclude.
But there is also a way to do it in the GUI status, but how?
In the status maintenance (SE41) is a button to set the function to (in)active:
This button is only visible in change mode.
I accidentally changed something within the code style in my PhpStorm. Now, when I press Ctrl + Shift + F for formatting, a space is placed in front and after parameters in a method call within a function.
How can I change this back?
Go to Editor > PHP > Spaces > Within, see if "Function declaration parantheses" or "Function call parantheses" are checked.
In tab "Spaces", option "Within", desactive "Method declaration parentheses".