-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #4: now that the rubber's hitting the road, it looks like TDCom…
…mandLine is needed
- Loading branch information
1 parent
7ae35ae
commit 2c3db42
Showing
12 changed files
with
112 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#!/usr/bin/env superdoit_solo | ||
options | ||
{ | ||
} | ||
% | ||
Usage | ||
----- | ||
USAGE $basename [--help | -h] [--debug | -D] [--debugGem] [-v | --verbose] \ | ||
--registry=<registry-name> <stone-name> | ||
|
||
DESCRIPTION | ||
This script is designed to run in the stone of interest and picks up the stone | ||
information from the .GDKStoneSpec.ston file in the stone directory. | ||
|
||
OPTIONS | ||
-h, --help display usage message | ||
-D, --debug bring up topaz debugger in the event of a script error | ||
--debugGem If terminal is connected to stdout, bring up debugger. If not, | ||
dump stack to stdout and wait for topaz to attach using topaz | ||
DEBUGGEM command. | ||
|
||
EXAMPLES | ||
$basename --help | ||
$basename -D | ||
$basename --debugGem | ||
$basename "3+4" | ||
----- | ||
% | ||
specs | ||
[ | ||
RwLoadSpecificationV2 { | ||
#projectName : 'GsDevKit_stones', | ||
#projectSpecFile : 'rowan/project.ston', | ||
#componentNames : [ | ||
'Core', | ||
'Solo' | ||
], | ||
#platformProperties : { | ||
'gemstone' : { | ||
'allusers' : { | ||
#defaultSymbolDictName : 'Globals' | ||
} | ||
} | ||
}, | ||
#comment : '' | ||
}, | ||
RwLoadSpecificationV2 { | ||
#projectName : 'GsCommands', | ||
#projectSpecFile : 'rowan/project.ston', | ||
#diskUrl : '$GEMSTONE/examples/GsCommands/projectsHome/GsCommands', | ||
#componentNames : [ | ||
'Commands' | ||
], | ||
#platformProperties : { | ||
'gemstone' : { | ||
'allusers' : { | ||
#defaultSymbolDictName : 'UserGlobals' | ||
} | ||
} | ||
}, | ||
#comment : '' | ||
} | ||
] | ||
% | ||
doit | ||
| registryClass stoneSpec sessionDescription | | ||
self preDoitSpecLoad: [:spec | | ||
spec projectName = 'GsCommands' | ||
ifTrue: [ spec projectsHome: '$GEMSTONE/examples/GsCommands/projectsHome' ] | ||
ifFalse: [ spec projectsHome: self dirname asFileReference parent parent ] ]. | ||
registryClass := (self globalNamed: 'GDKRegistry'). | ||
self positionalArgs size = 0 | ||
ifTrue: [ self error: 'a tODE command must be entered on command line' ] | ||
ifFalse: [ | ||
| specFile | | ||
specFile := FileLocator workingDirectory asFileReference / '.GDKStoneSpec.ston'. | ||
stoneSpec := (self globalNamed: 'GDKAbstractRegistryStore') fromPath: specFile ifAbsent: [] ]. | ||
sessionDescription := (self globalNamed: 'TDSessionDescription') | ||
fromFile: stoneSpec todeHome asFileReference / 'sys' / 'local' / 'sessions' / stoneSpec stoneName. | ||
(self globalNamed: 'TDShell') | ||
sessionDescription: sessionDescription | ||
evaluate: '3+4' | ||
debugMode: self debug | ||
% |
7 changes: 7 additions & 0 deletions
7
src/GsDevKit_stones-Tode.package/TDSessionDescription.class/class/fromFile..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
instance creation | ||
fromFile: filePath | ||
filePath asFileReference | ||
readStreamDo: [ :fileStream | | ||
| contents | | ||
contents := fileStream contents. | ||
^ STON fromString: contents ] |
13 changes: 0 additions & 13 deletions
13
src/GsDevKit_stones-Tode.package/TDSessionDescription.class/class/importFrom..st
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
src/GsDevKit_stones-Tode.package/TDSessionDescription.class/class/seaside.st
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
src/GsDevKit_stones-Tode.package/TDSessionDescription.class/instance/excludedInstVarNames.st
This file was deleted.
Oops, something went wrong.
19 changes: 12 additions & 7 deletions
19
src/GsDevKit_stones-Tode.package/TDSessionDescription.class/instance/fromSton..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
ston | ||
fromSton: stonReader | ||
stonReader | ||
parseMapDo: [ :instVarName :value | | ||
[ self instVarNamed: instVarName put: value ] | ||
on: Error | ||
do: [ :ignored | | ||
"If the instance variable for a TDsessionDescription is missing ... it is for a good reason ... keep on truckin' ... if it's critical let's find out during execution rather than during import" | ||
] ] | ||
| allInstanceVariableNames | | ||
allInstanceVariableNames := self stonInstVarNames. | ||
stonReader | ||
parseMapDo: [ :instVarName :value | | ||
[ | ||
self | ||
instVarAt: (allInstanceVariableNames indexOf: instVarName asSymbol) | ||
put: value ] | ||
on: Error | ||
do: [ :ignored | | ||
"If the instance variable for a TDsessionDescription is missing ... it is for a good reason ... keep on truckin' ... if it's critical let's find out during execution rather than during import" | ||
] ] |
5 changes: 1 addition & 4 deletions
5
src/GsDevKit_stones-Tode.package/TDSessionDescription.class/instance/stonInstVarNames.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
ston | ||
stonInstVarNames | ||
| oc | | ||
oc := self class allInstVarNames asOrderedCollection. | ||
oc removeAll: self excludedInstVarNames. | ||
^ oc | ||
^ self class allInstVarNames asOrderedCollection |
3 changes: 0 additions & 3 deletions
3
src/GsDevKit_stones-Tode.package/TDShell.class/class/open..st
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
src/GsDevKit_stones-Tode.package/TDShell.class/class/openFrom..st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
src/GsDevKit_stones-Tode.package/TDShell.class/class/openOnSessionDescription..st
This file was deleted.
Oops, something went wrong.
16 changes: 8 additions & 8 deletions
16
src/GsDevKit_stones-Tode.package/TDShell.class/instance/previousHistory.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
evaluator engine | ||
previousHistory | ||
| editor windowMorph | | ||
self history size = 0 | ||
ifTrue: [ ^ self ]. | ||
historyIndex > history size ifTrue: [ historyIndex := history size]. | ||
self | ||
installHistoryEntry: (history at: historyIndex) | ||
windowMorph: self shellWindow paneMorphs first. | ||
historyIndex := (historyIndex - 1 max: 1) min: history size | ||
self history size = 0 | ||
ifTrue: [ ^ self ]. | ||
historyIndex > history size | ||
ifTrue: [ historyIndex := history size ]. | ||
self | ||
installHistoryEntry: (history at: historyIndex) | ||
windowMorph: self shellWindow paneMorphs first. | ||
historyIndex := (historyIndex - 1 max: 1) min: history size |