Getting started instructions issues


These instructions may be out of date.


Following them exactly, choosing the path 1.2 "Creating a plugin project from scratch"  (using Gradle) and using  the latest version of community yields the following issues:


Variance of created directory structure with  directory structure as pictured in the instructions. Specifically, there is no Java folder as pictured and folder named main is not a source file (blue corner) as in the picture. Here is what I get; compare it to the instructions.


Adding the missing Java folder and making it a source to try to approximate the directory structure the instructions show , then pasting in the code of HelloAction results in something best communicated with a picture. Basically, the IDE has no idea where  the intellij.openapi classes are. 




Adding the lines to plugin.xml in the META-INF directory , specifically making  sure the depends-on and the extensions are in the plugin.xml file does't resolve the missing dependencies  issues. Normally, I  would look for the missing libraries and explicitly add them as dependencies but I don't think that's how this is supposed to work. 


I am not sure what I am doing wrong. Is there an updated version of this tutorial or does anyone know of another more current one ?


Also, there is a LOT of connecting to go fetch a LOT of JUnit, Hamcrest and com.jetbrains.IDEIC:2018.3.5 is that normal? Do i have to be connected to the internet on an ongoing basis to do IJ plugin work?


Thank you. 


Please try to re-sync the Gradle project completely (Gradle toolwindow), it seems something went wrong there. Please also post full contents of your build.gradle file.



 Thank you.

Just a quick question about the connections to the internet and the downloading of files. What exactly decided to do that? Is Gradle examining my plugin dev environment and then fetching what it knows are missing / outdated libraries? Assuming the answer is "yes", once it has done that is there a chance that I will get build / run errors  in the future on account of Gradle or something (coming from the  Jetbrains plugin dev-env)  needing to go online again or do I then have a settled plugin-development environment-snapshot that I can proceed with confidence against ?


I am asking because I am not always connected to the internet (security) and I don't speak Gradle (yet) so the whole thing is just an open ended  mystery with unclear boundaries of behavior and requirements.  


WRT to the original question, it seems to have resolved itself on its own for reasons I don't understand. I post the details below in case they are meaningful to the plugin dev team at IJ:


1) IJ (not coming from Gradle) asked to update itself to incremental updates. Did so then asked again and did so again. 

2) Received these two messages from Gradle:

5:50 AM The IDE modules below were removed by the Gradle import:
You can open dialog to select the ones you need to restore.

5:53 AM Compilation completed successfully in 2 s 17 ms

3) The errors wrt to importing libs in the plugin code appeared to disappear.

4) ran :runide

5) got the following output to console:

> Task :compileJava NO-SOURCE
> Task :patchPluginXml
> Task :processResources
> Task :classes
> Task :instrumentCode NO-SOURCE
> Task :postInstrumentCode
> Task :jar
> Task :prepareSandbox
> Task :runIde

6) IC launched and in fact did list MyPlugin as a  plugin. 


7) wasn't sure what the line starting with Download was trying to tell me. Was it telling me I should  download that file and unzip it and run it? Was it something Gradle was doing for me in the background? I just didn't know if it was instructional- "do this now"- or if it was informational- "this is being done now". 





 Also just because you explicitly asked for it I post here the full contents of the directory (1 file) . I just assume it's not informational for you since my issue appears resolved but in case it is useful:


plugins {
id 'java'
id 'org.jetbrains.intellij' version '0.4.4'

group 'mygroupid'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8

repositories {

dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'

intellij {
version '2018.3.5'
patchPluginXml {
changeNotes """
Add change notes here.<br>
<em>most HTML tags may be used</em>"""


Alright, glad it worked now for you.

All the output you got is expected and correct. You don't have to interfere or react to anything of it, Gradle was just updating/downloading all required dependencies.

As to "need to be online" - only on first synchronization and/or when changing any dependencies in your project (e.g. upgrade to later IntelliJ Platform version). You can also explicitly "Toggle Offline Mode" in Gradle toolwindow.



Thank you so much! You've helped me enormously !! I always get such high quality answers from Jetbrains people !!


 I feel like the documentation for the plugin architecture is absolutely 1st class now. So also with the procedure to build IJ Community. I did that earlier today and it went off without a hitch. 


I am also reading along with the documentation found on Git and it's so clear I just have nothing but thank yous to everyone who contributed to it.


Please sign in to leave a comment.