Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

9 tests are broken since famix parametric update #10

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions src/Carrefour-FastAndBindingGenerator/CRFBinderVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -278,17 +278,23 @@ CRFBinderVisitor >> visitFASTJavaMethodEntity: aFASTJavaMethodEntity [

{ #category : #visitor }
CRFBinderVisitor >> visitFASTJavaMethodInvocation: aFASTJavaMethodInvocation [
(self sourceFamixEntity queryAllOutgoingInvocations
select: [ :invoc |
(invoc hasSourceAnchor
ifTrue: [ | sourceStartPos |
sourceStartPos := self sourceFamixEntityStartPo.
invoc sourceAnchor startPos - sourceStartPos >= (aFASTJavaMethodInvocation startPos - 1)
and: [ invoc sourceAnchor endPos - sourceStartPos <= (aFASTJavaMethodInvocation endPos + 1) ] ]
ifFalse: [ invoc to first name beginsWith: aFASTJavaMethodInvocation name ]) ])
ifNotEmpty: [ :collectionOfPotentialInvoc |
(collectionOfPotentialInvoc sorted: [ :invoc1 :invoc2 | invoc1 sourceAnchor intervalAsCharPos size > invoc2 sourceAnchor intervalAsCharPos size ]) first
fast: aFASTJavaMethodInvocation ].

(self sourceFamixEntity queryAllOutgoingInvocations select: [ :invoc |
invoc hasSourceAnchor
ifTrue: [
| sourceStartPos |
sourceStartPos := self sourceFamixEntityStartPo.
invoc sourceAnchor startPos - sourceStartPos
>= (aFASTJavaMethodInvocation startPos - 1) and: [
invoc sourceAnchor endPos - sourceStartPos
<= (aFASTJavaMethodInvocation endPos + 1) ] ]
ifFalse: [
invoc target first name beginsWith: aFASTJavaMethodInvocation name ] ])
ifNotEmpty: [ :collectionOfPotentialInvoc |
(collectionOfPotentialInvoc sorted: [ :invoc1 :invoc2 |
invoc1 sourceAnchor intervalAsCharPos size
> invoc2 sourceAnchor intervalAsCharPos size ]) first fast:
aFASTJavaMethodInvocation ].
super visitFASTJavaMethodInvocation: aFASTJavaMethodInvocation
]

Expand Down
2 changes: 2 additions & 0 deletions src/Carrefour-Model/CRFModel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Does not define any entity, but ""imports"" entities from Famix and FAST and add
Class {
#name : #CRFModel,
#superclass : #MooseModel,
#traits : 'FASTJavaTEntityCreator + FASTTEntityCreator + FamixJavaTEntityCreator',
#classTraits : 'FASTJavaTEntityCreator classTrait + FASTTEntityCreator classTrait + FamixJavaTEntityCreator classTrait',
#category : #'Carrefour-Model-Model'
}

Expand Down
Loading
Loading