File tree Expand file tree Collapse file tree 3 files changed +35
-3
lines changed
kotlin/irony/pycharm/qsseditor Expand file tree Collapse file tree 3 files changed +35
-3
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,11 @@ import com.intellij.openapi.options.BoundSearchableConfigurable
44import com.intellij.openapi.options.Configurable.NoScroll
55import com.intellij.ui.dsl.builder.panel
66
7- class QSSConfigurable : BoundSearchableConfigurable (
7+ class SettingsConfigurable : BoundSearchableConfigurable (
88 " QSS" ,
99 " QSS Editor Configurable"
1010), NoScroll {
11+
1112 override fun createPanel () = panel {
1213 row {
1314 }
Original file line number Diff line number Diff line change 1+ package irony.pycharm.qsseditor
2+
3+ import com.intellij.openapi.application.ApplicationManager
4+ import com.intellij.openapi.components.PersistentStateComponent
5+ import com.intellij.openapi.components.State
6+ import com.intellij.openapi.components.Storage
7+ import com.intellij.util.xmlb.XmlSerializerUtil
8+
9+ @State(name = " irony.pycharm.qsseditor.SettingsState" , storages = [Storage (" QSSEditorSetting.xml" )])
10+ internal class SettingsState : PersistentStateComponent <SettingsState > {
11+ var auto: Boolean = true
12+ var host: String = " localhost"
13+ var port: Int = 61052
14+
15+ override fun getState (): SettingsState {
16+ return this
17+ }
18+
19+ override fun loadState (state : SettingsState ) {
20+ XmlSerializerUtil .copyBean(state, this )
21+ }
22+
23+ companion object {
24+ val instance: SettingsState
25+ get() = ApplicationManager .getApplication().getService(
26+ SettingsState ::class .java
27+ )
28+ }
29+ }
Original file line number Diff line number Diff line change 2525 <!-- Extension points defined by the plugin.
2626 Read more: https://plugins.jetbrains.com/docs/intellij/plugin-extension-points.html -->
2727 <extensions defaultExtensionNs =" com.intellij" >
28+ <applicationService
29+ serviceImplementation =" irony.pycharm.qsseditor.SettingsState" />
2830 <applicationConfigurable
2931 parentId =" language"
3032 groupWeight =" -500"
31- instance =" irony.pycharm.qsseditor.QSSConfigurable "
32- id =" irony.pycharm.qsseditor.QSSConfigurable "
33+ instance =" irony.pycharm.qsseditor.SettingsConfigurable "
34+ id =" irony.pycharm.qsseditor.SettingsConfigurable "
3335 displayName =" QSS" />
3436 </extensions >
3537 <actions >
You can’t perform that action at this time.
0 commit comments