./gradlew buildPlugin runPluginVerifier --warning-mode all -s -Dorg.gradle.project.publishChannel=snapshot -Dorg.gradle.project.buildNumber=20
Development
To start Intellij Idea Plugin development it’s a must to read through Intellij Platform SDK. Platform SDK documentation is not very long, but it gives great overview on what can be found where and how plugins works internally.
Project Modules
studio-idea-plugin
Main implementation of Intellij Plugin. Overview of packages:
-
studio-idea-plugin/src/main/resources/META-INF/plugin.xml
Plugin descriptor, contains definition of all UI actions, components, services and all extension points that this plugin implements.
-
studio-idea-plugin/src/main/java/com/evolveum/midpoint/studio/impl/client
Package containing REST implementation used for communication between plugin and midpoint. This REST client uses
okhttp
library. -
studio-idea-plugin/src/main/java/com/evolveum/midpoint/studio/action
Contains all UI actions defined in plugin descriptor. Most of these actions can be seen as buttons in UI on different toolbars or panels.
-
studio-idea-plugin/src/main/java/com/evolveum/midpoint/studio/impl
Core implementation of MidPoint plugin. From services that handle properties encryption, environments management, project settings and module/facet setup.
-
studio-idea-plugin/src/main/java/com/evolveum/midpoint/studio/impl/lang
studio-idea-plugin/src/main/java/com/evolveum/midpoint/studio/impl/psi
Packages contains most of the implementation for different extension points from IDE. They are used for code completion, injection of groovy variables, validation, annotations and properties inlay.
-
studio-idea-plugin/src/main/java/com/evolveum/midpoint/studio/ui
Main package containing most of UI elements, toolbars and panels for different features like object browser, trace viewer, remote diff and others.
-
studio-idea-plugin/src/main/java/com/evolveum/midpoint/studio/ui/trace
Trace UI, used to visualize information obtained from tracing midpoint operations (e.g. recompute, reconcile or tasks).
Development Basics
Project is build using Gradle. Main tasks to build project:
-
buildPlugin
-
runPluginVerifier
-
runIde
-
publishPlugin
Useful options for gradle:
-
-Dorg.gradle.project.publishChannel=snapshot
-
posible options [stable/snapshot/support]
-
-
-Dorg.gradle.project.buildNumber=20
-
used to simulate jenkins build numbers
-
-
PUBLISH_TOKEN
-
system environment variable used with
publishPlugin
for publishing plugin to JetBrains Marketplace. Contains publish token (authentication). This can be obtained on JetBrains MarketPlace.
-