Is there a hotkey for searching for references in IntelliJ when using Scala? - scala

Is there a hotkey for searching for references in IntelliJ when using Scala?
In Eclipse, when using the hotkey CTRL+SHIFT+G on a name, a search for references starts. This is very usefull to find where a certain method is used. Is there anything similiar in IntelliJ when using Scala ?

Ctrl+Alt+F7: Show Usages; displays pop-up with usages.
Alt+F7: Find Usages; opens the Find view, displaying usages in various ways (such as by methods and by files).
Found by doing Ctrl+Shift+A, then typing find, and seeing Show Usages and Find Usages listed. I tried search first, but that only showed settings. Now, I knew IDEA called it Usages, not References, but I avoided searching for that because you wouldn't know to search for that.

I think in version 12 in Ubuntu Linux it's Control + Alt + the number key 7 rather than F7.

Related

Zoom in/out with Ctrl+ / Ctrl- not working in Eclipse

In Eclipse, it seems like all the keyboard shortcuts work, except for those that zoom in/out. (I'm on Windows and using Eclipse Version "Kepler Service Release 2") I have already restored the default keys in my preferences as other StackOverflow posts have advised, but it still doesn't work. Does anyone know why? Thanks!
I'll provide an answer, but you haven't really provided enough information for anyone to be confident that they are fully dealing with your problem.
It would still be useful to know what version of Eclipse you're using.
The first thing to do, is determine exactly what the binding is for the "Zoom In" and "Zoom Out" commands, by looking in the "Keys" section in Preferences. It's easiest to type "zoom" in the filter field to limit the table to those functions. I imagine you've already effectively done this, but it is a prerequisite.
The next thing to do is look for conflicts. There are two ways to look for this. First, check the Eclipse log. It will note if there is a keybinding conflict. Second, in that same "Keys" list, remove "zoom" from the filter (if it was there) and click on the "Binding" header to sort by the key sequence. Then page through the list until you find "Ctrl++" and "Ctrl+-" in the list, which I assume are the bindings you have. What you want to check for is if there is another binding in that list where "Ctrl++" BEGINS the key sequence, and is longer than that. Do the same for "Ctrl+-".
If you still don't find any clues from this, I suppose it's possible there's something else you have installed in Windows that is capturing that key sequence. I don't know how you would check for that.

Eclipse equivalent of CTRL-K in Netbeans

Netbeans has a nifty shortcut completion, I use while I type. It works in comments, in strings. Pretty much places where regular completion is useless. It basically autocompletes using the editor scope (in other words, whatever word matches closes to the point you are typing). Is there something similar in Eclipse ? I am making a transition due to lack of mybatis/mylyn support in netbeans. You can read more about it here https://blogs.oracle.com/chengfang/entry/why_am_i_using_netbeans .
It's called Word Completion. The key binding may vary; Ctrl/Cmd+Shift+L to find out.
CTRL+Space will show and sometimes autocomplete (depends on the settings you choose) methods names, variables and etc.
You can read more about specific settings and further fine tuning here.

Eclipse search everywhere

There is a search everywhere shortcut in Intellij IDEA(double clicking shift button), I'm wondering if similiar searching can be done in Eclipse. I did some googling, but it seems I can't search files/code at the same time in Eclipse.
Any suggestions are appreciated.
For me, its a combination of:
Cmd+Shift+R : using wildcards like *, for the files
Cmd+Shift+M : for methods (also Cmd+O for a quick outline)
Cmd+Shift+T : for classes
I prefer keyboard shortcuts rather than the mouse, so these 3 shortcuts helps me a lot
No, the search everywhere (source code, databases, actions, elements of the user interface) from IntelliJ is (for Eclipse) split at least between:
searches (ctrl+H): you can define a search in files by default.
searches in shortcuts (ctrl+l): for dearching the list of key bindings
Control + 3 - search in all the settings. And my favourite Control + Shift + L (Only in Spring Source Tool Suite) - it's like Google for your source code. Is somehow similar to Symbol/ctag search in Intellij but it finds ALL occurences.
Both are very old features.
What you want is called Quick Search and can be activated using Ctrl+Alt+Shift+L

Is there a way to enable Visual-Assist-style tooltips for comments with IntelliJ IDEA?

One thing that I've found incredibly useful, especially when working with code that I haven't written myself, is when tooltips can show me the comments, and syntax highlighting for a given variable/value/function/method/etc. It wastes time having to go to the implementation itself to read the comments and then come back.
Visual Assist X for Visual Studio does this, here's an example I found:
Notice the comments at the bottom of the image, and syntax highlighting applied to the tooltip itself.
I'm hoping IntelliJ IDEA does this, or at least that a plugin for it does. Any help is much appreciated.
Background info: I'm using IntelliJ IDEA 11, particularly for Scala.
Ctrl + Q will show you ScalaDoc for the the thing you have under cursor. More info
You can also use Ctrl + Shift + I to quickly view the definition of that thing. More info
You can also find useful Ctrl + P - it shows parameter list for the function you are calling and your progress so far (in bold). I find it very helpful when I writing method calls. More info
In order to make it work, you need to attach sources and/or javadocs to you library dependencies. You can make in module settings (dependencies tab). Just double click on the library dependency and you will see options that allow you to attach sources and javadocs. They are normally distributed as JAR and ZIP files or you can also simply point them to some directory in you file system.

How do I use IntelliJ to auto-complete method parameters?

A feature in Eclipse that I really miss is how you can auto-complete method parameters with currently in-scope variables. This feature will, with a single key combo (ctrl+space) fill in all method parameters. As long as my variables were named similarly to the method parameters, I never had a problem with this auto-complete. Is there a plugin or a native way to accomplish this in Intellij?
You might already know that IntelliJ IDEA has the CTRL+P shortcut (Windows) and CMD+P (OX X) that brings up a brief description of which parameters are passed to the method. It's very handy and saves a lot of time that otherwise would have been spent looking up the method declaration.
IntelliJ IDEA 9 now supports what they call "super completion" which matches the behavior you are looking for and is available through their early access program.
(source: jetbrains.com)
IntelliJ IDEA 8 does not allow you to autocomplete more than one parameter at a time. You are forced to use Control-Shift-Space once for each parameter.
Control-Shift-Space (and the completion is based on type, not name)
For more goodness: Help -> Default Keymap Reference
There is also an IntelliJ plugin called 'kotlin-fill-class' that will fill in some default values automagically. Tested the latest snapshot version of the plugin with IntelliJ 2019.1 and it appears to be working.
from this post: https://stackoverflow.com/a/55160515/405749:
The plugin https://plugins.jetbrains.com/plugin/8638-auto-filling-java-call-arguments at least will provide a smart fix to do it when pressing alt+enter.
I have not found a away to do this completely automatically as it works in eclipse.