System Settings - saikek/Intellij-Idea-Plugin-Creation-Guide GitHub Wiki
System settings
Allow you to store configuration for plugin.
They can be found / entered in File -> Settings -> Other Settings
menu.
Implementation
Form
First you need to create form using IDEA's designer:
And implement getters/setters inside corresponding code class to get proper mapping of form fields.
*Configuration
This class would contain mostly storage information:
- location where to store
- implementation of load / save
- mapping of IDE properties to file properties
*Configurable
This class contains logic for form update, to be able to:
- reset form
- update with values from file
- validate that configuration values were changed
NOTE: be sure to include all form elements inside isModified
class, otherwise the form will not be updated, or you will not simply click button Apply
.
Plugin.xml configuration
<extensions defaultExtensionNs="com.intellij">
<projectService
serviceImplementation="com.cyberneticscore.ideapluginguide.settingsinideconfigpanel.SystemSettingsConfiguration"/>
<projectConfigurable
instance="com.cyberneticscore.ideapluginguide.settingsinideconfigpanel.SystemSettingsConfigurable"/>
</extensions>