As a Java developer, I am used to being able to see all relevant information out of the code completion of the IDE already. Here is an example of code autocompletion from the Eclipse IDE. For instance, you can see that the return type of the function contentEquals is a boolean and it expect one parameter with type StringBuffer. Additionally, if the JavaDoc is there, you even get a nice explanation of how the function is supposed to be used.
Now I am looking for something similar when coding with JavaScript. I started using Webstorm as I wanted an IDE with the more advanced features but when you look at the code autocompletion, it either seems rather poor or I'm not using it right.
Can someone help me figure it out?
Here is a more specific example:
Let's say, you want to get the user's position by using the navigator.geolocation. Let's assume you know as much as that it can be done by calling the getCurrentPosition() method.
You go ahead and type in your IDE (Webstorm in my case):
navigator.geolocation.getCurrentPosition()
Here is what the Webstorm IDE makes out of it:
Ok, it tells me there is one mandatory and a couple of optional parameters to call this method. Let's say, you want to call this with only the mandatory parameter, which is supposed to be a function. So far so good, but what kind of function? Is this function supposed to take parameters? Does it return anything? There's no hint about it.
I found in various examples on the web, that this callback function actually does take one parameter, so I go ahead and write it:
function printPosition(position) {
// do something
}
But here comes the next question: what type is this parameter position? What can you do with it?
So I try the code autocompletion on it:

Whooot? It gives me all kinds of stuff, but not at all what I'm looking for. So I'm ending up with google again.
And here it is how it is supposed to look like:
console.log(position.coords.latitude + ' , ' + position.coords.longitude);
Honestly, I never would have guessed that this is how it's done only by looking at the autocompletion which is very annoying because I am used to being able to do that when coding in Java.
Can anyone relate to what I am experiencing? Am I missing something? Any help would be highly appreciated!


