IntelliJ IDEA shows decompiled .class instead of documentation - intellij-idea

I am using same version of IntelliJ IDEA (2016.3.5) on Windows and Linux. The problem is that on Linux IntelliJ IDEA doesn't show java documentation after clicking "Ctrl" + left mouse button , but it shows decompiled .class file. It's not big problem but it's annoying. What may be wrong? I tried to restore default settings but it didn't help.

You're not showing docs, you're drilling down into the implementation of a library method. You haven't attached the sources for the library, so the ide has no choice but to decompile the code in order to let you see the method you're trying to reach. If you're using maven you can download the sources and then when you drill down you'll see real code. Restoring default settings won't help, because this is how its meant to work.
Further; when IntelliJ shows documentation (ctrl-q on my machine) it tries to build the javadocs directly from the source, not from the published javadocs which it ignores. This is another reason to download the sources along with your libs.
BTW: When you 'release' your own libs to your corporate repo you should be building and releasing sources too, so that the users of your libs get the ability to drill down into the implementation, and so that they get access to your api's javadocs.

Related

Intellij plugin development, SDK source file content

I can't figure out how to add the Intellij SDK plugin development source files to be able to navigate the files.
Right now I am only getting a decompiled list. I'd like the comments as well.
Note, I know there is https://github.com/JetBrains/intellij-community/blob/master/platform/platform-impl/src/com/intellij/openapi/editor/actions/
But shouldn't these already be included?
Can someone explain how to add the sources? I tried from module settings but couldn't get that to work.
If you're developing a plugin, or viewing/modifying an existing one, I suggest you take a look at the IntelliJ SDK docs, especially the prerequisites section, which explains how to set up a proper development environment.
Basically, you should clone IntelliJ community using
git clone git://git.jetbrains.org/idea/community.git idea
Then configure an IntelliJ SDK, and in the Sourcepath tab, add the local git repo to attach the source code.

How to properly import a Play 2+ project in IntelliJ 14+ with all integrated features (run, debug, test)?

I work on a Java based Play! project for severals months now and I'd like to import it completely in IntelliJ, meaning being able to run, compile, test and debug from IntelliJ, without the need to use the command line.
According to this post from Jetbrain, it seems to be possible, if I quote the article it says clearly : "Now you don’t need to switch between IntelliJ IDEA and Play console anymore. Everything is available right from your favorite IDE.", but I can't figure out a way to achieve this for now, even if I follow the tutorial provided by Jetbrains.
Here are the steps I've been throught :
Open my fav IDE IntelliJ ;)
Go to the project list window.
Import project
Import from external model and choose SBT as suggested in Jetbrains tutorial.
option "Use auto import" checked, option "create directories for empty content roots automatically" checked. Project SDK Java 1.7
Global sbt settings : JVM From project JDK.
Finish
By now, if I try to make the project and launch it from IntelliJ, I'll get scala compiling errors related to routes object. Thanks to this post, we can understand that this happens because scala routes are located to specific folders that needs to be included in IntelliJ sources settings for this project. So next step was :
File -> Project Structure -> Modules
Add target/scala-2.10/classes:target/scala-2.10/resources_managed:target/scala-2.10/src_managed as sources folders.
But my problem remains the same, routes object being unrecognized.
Notes : I have no scala facets in my project structure configuration nor can add one.
IntelliJ provides integrated support for the Play Framework for Scala and Java. Support is currently only available in IntelliJ Ultimate Edition (see the Frameworks and Technology section).
Assuming Ultimate Edition, the setup for Play is incredibly easy. Simply create a new project by importing build.sbt, then choose Add Framework Support and choose Play 2.
Once complete, you can start and stop Play using the Play 2 Run/Debug configuration. No command line necessary.
Here is a more in depth look at IntelliJ's Play project configuration.
You could try the command play idea if you are using play or activator idea if you are using activator. That will do the magic.

Looking for a MyBatis plugin for IntelliJ Idea 14

I'm looking for a current MyBatis plugin for IntelliJ Idea 14. I previously used one hosted by Seventh7 but that is no longer listed (and its git is a 404). The main thing I'm looking for is decent linking between my classes that extend SqlSessionDaoSupport (my DAO classes) and their matching xml files (not using annotation driven).
Any suggestions?
As far as I know the latest free version was v2.34 and it was applied to IDEA v141.177 till v141.179 (as described in file plugin.xml inside jar). That's why this plugin is no listed in IDEA. After this author released paid version and closes free access to the repo
But there is a free fork here:
https://github.com/phoenix/intellij-mybatis-plugin (I love github and open source :) )
Short instruction how to install it:
Download intellij-mybatis-plugin.jar from repo above or use direct link
In IDEA: File>Settings>Plugins, press button "Install plugin from disk" and select downloaded jar.
Restart IDEA
Note: For me navigation to and from xml files does not work until I disabled another iBatis plugin
In Intellij, Go to Settings-->Plugin-->Browse repositories
Search for mybatis plugin.
Install it and restart.
there is a plugin named MyBatisCodeHelperPro, you can search it in repositories.
or download via https://github.com/gejun123456/MyBatisCodeHelper-Pro/blob/master/README_EN.md

How can I check the build command for my JavafX app in IntelliJ IDEA

Im creating a JavaFX application in IntelliJ IDEA, and I am new to IntelliJ.
I would like to be able to compile my JavaFX application on a Raspberry Pi, but my app is quite complex and relies on 3rd party libraries, etc.
I would like to be able to see what exactly is going on in IntelliJ when I run "Make Project"
Is there a command line output screen that Im simply missing? I want the exact command that IntelliJ uses to compile the application.
Essentially, on the Pi, I want to get the code from my repo, run the compilation command and produce an executable JAR on demand.
I have of course read the doco on how to compile a JavaFX application, but if I could see what IntelliJ does, that would be fantastic.
So far I haven't found such an option but the process is most likely some sort of flow based on IntelliJ plugins and the documentation seems to support this theory.
Perhaps you'd consider using a software management and build tool such as maven or ant or something similar. This should give you (almost) unlimited options to configure your desired build sequence and 3rd party dependencies.

Setup IntelliJ IDEA 12 with Play2 and framework sources (java)

I'm using IntelliJ IDEA 12, its Play2.0 plugin for a Java project.
Unfortunately Play 2 (2.1.4 at this time) does not ship with the sources for its dependencies, and running idea with-sources=yes only downloads the project's dependencies sources.
So far I've had to manually download the source jars and attach them whenever I needed them.
Of course I have to redo this every time the Play framework is updated.
Is there any better way, either within play, which I would prefer, or with an external solution?
Unfortunately IDEA's "Search in internet..." button usually doesn't work, most likely because it's looking on the wrong respositories. I suspect it is trying to use the Maven settings with the configured Nexus repos, but AFAIK Maven central is not in there.
It is as simple as running update-classifiers in the Play console and then regenerating the project files.
I wish this would be done automatically, but apparently it is too obvious to sbt users.