Skip to content

Commit

Permalink
Source code comments, first pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
eMaringolo committed Mar 10, 2022
1 parent 6bbb41d commit 2ade7c4
Show file tree
Hide file tree
Showing 22 changed files with 332 additions and 141 deletions.
48 changes: 24 additions & 24 deletions source/.configmaps
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
[
{
#conditions : [ ],
#ts : 3813497911,
#ts : 3824386360,
#comment : '',
#formatVersion : '1.1',
#applications : OrderedCollection [
{
#name : 'TonelBaseApp',
#versionName : '1.4.10',
#ts : 3813497911
#versionName : '1.4.7',
#ts : 3812608735
},
{
#name : 'TonelFileSystem',
#versionName : '1.4.10',
#ts : 3813497911
#versionName : '1.4.7',
#ts : 3812609203
},
{
#name : 'TonelLoaderInteractiveApp',
#versionName : '1.4.10',
#ts : 3813497973
#versionName : '',
#ts : 3824381840
},
{
#name : 'TonelLoaderModel',
#versionName : '1.4.10',
#ts : 3813497911
#versionName : '',
#ts : 3824364126
},
{
#name : 'TonelReaderModel',
#versionName : '1.4.10',
#ts : 3813497911
#versionName : 'b496 + 68399 a',
#ts : 3813221906
},
{
#name : 'TonelTools',
#versionName : 'V 11.0.0 [495]',
#ts : 3810536888
#versionName : '',
#ts : 3824386303
},
{
#name : 'TonelWriterModel',
#versionName : '1.4.10',
#ts : 3813497911
#versionName : '1.4.7',
#ts : 3812609203
}
],
#name : 'ENVY/Image Tonel',
#versionName : '1.4.10'
#versionName : ''
},
{
#conditions : [ ],
Expand All @@ -52,23 +52,23 @@
#applications : OrderedCollection [
{
#name : 'EmLibraryToolsApp',
#versionName : '390d2a1-master',
#ts : 3812608417
#versionName : 'b495 + 68281 b',
#ts : 3812609757
},
{
#name : 'TonelLoaderTests',
#versionName : '1.4.7',
#ts : 3812609204
#versionName : 'b495 + 68281 b',
#ts : 3812609758
},
{
#name : 'TonelReaderTests',
#versionName : '1.4.7',
#ts : 3812609204
#versionName : 'b495 + 68281 b',
#ts : 3812609758
},
{
#name : 'TonelWriterTests',
#versionName : '1.4.7',
#ts : 3812609204
#versionName : 'b495 + 68281 b',
#ts : 3812609757
}
],
#name : 'Test ENVY/Image Tonel',
Expand Down
7 changes: 0 additions & 7 deletions source/TonelLoaderInteractiveApp/TonelLoader.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ Extension {
#name : 'TonelLoader'
}

{ #category : '*TonelLoaderInteractiveApp',
#vaCategories : ['STS-Support'] }
TonelLoader class >> loaded [

EsImageStartUp debuggerClass: (#StsDebugger asClass ifNil: [#DbgDebugger class])
]

{ #category : '*TonelLoaderInteractiveApp',
#vaCategories : ['strategies-convenience'] }
TonelLoader >> beInteractive [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Class {

{ #category : 'operations' }
TonelLoaderInteractiveBaseEditionStrategy >> selectBaseEditionOf: aTonelSubApplication [
"Answers the base edition of aTonelApplication,
prompting the user to select it interactively from a dialog."

^(CwListPrompter new)
messageString: (TonelMsg06 bindWith: aTonelSubApplication name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@ Class {

{ #category : 'api' }
TonelLoaderInteractivePrereqStrategy >> concretePrerequisitesOf: aTonelApplication [
"Answer the immediate prerequisite application of aTonelApplication,
by prompting the user to choose them."


^self prerequisitesFor: aTonelApplication current: aTonelApplication prerequisiteApps
]

{ #category : 'api' }
TonelLoaderInteractivePrereqStrategy >> prerequisitesFor: tonelApplication current: aCollection [

"Answer a collection of EmShadowApplication that are the prerequistes applications
of aTonelApplication based on prompting the user with a dialog to choose them from.
Answers:
<EmShadowApplication>
"

^EtPrerequisiteCollectingPrompter
prompt: ('Please select the prequisites for %1 (chains will be resolved after selection)'
bindWith: tonelApplication name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ TonelLoaderInteractiveVersionStrategy class >> description [

{ #category : 'resolving' }
TonelLoaderInteractiveVersionStrategy >> versionFor: aTonelApplication [

"Answer the version for anAppOrSubapp,
prompting the user to specify one using an interactive dialog."

^(System prompt: TonelMsg11 answer: String new) "$NLS$ Enter the version name to be used for imported classes and applications" ifNil: [''] "$NON-NLS$"
]
25 changes: 25 additions & 0 deletions source/TonelLoaderModel/TonelConfigurationMap.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
"
DESCRIPTION:
An instance of the TonelConfigurationMap class provides an object
that represents an ENVY Library Configuration Map (EmConfigurationMap)
within a Tonel formatted source.
When instances of receiver specify its required maps, they could be other
instances of TonelConfigurationMap or instances of TonelEmConfigurationMap.
RESPONSIBILITY:
- Reify the serialized config map in a Tonel formatted repository.
- Load itself and its required maps
"
Class {
#name : 'TonelConfigurationMap',
#superclass : 'Object',
Expand Down Expand Up @@ -325,6 +339,17 @@ TonelConfigurationMap >> loadRequiredMaps [

{ #category : 'loading' }
TonelConfigurationMap >> loadWithRequiredMaps [
"Load the receiver and all its required maps first.
Loading a required map may in turn load other required maps."

self loadWithRequiredMaps: true
]

{ #category : 'loading' }
TonelConfigurationMap >> loadWithRequiredMaps: aBoolean [
"Load the receiver. And all its required maps first if aBoolean is true.
Loading a required map may in turn load other required maps."

self loadRequiredMaps.
self load
]
Expand Down
16 changes: 14 additions & 2 deletions source/TonelLoaderModel/TonelEmConfigurationMap.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"
DESCRIPTION:
An instance of the EmTonelConfigurationMap class provides an object
that represents a reference to an ENVY Library Configuration Map.
RESPONSIBILITY:
- Load the proper EmConfigurationMap from the ENVY Library
"
Class {
#name : 'TonelEmConfigurationMap',
#superclass : 'TonelConfigurationMap',
Expand All @@ -15,15 +24,18 @@ TonelEmConfigurationMap class >> name: aString ts: seconds versionName: versionS
]

{ #category : 'loading' }
TonelEmConfigurationMap >> loadWithRequiredMaps [
TonelEmConfigurationMap >> loadWithRequiredMaps: aBoolean [
"Load the receiver. And all its required maps first if aBoolean is true.
Loading a required map may in turn load other required maps."

| emConfigMap |
aBoolean ifFalse: [^self].
emConfigMap := (EmConfigurationMap editionsFor: self name)
detect: [:one | self hasSameVersionAs: one]
ifNone: [
TonelLoaderError signal: (
'Could not find configuration map <1p> <2p>'
expandMacrosWith: self name
with: self versionName)].
emConfigMap loadWithRequiredMaps
emConfigMap loadWithRequiredMaps.
]
Loading

0 comments on commit 2ade7c4

Please sign in to comment.