-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from jecisc/do-not-rely-on-classtraitdefinition
Remove the usage of MCClassTraitDefinition
- Loading branch information
Showing
5 changed files
with
14 additions
and
48 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
18 changes: 0 additions & 18 deletions
18
MonticelloTonel-Core.package/TonelParser.class/instance/basicNewTraitDefinitionFrom..st
This file was deleted.
Oops, something went wrong.
25 changes: 11 additions & 14 deletions
25
MonticelloTonel-Core.package/TonelParser.class/instance/newTraitDefinitionFrom..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,18 +1,15 @@ | ||
private - factory | ||
newTraitDefinitionFrom: anArray | ||
|
||
| metadata traitDefs | | ||
| metadata definition | | ||
metadata := anArray sixth. | ||
traitDefs := { (self basicNewTraitDefinitionFrom: anArray) }. | ||
|
||
traitDefs first hasClassTraitComposition ifTrue: [ | ||
| definition | | ||
definition := (MCClassTraitDefinition baseTraitName: (metadata at: #name)) | ||
classTraitComposition: (metadata at: #classTraits); | ||
yourself. | ||
|
||
self addPackageInfoTo: definition from: metadata. | ||
|
||
traitDefs := traitDefs copyWith: definition ]. | ||
|
||
^ traitDefs | ||
definition := (MCTraitDefinition named: (metadata at: #name)) | ||
comment: (anArray second ifNil: [ '' ]); | ||
yourself. | ||
metadata | ||
at: #traits ifPresent: [ :composition | definition traitComposition: composition ]; | ||
at: #classTraits ifPresent: [ :composition | definition classTraitComposition: composition ]; | ||
at: #instVars ifPresent: [ :ivar | definition instVarNames: ivar ]; | ||
at: #classInstVars ifPresent: [ :classIVar | definition classInstVarNames: classIVar ]. | ||
self addPackageInfoTo: definition from: metadata. | ||
^ definition |
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
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 @@ | ||
SystemOrganization addCategory: #'MonticelloTonel-Core'! | ||
SystemOrganization addCategory: #'MonticelloTonel-Core-Base'! | ||
SystemOrganization addCategory: #'MonticelloTonel-Core-Errors'! | ||
SystemOrganization addCategory: #'MonticelloTonel-Core-Reading'! | ||
SystemOrganization addCategory: #'MonticelloTonel-Core-Utilities'! | ||
SystemOrganization addCategory: #'MonticelloTonel-Core-Writing'! | ||
self packageOrganizer ensurePackage: #'MonticelloTonel-Core' withTags: #(#Base #Errors #Reading #Utilities #Writing)! |