-
Notifications
You must be signed in to change notification settings - Fork 10
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 #27 from badetitou/add-spec2extension
Add spec2extension
- Loading branch information
Showing
7 changed files
with
174 additions
and
24 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
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,30 @@ | ||
Extension { #name : #FM3Class } | ||
|
||
{ #category : #'*Fame-Spec2' } | ||
FM3Class >> stFmInspectorProperties: aBuilder [ | ||
|
||
<inspectorPresentationOrder: 1 title: 'Properties'> | ||
^ aBuilder newTable | ||
addColumn: (SpStringTableColumn title: 'Name' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each fullName ]) beSortable; | ||
addColumn: (SpStringTableColumn title: 'Type' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each stFmTypeString ]); | ||
addColumn: (SpStringTableColumn title: 'Derived?' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each isDerived ]); | ||
addColumn: (SpStringTableColumn title: 'Comment' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each comment ]); | ||
items: self allPrimitiveProperties; | ||
yourself | ||
] | ||
|
||
{ #category : #'*Fame-Spec2' } | ||
FM3Class >> stFmInspectorRelations: aBuilder [ | ||
|
||
<inspectorPresentationOrder: 0 title: 'Relations'> | ||
^ aBuilder newTable | ||
addColumn: (SpStringTableColumn title: 'Name' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each fullName ]) beSortable; | ||
addColumn: (SpStringTableColumn title: 'Type' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each stFmTypeString ]); | ||
addColumn: (SpStringTableColumn title: 'Derived?' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each isDerived ]); | ||
addColumn: (SpStringTableColumn title: 'Container?' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each isContainer ]); | ||
addColumn: (SpStringTableColumn title: 'isTarget?' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each isTarget ]); | ||
addColumn: (SpStringTableColumn title: 'isSource?' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each isSource ]); | ||
addColumn: (SpStringTableColumn title: 'Comment' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each comment ]); | ||
items: self allComplexProperties; | ||
yourself | ||
] |
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,21 @@ | ||
Extension { #name : #FM3Package } | ||
|
||
{ #category : #'*Fame-Spec2' } | ||
FM3Package >> stFmInspectorClasses: aBuilder [ | ||
|
||
<inspectorPresentationOrder: 0 title: 'Classes'> | ||
^ aBuilder newTable | ||
addColumn: (SpStringTableColumn title: 'Class' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each fullName ]) beSortable; | ||
items: self classes asOrderedCollection ; | ||
yourself | ||
] | ||
|
||
{ #category : #'*Fame-Spec2' } | ||
FM3Package >> stFmInspectorExtensions: aBuilder [ | ||
|
||
<inspectorPresentationOrder: 0 title: 'Extensions'> | ||
^ aBuilder newTable | ||
addColumn: (SpStringTableColumn title: 'Extensions' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each fullName ]) beSortable; | ||
items: self extensions asOrderedCollection; | ||
yourself | ||
] |
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,10 @@ | ||
Extension { #name : #FM3Property } | ||
|
||
{ #category : #'*Fame-Spec2' } | ||
FM3Property >> stFmTypeString [ | ||
^ String | ||
streamContents: [ :s | | ||
self type ifNotNil: [ :t | s nextPutAll: t name ]. | ||
self isMultivalued ifTrue: [ s nextPutAll: ' *' ]. | ||
self isDerived ifTrue: [ s nextPutAll: ' /' ] ] | ||
] |
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,30 @@ | ||
Extension { #name : #FM3Trait } | ||
|
||
{ #category : #'*Fame-Spec2' } | ||
FM3Trait >> stFmInspectorProperties: aBuilder [ | ||
|
||
<inspectorPresentationOrder: 1 title: 'Properties'> | ||
^ aBuilder newTable | ||
addColumn: (SpStringTableColumn title: 'Name' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each fullName ]) beSortable; | ||
addColumn: (SpStringTableColumn title: 'Type' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each stFmTypeString ]); | ||
addColumn: (SpStringTableColumn title: 'Derived?' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each isDerived ]); | ||
addColumn: (SpStringTableColumn title: 'Comment' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each comment ]); | ||
items: self allPrimitiveProperties; | ||
yourself | ||
] | ||
|
||
{ #category : #'*Fame-Spec2' } | ||
FM3Trait >> stFmInspectorRelations: aBuilder [ | ||
|
||
<inspectorPresentationOrder: 0 title: 'Relations'> | ||
^ aBuilder newTable | ||
addColumn: (SpStringTableColumn title: 'Name' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each fullName ]) beSortable; | ||
addColumn: (SpStringTableColumn title: 'Type' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each stFmTypeString ]); | ||
addColumn: (SpStringTableColumn title: 'Derived?' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each isDerived ]); | ||
addColumn: (SpStringTableColumn title: 'Container?' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each isContainer ]); | ||
addColumn: (SpStringTableColumn title: 'isTarget?' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each isTarget ]); | ||
addColumn: (SpStringTableColumn title: 'isSource?' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each isSource ]); | ||
addColumn: (SpStringTableColumn title: 'Comment' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each comment ]); | ||
items: self allComplexProperties; | ||
yourself | ||
] |
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,58 @@ | ||
Extension { #name : #FMMetaModel } | ||
|
||
{ #category : #'*Fame-Spec2' } | ||
FMMetaModel >> stFmInspectorClasses: aBuilder [ | ||
|
||
<inspectorPresentationOrder: 0 title: 'Classes'> | ||
^ aBuilder newTable | ||
addColumn: (SpStringTableColumn title: 'Class' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each fullName ]) beSortable; | ||
items: self classes; | ||
yourself | ||
] | ||
|
||
{ #category : #'*Fame-Spec2' } | ||
FMMetaModel >> stFmInspectorHierarchies: aBuilder [ | ||
|
||
<inspectorPresentationOrder: 3 title: 'Hierarchies'> | ||
^ aBuilder newTree | ||
roots: (self classes select: [ :each | each superclass = FM3Object instance ]); | ||
children: [ :c | c subclasses ]; | ||
display: [ :each | | ||
each isAbstract | ||
ifTrue: [ Text string: each fullName attribute: TextEmphasis italic ] | ||
ifFalse: [ Text fromString: each fullName ] ]; | ||
yourself | ||
] | ||
|
||
{ #category : #'*Fame-Spec2' } | ||
FMMetaModel >> stFmInspectorPackages: aBuilder [ | ||
|
||
<inspectorPresentationOrder: 2 title: 'Packages'> | ||
^ aBuilder newTable | ||
addColumn: (SpStringTableColumn title: 'Package' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each fullName ]) beSortable; | ||
items: self packages; | ||
yourself | ||
] | ||
|
||
{ #category : #'*Fame-Spec2' } | ||
FMMetaModel >> stFmInspectorProperties: aBuilder [ | ||
|
||
<inspectorPresentationOrder: 5 title: 'Properties'> | ||
^ aBuilder newTable | ||
addColumn: (SpStringTableColumn title: 'Name' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each fullName ]) beSortable; | ||
addColumn: (SpStringTableColumn title: 'Type' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each stFmTypeString ]); | ||
addColumn: (SpStringTableColumn title: 'Derived?' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each isDerived ]); | ||
addColumn: (SpStringTableColumn title: 'Comment' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each comment ]); | ||
items: self properties; | ||
yourself | ||
] | ||
|
||
{ #category : #'*Fame-Spec2' } | ||
FMMetaModel >> stFmInspectorTraits: aBuilder [ | ||
|
||
<inspectorPresentationOrder: 1 title: 'Traits'> | ||
^ aBuilder newTable | ||
addColumn: (SpStringTableColumn title: 'Trait' evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each fullName ]) beSortable; | ||
items: self traits; | ||
yourself | ||
] |
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 @@ | ||
Package { #name : #'Fame-Spec2' } |