Skip to content

Commit a8abb26

Browse files
committed
Fixing the issue of wrong positions
1 parent b5fff9a commit a8abb26

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/FamixJavaModelUpdater/FJMUModelUpdater.class.st

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ FJMUModelUpdater >> updateAssociationFor: newlyCreatedEntity [
118118
famixModel: newlyCreatedEntity mooseModel;
119119
fastModel: self fastModel;
120120
famixEntity: famixEntity;
121-
newStartPosition: self newStartPosition;
122-
newEndPosition: self newEndPosition;
123121
fileAnchorPath: self fileAnchorPath;
124122
newFamixEntity: newlyCreatedEntity;
125123
update

src/FamixJavaModelUpdater/TFJMUEntityFactory.trait.st

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,16 @@ TFJMUEntityFactory >> fileAnchorPath: anObject [
7676
{ #category : 'model - create' }
7777
TFJMUEntityFactory >> generateAnchorBasedOn: famixSourceAnchor for: aFastJavaEntity [
7878

79-
| safeStart |
80-
81-
safeStart := self newStartPosition
82-
ifNotNil: [ :pos | pos - 1 ]
83-
ifNil: [ 0 ].
79+
| safeStart safeEnd|
80+
safeStart := self newStartPosition
81+
ifNil: [ aFastJavaEntity startPos ].
82+
83+
safeEnd := self newEndPosition
84+
ifNil: [ aFastJavaEntity endPos ].
8485

8586
^ (self create: FamixJavaIndexedFileAnchor)
86-
startPos: safeStart + aFastJavaEntity startPos ;
87-
endPos: safeStart + aFastJavaEntity endPos ;
87+
startPos: safeStart;
88+
endPos: safeEnd;
8889
fileName: famixSourceAnchor ;
8990
yourself
9091
]

0 commit comments

Comments
 (0)