From 406b899fcbaf717e252932abe80439f3084b106c Mon Sep 17 00:00:00 2001 From: Pierre Laborde Date: Thu, 16 Nov 2023 15:07:47 +0100 Subject: [PATCH 1/4] Add settings section for the edit on running plugin (only the boolean, not always the shortcut) --- ...yramidEditOnRunningSystemSettings.class.st | 49 +++++++++++++++++++ .../PyramidPluginEditOnRunning.class.st | 1 + 2 files changed, 50 insertions(+) create mode 100644 src/Pyramid/PyramidEditOnRunningSystemSettings.class.st diff --git a/src/Pyramid/PyramidEditOnRunningSystemSettings.class.st b/src/Pyramid/PyramidEditOnRunningSystemSettings.class.st new file mode 100644 index 00000000..7b09da1b --- /dev/null +++ b/src/Pyramid/PyramidEditOnRunningSystemSettings.class.st @@ -0,0 +1,49 @@ +Class { + #name : #PyramidEditOnRunningSystemSettings, + #superclass : #Object, + #category : #'Pyramid-plugin-edit-on-running' +} + +{ #category : #dialog } +PyramidEditOnRunningSystemSettings class >> canEditDialog: aBuilder [ + + ^ self theme newRowIn: self for: { + "Default shortcut is F12 because it is usually use to enter dev mode in webbrowsers" + self theme buttonLabelForText: 'with shortcut: F12' translated. + } +] + +{ #category : #accessing } +PyramidEditOnRunningSystemSettings class >> editOnRunning [ + + ^ PyramidPluginEditOnRunning editOnRunning +] + +{ #category : #accessing } +PyramidEditOnRunningSystemSettings class >> editOnRunning: aBoolean [ + + PyramidPluginEditOnRunning editOnRunning: aBoolean +] + +{ #category : #settings } +PyramidEditOnRunningSystemSettings class >> editOnRunningSettingOn: aBuilder [ + + + (aBuilder setting: #editOnRunning) + parent: #pyramid; + label: 'Can edit opened BlSpaces'; + target: self; + dialog: [self canEditDialog: aBuilder]; + description: 'Setup availability to edit opened BlSpace in a Pyramid window. +Press the required shortcut key(s) on a focused BlSpace window to edit it in Pyramid.' +] + +{ #category : #dialog } +PyramidEditOnRunningSystemSettings class >> theme [ + + ^ Smalltalk ui theme +] + +{ #category : #'see class side' } +PyramidEditOnRunningSystemSettings >> seeClassSide [ +] diff --git a/src/Pyramid/PyramidPluginEditOnRunning.class.st b/src/Pyramid/PyramidPluginEditOnRunning.class.st index 1876e000..5a1d7ffc 100644 --- a/src/Pyramid/PyramidPluginEditOnRunning.class.st +++ b/src/Pyramid/PyramidPluginEditOnRunning.class.st @@ -44,6 +44,7 @@ PyramidPluginEditOnRunning class >> installBlUniverseListeners [ { #category : #'universe management' } PyramidPluginEditOnRunning class >> receiveBlParallelUniverseHostSpaceCreatedSignal: anEvent [ + self flag:'labordep: waiting for Bloc issue fix'. self editOnRunning ifFalse: [ ^ self ]. ] From ced4b3ed5e7910e57cea9fd09bf39bd1fd90efd8 Mon Sep 17 00:00:00 2001 From: Pierre Laborde Date: Thu, 16 Nov 2023 15:08:44 +0100 Subject: [PATCH 2/4] Add not working statement. #83 --- src/Pyramid/PyramidEditOnRunningSystemSettings.class.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pyramid/PyramidEditOnRunningSystemSettings.class.st b/src/Pyramid/PyramidEditOnRunningSystemSettings.class.st index 7b09da1b..cf6444db 100644 --- a/src/Pyramid/PyramidEditOnRunningSystemSettings.class.st +++ b/src/Pyramid/PyramidEditOnRunningSystemSettings.class.st @@ -31,7 +31,7 @@ PyramidEditOnRunningSystemSettings class >> editOnRunningSettingOn: aBuilder [ (aBuilder setting: #editOnRunning) parent: #pyramid; - label: 'Can edit opened BlSpaces'; + label: '(Not working) Can edit opened BlSpaces'; target: self; dialog: [self canEditDialog: aBuilder]; description: 'Setup availability to edit opened BlSpace in a Pyramid window. From c2fdbf13b9a0d26af381de11561015c34baf10a5 Mon Sep 17 00:00:00 2001 From: Pierre Laborde Date: Thu, 16 Nov 2023 15:22:12 +0100 Subject: [PATCH 3/4] test plugin initialization --- src/Pyramid-Tests/PyramidPluginEditOnRunningTest.class.st | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Pyramid-Tests/PyramidPluginEditOnRunningTest.class.st b/src/Pyramid-Tests/PyramidPluginEditOnRunningTest.class.st index 0b57bcb8..7b6f078f 100644 --- a/src/Pyramid-Tests/PyramidPluginEditOnRunningTest.class.st +++ b/src/Pyramid-Tests/PyramidPluginEditOnRunningTest.class.st @@ -33,3 +33,10 @@ PyramidPluginEditOnRunningTest >> testEditOnRunning [ PyramidPluginEditOnRunning editOnRunning: false. self deny: PyramidPluginEditOnRunning editOnRunning. ] + +{ #category : #tests } +PyramidPluginEditOnRunningTest >> testInitializePlugin [ + "Test if the plugin is installed because this is a core plugin that need to be installed" + + self assert: (PyramidPluginManager uniqueInstance isPluginInstalled: PyramidPluginEditOnRunning) +] From 496017f9c8b8b2ca398311da6e13e7b4e4757e50 Mon Sep 17 00:00:00 2001 From: Pierre Laborde Date: Fri, 17 Nov 2023 15:50:36 +0100 Subject: [PATCH 4/4] reverse --- src/Pyramid/PyramidPluginEditOnRunning.class.st | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Pyramid/PyramidPluginEditOnRunning.class.st b/src/Pyramid/PyramidPluginEditOnRunning.class.st index 5a1d7ffc..1876e000 100644 --- a/src/Pyramid/PyramidPluginEditOnRunning.class.st +++ b/src/Pyramid/PyramidPluginEditOnRunning.class.st @@ -44,7 +44,6 @@ PyramidPluginEditOnRunning class >> installBlUniverseListeners [ { #category : #'universe management' } PyramidPluginEditOnRunning class >> receiveBlParallelUniverseHostSpaceCreatedSignal: anEvent [ - self flag:'labordep: waiting for Bloc issue fix'. self editOnRunning ifFalse: [ ^ self ]. ]