diff --git a/src/FAST-Core-Model-Extension/FASTTEntity.extension.st b/src/FAST-Core-Model-Extension/FASTTEntity.extension.st index e1b5e2c..844f29c 100644 --- a/src/FAST-Core-Model-Extension/FASTTEntity.extension.st +++ b/src/FAST-Core-Model-Extension/FASTTEntity.extension.st @@ -29,17 +29,18 @@ FASTTEntity >> display [ { #category : #'*FAST-Core-Model-Extension' } FASTTEntity >> inspectionFAST [ - + ^ SpTreeTablePresenter new addColumn: (SpCompositeTableColumn new addColumn: ((SpImageTableColumn evaluated: #mooseIcon) width: 20; yourself); - addColumn: (SpStringTableColumn evaluated: [ :node | node display ]); + addColumn: + (SpStringTableColumn evaluated: [ :node | node display ]); yourself); - children: [ :aClass | - aClass children asArray sorted: [ :a :b | - (a startPos ifNil: 0) <= (b startPos ifNil: 0) ] ]; + children: [ :aClass | + aClass children asArray sorted: [ :a :b | + (a startPos ifNil: [ 0 ]) <= (b startPos ifNil: [ 0 ]) ] ]; beMultipleSelection; roots: { self }; beResizable @@ -48,9 +49,9 @@ FASTTEntity >> inspectionFAST [ { #category : #'*FAST-Core-Model-Extension' } FASTTEntity >> inspectionFASTSourceCode [ - - (self sourceText isNotNil and: [ - self startPos isNotNil and: [ self endPos isNotNil ] ]) ifFalse: [ + + (self sourceText isNotNil and: [ + self startPos isNotNil and: [ self endPos isNotNil ] ]) ifFalse: [ ^ SpTextPresenter new text: 'Not available'; yourself ]. diff --git a/src/FAST-Core-Tools/FASTDumpVisitor.class.st b/src/FAST-Core-Tools/FASTDumpVisitor.class.st index f7d51c2..bdd1cbe 100644 --- a/src/FAST-Core-Tools/FASTDumpVisitor.class.st +++ b/src/FAST-Core-Tools/FASTDumpVisitor.class.st @@ -34,14 +34,13 @@ FASTDumpVisitor >> initialize [ { #category : #enumerating } FASTDumpVisitor >> propertiesAndValuesOf: aFASTEntity do: twoArgsBlock [ - "Iterate over the attributes and child relations of the given entity." | value | (self propertiesOf: aFASTEntity) - select: [ :property | - (property isChildrenProperty or: [ - (property hasOpposite | property isDerived) not ]) and: [ + select: [ :property | + (property isChildrenProperty or: [ + (property hasOpposite | property isDerived) not ]) and: [ value := aFASTEntity perform: property implementingSelector. property isMultivalued ifTrue: [ value isNotEmpty ] @@ -69,14 +68,15 @@ FASTDumpVisitor >> visit: aFASTEntity [ | beforeFirst | beforeFirst := true. stream << aFASTEntity className << ' new '. - self propertiesAndValuesOf: aFASTEntity do: [ :property :value | + self propertiesAndValuesOf: aFASTEntity do: [ :property :value | beforeFirst ifTrue: [ beforeFirst := false ] ifFalse: [ stream nextPut: $; ]. stream nextPutAll: property implementingSelector asMutator. property hasOpposite ifTrue: [ "relation" - property isMultivalued + (property isMultivalued or: [ "temporary check until https://github.com/moosetechnology/FAST-JAVA/issues/210 is fixed" + value isKindOf: FMMultivalueLink ]) ifFalse: [ self visitOnlyChild: value ] ifTrue: [ self visitChildren: value ] ] ifFalse: [ "attribute" value printOn: stream ] ] diff --git a/src/FAST-Core-Tools/FASTTEntity.extension.st b/src/FAST-Core-Tools/FASTTEntity.extension.st index 29efb69..f44d90d 100644 --- a/src/FAST-Core-Tools/FASTTEntity.extension.st +++ b/src/FAST-Core-Tools/FASTTEntity.extension.st @@ -19,7 +19,7 @@ FASTTEntity >> dump [ { #category : #'*FAST-Core-Tools' } FASTTEntity >> inspectionFASTDump [ - + ^ SpCodePresenter new text: (RBParser parseExpression: self dump) formattedCode; beForScripting;