diff --git a/source/BaselineOfLaunchpad/BaselineOfLaunchpad.class.st b/source/BaselineOfLaunchpad/BaselineOfLaunchpad.class.st index 70feb54..427b2e5 100644 --- a/source/BaselineOfLaunchpad/BaselineOfLaunchpad.class.st +++ b/source/BaselineOfLaunchpad/BaselineOfLaunchpad.class.st @@ -79,21 +79,31 @@ BaselineOfLaunchpad >> setUpDependencies: spec [ BaselineOfLaunchpad >> setUpDeploymentPackages: spec [ spec - package: 'Launchpad-Configuration' - with: [ spec requires: #( 'Bell-Deployment' 'INIParser-Deployment' 'Buoy-Deployment' ) ]; + package: 'Launchpad-Configuration' with: [ + spec requires: + #( 'Bell-Deployment' 'INIParser-Deployment' + 'Buoy-Deployment' ) ]; group: 'Deployment' with: 'Launchpad-Configuration'. spec - package: 'Launchpad-Applications' with: [ spec requires: 'Bell-Deployment' ]; + package: 'Launchpad-Applications' + with: [ spec requires: 'Bell-Deployment' ]; group: 'Deployment' with: 'Launchpad-Applications'. spec - package: 'Launchpad-Commands' - with: [ spec requires: #( 'Launchpad-Applications' 'Launchpad-Configuration' ) ]; + package: 'Launchpad-Commands' with: [ + spec requires: + #( 'Launchpad-Applications' 'Launchpad-Configuration' ) ]; group: 'Deployment' with: 'Launchpad-Commands'. spec - package: 'Launchpad-Tracing' with: [ spec requires: 'Launchpad-Applications' ]; + package: 'Launchpad-Commands-Pharo' + with: [ spec requires: 'Launchpad-Commands' ]; + group: 'Deployment' with: 'Launchpad-Commands-Pharo'. + + spec + package: 'Launchpad-Tracing' + with: [ spec requires: 'Launchpad-Applications' ]; group: 'Deployment' with: 'Launchpad-Tracing' ] @@ -177,20 +187,33 @@ BaselineOfLaunchpad >> setUpTestPackages: spec [ spec package: 'Launchpad-Configuration-Tests' - with: [ spec requires: #( 'Launchpad-Configuration' 'Launchpad-SUnit' ) ]; + with: [ + spec requires: #( 'Launchpad-Configuration' + 'Launchpad-SUnit' ) ]; group: 'Tests' with: 'Launchpad-Configuration-Tests'. spec package: 'Launchpad-Applications-Tests' - with: [ spec requires: #( 'Launchpad-Applications' 'Launchpad-SUnit' ) ]; + with: [ + spec requires: #( 'Launchpad-Applications' 'Launchpad-SUnit' ) ]; group: 'Tests' with: 'Launchpad-Applications-Tests'. spec - package: 'Launchpad-Tracing-Tests' with: [ spec requires: 'Launchpad-Tracing' ]; + package: 'Launchpad-Tracing-Tests' + with: [ spec requires: 'Launchpad-Tracing' ]; group: 'Tests' with: 'Launchpad-Tracing-Tests'. spec - package: 'Launchpad-Commands-Tests' - with: [ spec requires: #( 'Examples' 'Launchpad-Commands' 'Launchpad-SUnit' 'Hyperspace-SUnit' ) ]; - group: 'Tests' with: 'Launchpad-Commands-Tests' + package: 'Launchpad-Commands-Tests' with: [ + spec requires: + #( 'Examples' 'Launchpad-Commands' 'Launchpad-SUnit' + 'Hyperspace-SUnit' ) ]; + group: 'Tests' with: 'Launchpad-Commands-Tests'. + + spec + package: 'Launchpad-Commands-Pharo-Tests' with: [ + spec requires: + #( 'Examples' 'Launchpad-Commands-Pharo' + 'Launchpad-SUnit' 'Hyperspace-SUnit' ) ]; + group: 'Tests' with: 'Launchpad-Commands-Pharo-Tests' ] diff --git a/source/Launchpad-Commands-Tests/TCPCommandServerTest.class.st b/source/Launchpad-Commands-Pharo-Tests/TCPCommandServerTest.class.st similarity index 97% rename from source/Launchpad-Commands-Tests/TCPCommandServerTest.class.st rename to source/Launchpad-Commands-Pharo-Tests/TCPCommandServerTest.class.st index 5da7e1b..e27113c 100644 --- a/source/Launchpad-Commands-Tests/TCPCommandServerTest.class.st +++ b/source/Launchpad-Commands-Pharo-Tests/TCPCommandServerTest.class.st @@ -7,7 +7,7 @@ Class { #instVars : [ 'server' ], - #category : #'Launchpad-Commands-Tests' + #category : #'Launchpad-Commands-Pharo-Tests' } { #category : #running } diff --git a/source/Launchpad-Commands-Pharo-Tests/package.st b/source/Launchpad-Commands-Pharo-Tests/package.st new file mode 100644 index 0000000..c6af63f --- /dev/null +++ b/source/Launchpad-Commands-Pharo-Tests/package.st @@ -0,0 +1 @@ +Package { #name : #'Launchpad-Commands-Pharo-Tests' } diff --git a/source/Launchpad-Commands-Pharo/LaunchpadStartApplicationCommand.extension.st b/source/Launchpad-Commands-Pharo/LaunchpadStartApplicationCommand.extension.st new file mode 100644 index 0000000..2df8cf0 --- /dev/null +++ b/source/Launchpad-Commands-Pharo/LaunchpadStartApplicationCommand.extension.st @@ -0,0 +1,14 @@ +Extension { #name : #LaunchpadStartApplicationCommand } + +{ #category : #'*Launchpad-Commands-Pharo' } +LaunchpadStartApplicationCommand >> enableTCPCommandServerListeningOn: listeningPort [ + + commandServer := TCPCommandServer listeningOn: listeningPort. + commandServer registerCommandNamed: 'SHUTDOWN' executing: [ + [ + LaunchpadApplication currentlyRunning + stop; + exitSuccess + ] forkAt: Processor timingPriority named: 'Launchpad shutdown process' + ] +] diff --git a/source/Launchpad-Commands/LaunchpadTCPCommandServerOption.class.st b/source/Launchpad-Commands-Pharo/LaunchpadTCPCommandServerOption.class.st similarity index 90% rename from source/Launchpad-Commands/LaunchpadTCPCommandServerOption.class.st rename to source/Launchpad-Commands-Pharo/LaunchpadTCPCommandServerOption.class.st index e0f559d..38da792 100644 --- a/source/Launchpad-Commands/LaunchpadTCPCommandServerOption.class.st +++ b/source/Launchpad-Commands-Pharo/LaunchpadTCPCommandServerOption.class.st @@ -4,7 +4,7 @@ Class { #instVars : [ 'command' ], - #category : #'Launchpad-Commands' + #category : #'Launchpad-Commands-Pharo' } { #category : #'instance creation' } @@ -13,6 +13,12 @@ LaunchpadTCPCommandServerOption class >> for: aCommand [ ^ self new initializeFor: aCommand ] +{ #category : #testing } +LaunchpadTCPCommandServerOption class >> isExtendedStartingOption [ + + ^ true +] + { #category : #testing } LaunchpadTCPCommandServerOption >> canHandle: argument [ diff --git a/source/Launchpad-Commands/TCPCommandServer.class.st b/source/Launchpad-Commands-Pharo/TCPCommandServer.class.st similarity index 97% rename from source/Launchpad-Commands/TCPCommandServer.class.st rename to source/Launchpad-Commands-Pharo/TCPCommandServer.class.st index f719058..c7cf0fd 100644 --- a/source/Launchpad-Commands/TCPCommandServer.class.st +++ b/source/Launchpad-Commands-Pharo/TCPCommandServer.class.st @@ -7,7 +7,7 @@ Class { 'connectionSocket', 'serverProcess' ], - #category : #'Launchpad-Commands' + #category : #'Launchpad-Commands-Pharo' } { #category : #'instance creation' } diff --git a/source/Launchpad-Commands-Pharo/package.st b/source/Launchpad-Commands-Pharo/package.st new file mode 100644 index 0000000..d1fc72f --- /dev/null +++ b/source/Launchpad-Commands-Pharo/package.st @@ -0,0 +1 @@ +Package { #name : #'Launchpad-Commands-Pharo' } diff --git a/source/Launchpad-Commands/LaunchpadOption.class.st b/source/Launchpad-Commands/LaunchpadOption.class.st index f31eae2..04940d4 100644 --- a/source/Launchpad-Commands/LaunchpadOption.class.st +++ b/source/Launchpad-Commands/LaunchpadOption.class.st @@ -4,6 +4,15 @@ Class { #category : #'Launchpad-Commands' } +{ #category : #querying } +LaunchpadOption class >> additionalStartingOptionsFor: startApplicationCommand [ + + ^ self allLeafSubclasses + select: [ :optionClass | optionClass isExtendedStartingOption ] + thenCollect: [ :optionClass | + optionClass for: startApplicationCommand ] +] + { #category : #testing } LaunchpadOption class >> isAbstract [ @@ -11,6 +20,12 @@ LaunchpadOption class >> isAbstract [ ^ self = LaunchpadOption ] +{ #category : #testing } +LaunchpadOption class >> isExtendedStartingOption [ + + ^ false +] + { #category : #testing } LaunchpadOption >> canHandle: argument [ diff --git a/source/Launchpad-Commands/LaunchpadStartApplicationCommand.class.st b/source/Launchpad-Commands/LaunchpadStartApplicationCommand.class.st index 4163bb0..8e77fa1 100644 --- a/source/Launchpad-Commands/LaunchpadStartApplicationCommand.class.st +++ b/source/Launchpad-Commands/LaunchpadStartApplicationCommand.class.st @@ -39,19 +39,6 @@ LaunchpadStartApplicationCommand >> enableStructuredLogging [ ] ensure: [ StandardStreamLogger onStandardError stop ] ] -{ #category : #configuring } -LaunchpadStartApplicationCommand >> enableTCPCommandServerListeningOn: listeningPort [ - - commandServer := TCPCommandServer listeningOn: listeningPort. - commandServer registerCommandNamed: 'SHUTDOWN' executing: [ - [ - LaunchpadApplication currentlyRunning - stop; - exitSuccess - ] forkAt: Processor timingPriority named: 'Launchpad shutdown process' - ] -] - { #category : #evaluating } LaunchpadStartApplicationCommand >> evaluateWithin: context [ @@ -66,12 +53,12 @@ LaunchpadStartApplicationCommand >> evaluateWithin: context [ LaunchpadStartApplicationCommand >> initialize [ super initialize. - options := Array - with: ( LaunchpadHelpOption for: self ) - with: ( LaunchpadDebugModeOption for: self ) - with: ( LaunchpadSettingsFileOption for: self ) - with: ( LaunchpadTCPCommandServerOption for: self ) - with: ( LaunchpadStructuredLoggingOption for: self ). + options := OrderedCollection + with: (LaunchpadHelpOption for: self) + with: (LaunchpadDebugModeOption for: self) + with: (LaunchpadSettingsFileOption for: self) + with: (LaunchpadStructuredLoggingOption for: self). + options addAll: (LaunchpadOption additionalStartingOptionsFor: self). baseConfigurationProvider := NullConfigurationProvider new. applicationMode := ReleasedApplicationMode new. commandServer := NullCommandServer new