Skip to content

Commit

Permalink
better export for attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
badetitou committed Aug 14, 2020
1 parent 495586b commit 1dc3e10
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/Famix2Java/FAMIX2JavaVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -198,24 +198,30 @@ FAMIX2JavaVisitor >> visitAttribute: aAttribute [
"Visit an attribute to print its annotations and its field."

" Printing the annotations for the attribute"

aAttribute annotationInstances
do: [ :annotationInstance |
self clone visit: annotationInstance.
self crlf ].

"Printing modifiers"
self indent.
aAttribute modifiers do: [ :modifier | self <<< modifier; space ].

self indent.
aAttribute modifiers
do: [ :modifier |
self
<<< modifier;
space ].

"Declared Type"
self printDeclaredType: aAttribute declaredType.
"Attribute name"
self
space;
<<< aAttribute name;
space.
<<< aAttribute name.
(aAttribute sourceAnchor sourceText includesSubstring: '=')
ifTrue: [ self <<< (aAttribute sourceAnchor sourceText copyFrom: (aAttribute sourceAnchor sourceText findString: '=') to: aAttribute sourceAnchor sourceText size) ].
ifTrue: [ self
space;
<<< (aAttribute sourceAnchor sourceText copyFrom: (aAttribute sourceAnchor sourceText findString: '=') to: aAttribute sourceAnchor sourceText size) ].
self <<< ';'
]

Expand Down

0 comments on commit 1dc3e10

Please sign in to comment.