Skip to content

Commit

Permalink
Merge branch 'v4' into v4
Browse files Browse the repository at this point in the history
  • Loading branch information
badetitou committed May 26, 2023
2 parents 91d045a + 78c0e44 commit 6f3e4eb
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,31 @@ Extension { #name : #FamixJavaInterface }
FamixJavaInterface >> bindFastModel: fastModel usingBinder: binder [
binder bindFastModel: fastModel fromFamixClassEntity: self
]

{ #category : #'*Carrefour-FastAndBindingGenerator' }
FamixJavaInterface >> generateFastAndBind [
| fastModel |
self assert: self sourceAnchor isNotNil.
fastModel := self getFASTModel
metamodel: CRFModel metamodel;
yourself.
self bindFastModel: fastModel usingBinder: CRFBinderVisitor new.
^ fastModel
]

{ #category : #'*Carrefour-FastAndBindingGenerator' }
FamixJavaInterface >> generateFastIfNotDoneAndBind [

self fastDeclaration ifNotEmpty: [
^ self fastDeclaration anyOne mooseModel ].
self fastTypeDefinition ifNotNil: [
^ self fastTypeDefinition mooseModel ].
^ self isAnonymousClass
ifFalse: [ self generateFastAndBind ]
ifTrue: [
((self
allAtScope: FamixTClass
until: [ :c |
(c isKindOf: FamixJavaClass) and: [ c isAnonymousClass not ] ])
asOrderedCollection \ { self }) anyOne generateFastAndBind ]
]
28 changes: 28 additions & 0 deletions src/Carrefour-FastAndBindingGenerator/FamixTClass.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,31 @@ Extension { #name : #FamixTClass }
FamixTClass >> bindFastModel: fastModel usingBinder: binder [
binder bindFastModel: fastModel fromFamixClassEntity: self
]

{ #category : #'*Carrefour-FastAndBindingGenerator' }
FamixTClass >> generateFastAndBind [
| fastModel |
self assert: self sourceAnchor isNotNil.
fastModel := self getFASTModel
metamodel: CRFModel metamodel;
yourself.
self bindFastModel: fastModel usingBinder: CRFBinderVisitor new.
^ fastModel
]

{ #category : #'*Carrefour-FastAndBindingGenerator' }
FamixTClass >> generateFastIfNotDoneAndBind [

self fastDeclaration ifNotEmpty: [
^ self fastDeclaration anyOne mooseModel ].
self fastTypeDefinition ifNotNil: [
^ self fastTypeDefinition mooseModel ].
^ self isAnonymousClass
ifFalse: [ self generateFastAndBind ]
ifTrue: [
((self
allAtScope: FamixTClass
until: [ :c |
(c isKindOf: FamixJavaClass) and: [ c isAnonymousClass not ] ])
asOrderedCollection \ { self }) anyOne generateFastAndBind ]
]
17 changes: 17 additions & 0 deletions src/Carrefour-FastAndBindingGenerator/FamixTMethod.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,20 @@ Extension { #name : #FamixTMethod }
FamixTMethod >> bindFastModel: fastModel usingBinder: binder [
binder bindFastModel: fastModel fromFamixMethodEntity: self
]

{ #category : #'*Carrefour-FastAndBindingGenerator' }
FamixTMethod >> generateFastAndBind [
| fastModel |
self assert: self sourceAnchor isNotNil.
fastModel := self getFASTModel
metamodel: CRFModel metamodel;
yourself.
self bindFastModel: fastModel usingBinder: CRFBinderVisitor new.
^ fastModel
]

{ #category : #'*Carrefour-FastAndBindingGenerator' }
FamixTMethod >> generateFastIfNotDoneAndBind [
self fast ifNotNil: [ ^ self fast mooseModel ].
^ self generateFastAndBind
]

0 comments on commit 6f3e4eb

Please sign in to comment.