Skip to content

Commit

Permalink
Move UI feedback into installLanguages
Browse files Browse the repository at this point in the history
This way, installLanguage:version:path: can be used in headless mode during testing.
  • Loading branch information
fniephaus committed Feb 17, 2024
1 parent c83543e commit 9dffcf6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ installLanguage
version := UIManager default
request: 'Select a version:'
initialAnswer: ((Java type: 'java.lang.System') getProperty: 'org.graalvm.version' and: 'unknown').
self installLanguage: languageId version: version path: modulesPath fullName
'Installing language and its dependencies...' displayProgressFrom: 0 to: 1 during: [ :bar |
bar value: 0.
self installLanguage: languageId version: version path: modulesPath fullName
].
self inform: 'Success! Please restart TruffleSqueak for the language to become available. You can also install more languages now.'
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ installLanguage: languageId version: version path: path
| downloader |
[ downloader := Java type: 'org.graalvm.maven.downloader.Main' ]
on: Error
do: [ self error: 'Unable to find Maven Downloader. Additional languages can only be installed in a JVM standalone of TruffleSqueak.'].
'Installing language and its dependencies...' displayProgressFrom: 0 to: 1 during: [ :bar |
bar value: 0.
downloader main: {
'-o'. path.
'-v'. version.
'-a'. languageId
}.
].
self inform: 'Success! Please restart TruffleSqueak for the language to become available. You can also install more languages now.'
do: [ self error: 'Unable to find Maven Downloader. Additional languages can only be installed in a JVM standalone of TruffleSqueak.' ].
downloader main: {
'-o'. path.
'-v'. version.
'-a'. languageId
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
"iconWASM" : "fn 6/26/2021 15:10",
"import:" : "fn 11/11/2018 21:34",
"initialize" : "fn 1/24/2020 14:41",
"installLanguage" : "fn 2/17/2024 16:36",
"installLanguage" : "fn 2/17/2024 17:05",
"installLanguage:version:" : "fn 2/17/2024 13:19",
"installLanguage:version:path:" : "fn 2/17/2024 16:35",
"installLanguage:version:path:" : "fn 2/17/2024 17:06",
"isPermitted:" : "fn 1/26/2021 17:27",
"isPolyglotEvalAllowed" : "fn 5/13/2020 17:37",
"languageIdHost" : "fn 6/25/2021 13:43",
Expand Down

0 comments on commit 9dffcf6

Please sign in to comment.