From e8bacc97a4854494969453e09cbbf83ad8db66bd Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Thu, 23 May 2024 11:43:01 +0200 Subject: [PATCH 1/7] Introduce NewTools-Utils --- src/BaselineOfNewTools/BaselineOfNewTools.class.st | 11 +++-------- src/NewTools-Compression-Utils/package.st | 1 - src/NewTools-Fuel/package.st | 1 - .../FLFuelCommandLineHandler.class.st | 6 +++--- .../FLMaterializer.extension.st | 6 +++--- .../InflateStream.extension.st | 4 ++-- .../Object.extension.st | 2 +- .../ZipArchive.extension.st | 2 +- src/NewTools-Utils/package.st | 1 + 9 files changed, 14 insertions(+), 20 deletions(-) delete mode 100644 src/NewTools-Compression-Utils/package.st delete mode 100644 src/NewTools-Fuel/package.st rename src/{NewTools-Fuel => NewTools-Utils}/FLFuelCommandLineHandler.class.st (96%) rename src/{NewTools-Fuel => NewTools-Utils}/FLMaterializer.extension.st (80%) rename src/{NewTools-Compression-Utils => NewTools-Utils}/InflateStream.extension.st (87%) rename src/{NewTools-Fuel => NewTools-Utils}/Object.extension.st (83%) rename src/{NewTools-Compression-Utils => NewTools-Utils}/ZipArchive.extension.st (90%) create mode 100644 src/NewTools-Utils/package.st diff --git a/src/BaselineOfNewTools/BaselineOfNewTools.class.st b/src/BaselineOfNewTools/BaselineOfNewTools.class.st index 844ae94ea..22e5bbee2 100644 --- a/src/BaselineOfNewTools/BaselineOfNewTools.class.st +++ b/src/BaselineOfNewTools/BaselineOfNewTools.class.st @@ -81,7 +81,6 @@ BaselineOfNewTools >> baseline: spec [ "Fuel" package: 'NewTools-Debugger-Fuel'; package: 'NewTools-Debugger-Fuel-Tests' with: [ spec requires: #( 'NewTools-Debugger-Fuel' ) ]; - package: 'NewTools-Fuel'; "Rewriter Tools" package: 'NewTools-RewriterTools-Backend'; package: 'NewTools-RewriterTools' with: [ spec requires: #('NewTools-RewriterTools-Backend') ]; @@ -104,7 +103,7 @@ BaselineOfNewTools >> baseline: spec [ package: 'NewTools-SettingsBrowser' with: [ spec requires: #('ColorPicker') ]; package: 'NewTools-SettingsBrowser-Tests' with: [ spec requires: #('NewTools-SettingsBrowser') ]; - package: 'NewTools-Compression-Utils' with: [ spec requires: #('NewTools-FileBrowser') ]. + package: 'NewTools-Utils' with: [ spec requires: #('NewTools-FileBrowser') ]. spec group: 'Core' with: #( 'NewTools-Core' 'NewTools-Morphic' ); @@ -124,7 +123,7 @@ BaselineOfNewTools >> baseline: spec [ 'NewTools-Debugger-Tests' 'NewTools-Debugger-Fuel' 'NewTools-Debugger-Fuel-Tests' - 'NewTools-Fuel' + 'NewTools-Utils' 'NewTools-DebugPointsBrowser' 'NewTools-ObjectCentricDebugPoints' ); group: 'Spotter' with: #( @@ -172,9 +171,6 @@ BaselineOfNewTools >> baseline: spec [ group: 'SettingsBrowser' with: #( 'NewTools-SettingsBrowser' 'NewTools-SettingsBrowser-Tests'); - "Compression Utilities" - group: 'CompressionUtilities' with: #( - 'NewTools-Compression-Utils'); group: 'default' with: #( 'Playground' @@ -190,8 +186,7 @@ BaselineOfNewTools >> baseline: spec [ 'FileBrowser' 'Finder' 'Profiler' - 'SettingsBrowser' - 'CompressionUtilities') ] + 'SettingsBrowser' ) ] ] { #category : 'external projects' } diff --git a/src/NewTools-Compression-Utils/package.st b/src/NewTools-Compression-Utils/package.st deleted file mode 100644 index 6f8533202..000000000 --- a/src/NewTools-Compression-Utils/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : 'NewTools-Compression-Utils' } diff --git a/src/NewTools-Fuel/package.st b/src/NewTools-Fuel/package.st deleted file mode 100644 index 291216045..000000000 --- a/src/NewTools-Fuel/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : 'NewTools-Fuel' } diff --git a/src/NewTools-Fuel/FLFuelCommandLineHandler.class.st b/src/NewTools-Utils/FLFuelCommandLineHandler.class.st similarity index 96% rename from src/NewTools-Fuel/FLFuelCommandLineHandler.class.st rename to src/NewTools-Utils/FLFuelCommandLineHandler.class.st index 72c2de8a2..22419ec80 100644 --- a/src/NewTools-Fuel/FLFuelCommandLineHandler.class.st +++ b/src/NewTools-Utils/FLFuelCommandLineHandler.class.st @@ -28,9 +28,9 @@ Class { #instVars : [ 'files' ], - #category : 'NewTools-Fuel-CommandLineHandler', - #package : 'NewTools-Fuel', - #tag : 'CommandLineHandler' + #category : 'NewTools-Utils-Fuel', + #package : 'NewTools-Utils', + #tag : 'Fuel' } { #category : 'accessing' } diff --git a/src/NewTools-Fuel/FLMaterializer.extension.st b/src/NewTools-Utils/FLMaterializer.extension.st similarity index 80% rename from src/NewTools-Fuel/FLMaterializer.extension.st rename to src/NewTools-Utils/FLMaterializer.extension.st index 72cec8d2a..f7385c6c8 100644 --- a/src/NewTools-Fuel/FLMaterializer.extension.st +++ b/src/NewTools-Utils/FLMaterializer.extension.st @@ -1,6 +1,6 @@ Extension { #name : 'FLMaterializer' } -{ #category : '*NewTools-Fuel-FileRegistry' } +{ #category : '*NewTools-Utils-Fuel-FileRegistry' } FLMaterializer class >> fileReaderServicesForFile: fullName suffix: suffix [ suffix = 'fuel' @@ -8,7 +8,7 @@ FLMaterializer class >> fileReaderServicesForFile: fullName suffix: suffix [ ^ { self serviceFuelMaterialize } ] -{ #category : '*NewTools-Fuel-FileRegistry' } +{ #category : '*NewTools-Utils-Fuel-FileRegistry' } FLMaterializer class >> inspectMaterializationFromFileNamed: aString [ | result | result := self new @@ -17,7 +17,7 @@ FLMaterializer class >> inspectMaterializationFromFileNamed: aString [ ^ result inspect ] -{ #category : '*NewTools-Fuel-FileRegistry' } +{ #category : '*NewTools-Utils-Fuel-FileRegistry' } FLMaterializer class >> serviceFuelMaterialize [ ^ SimpleServiceEntry provider: self diff --git a/src/NewTools-Compression-Utils/InflateStream.extension.st b/src/NewTools-Utils/InflateStream.extension.st similarity index 87% rename from src/NewTools-Compression-Utils/InflateStream.extension.st rename to src/NewTools-Utils/InflateStream.extension.st index 04df1adf6..413f910f6 100644 --- a/src/NewTools-Compression-Utils/InflateStream.extension.st +++ b/src/NewTools-Utils/InflateStream.extension.st @@ -1,6 +1,6 @@ Extension { #name : 'InflateStream' } -{ #category : '*NewTools-Compression-Utils' } +{ #category : '*NewTools-Utils-Compression' } InflateStream class >> openWithContents: contentsString label: titleString [ "Open a text viewer on contentsString and window label titleString" @@ -13,7 +13,7 @@ InflateStream class >> openWithContents: contentsString label: titleString [ extent: 600 @ 800 ] ] -{ #category : '*NewTools-Compression-Utils' } +{ #category : '*NewTools-Utils-Compression' } InflateStream class >> viewContents: fullFileName [ "Open the decompressed contents of fullFileName" diff --git a/src/NewTools-Fuel/Object.extension.st b/src/NewTools-Utils/Object.extension.st similarity index 83% rename from src/NewTools-Fuel/Object.extension.st rename to src/NewTools-Utils/Object.extension.st index c9060bb82..232264e91 100644 --- a/src/NewTools-Fuel/Object.extension.st +++ b/src/NewTools-Utils/Object.extension.st @@ -1,6 +1,6 @@ Extension { #name : 'Object' } -{ #category : '*NewTools-Fuel' } +{ #category : '*NewTools-Utils-Fuel' } Object >> fuelOut [ | target | target := FileLocator imageDirectory / self printString asFileName, 'fuel'. diff --git a/src/NewTools-Compression-Utils/ZipArchive.extension.st b/src/NewTools-Utils/ZipArchive.extension.st similarity index 90% rename from src/NewTools-Compression-Utils/ZipArchive.extension.st rename to src/NewTools-Utils/ZipArchive.extension.st index 092738a54..1980a446e 100644 --- a/src/NewTools-Compression-Utils/ZipArchive.extension.st +++ b/src/NewTools-Utils/ZipArchive.extension.st @@ -1,6 +1,6 @@ Extension { #name : 'ZipArchive' } -{ #category : '*NewTools-Compression-Utils' } +{ #category : '*NewTools-Utils-Compression' } ZipArchive class >> extractAllIn: aFileReferenceOrFileName [ "Service method to extract all contents of a zip. Example: diff --git a/src/NewTools-Utils/package.st b/src/NewTools-Utils/package.st new file mode 100644 index 000000000..577af31e4 --- /dev/null +++ b/src/NewTools-Utils/package.st @@ -0,0 +1 @@ +Package { #name : 'NewTools-Utils' } From b5fedde9097517be9ca810607a00ee3c78e797aa Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Fri, 24 May 2024 11:15:46 +0200 Subject: [PATCH 2/7] First iteration over the new protocol chooser presenter --- .../StProtocolNameChooser.class.st | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 src/NewTools-Utils/StProtocolNameChooser.class.st diff --git a/src/NewTools-Utils/StProtocolNameChooser.class.st b/src/NewTools-Utils/StProtocolNameChooser.class.st new file mode 100644 index 000000000..967a05a3e --- /dev/null +++ b/src/NewTools-Utils/StProtocolNameChooser.class.st @@ -0,0 +1,91 @@ +" +I am a little interface to let the user choose the name of a protocol. + +This interface will suggest the name of the protocol as the user types the beginning of the name. +" +Class { + #name : 'StProtocolNameChooser', + #superclass : 'StPresenter', + #instVars : [ + 'suggestionList', + 'protocolNameField', + 'concernedClass' + ], + #category : 'NewTools-Utils-ProtocolChooser', + #package : 'NewTools-Utils', + #tag : 'ProtocolChooser' +} + +{ #category : 'helpers' } +StProtocolNameChooser class >> forClass: aClass [ + + ^ self new + concernedClass: aClass; + yourself +] + +{ #category : 'instance creation' } +StProtocolNameChooser class >> open [ + +