Skip to content

Commit

Permalink
added method to print loc of metadata in differents formats
Browse files Browse the repository at this point in the history
  • Loading branch information
IkiAde committed May 21, 2024
1 parent 62b9248 commit 028897f
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/Fame-ImportExport/FMDataStructurePrinter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@ FMDataStructurePrinter >> crTabs [
tab: indent
]

{ #category : #printing }
FMDataStructurePrinter >> printEntityCloser [
^ self subclassResponsibility
]

{ #category : #printing }
FMDataStructurePrinter >> printEntityLineBreak [
^ self subclassResponsibility
]

{ #category : #printing }
FMDataStructurePrinter >> printEntityOpener [
^ self subclassResponsibility
]

{ #category : #accessing }
FMDataStructurePrinter >> stream [
^ stream
Expand Down
4 changes: 3 additions & 1 deletion src/Fame-ImportExport/FMImporterFilter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ FMImporterFilter >> beginDocument [

{ #category : #parsing }
FMImporterFilter >> beginEntity: name [

(filter includes: name)
ifTrue: [ shouldSkip := false.
ifTrue: [
shouldSkip := false.
importer beginEntity: name ]
ifFalse: [ shouldSkip := true ]
]
Expand Down
21 changes: 21 additions & 0 deletions src/Fame-ImportExport/FMJSONPrinter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,27 @@ FMJSONPrinter >> primitive: value [
ifFalse: [ value msePrintOn: stream ]
]
{ #category : #parsing }
FMJSONPrinter >> printEntityCloser [
indent := indent - 1.
self crTabs.
stream nextPut: $}.
]
{ #category : #printing }
FMJSONPrinter >> printEntityLineBreak [
^ self crTabs
]
{ #category : #parsing }
FMJSONPrinter >> printEntityOpener [
indent := indent + 1.
stream nextPutAll: '{'.
self crTabs
]
{ #category : #parsing }
FMJSONPrinter >> printEntitySeparator [
stream nextPut: $,
Expand Down
21 changes: 21 additions & 0 deletions src/Fame-ImportExport/FMMSEPrinter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,27 @@ FMMSEPrinter >> primitive: value [
value msePrintOn: stream
]

{ #category : #printing }
FMMSEPrinter >> printEntityCloser [

indent := indent - 1.
self crTabs.
stream nextPut: $)
]

{ #category : #printing }
FMMSEPrinter >> printEntityLineBreak [
^self crTabs
]

{ #category : #printing }
FMMSEPrinter >> printEntityOpener [

indent := indent + 1.
stream nextPut: $(.
self crTabs.
]

{ #category : #parsing }
FMMSEPrinter >> referenceName: name [
stream
Expand Down
20 changes: 20 additions & 0 deletions src/Fame-ImportExport/FMXMLPrinter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,26 @@ FMXMLPrinter >> primitive: value [
indent := indent - 1
]
{ #category : #parsing }
FMXMLPrinter >> printEntityCloser [
stream nextPut: $>.
self crTabs
]
{ #category : #printing }
FMXMLPrinter >> printEntityLineBreak [
^ self crTabs
]
{ #category : #parsing }
FMXMLPrinter >> printEntityOpener [
stream nextPut: $>.
indent := indent + 1.
self crTabs
]
{ #category : #parsing }
FMXMLPrinter >> referenceName: name [
Expand Down

0 comments on commit 028897f

Please sign in to comment.