From 79c8d869fbccca5d804ad684d8bac6b355e5834c Mon Sep 17 00:00:00 2001 From: valb3r Date: Fri, 2 Jun 2023 09:23:08 +0300 Subject: [PATCH] FBP-350. Show plug message --- .../plugin/core/BpmnPluginToolWindow.form | 25 +++++++++++++++++-- .../plugin/core/BpmnPluginToolWindow.kt | 4 ++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/BpmnPluginToolWindow.form b/bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/BpmnPluginToolWindow.form index cef2857c4..f661c9310 100644 --- a/bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/BpmnPluginToolWindow.form +++ b/bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/BpmnPluginToolWindow.form @@ -3,7 +3,7 @@ - + @@ -27,7 +27,19 @@ - + + + + + + + + + + + + + @@ -46,6 +58,15 @@ + + + + + + + + + diff --git a/bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/BpmnPluginToolWindow.kt b/bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/BpmnPluginToolWindow.kt index 322766f02..0cca059f6 100644 --- a/bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/BpmnPluginToolWindow.kt +++ b/bpmn-intellij-plugin-core/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/core/BpmnPluginToolWindow.kt @@ -81,7 +81,7 @@ open class BpmnPluginToolWindow( this.canvas.addMouseWheelListener(mouseEventHandler) this.canvas.isFocusable = true this.canvas.addKeyListener(KeyboardEventHandler(project, canvas)) - this.canvasPanel.add(this.canvas) + canvasAndProperties.dividerLocation = (canvasAndProperties.height * 0.8f).toInt() hackFixForMacOsScrollbars() @@ -240,6 +240,7 @@ open class BpmnPluginToolWindow( } private fun setupUiBeforeRun() { + this.canvasPanel.removeAll() this.canvasPanel.isEnabled = false // clear the canvas panel, ready for new graph this.canvas.isVisible = false @@ -247,6 +248,7 @@ open class BpmnPluginToolWindow( } private fun setupUiAfterRun() { + this.canvasPanel.add(this.canvas) // show the rendered canvas this.canvas.isVisible = true this.canvasPanel.updateUI()