From b928aaacd6503b834ba51ab93c71d57fcd7be1a8 Mon Sep 17 00:00:00 2001 From: Mykhailo Lytvyn Date: Sat, 14 Jan 2023 23:48:53 +0100 Subject: [PATCH] #163 | Enable plugin's settings sharing through Settings Sync --- resources/META-INF/plugin-release-info.xml | 1 + .../hybris/settings/HybrisApplicationSettingsComponent.java | 5 ++++- .../hybris/toolwindow/system/bean/view/BSViewSettings.kt | 3 ++- .../hybris/toolwindow/system/type/view/TSViewSettings.kt | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/resources/META-INF/plugin-release-info.xml b/resources/META-INF/plugin-release-info.xml index a051f3340..a3455214b 100644 --- a/resources/META-INF/plugin-release-info.xml +++ b/resources/META-INF/plugin-release-info.xml @@ -125,6 +125,7 @@
  • Feature: Added navigation to items.xml Type attributes from generated classes (#120, #71)
  • +
  • Feature: Enabled [y] plugin settings sharing through Settings Sync (#163)
  • Feature: Added navigation to items.xml Enum values declaration from generated classes (#115)
  • Feature: Added navigation to beans.xml Enum values declaration from generated classes (#111)
  • Feature: Added navigation to beans.xml Bean property declaration from generated classes (#112)
  • diff --git a/src/com/intellij/idea/plugin/hybris/settings/HybrisApplicationSettingsComponent.java b/src/com/intellij/idea/plugin/hybris/settings/HybrisApplicationSettingsComponent.java index cb6561cb3..64ad5854d 100644 --- a/src/com/intellij/idea/plugin/hybris/settings/HybrisApplicationSettingsComponent.java +++ b/src/com/intellij/idea/plugin/hybris/settings/HybrisApplicationSettingsComponent.java @@ -20,6 +20,7 @@ import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.components.PersistentStateComponent; +import com.intellij.openapi.components.SettingsCategory; import com.intellij.openapi.components.State; import com.intellij.openapi.components.Storage; import com.intellij.util.xmlb.XmlSerializerUtil; @@ -33,7 +34,9 @@ * * @author Alexander Bartash */ -@State(name = "HybrisApplicationSettings", storages = {@Storage(STORAGE_HYBRIS_INTEGRATION_SETTINGS)}) +@State(name = "[y] Global Settings", + category = SettingsCategory.PLUGINS, + storages = {@Storage(value = STORAGE_HYBRIS_INTEGRATION_SETTINGS)}) public class HybrisApplicationSettingsComponent implements PersistentStateComponent { protected final HybrisApplicationSettings hybrisApplicationSettings = new HybrisApplicationSettings(); diff --git a/src/com/intellij/idea/plugin/hybris/toolwindow/system/bean/view/BSViewSettings.kt b/src/com/intellij/idea/plugin/hybris/toolwindow/system/bean/view/BSViewSettings.kt index b4cc9671f..183fde20b 100644 --- a/src/com/intellij/idea/plugin/hybris/toolwindow/system/bean/view/BSViewSettings.kt +++ b/src/com/intellij/idea/plugin/hybris/toolwindow/system/bean/view/BSViewSettings.kt @@ -20,6 +20,7 @@ package com.intellij.idea.plugin.hybris.toolwindow.system.bean.view import com.intellij.idea.plugin.hybris.common.HybrisConstants import com.intellij.openapi.components.PersistentStateComponent +import com.intellij.openapi.components.SettingsCategory import com.intellij.openapi.components.State import com.intellij.openapi.components.Storage import com.intellij.openapi.project.Project @@ -27,7 +28,7 @@ import com.intellij.util.messages.MessageBus import com.intellij.util.messages.Topic import com.intellij.util.xmlb.XmlSerializerUtil -@State(name = "HybrisBSView") +@State(name = "[y] Bean System View settings", category = SettingsCategory.PLUGINS) @Storage(HybrisConstants.STORAGE_HYBRIS_BS_VIEW) class BSViewSettings(private val myProject: Project) : PersistentStateComponent { diff --git a/src/com/intellij/idea/plugin/hybris/toolwindow/system/type/view/TSViewSettings.kt b/src/com/intellij/idea/plugin/hybris/toolwindow/system/type/view/TSViewSettings.kt index 8f121ac1f..8450d41d5 100644 --- a/src/com/intellij/idea/plugin/hybris/toolwindow/system/type/view/TSViewSettings.kt +++ b/src/com/intellij/idea/plugin/hybris/toolwindow/system/type/view/TSViewSettings.kt @@ -20,6 +20,7 @@ package com.intellij.idea.plugin.hybris.toolwindow.system.type.view import com.intellij.idea.plugin.hybris.common.HybrisConstants import com.intellij.openapi.components.PersistentStateComponent +import com.intellij.openapi.components.SettingsCategory import com.intellij.openapi.components.State import com.intellij.openapi.components.Storage import com.intellij.openapi.project.Project @@ -27,7 +28,7 @@ import com.intellij.util.messages.MessageBus import com.intellij.util.messages.Topic import com.intellij.util.xmlb.XmlSerializerUtil -@State(name = "HybrisTSView") +@State(name = "[y] Type System View settings", category = SettingsCategory.PLUGINS) @Storage(HybrisConstants.STORAGE_HYBRIS_TS_VIEW) class TSViewSettings(myProject: Project) : PersistentStateComponent {