Skip to content

Commit

Permalink
Merge pull request #696 from Rinzwind/fileservice
Browse files Browse the repository at this point in the history
Add ‘fileService’ for PharoLauncherApplication allowing ‘.image’ files to be opened through PhLLaunchImageFromDiskCommand
  • Loading branch information
demarey authored Aug 28, 2024
2 parents 7b9bb7d + 301d83f commit a5c9341
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/PharoLauncher-Spec2/PharoLauncherApplication.class.st
Original file line number Diff line number Diff line change
@@ -57,6 +57,17 @@ PharoLauncherApplication class >> defaultInitializationScriptLocation [
^ FileLocator launcherUserFilesLocation / 'scripts'
]

{ #category : #'file service' }
PharoLauncherApplication class >> fileReaderServicesForFile: fullName suffix: suffix [

<fileService>

^ suffix = 'image'
ifTrue: [
{ SimpleServiceEntry provider: self label: 'Launch image' selector: #launchImage: } ]
ifFalse: [ #() ]
]

{ #category : #settings }
PharoLauncherApplication class >> hardResetPersistanceState [
^false
@@ -116,6 +127,13 @@ PharoLauncherApplication class >> isDeployed [
^ IsDeployed ifNil: [ IsDeployed := false ]
]

{ #category : #'file service' }
PharoLauncherApplication class >> launchImage: fullName [

(PhLLaunchImageFromDiskCommand forContext: self default mainPresenter)
launchImage: (PhLImage location: fullName asFileReference)
]

{ #category : #'world menu' }
PharoLauncherApplication class >> menuCommandOn: aBuilder [
<worldMenu>

0 comments on commit a5c9341

Please sign in to comment.