Skip to content

Commit

Permalink
refactoring of visitMethod to make it more modular
Browse files Browse the repository at this point in the history
  • Loading branch information
badetitou committed Jun 5, 2024
1 parent 783ccbc commit 64effa4
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/Famix2Java/FAMIX2JavaVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,17 @@ FAMIX2JavaVisitor >> printMethodAnnotations: aMethod [
self eol ]
]

{ #category : #accessing }
FAMIX2JavaVisitor >> printStatementBlockOf: aMethod [

self << ' {'.
self eol.
self << aMethod bodySourceText.
self
eol;
<<| '}'
]

{ #category : #accessing }
FAMIX2JavaVisitor >> reset [
tabs := 0.
Expand Down Expand Up @@ -466,13 +477,7 @@ FAMIX2JavaVisitor >> visitMethod: aMethod [
(aMethod parentType isInterface or: [
aMethod isAbstract isNotNil and: [ aMethod isAbstract ] ])
ifTrue: [ self << ';' ]
ifFalse: [
self << ' {'.
self eol.
self << aMethod bodySourceText.
self
eol;
<<| '}' ]
ifFalse: [ self printStatementBlockOf: aMethod ]
]

{ #category : #visiting }
Expand Down

0 comments on commit 64effa4

Please sign in to comment.