Shortcut key for context-sensitive help in Intellij Idea (coding in Java) - intellij-idea

Isn't there some shortcut that takes you to context specific help?
For example, if I have my cursor on System.out.println, isn't there some shortcut key I press that takes me to the documentation on this particular method or class where the method is declared?

View documentation ("Quick Documentation" action):
Ctrl+Q
View external documentation ("External Documentation" action):
Shift+F1
For this to work you need to configure your project so that IntelliJ knows where to look for it (see here).

Just to add an answer for the Mac users out there try using F1 for Quick Documentation.

Check out https://www.jetbrains.com/help/idea/viewing-reference-information.html#external-docs
In the Project Structure window > Platform Settings (Ctrl+Shift+Alt+S) under SDKs you can add a documentation url for the specific SDK version: under Documentation Paths tab click on the correct + icon (or use Alt-S). In IntelliJ 2019.3 when you want to add the url it gives you by default the correct url so you can just hit Ok:
JDK 1.8: https://docs.oracle.com/javase/8/docs/api/
JDK 11: https://docs.oracle.com/en/java/javase/11/docs/api/
JDK 13: https://docs.oracle.com/en/java/javase/13/docs/api/
When you return to your source code you can the select a Java keyword and hit Shift-F1 and your browser will open and jump automatically to the correct docs for the keyword.

Related

cannot navigate method definition scala code in inteliij

I'm using Java and Scala on IntelliJ 2016 3.4 Ultimate on Mac.
I can navigate method declaration/implementation of Java.
But can't do it Scala code.
The way I'm doing in Java is if I Command + hove over left mouse/trackpad on a method, it displays some methods and if I click one of methods, I can go to that method.
( I don't hit Command + shift as described in [here][1]
[1]: https://www.jetbrains.com/help/idea/navigating-to-declaration-or-type-declaration-of-a-symbol.html in Java code)
But cannot do navigate methods for Scala code by hitting Command + hove over left mouse/trackpad on a method.
I checked Preference > Language & Frameworks > Scala but couldn't find setting for this.
Do I need to set up somewhere for scala in intelliJ?
Right click on src folder and set Mark Directory as > Sources Root

Jetbrains Plugin Custom TextEditor Rendering

How does one go about extending the jetbrains texteditor in a plugin to replace the text/characters/tokens with images/sprites?
This is not possible in the current version of IntelliJ IDEA (2016.3). The only possibility is to use the EditorInlay API to insert custom-drawn fragments between characters in the editor.

how to make XCode 4.5 Organizer Documentation help similar to earlier versions

This is one of my biggest turn offs from the newer versions of XCode(ie 4.5+) is the following: in earlier versions.. when you option click a system defined function.. you get a bubble that offers you a link that takes you directly to the function definition in organizer:
but on XCode 4.5 and later.. that changed: the exact link of the function is no longer provided.. instead you can only click on the reference of the entire class!
any idea how that can be changed? Another problem I have is the fact that I just couldn't figure out how to do offline documentation viewing on xcode 4.5 (it worked fine in earlier versions.. and yes i did download all the documentation locally and followed all the SOF links.. but no luck!)..
Make sure you download all the documentation locally via XCode->Preferences. Once it's local there should be no problem accessing specific functions through the popup - it says "Class Reference" but it automatically opens the relevant documentation within the class reference.

LXR, DXR or woboq for WebKit?

Is there anywhere that you can browse the WebKit source code easily and be able to "go to definition" for information about every variable, type, and function?
Something like the Linux Cross Reference, Mozilla's DXR, or woboq Code Browser.
Which specific WebKit port were you interested in? We managed to get the current Qt5 QtWebKit to compile with the code browser :)
http://code.woboq.org/qt5/qtwebkit/

Trace shortcut in intellij idea

Is there any shortcut to generate trace statements from selected variable, like ctrl-shift-0 in flash develop?
E.g.: If I select myVar in the below line and press "DesiredShortcut":
var myVar=5;
I'd like to get:
var myVar=5;
trace('myVar='+myVar);
Thanks
Consider using Live Templates.
For Java IntelliJ IDEA already has soutv template that will generate
System.out.println("var=" + var);
after pressing Tab.
You can define your own templates to log via your favorite logging framework.