The Trunk: Morphic-mt.1598.mcz

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

The Trunk: Morphic-mt.1598.mcz

commits-2
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1598.mcz

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

Name: Morphic-mt.1598
Author: mt
Time: 3 December 2019, 2:02:47.214677 pm
UUID: 8ee5a31c-f69f-6049-b274-c3dcbbdec38e
Ancestors: Morphic-eem.1597

Harmonize all find*-parsing methods used in text editors.

=============== Diff against Morphic-eem.1597 ===============

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

Item was changed:
  ----- Method: TextEditor>>selectedSelector (in category 'menu messages') -----
  selectedSelector
+ "Try to make a selector out of the current text selection."
+
+ ^ self selection string findSelector!
- "Try to make a selector out of the current text selection"
- ^self selection string findSelector!

Item was changed:
  ----- Method: TextEditor>>selectedSymbol (in category 'menu messages') -----
  selectedSymbol
+ "Try to make a symbol out of the current text selection."
- "Return the currently selected symbol, or nil if none.  Spaces, tabs and returns are ignored"
 
+ ^ self selection string findSymbol!
- | aString |
- self hasCaret ifTrue: [^ nil].
- aString := self selection string copyWithoutAll: CharacterSet separators.
- aString size = 0 ifTrue: [^ nil].
- Symbol hasInterned: aString  ifTrue: [:sym | ^ sym].
-
- ^ nil!