forked from magritte-metamodel/magritte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Magritte-Model-SeanDeNigris.466:
[Enh]: Fix Issue magritte-metamodel#27…
…: All Option Descriptions Should Be Extensible; now MultipleOptionDescriptions can be #extensible, too! Implementation note: #initializer had to be pushed up, since we need to supply a way to create the new instance. This pushes us a bit closer to my suspicion that #classes for reference descriptions should be #factories, which would probably mean a name-change for #initializer
- Loading branch information
Sean DeNigris
committed
Jul 27, 2016
1 parent
99ba457
commit 09bd69d
Showing
23 changed files
with
39 additions
and
26 deletions.
There are no files selected for viewing
3 changes: 1 addition & 2 deletions
3
...sitory/Magritte-Model.package/MAMultipleOptionDescription.class/instance/validateKind..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,5 +1,4 @@ | ||
validating | ||
validateKind: anObject | ||
super validateKind: anObject. | ||
(anObject allSatisfy: [ :each | self options includes: each ]) | ||
ifFalse: [ MAKindError description: self signal: self kindErrorMessage ] | ||
anObject do: [ :e | self validateOptionKind: e ] |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
repository/Magritte-Model.package/MAOptionDescription.class/instance/shouldNotInclude..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,3 +1,3 @@ | ||
accessing-dynamic | ||
shouldNotInclude: anObject | ||
^ anObject isNil or: [ self options includes: anObject ] | ||
^ self isExtensible not or: [ anObject isNil or: [ self options includes: anObject ] ] |
7 changes: 7 additions & 0 deletions
7
repository/Magritte-Model.package/MAOptionDescription.class/instance/validateOptionKind..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 @@ | ||
validating | ||
validateOptionKind: anObject | ||
(self options includes: anObject) | ||
ifTrue: [ ^ self ]. | ||
self isExtensible | ||
ifTrue: [ self reference validate: anObject ] | ||
ifFalse: [ MAKindError description: self signal: self kindErrorMessage ] |
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
File renamed without changes.
File renamed without changes.
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
3 changes: 0 additions & 3 deletions
3
...tory/Magritte-Model.package/MASingleOptionDescription.class/instance/shouldNotInclude..st
This file was deleted.
Oops, something went wrong.
6 changes: 1 addition & 5 deletions
6
repository/Magritte-Model.package/MASingleOptionDescription.class/instance/validateKind..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,8 +1,4 @@ | ||
validating | ||
validateKind: anObject | ||
super validateKind: anObject. | ||
(self options includes: anObject) | ||
ifTrue: [ ^ self ]. | ||
self isExtensible | ||
ifTrue: [ self reference validate: anObject ] | ||
ifFalse: [ MAKindError description: self signal: self kindErrorMessage ] | ||
self validateOptionKind: anObject |
10 changes: 1 addition & 9 deletions
10
repository/Magritte-Model.package/MASingleOptionDescription.class/methodProperties.json
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,20 +1,12 @@ | ||
{ | ||
"class" : { | ||
"defaultExtensible" : "lr 3/9/2006 11:33", | ||
"isAbstract" : "lr 3/9/2006 11:33", | ||
"label" : "lr 3/9/2006 11:33" }, | ||
"instance" : { | ||
"acceptMagritte:" : "StephanEggermont 4/16/2015 11:06", | ||
"beExtensible" : "lr 3/9/2006 11:32", | ||
"beLimited" : "lr 3/9/2006 11:32", | ||
"descriptionExtensible" : "NickAger 1/16/2012 18:20", | ||
"descriptionGroupBy" : "NickAger 1/16/2012 17:27", | ||
"extensible" : "lr 3/9/2006 11:32", | ||
"extensible:" : "lr 3/9/2006 11:32", | ||
"groupBy" : "lr 9/3/2008 11:43", | ||
"groupBy:" : "lr 3/25/2009 19:31", | ||
"isExtensible" : "lr 3/9/2006 11:32", | ||
"isGrouped" : "mb 4/10/2008 00:37", | ||
"prepareOptions:" : "lr 10/12/2010 13:09", | ||
"shouldNotInclude:" : "lr 10/12/2010 13:09", | ||
"validateKind:" : "lr 10/12/2010 13:08" } } | ||
"validateKind:" : "SeanDeNigris 10/7/2015 14:12" } } |
7 changes: 7 additions & 0 deletions
7
repository/Magritte-Model.package/NumberParser.extension/class/isNumber..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 @@ | ||
*Magritte-Model | ||
isNumber: aStringOrStream | ||
|
||
| stream | | ||
stream := aStringOrStream readStream. | ||
NumberParser parse: stream onError: [ ^ false ]. | ||
^ stream atEnd |
5 changes: 5 additions & 0 deletions
5
repository/Magritte-Model.package/NumberParser.extension/methodProperties.json
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,5 @@ | ||
{ | ||
"class" : { | ||
"isNumber:" : "SeanDeNigris 4/12/2015 10:18" }, | ||
"instance" : { | ||
} } |
2 changes: 2 additions & 0 deletions
2
repository/Magritte-Model.package/NumberParser.extension/properties.json
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,2 @@ | ||
{ | ||
"name" : "NumberParser" } |
Large diffs are not rendered by default.
Oops, something went wrong.