Skip to content

Commit

Permalink
Merge pull request #71 from dionisiydk/dev
Browse files Browse the repository at this point in the history
class creation tool fixed
  • Loading branch information
dionisiydk authored Jul 31, 2017
2 parents ea50d51 + 43c8594 commit ebf2337
Show file tree
Hide file tree
Showing 39 changed files with 149 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Calypso-Environment-Processor-Tests.package/.filetree
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"separateMethodMetaAndSource" : false,
"noMethodMetaData" : true,
"useCypressPropertiesFile" : true
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
helpers
bottomMethodInStack
^#bottomMethod
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
helpers
buildStackFrom: processStackSelectors
| processScope |

self createProcessWith: processStackSelectors.
processScope := environment selectScope: ClyProcessScope of: { process}.
self retrieveContentFrom: processScope.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
helpers
contentClass
^ClyProcessStack
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
running
createProcessWith: selectors

| eachContext |
contexts := OrderedCollection new.
selectors do: [ :each |
eachContext := self newContextFor: each.
contexts ifNotEmpty: [ contexts last privSender: eachContext ].
contexts add: eachContext].

process := Process new.
process suspendedContext: contexts first
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
helpers
method1InStack
^#method1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
helpers
newContextFor: aSelector

^Context sender: nil receiver: self method: self class >> aSelector arguments: #()
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tests
testIncludesAllContextsWhenTheyFitInCache

self buildStackFrom: #(topMethodInStack method1InStack bottomMethodInStack).

self assert: actualObjects asArray equals: contexts asArray
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
helpers
topMethodInStack
^#topMethod
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"commentStamp" : "",
"super" : "ClyEnvironmentContentTestCase",
"category" : "Calypso-Environment-Processor-Tests",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"process",
"contexts"
],
"name" : "ClyProcessStackTests",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SystemOrganization addCategory: #'Calypso-Environment-Processor-Tests'!
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(name 'Calypso-Environment-Processor-Tests')
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ }
5 changes: 5 additions & 0 deletions Calypso-Environment-Processor.package/.filetree
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"separateMethodMetaAndSource" : false,
"noMethodMetaData" : true,
"useCypressPropertiesFile" : true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*Calypso-Environment-Processor
fetchContent: anEnvironmentContent fromProcesses: processes
anEnvironmentContent buildFromProcesses: processes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "ClyAllItemsQuery"
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
item resolving
resolveMetadataOf: anEnvironmentContent by: anEnvironmentPlugin
anEnvironmentPlugin resolveMetadataOfContexts: anEnvironmentContent
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
items resolving
resolvePropertiesOf: anEnvironmentItem by: anEnvironmentPlugin
anEnvironmentPlugin resolvePropertiesOfContext: anEnvironmentItem
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "",
"super" : "ClyEnvironmentScope",
"category" : "Calypso-Environment-Processor",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "ClyContextScope",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*Calypso-Environment-Processor
resolveMetadataOfContexts: anEnvironmentContent
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*Calypso-Environment-Processor
resolvePropertiesOfContext: anEnvironmentItem
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "ClyEnvironmentPlugin"
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
queries
fetchContent: anEnvironmentContent by: anEnvironmentQuery

anEnvironmentQuery fetchContent: anEnvironmentContent fromProcesses: basisObjects
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "",
"super" : "ClyEnvironmentScope",
"category" : "Calypso-Environment-Processor",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "ClyProcessScope",
"type" : "normal"
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
description
itemScope
^ClyContextScope
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
building
buildFromProcess: aProcess

| sender |
sender := aProcess suspendedContext.
[ sender notNil ] whileTrue: [
items add: (ClyEnvironmentItem named: sender method selector with: sender).
sender := sender sender
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
building
buildFromProcesses: processes
processes size = 1 ifFalse: [ self error: 'multiple processes are not supported' ].

self buildFromProcess: processes first
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
initialization
defaultItems
^OrderedCollection new
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "",
"super" : "ClyEnvironmentContent",
"category" : "Calypso-Environment-Processor",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "ClyProcessStack",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SystemOrganization addCategory: #'Calypso-Environment-Processor'!
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(name 'Calypso-Environment-Processor')
1 change: 1 addition & 0 deletions Calypso-Environment-Processor.package/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ }
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Is this really what you want to do?') asText makeBoldFrom: 1 to: newClassName si
since oldClass superclass knows the definerClass of oldClass."

oldClass
ifNil: [ classCompiler := self systemEnvironment defaultClassCompiler]
ifNil: [ classCompiler := self defaultClassCompiler]
ifNotNil: [ classCompiler := oldClass superclass subclassDefinerClass new].
class := classCompiler
source: aString;
Expand Down

0 comments on commit ebf2337

Please sign in to comment.