|
If you place your cursor on a method in a block, and press cmd-M (to browse implementors) it doesn't correctly resolve to search for the current method - it seems to highlight the entire line of source and try and resolve the implementors from that. This is quite confusing particularly for a cascaded method as it won't find anything.
e.g.
In a new image go to
SortedCollection>>collect: aBlock "Evaluate aBlock with each of my elements as the argument. Collect the resulting values into an OrderedCollection. Answer the new collection. Override the superclass in order to produce an OrderedCollection instead of a SortedCollection."
| newCollection | newCollection := OrderedCollection new: self size. self do: [:each | newCollection addLast: (aBlock value: each)]. ^ newCollection
Put your cursor on #addLast: (say click on the L) - and press cmd-M. It should find the implementors of addLast: not do: as it currently does.
A more extreme example (and how I found this) was code like the following:
sprintsIn: aTimeSpan fromJira: aJira "Answer the sprints that start in @aTimeSpan (typically a Mnth)"
^ (self sprints select: [ :s | s isPlanned and: [ aTimeSpan includes: s startDate ] ]) do: [ :s | s populateIssuesFromJira: aJira ]; yourself
Putting my cursor on populateIssuesFromJira: finds nothing due to the ; cascade on that line. However if I put a CR in front of the "s populate...." then it will find something.
I think the lookup is very naive - I would expect it to map a cursor position to an AST node and then correctly lookup on that (this is how Dolphin smalltalk did it, but i'm not sure if Pharo has that line/cursor mapping to source and AST node to make this possible?)
|
|
|
Priority: 3 – Must Fix
|
|
Status: Work Needed
|
|
Assigned to: Everyone
|
|
Milestone: Pharo7.0
|
Go to Case
|
|