Intellij plugin development, SDK source file content - intellij-idea

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.

Related

IntelliJ IDEA shows decompiled .class instead of documentation

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.

Cannot add framework support in IntelliJ 14 Ultimate

I found a pretty old post with this question but unfortunately he didn't get any help. I hope someone can assist me.
I created a repo at GitHub. After cloning it to my computer I tried to add the following framework support: Maven, JSF, EJB, CDI, etc. I know I could add the files manually. But, I want to use what the IDE has to offer.
However, the only framework showing up is SQL, which is different from this post from stackoverflow and from their documentation.
Has anyone had this same problem and got it working?
Intellij reacts to changes in your Maven pom.xml file. Maven does not react to changes in your IntelliJ project module settings.
The steps that you should follow here are
Close IntelliJ
In a command shell, clone your Github repository.
Using an editor external to IntelliJ such as VI or Notepad, create a pom.xml in the root directory. Better yet, use a Maven Archetype to generate your pom.xml.
Now open IntelliJ. Choose File, New, Project From Existing Sources. Navigate to your pom.xml and follow the prompts.
I recommend checking Search for projects recursively and Import Maven projects automatically.
Finish the project creation.
Now, add dependencies to your pom.xml via the dependencies tag. See Maven Dependencies. Intellij will automatically react to dependencies that you add as long as it can see a Maven Repository on your local machine or on your network or on the Internet.
I know it is a little bit to late but I just post it because it is still an possible issue: You need to open YourProjectName.iml and make sure that the type (<module type="JAVA_MODULE" version="4">) is JAVA_MODULE and not something else!(In my case it was WEB_MODULE)

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

Importing Cordova plugins into Worklight 6

I worked through the ApacheCordovaPlugin example. Its nice to see that creating a new plugin is possible, and I successfully replicated the HelloWorldPlugin in a WL project of my own just to make sure I could get all the plumbing to work. It is tricky, you have to make entries in the right XML files, name your Java and .js files appropriately, know how to include them and call the functions, etc. If you make a mistake there is very little information visible that you can use to debug it. The entire process is very fragile.
Now I would like to have access to the large library of existing Cordova plugins. My primary development target is Android. I downloaded a plugin zip file from a git repository and extracted it. Looking at the files and the directory layout it is not at all clear how to integrate this into a WL project. Cordova has a 'plugin.xml' file that appears to supply all the glue, but there is no such thing in WL. I was not able to determine where to put files and what edits to make in the Worklight project that would cause the Cordova plugin to be recognized and accessed from my application JavaScript.
Surely this process is possible and is documented somewhere? Ideally there would be a utility that we use to import Cordova plugins, but next-best would be a step-by-step procedure description. I saw one somebody did for getting plugins into the iOS application environment, but not Android.
Most probably you've downloaded a plugin for cordova 3.0+. Since latest WL contains Cordova 2.6 you need to download plugin for this (or similar) version. E.g. if you're talking about barcode scanner plugin the most suitable version would be 2.2 (https://github.com/phonegap/phonegap-plugins/tree/master/Android/BarcodeScanner)

How to write an IntelliJ IDEA Plugin?

IDEA has many plugins to use. I.e. IDEtalk is one of them which I use. How can I code a simple plugin that just connects to Internet and shows a web page? (no need for an address bar but it is not a problem to be). I want my plugin's shortcut's button locate at my IDE as like IDEtalk, Commander, Maven Projects etc.
Any ideas?
Check the documentation and the source code of the other plug-ins available in the public git repository of the Community Edition.
There is a Creating Your First Plugin guide on JetBrains web site. It covers all the needed steps from plugin creation to deployment to the plugin repository.
You might also want take a look in the source code of a simple plugin like Twitter Integration Plugin which I recently implemented. Or check a more complex one like this one.