Scala IDE doesn't show documentation during autocomplete hints - eclipse

I can't see any documentation when I press "Ctrl + space" to see all the available functions.
For instance, in a Java class I can see the javadoc associated with each method:
But when I try to view the same information in a Scala worksheet, I can't see anything:
However, if I make a hover with my mouse over the method once it has been written I can see the documentation:
This behaviour is very annoying. Does anyone know how to do it in scalaIDE? Do I need to configure anything?

Perhaps you are using a non built-in compiler. In my case I was using as an installed compiler scala-2.12.0-M5.
If that is the case, try using a built-in one.
See also my last comment to the previous answer.

The new version should have the scaladoc integration working. Can you check if the Scala->Run Setup Diagonostics window and see if the two JDT options are checked?
ScalaIDE

Related

Display Javadoc with Autocomplete Parameter Information in Intellij

In Eclipse, when you're about to enter parameters for a method, the auto-complete will display all possible combinations as well as the Javadoc associated with each of them. This can also be triggered manually.
I'm trying to get Intellij to display the same information but I can only get it to display the shortened parameter information via Control-P. Is there a way to display the corresponding Javadocs as well?
For the example below, in Eclipse, you can get the Javadoc for each of the different Date constructors to show up before entering anything. But in Intellij, I can only get the JavaDocs to display after entering ALL of the parameters then performing a Control-Q on the method. I can't get the Javadocs to display while typing.
In this case, it's trivial but sometimes the parameter names are not labeled so Javadocs are nice to help pick which overloaded method you want.
Eclipse:
Intellij:
It's a known limitation, please vote for this feature request in YouTrack (it's 4 years old!).
Maybe you're looking for this new feature to appear in IntelliJ 2018.2, Go to Settings | Editor | General | Code Completion and open Show the documentation info popup in... options, I just solved this problem with the new version.

eclipse java editor method proposal

I recently had to work on a visual basic project. For this task I used Visual Studio 2010 and noticed I slight difference how method are proposed for code completion. If you hit CRTL+Space and start typing, all methods are suggested that contain the text. Eclipse suggests all method that start with the text.
This behavior is especially helpful if you have to work with unknown code. Can I achieve the same behavior for Eclipse? Thank you!
You can download Eclipse Code Recommenders plugin - http://www.eclipse.org/recommenders/. It has a feature 'Subwords Completion' which does exactly what you are looking for.
The closest you have in Eclipse is support for camel-case... This allows you to type "new NPE" ctrl-space and Eclipse will propose NullPointerException and NoPermissionException (depending on your current target platform).
To see which preferences you have to change the behavior of the quick assist functionality, open the Preferences Dialog and type "assist" in the search field... There are plenty of ways to tweak the behavior :-)

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.

Scala Eclipse plugin doesn't show mouse hover documentation

I just installed the Scala IDE Eclipse plugin with a fresh install of Eclipse Indigo. I followed the getting started youtube video on the scala-ide.org main page on a fresh installation of Indigo. Instead of showing the complete documentation for the String Java class, it shows "type String = String"
I did notice incidentally by looking at the project properties, that in the scala-library.jar and others in the project, under "javadoc location," they show "(None) - non modifiable." I'm not sure if this is the problem, or if the Scala editor gets its documentation somewhere else.
Has anyone else experienced this and/or figured out how to fix it? Thanks!
In addition to the bug that you've raised (Mouse hover doesn't show documentation), there
are the following issues:
Hovering on a type should show its javadoc
Javadoc view regression
As you can see, the issue is a real bug, so there aren't any workarounds at the minute. Sorry.
You could always fix it if you like :-)
So there are updates to this question
The issues stated above are fixed in the latest release.
Hovering on type should show fix
Scaladoc integration with code completion
Please use the latest release of ScalaIDE(post 3.0.4-211) to work with them

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.