From 0172499542a433218af9b2c4216b6c5870e3d8d5 Mon Sep 17 00:00:00 2001
From: valb3r
Date: Mon, 17 Jul 2023 21:16:01 +0300
Subject: [PATCH] Release 0.5.3.1 - Hotfix for multiple plugins
(Activiti,Camunda) on same host
---
.../ActivitiBpmnPluginToolWindowFactory.kt | 6 ++++++
.../plugin/ActivitiPluginPreloaded.kt | 3 +++
.../ActivitiAdvertisementState.kt | 8 +++++++
.../src/main/resources/META-INF/plugin.xml | 10 +++++++--
...mentState.kt => BaseAdvertisementState.kt} | 21 ++++++++++++-------
.../advertisement/NotificationTryPolyBpmn.kt | 10 ++++-----
.../CamundaBpmnPluginToolWindowFactory.kt | 3 +++
.../plugin/camunda/CamundaPluginPreloaded.kt | 3 +++
.../advertisement/AdvertisementState.kt | 8 +++++++
.../src/main/resources/META-INF/plugin.xml | 10 +++++++--
.../FlowableBpmnPluginToolWindowFactory.kt | 3 +++
.../flowable/FlowablePluginPreloaded.kt | 3 +++
.../FlowableAdvertisementState.kt | 8 +++++++
.../src/main/resources/META-INF/plugin.xml | 10 +++++++--
14 files changed, 87 insertions(+), 19 deletions(-)
create mode 100644 activiti-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/activiti/plugin/advertisement/ActivitiAdvertisementState.kt
rename bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/advertisement/{AdvertisementState.kt => BaseAdvertisementState.kt} (50%)
create mode 100644 camunda-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/advertisement/AdvertisementState.kt
create mode 100644 flowable-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/advertisement/FlowableAdvertisementState.kt
diff --git a/activiti-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/activiti/plugin/ActivitiBpmnPluginToolWindowFactory.kt b/activiti-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/activiti/plugin/ActivitiBpmnPluginToolWindowFactory.kt
index 69053635..6efb8651 100644
--- a/activiti-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/activiti/plugin/ActivitiBpmnPluginToolWindowFactory.kt
+++ b/activiti-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/activiti/plugin/ActivitiBpmnPluginToolWindowFactory.kt
@@ -7,8 +7,10 @@ import com.intellij.openapi.project.Project
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.wm.ToolWindow
import com.intellij.openapi.wm.ToolWindowFactory
+import com.valb3r.bpmn.intellij.activiti.plugin.advertisement.ActivitiAdvertisementState
import com.valb3r.bpmn.intellij.activiti.plugin.notifications.showNotificationBalloon
import com.valb3r.bpmn.intellij.activiti.plugin.popupmenu.ActivitiCanvasPopupMenuProvider
+import com.valb3r.bpmn.intellij.activiti.plugin.settings.ActivitiBpmnPluginSettingsState
import com.valb3r.bpmn.intellij.activiti.plugin.xmlnav.ActivitiXmlNavigator
import com.valb3r.bpmn.intellij.plugin.activiti.parser.Activiti7ObjectFactory
import com.valb3r.bpmn.intellij.plugin.activiti.parser.Activiti7Parser
@@ -16,9 +18,11 @@ import com.valb3r.bpmn.intellij.plugin.activiti.parser.ActivitiObjectFactory
import com.valb3r.bpmn.intellij.plugin.activiti.parser.ActivitiParser
import com.valb3r.bpmn.intellij.plugin.commons.langinjection.registerCurrentFile
import com.valb3r.bpmn.intellij.plugin.core.BpmnPluginToolWindow
+import com.valb3r.bpmn.intellij.plugin.core.advertisement.currentAdvertisementStateProvider
import com.valb3r.bpmn.intellij.plugin.core.getContentFactory
import com.valb3r.bpmn.intellij.plugin.core.newelements.registerNewElementsFactory
import com.valb3r.bpmn.intellij.plugin.core.parser.registerParser
+import com.valb3r.bpmn.intellij.plugin.core.settings.currentSettingsStateProvider
import com.valb3r.bpmn.intellij.plugin.core.ui.components.popupmenu.registerPopupMenuProvider
import com.valb3r.bpmn.intellij.plugin.core.xmlnav.registerXmlNavigator
import java.nio.charset.StandardCharsets
@@ -29,6 +33,8 @@ class ActivitiBpmnPluginToolWindowFactory: ToolWindowFactory {
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
log.info("Creating tool window content")
+ currentSettingsStateProvider.set { ServiceManager.getService(ActivitiBpmnPluginSettingsState::class.java) }
+ currentAdvertisementStateProvider.set { ServiceManager.getService(ActivitiAdvertisementState::class.java) }
val bpmnWindow = BpmnPluginToolWindow(
project,
diff --git a/activiti-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/activiti/plugin/ActivitiPluginPreloaded.kt b/activiti-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/activiti/plugin/ActivitiPluginPreloaded.kt
index c1ea37da..86c39e32 100644
--- a/activiti-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/activiti/plugin/ActivitiPluginPreloaded.kt
+++ b/activiti-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/activiti/plugin/ActivitiPluginPreloaded.kt
@@ -3,7 +3,9 @@ package com.valb3r.bpmn.intellij.activiti.plugin
import com.intellij.openapi.components.ServiceManager
import com.intellij.openapi.project.Project
import com.intellij.openapi.startup.StartupActivity
+import com.valb3r.bpmn.intellij.activiti.plugin.advertisement.ActivitiAdvertisementState
import com.valb3r.bpmn.intellij.activiti.plugin.settings.ActivitiBpmnPluginSettingsState
+import com.valb3r.bpmn.intellij.plugin.core.advertisement.currentAdvertisementStateProvider
import com.valb3r.bpmn.intellij.plugin.core.settings.currentSettingsStateProvider
import java.util.concurrent.atomic.AtomicBoolean
@@ -14,6 +16,7 @@ class ActivitiPluginPreloaded: StartupActivity.Background {
override fun runActivity(project: Project) {
if (isLoaded.compareAndSet(false, true)) {
currentSettingsStateProvider.set { ServiceManager.getService(ActivitiBpmnPluginSettingsState::class.java) }
+ currentAdvertisementStateProvider.set { ServiceManager.getService(ActivitiAdvertisementState::class.java) }
}
}
}
\ No newline at end of file
diff --git a/activiti-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/activiti/plugin/advertisement/ActivitiAdvertisementState.kt b/activiti-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/activiti/plugin/advertisement/ActivitiAdvertisementState.kt
new file mode 100644
index 00000000..2c747549
--- /dev/null
+++ b/activiti-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/activiti/plugin/advertisement/ActivitiAdvertisementState.kt
@@ -0,0 +1,8 @@
+package com.valb3r.bpmn.intellij.activiti.plugin.advertisement
+
+import com.intellij.openapi.components.State
+import com.intellij.openapi.components.Storage
+import com.valb3r.bpmn.intellij.plugin.core.advertisement.BaseAdvertisementState
+
+@State(name = "ActivitiIntellijPluginAdvertisementState", storages = [(Storage("valb3r-activiti-opensource-polybpmn-advertisement.xml"))], defaultStateAsResource = true)
+class ActivitiAdvertisementState: BaseAdvertisementState()
\ No newline at end of file
diff --git a/activiti-intellij-plugin/src/main/resources/META-INF/plugin.xml b/activiti-intellij-plugin/src/main/resources/META-INF/plugin.xml
index 46eeafb6..dca10941 100644
--- a/activiti-intellij-plugin/src/main/resources/META-INF/plugin.xml
+++ b/activiti-intellij-plugin/src/main/resources/META-INF/plugin.xml
@@ -4,7 +4,7 @@
Activiti BPMN visualizer
- 0.5.3
+ 0.5.3.1
@@ -39,6 +39,12 @@
0.5.3.1:
+
+ -
+ Fixed blocker issue when users have multiple (i.e. Flowable,Camunda) plugins installed
+
+
0.5.3:
-
@@ -312,7 +318,7 @@
-
+
diff --git a/bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/advertisement/AdvertisementState.kt b/bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/advertisement/BaseAdvertisementState.kt
similarity index 50%
rename from bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/advertisement/AdvertisementState.kt
rename to bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/advertisement/BaseAdvertisementState.kt
index 0181081a..0c7a21ac 100644
--- a/bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/advertisement/AdvertisementState.kt
+++ b/bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/advertisement/BaseAdvertisementState.kt
@@ -1,13 +1,14 @@
package com.valb3r.bpmn.intellij.plugin.core.advertisement
-import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.components.PersistentStateComponent
-import com.intellij.openapi.components.State
-import com.intellij.openapi.components.Storage
+import com.valb3r.bpmn.intellij.plugin.core.settings.currentSettingsStateProvider
import java.time.LocalDate
+import java.util.concurrent.atomic.AtomicReference
-@State(name = "AdvertisementState", storages = [(Storage("opensource-polybpmn-advertisement.xml"))], defaultStateAsResource = true)
-class AdvertisementState: PersistentStateComponent {
+val currentAdvertisementStateProvider = AtomicReference<() -> BaseAdvertisementState>() // Not map as is global
+
+// Due to class name collision each plugin implementation should reference its own class
+open class BaseAdvertisementState: PersistentStateComponent {
class State {
var advertisementCommonShownAtDay: Long = LocalDate.MIN.toEpochDay()
var advertisementSwimpoolShownAtDay: Long = LocalDate.MIN.toEpochDay()
@@ -29,8 +30,12 @@ class AdvertisementState: PersistentStateComponent {
override fun loadState(state: State) {
myState = state
}
+}
- companion object {
- fun getInstance() = ApplicationManager.getApplication().getService(AdvertisementState::class.java)
- }
+fun currentAdvertisementState(): BaseAdvertisementState {
+ // This is required to access state this way, because ServiceManagerImpl.getComponentInstance -> ComponentStoreImpl.initComponent are
+ // responsible for loading from XML
+ // TODO this null-replacing dummy is is a hack for 'Searchable options index builder failed' java.lang.NullPointerException of build
+ val current = currentAdvertisementStateProvider.get() ?: return object : BaseAdvertisementState() {}
+ return current()
}
\ No newline at end of file
diff --git a/bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/advertisement/NotificationTryPolyBpmn.kt b/bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/advertisement/NotificationTryPolyBpmn.kt
index 90a871e4..1dcfe2dc 100644
--- a/bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/advertisement/NotificationTryPolyBpmn.kt
+++ b/bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/advertisement/NotificationTryPolyBpmn.kt
@@ -6,11 +6,11 @@ import com.valb3r.bpmn.intellij.plugin.core.ui.components.notifications.genericS
import java.time.LocalDate
fun showTryPolyBpmnAdvertisementNotification(project: Project) {
- val checkDate = AdvertisementState.getInstance().lastDisplayDateGlobal
+ val checkDate = currentAdvertisementState().lastDisplayDateGlobal
val now = LocalDate.now()
val showOnceInDays = 30L
if (shouldShow(checkDate, showOnceInDays, now)) {
- AdvertisementState.getInstance().lastDisplayDateGlobal = now
+ currentAdvertisementState().lastDisplayDateGlobal = now
genericShowNotificationBalloon(project, "Advertisement", "Try PolyBPMN plugin.
PolyBPMN's has upgraded split editor for each file, diagram history and a wider selection of elements and properties.", NotificationType.INFORMATION, "Do not show again") {
doNotShowAgain(showOnceInDays) // set maximum date
}
@@ -18,11 +18,11 @@ fun showTryPolyBpmnAdvertisementNotification(project: Project) {
}
fun showTryPolyBpmnAdvertisementSwimpoolNotification(project: Project) {
- val checkDate = AdvertisementState.getInstance().lastDisplayDateSwimpoolAd
+ val checkDate =currentAdvertisementState().lastDisplayDateSwimpoolAd
val now = LocalDate.now()
val showOnceInDays = 30L
if (shouldShow(checkDate, showOnceInDays, now)) {
- AdvertisementState.getInstance().lastDisplayDateSwimpoolAd = now
+ currentAdvertisementState().lastDisplayDateSwimpoolAd = now
genericShowNotificationBalloon(project, "Advertisement Swimming pool", "Unlock the full potential of diagram reading and editing with the PolyBPMN plugin. Seamlessly visualize and interpret swimming pools and swimming lanes with ease. Download from here", NotificationType.INFORMATION, "Do not show again") {
doNotShowAgain(showOnceInDays) // set maximum date
}
@@ -37,5 +37,5 @@ private fun shouldShow(checkDate: LocalDate, showOnceInDays: Long, now: LocalDat
private fun doNotShowAgain(showOnceInDays: Long) {
- AdvertisementState.getInstance().lastDisplayDateGlobal = LocalDate.MAX.minusDays(showOnceInDays).minusDays(1)
+ currentAdvertisementState().lastDisplayDateGlobal = LocalDate.MAX.minusDays(showOnceInDays).minusDays(1)
}
\ No newline at end of file
diff --git a/camunda-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/CamundaBpmnPluginToolWindowFactory.kt b/camunda-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/CamundaBpmnPluginToolWindowFactory.kt
index 723fa929..6ab4ae28 100644
--- a/camunda-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/CamundaBpmnPluginToolWindowFactory.kt
+++ b/camunda-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/CamundaBpmnPluginToolWindowFactory.kt
@@ -6,6 +6,7 @@ import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.project.Project
import com.intellij.openapi.wm.ToolWindow
import com.intellij.openapi.wm.ToolWindowFactory
+import com.valb3r.bpmn.intellij.plugin.camunda.advertisement.CamundaAdvertisementState
import com.valb3r.bpmn.intellij.plugin.camunda.notifications.showNotificationBalloon
import com.valb3r.bpmn.intellij.plugin.camunda.parser.CamundaObjectFactory
import com.valb3r.bpmn.intellij.plugin.camunda.parser.CamundaParser
@@ -14,6 +15,7 @@ import com.valb3r.bpmn.intellij.plugin.camunda.ui.components.popupmenu.CamundaCa
import com.valb3r.bpmn.intellij.plugin.camunda.xmlnav.CamundaXmlNavigator
import com.valb3r.bpmn.intellij.plugin.commons.langinjection.registerCurrentFile
import com.valb3r.bpmn.intellij.plugin.core.BpmnPluginToolWindow
+import com.valb3r.bpmn.intellij.plugin.core.advertisement.currentAdvertisementStateProvider
import com.valb3r.bpmn.intellij.plugin.core.getContentFactory
import com.valb3r.bpmn.intellij.plugin.core.newelements.registerNewElementsFactory
import com.valb3r.bpmn.intellij.plugin.core.parser.registerParser
@@ -28,6 +30,7 @@ class CamundaBpmnPluginToolWindowFactory: ToolWindowFactory {
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
log.info("Creating tool window content")
currentSettingsStateProvider.set { ServiceManager.getService(CamundaBpmnPluginSettingsState::class.java) }
+ currentAdvertisementStateProvider.set { ServiceManager.getService(CamundaAdvertisementState::class.java) }
val bpmnWindow = BpmnPluginToolWindow(
project,
diff --git a/camunda-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/CamundaPluginPreloaded.kt b/camunda-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/CamundaPluginPreloaded.kt
index 380e9ead..03bb57f4 100644
--- a/camunda-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/CamundaPluginPreloaded.kt
+++ b/camunda-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/CamundaPluginPreloaded.kt
@@ -3,7 +3,9 @@ package com.valb3r.bpmn.intellij.plugin.camunda
import com.intellij.openapi.components.ServiceManager
import com.intellij.openapi.project.Project
import com.intellij.openapi.startup.StartupActivity
+import com.valb3r.bpmn.intellij.plugin.camunda.advertisement.CamundaAdvertisementState
import com.valb3r.bpmn.intellij.plugin.camunda.settings.CamundaBpmnPluginSettingsState
+import com.valb3r.bpmn.intellij.plugin.core.advertisement.currentAdvertisementStateProvider
import com.valb3r.bpmn.intellij.plugin.core.settings.currentSettingsStateProvider
import java.util.concurrent.atomic.AtomicBoolean
@@ -14,6 +16,7 @@ class CamundaPluginPreloaded: StartupActivity.Background {
override fun runActivity(project: Project) {
if (isLoaded.compareAndSet(false, true)) {
currentSettingsStateProvider.set { ServiceManager.getService(CamundaBpmnPluginSettingsState::class.java) }
+ currentAdvertisementStateProvider.set { ServiceManager.getService(CamundaAdvertisementState::class.java) }
}
}
}
\ No newline at end of file
diff --git a/camunda-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/advertisement/AdvertisementState.kt b/camunda-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/advertisement/AdvertisementState.kt
new file mode 100644
index 00000000..d6fde818
--- /dev/null
+++ b/camunda-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/advertisement/AdvertisementState.kt
@@ -0,0 +1,8 @@
+package com.valb3r.bpmn.intellij.plugin.camunda.advertisement
+
+import com.intellij.openapi.components.State
+import com.intellij.openapi.components.Storage
+import com.valb3r.bpmn.intellij.plugin.core.advertisement.BaseAdvertisementState
+
+@State(name = "CamundaIntellijPluginAdvertisementState", storages = [(Storage("valb3r-camunda-opensource-polybpmn-advertisement.xml"))], defaultStateAsResource = true)
+class CamundaAdvertisementState: BaseAdvertisementState()
\ No newline at end of file
diff --git a/camunda-intellij-plugin/src/main/resources/META-INF/plugin.xml b/camunda-intellij-plugin/src/main/resources/META-INF/plugin.xml
index 1c7c2ada..de7e8d07 100644
--- a/camunda-intellij-plugin/src/main/resources/META-INF/plugin.xml
+++ b/camunda-intellij-plugin/src/main/resources/META-INF/plugin.xml
@@ -4,7 +4,7 @@
Camunda BPMN visualizer
- 0.5.3
+ 0.5.3.1
@@ -39,6 +39,12 @@
0.5.3.1:
+
+ -
+ Fixed blocker issue when users have multiple (i.e. Flowable,Camunda) plugins installed
+
+
0.5.3:
-
@@ -312,7 +318,7 @@
-
+
diff --git a/flowable-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/FlowableBpmnPluginToolWindowFactory.kt b/flowable-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/FlowableBpmnPluginToolWindowFactory.kt
index 2f76e1dc..c3cf9f0a 100644
--- a/flowable-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/FlowableBpmnPluginToolWindowFactory.kt
+++ b/flowable-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/FlowableBpmnPluginToolWindowFactory.kt
@@ -9,12 +9,14 @@ import com.intellij.openapi.wm.ToolWindowFactory
import com.valb3r.bpmn.intellij.activiti.plugin.notifications.showNotificationBalloon
import com.valb3r.bpmn.intellij.plugin.commons.langinjection.registerCurrentFile
import com.valb3r.bpmn.intellij.plugin.core.BpmnPluginToolWindow
+import com.valb3r.bpmn.intellij.plugin.core.advertisement.currentAdvertisementStateProvider
import com.valb3r.bpmn.intellij.plugin.core.getContentFactory
import com.valb3r.bpmn.intellij.plugin.core.newelements.registerNewElementsFactory
import com.valb3r.bpmn.intellij.plugin.core.parser.registerParser
import com.valb3r.bpmn.intellij.plugin.core.settings.currentSettingsStateProvider
import com.valb3r.bpmn.intellij.plugin.core.ui.components.popupmenu.registerPopupMenuProvider
import com.valb3r.bpmn.intellij.plugin.core.xmlnav.registerXmlNavigator
+import com.valb3r.bpmn.intellij.plugin.flowable.advertisement.FlowableAdvertisementState
import com.valb3r.bpmn.intellij.plugin.flowable.parser.FlowableObjectFactory
import com.valb3r.bpmn.intellij.plugin.flowable.parser.FlowableParser
import com.valb3r.bpmn.intellij.plugin.flowable.settings.FlowableBpmnPluginSettingsState
@@ -28,6 +30,7 @@ class FlowableBpmnPluginToolWindowFactory: ToolWindowFactory {
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
log.info("Creating tool window content")
currentSettingsStateProvider.set { ServiceManager.getService(FlowableBpmnPluginSettingsState::class.java) }
+ currentAdvertisementStateProvider.set { ServiceManager.getService(FlowableAdvertisementState::class.java) }
val bpmnWindow = BpmnPluginToolWindow(
project,
diff --git a/flowable-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/FlowablePluginPreloaded.kt b/flowable-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/FlowablePluginPreloaded.kt
index 2eb5116e..03f962dc 100644
--- a/flowable-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/FlowablePluginPreloaded.kt
+++ b/flowable-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/FlowablePluginPreloaded.kt
@@ -3,7 +3,9 @@ package com.valb3r.bpmn.intellij.plugin.flowable
import com.intellij.openapi.components.ServiceManager
import com.intellij.openapi.project.Project
import com.intellij.openapi.startup.StartupActivity
+import com.valb3r.bpmn.intellij.plugin.core.advertisement.currentAdvertisementStateProvider
import com.valb3r.bpmn.intellij.plugin.core.settings.currentSettingsStateProvider
+import com.valb3r.bpmn.intellij.plugin.flowable.advertisement.FlowableAdvertisementState
import com.valb3r.bpmn.intellij.plugin.flowable.settings.FlowableBpmnPluginSettingsState
import java.util.concurrent.atomic.AtomicBoolean
@@ -14,6 +16,7 @@ class FlowablePluginPreloaded: StartupActivity.Background {
override fun runActivity(project: Project) {
if (isLoaded.compareAndSet(false, true)) {
currentSettingsStateProvider.set { ServiceManager.getService(FlowableBpmnPluginSettingsState::class.java) }
+ currentAdvertisementStateProvider.set { ServiceManager.getService(FlowableAdvertisementState::class.java) }
}
}
}
\ No newline at end of file
diff --git a/flowable-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/advertisement/FlowableAdvertisementState.kt b/flowable-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/advertisement/FlowableAdvertisementState.kt
new file mode 100644
index 00000000..7f9b9055
--- /dev/null
+++ b/flowable-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/advertisement/FlowableAdvertisementState.kt
@@ -0,0 +1,8 @@
+package com.valb3r.bpmn.intellij.plugin.flowable.advertisement
+
+import com.intellij.openapi.components.State
+import com.intellij.openapi.components.Storage
+import com.valb3r.bpmn.intellij.plugin.core.advertisement.BaseAdvertisementState
+
+@State(name = "FlowableIntellijPluginAdvertisementState", storages = [(Storage("valb3r-flowable-opensource-polybpmn-advertisement.xml"))], defaultStateAsResource = true)
+class FlowableAdvertisementState: BaseAdvertisementState()
\ No newline at end of file
diff --git a/flowable-intellij-plugin/src/main/resources/META-INF/plugin.xml b/flowable-intellij-plugin/src/main/resources/META-INF/plugin.xml
index 6cb48494..1dbd90b4 100644
--- a/flowable-intellij-plugin/src/main/resources/META-INF/plugin.xml
+++ b/flowable-intellij-plugin/src/main/resources/META-INF/plugin.xml
@@ -4,7 +4,7 @@
Flowable BPMN visualizer
- 0.5.3
+ 0.5.3.1
@@ -39,6 +39,12 @@
0.5.3.1:
+
+ -
+ Fixed blocker issue when users have multiple (i.e. Flowable,Camunda) plugins installed
+
+
0.5.3: