Adding Your Plugin Setting to the IDE Settings Dialog
Answered
I would like to know how to add my own plugin options to the settings dialog. The closest question I could find was the one below. However it left my question still unanswered.
Please sign in to leave a comment.
Create a sub-class of Configurable and register it in your plugin.xml. The Configurable class, in the Community sources is the place to start reading. There are many example sub-classes in the Community sources.
See the docs on https://github.com/JetBrains/intellij-community/blob/master/platform/platform-api/src/com/intellij/openapi/options/Configurable.java.
Alejandro, I have exactly the same question - how have you been able to solve it?
Eric, I am a little overwhelmed with the source code - would you please be able to provide a little more information as to what parts of the Configurable class need to be implemented in a sub-class?
Thank you,
Richard
To specifically answer your question: You must implement all abstract methods and all interface methods. But that is no different than any Java class.
To more generally give you a direction to research: Here is a very simple example: https://github.com/HaxeFoundation/intellij-haxe/blob/master/src/common/com/intellij/plugins/haxe/config/HaxeSettingsConfigurable.java
You must create a new UI form using the UI Designer (use the menu item File->New->GUI Form...). This will create a new class and Swing UI form and keep them in sync (adds variables, etc.).
Then, create a XXXConfigurable class, such as the example one above. Instantiate your UI form class as seen in the example.
Finally, go to your project's src/META-INF/plugin.xml, and add a line like the following to the extensions section:
Thank you very much Eric - that helped a lot!
The provided links are no more available. :(
Here is an updated one: https://programtalk.com/vs/intellij-haxe/src/common/com/intellij/plugins/haxe/config/HaxeSettingsConfigurable.java/ .