Skip to content

Commit

Permalink
Magritte-Model-SeanDeNigris.466: [Enh]: Fix Issue magritte-metamodel#27
Browse files Browse the repository at this point in the history
…: 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
Show file tree
Hide file tree
Showing 23 changed files with 39 additions and 26 deletions.
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 ]
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"isOrdered" : "lr 3/9/2006 11:32",
"ordered" : "lr 3/9/2006 11:32",
"ordered:" : "lr 3/9/2006 11:32",
"validateKind:" : "lr 11/14/2006 17:59",
"validateKind:" : "SeanDeNigris 10/7/2015 14:51",
"validateRequired:" : "lr 2/16/2007 08:49" } }
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 ] ]
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 ]
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
{
"class" : {
"defaultExtensible" : "SeanDeNigris 10/7/2015 12:37",
"defaultOptions" : "lr 3/9/2006 11:33",
"defaultSorted" : "lr 3/9/2006 11:33" },
"instance" : {
"acceptMagritte:" : "StephanEggermont 4/16/2015 11:06",
"allOptions" : "lr 3/9/2006 11:32",
"allOptionsWith:" : "lr 5/5/2006 19:31",
"beExtensible" : "SeanDeNigris 10/7/2015 12:30",
"beLimited" : "SeanDeNigris 10/7/2015 12:30",
"beSorted" : "lr 3/9/2006 11:32",
"beUnsorted" : "lr 3/9/2006 11:32",
"descriptionDefault" : "NickAger 1/16/2012 17:27",
"descriptionExtensible" : "SeanDeNigris 10/7/2015 12:30",
"descriptionOptions" : "NickAger 1/16/2012 18:19",
"descriptionSorted" : "NickAger 1/16/2012 18:19",
"extensible" : "SeanDeNigris 10/7/2015 12:30",
"extensible:" : "SeanDeNigris 10/7/2015 12:30",
"isExtensible" : "SeanDeNigris 10/7/2015 12:30",
"isMultiple" : "DiegoLont 6/4/2014 14:36",
"isSorted" : "lr 3/9/2006 11:32",
"labelForOption:" : "DiegoLont 1/24/2014 10:43",
Expand All @@ -21,8 +28,9 @@
"optionsTextual:" : "lr 4/21/2007 18:30",
"postCopy" : "lr 3/26/2007 11:45",
"prepareOptions:" : "lr 9/24/2007 19:18",
"shouldNotInclude:" : "lr 5/5/2006 19:31",
"shouldNotInclude:" : "SeanDeNigris 10/7/2015 12:32",
"sortBlock" : "lr 3/9/2006 11:32",
"sorted" : "lr 3/9/2006 11:32",
"sorted:" : "lr 3/25/2009 19:31",
"undefined:" : "lr 3/9/2006 11:32" } }
"undefined:" : "lr 3/9/2006 11:32",
"validateOptionKind:" : "SeanDeNigris 10/7/2015 14:10" } }
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"instance" : {
"acceptMagritte:" : "StephanEggermont 4/16/2015 11:06",
"descriptionReference" : "NickAger 1/18/2012 16:56",
"initializer" : "SeanDeNigris 10/7/2015 13:41",
"initializer:" : "SeanDeNigris 10/7/2015 13:41",
"postCopy" : "lr 3/26/2007 11:44",
"reference" : "lr 3/9/2006 11:32",
"reference:" : "lr 3/9/2006 11:32" } }
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@
"commonClass" : "NickAger 1/31/2012 17:47",
"descriptionClasses" : "NickAger 1/18/2012 16:57",
"descriptionReference" : "NickAger 1/18/2012 16:57",
"initializer" : "SeanDeNigris 8/12/2015 00:39",
"initializer:" : "SeanDeNigris 8/12/2015 00:39",
"postCopy" : "lr 3/26/2007 11:45",
"reference" : "StephanEggermont 8/25/2014 16:36" } }

This file was deleted.

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
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" } }
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"class" : {
"isNumber:" : "SeanDeNigris 4/12/2015 10:18" },
"instance" : {
} }
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
"name" : "NumberParser" }
2 changes: 1 addition & 1 deletion repository/Magritte-Model.package/monticello.meta/version

Large diffs are not rendered by default.

0 comments on commit 09bd69d

Please sign in to comment.