The Trunk: Morphic-eem.1596.mcz

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

The Trunk: Morphic-eem.1596.mcz

commits-2
Eliot Miranda uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-eem.1596.mcz

==================== Summary ====================

Name: Morphic-eem.1596
Author: eem
Time: 29 November 2019, 4:50:37.46714 pm
UUID: e4ca2f3d-c9db-4468-bb91-cf698317b2f1
Ancestors: Morphic-mt.1595

Have seNders in the text editor also look up references to literals.

=============== Diff against Morphic-mt.1595 ===============

Item was changed:
  ----- Method: TextEditor>>selectedSelector (in category 'menu messages') -----
  selectedSelector
  "Try to make a selector out of the current text selection"
+ | tokens |
+ tokens := Scanner new typedScanTokens: self selection string.
+ ^tokens isEmpty ifFalse: [tokens first]!
- ^self selection string findSelector!

Item was changed:
  ----- Method: TextEditor>>sendersOfIt (in category 'menu messages') -----
  sendersOfIt
  "Open a senders browser on the selected selector"
 
- | aSelector |
  self lineSelectAndEmptyCheck: [^ self].
+ self selectedSelector ifNotNil:
+ [:aSelector| ^self systemNavigation browseAllCallsOn: aSelector].
+ self selectedLiteral ifNotNil:
+ [:aLiteral| ^self systemNavigation browseAllCallsOn: aLiteral].
+ morph flash!
- (aSelector := self selectedSelector) == nil ifTrue: [^ morph flash].
- self systemNavigation browseAllCallsOn: aSelector!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-eem.1596.mcz

marcel.taeumel
Hi Eliot.

I don't think this works as expected. Please take a look at StringTest >> testFindSelector. The semantics of String >> #findSelector and Scanner >> #typedScanTokens: seem quite different.

Also, you forgot to commit TextEditor >> #selectedLiteral to make #sendersOfIt work as you intended.

Should we roll back this commit and polish it through the inbox first? ;-)

Best,
Marcel

Am 30.11.2019 01:50:55 schrieb [hidden email] <[hidden email]>:

Eliot Miranda uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-eem.1596.mcz

==================== Summary ====================

Name: Morphic-eem.1596
Author: eem
Time: 29 November 2019, 4:50:37.46714 pm
UUID: e4ca2f3d-c9db-4468-bb91-cf698317b2f1
Ancestors: Morphic-mt.1595

Have seNders in the text editor also look up references to literals.

=============== Diff against Morphic-mt.1595 ===============

Item was changed:
----- Method: TextEditor>>selectedSelector (in category 'menu messages') -----
selectedSelector
"Try to make a selector out of the current text selection"
+ | tokens |
+ tokens := Scanner new typedScanTokens: self selection string.
+ ^tokens isEmpty ifFalse: [tokens first]!
- ^self selection string findSelector!

Item was changed:
----- Method: TextEditor>>sendersOfIt (in category 'menu messages') -----
sendersOfIt
"Open a senders browser on the selected selector"

- | aSelector |
self lineSelectAndEmptyCheck: [^ self].
+ self selectedSelector ifNotNil:
+ [:aSelector| ^self systemNavigation browseAllCallsOn: aSelector].
+ self selectedLiteral ifNotNil:
+ [:aLiteral| ^self systemNavigation browseAllCallsOn: aLiteral].
+ morph flash!
- (aSelector := self selectedSelector) == nil ifTrue: [^ morph flash].
- self systemNavigation browseAllCallsOn: aSelector!




Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-eem.1596.mcz

marcel.taeumel
More importantly: what do you mean by "also look up references to literals"? This is already happening. See implementors of #allLiteralsDo:.

Or are you referring to the to-dos in CompiledCode >> #allLiteralsDo: and CompiledMethod >> #allLiteralsDo:?

Best,
Marcel

Am 30.11.2019 10:43:33 schrieb Marcel Taeumel <[hidden email]>:

Hi Eliot.

I don't think this works as expected. Please take a look at StringTest >> testFindSelector. The semantics of String >> #findSelector and Scanner >> #typedScanTokens: seem quite different.

Also, you forgot to commit TextEditor >> #selectedLiteral to make #sendersOfIt work as you intended.

Should we roll back this commit and polish it through the inbox first? ;-)

Best,
Marcel

Am 30.11.2019 01:50:55 schrieb [hidden email] <[hidden email]>:

Eliot Miranda uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-eem.1596.mcz

==================== Summary ====================

Name: Morphic-eem.1596
Author: eem
Time: 29 November 2019, 4:50:37.46714 pm
UUID: e4ca2f3d-c9db-4468-bb91-cf698317b2f1
Ancestors: Morphic-mt.1595

Have seNders in the text editor also look up references to literals.

=============== Diff against Morphic-mt.1595 ===============

Item was changed:
----- Method: TextEditor>>selectedSelector (in category 'menu messages') -----
selectedSelector
"Try to make a selector out of the current text selection"
+ | tokens |
+ tokens := Scanner new typedScanTokens: self selection string.
+ ^tokens isEmpty ifFalse: [tokens first]!
- ^self selection string findSelector!

Item was changed:
----- Method: TextEditor>>sendersOfIt (in category 'menu messages') -----
sendersOfIt
"Open a senders browser on the selected selector"

- | aSelector |
self lineSelectAndEmptyCheck: [^ self].
+ self selectedSelector ifNotNil:
+ [:aSelector| ^self systemNavigation browseAllCallsOn: aSelector].
+ self selectedLiteral ifNotNil:
+ [:aLiteral| ^self systemNavigation browseAllCallsOn: aLiteral].
+ morph flash!
- (aSelector := self selectedSelector) == nil ifTrue: [^ morph flash].
- self systemNavigation browseAllCallsOn: aSelector!