You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"In case of a relative path we need to find the origin package for the resolution"
52
52
remainingPath := path allButFirst.
53
-
currentPackage := (currentEntity query ancestorsofType:FamixTPackage) anyOne. "If we have a module, we need to start with its parent package. If we have a package, it starts in itself."
53
+
currentPackage := (currentEntity query containersofType:FamixTPackage) anyOne. "If we have a module, we need to start with its parent package. If we have a package, it starts in itself."
"We trim the path because we can have spaces after the dots in relativ paths."
63
-
selffindTargetEntityFor: remainingPath trim from: possibleEntities ].
64
-
65
-
66
-
"If we have an import all then we import the targeted module directly."
60
+
possibleEntities := currentEntity rootContainers flatCollect:#children ]. "We trim the path because we can have spaces after the dots in relativ paths."
61
+
selffindTargetEntityFor: remainingPath trim from: possibleEntities ]. "If we have an import all then we import the targeted module directly."
"It is possible that we have multiple entities with the same name and in that case, python select the last one declared. So we sort by source anchor position to find this one."
64
+
ifFalse: [ targetModule allContainedEntities select: [ :child | child isNamedEntity and: [ child name = entityName ] ] ]. "It is possible that we have multiple entities with the same name and in that case, python select the last one declared. So we sort by source anchor position to find this one."
"I'm managing the write access to an identifier. I have an alternative for access to an attibute such as `instance.var = 3`. See #manageAttributeWriteAccessTo: for this."
583
583
584
584
| variablename |
585
-
name := aNode sourceText.
586
-
587
-
"If we have a variable of this name already, we should not recreate it. Except if this variable got shadowed! In that case, we should recreate it."
name := aNode sourceText. "If we have a variable of this name already, we should not recreate it. Except if this variable got shadowed! In that case, we should recreate it."
0 commit comments