Skip to content

Commit

Permalink
can bind interface
Browse files Browse the repository at this point in the history
  • Loading branch information
badetitou committed Sep 23, 2022
1 parent e6f0c62 commit 704d0f2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Class {
{ #category : #running }
CRFBindingInterfaceDefinitionTest >> setUp [
super setUp.
helloClass := (self famixModel allModelClasses detect: [:class | class name = #'MyInterface']).
helloClass := ((self famixModel allWithType: FamixJavaInterface) detect: [:class | class name = #'MyInterface']).
fastModel := (JavaSmaCCProgramNodeImporterVisitor new parseCodeString: (self sourceCodeOfClass: helloClass))
name: #fastModel;
yourself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ CRFBinderVisitor >> visitFASTJavaInitializer: aFASTJavaInitializer [
{ #category : #visitor }
CRFBinderVisitor >> visitFASTJavaInterfaceDeclaration: aFASTJavaInterfaceDeclaration [

(self sourceFamixEntity allToScope: FamixTClass)
(self sourceFamixEntity allToAnyScope: {FamixTClass . FamixJavaInterface})
detect: [ :class |
class isAnonymousClass not and: [
class name = aFASTJavaInterfaceDeclaration name ] ]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Extension { #name : #FamixJavaInterface }

{ #category : #'*Carrefour-FastAndBindingGenerator' }
FamixJavaInterface >> bindFastModel: fastModel usingBinder: binder [
binder bindFastModel: fastModel fromFamixClassEntity: self
]

0 comments on commit 704d0f2

Please sign in to comment.