I'm (almost) a beginner in plugin creation (I created one a long time ago) and I would like to create a plugin that works BOTH with IntelliJ and with Android Studio (this to start with, because later I would like it to work also for Webstorm, PyCharm...). The principle is to use the parsing provided by IntelliJ (for Java for the moment, later for Kotlin, PHP...) thanks to the PSI. I've spent days reading and testing information at https://plugins.jetbrains.com/docs/intellij (and so on) and online tutorials, but I still can't configure my project (even before coding it). Can you help me?
Here is some information:
- I created the plugin ('empty' plugin for now) from the github template presented the online documentation. No problem for that I guess.
- I use a JDK 11. I guess this is what I have to do now (unlike before when I had to use the IntelliJ JDK).
- I want to code my plugin in Java (not in Kotlin). The template generated Kotlin code (MyBundle.kt, listeners, services...). What to write to replace these code in Java ?
- I don't know Kotlin (or very very little) and I usually develop in Java with Android Studio and Gradle. Should I keep the build.gradle.kst or replace it by build.gradle (and if yes, what to put in it ?) ? The formats of the parameters in these "build.gradle" are often written for one or the other and it is difficult for me to find my way around.
- When I'll have succeeded in this step, I must also add a library (a jar) for my plugin to work. Do I only have to add this jar in the libraries of the 'project settings' or do I have to do something else?
- Finally, when I run my 'empty' plugin, I get the errors :
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.intellij.ui.JreHiDpiUtil to method sun.java2d.SunGraphicsEnvironment.isUIScaleEnabled()
WARNING: Please consider reporting this to the maintainers of com.intellij.ui.JreHiDpiUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2022-02-28 14:35:43,095 [ 12910] WARN - j.internal.DebugAttachDetector - Unable to start DebugAttachDetector, please add `--add-exports java.base/jdk.internal.vm=ALL-UNNAMED` to VM options
2022-02-28 14:35:52,544 [ 22359] WARN - .diagnostic.PerformanceWatcher - UI was frozen for 8674ms, details saved to C:\Users\Jean-Claude\IdeaProjects\pluginTemplateGradle_1\build\idea-sandbox\system\log\threadDumps-freeze-20220228-143548-IC-211.7628.21-8sec
Is this normal? If not, what to do?
I join my gradle.properties and plugin.xml files (Upload id: 2022_03_01_E9bT1d2SGKmmFc7M (files: plugin.xml, gradle.properties)
Thanks for your help...