FogBugz (Case [Issue]20155) Nautilus - Browse implementers of in Nautilus doesn't parse source code properly for methods in a block

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

FogBugz (Case [Issue]20155) Nautilus - Browse implementers of in Nautilus doesn't parse source code properly for methods in a block

Pharo Issue Tracker
FogBugz Notification
avatar
Bug in Project:  Nautilus: 1. Pharo Image  •  You are subscribed to this case
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 Priority: 3 – Must Fix Status Status: Work Needed
Assigned To Assigned to: Everyone Milestone Milestone: Pharo7.0

Go to Case
No longer need updates? Unsubscribe from this case.

Don't want FogBugz notifications anymore? Update your preferences.

FogBugz

_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
https://lists.gforge.inria.fr/mailman/listinfo/pharo-bugtracker