5 comments
Avatar
Permanently deleted user

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.

 

3
Avatar
Permanently deleted user

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

0
Avatar
Permanently deleted user

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:

<extensions defaultExtensionNs="com.intellij">
...
<projectConfigurable instance="com.intellij.plugins.haxe.config.HaxeSettingsConfigurable" id="haxe.settings" key="haxe.settings.name"
bundle="com.intellij.plugins.haxe.HaxeBundle" nonDefaultProject="true"/>
...
</extensions>

 

6
Avatar
Permanently deleted user

Thank you very much Eric - that helped a lot!

0

Please sign in to leave a comment.