--- a/SmallSense__ParseTreeInspector.st Tue Feb 03 05:38:59 2015 +0000
+++ b/SmallSense__ParseTreeInspector.st Thu Feb 05 07:27:07 2015 +0000
@@ -558,14 +558,10 @@
update:something with:aParameter from:changedObject
"Invoked when an object that I depend upon sends a change notification."
- "stub code automatically generated - please change as required"
-
sourceView notNil ifTrue:[
- changedObject == sourceView cursorLineHolder ifTrue:[
- self updateSelectionFromCursor.
- ^ self.
- ].
- changedObject == sourceView cursorColHolder ifTrue:[
+ "/ cursor moved by user...
+ ((changedObject == sourceView cursorLineHolder)
+ or:[ changedObject == sourceView cursorColHolder ]) ifTrue:[
self updateSelectionFromCursor.
^ self.
].
@@ -612,20 +608,25 @@
updateSourceViewSelection
- | astNode startPosition stopPosition |
+ | astNode parseNode startPosition stopPosition |
+
sourceView ifNil:[^self].
(astNode := self selection) ifNil:[^self].
- astNode node isNil ifTrue:[ ^ self ].
- (startPosition := astNode node startPosition)
+ (parseNode := astNode node) isNil ifTrue:[ ^ self ].
+
+ (startPosition := parseNode startPosition)
ifNil:[^sourceView unselect].
- (stopPosition := astNode node endPosition)
+ (stopPosition := parseNode endPosition)
ifNil:[^sourceView unselect].
- sourceView
- selectFromCharacterPosition: startPosition
- to: stopPosition.
- sourceView makeCursorVisible
-
+ "/ avoid cyclic update (from changed cursor)
+ "/ (which would deselect again)
+ sourceView cursorLineHolder withoutUpdating:self do:[
+ sourceView cursorColHolder withoutUpdating:self do:[
+ sourceView selectFromCharacterPosition: startPosition to: stopPosition.
+ sourceView makeCursorVisible
+ ]
+ ]
"Created: / 12-04-2007 / 12:29:42 / janfrog"
"Modified: / 07-08-2014 / 10:21:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
@@ -643,7 +644,7 @@
!ParseTreeInspector::ParseTreeItem class methodsFor:'documentation'!
version
- ^'$Id$'
+ ^'$Header: /cvs/stx/stx/goodies/smallsense/SmallSense__ParseTreeInspector.st,v 1.2 2015-02-04 09:46:31 cg Exp $'
! !
!ParseTreeInspector::ParseTreeItem methodsFor:'accessing'!
@@ -712,18 +713,25 @@
!
label
- | label start stop |
+ | label start stop optionalSelector |
astNode isNil ifTrue:[ ^ 'No AST' ].
start := astNode startPosition.
stop := astNode endPosition.
- label := '%1 {%2} [%3..%4]'
+ astNode isMessage ifTrue:[
+ optionalSelector := ' #',astNode selector allBold.
+ ] ifFalse:[
+ optionalSelector := ''
+ ].
+ label := '%1 {%2%5} [%3..%4]'
bindWith: self ivarName
with: self astNodeName
with: start ? '?'
- with: stop ? '?'.
+ with: stop ? '?'
+ with: optionalSelector.
+
(start isNil or:[ stop isNil ]) ifTrue:[
label := label asText colorizeAllWith: Color red.
].
@@ -761,12 +769,20 @@
!ParseTreeInspector class methodsFor:'documentation'!
+version
+ ^ '$Header: /cvs/stx/stx/goodies/smallsense/SmallSense__ParseTreeInspector.st,v 1.2 2015-02-04 09:46:31 cg Exp $'
+!
+
+version_CVS
+ ^ '$Path: stx/goodies/smallsense/SmallSense__ParseTreeInspector.st, Version: 1.0, User: cg, Time: 2015-02-04T10:46:56.332+01$'
+!
+
version_HG
^ '$Changeset: <not expanded> $'
!
version_SVN
- ^ '$Id$'
+ ^ '$Id: SmallSense__ParseTreeInspector.st,v 1.2 2015-02-04 09:46:31 cg Exp $'
! !
--- a/stx_goodies_smallsense.st Tue Feb 03 05:38:59 2015 +0000
+++ b/stx_goodies_smallsense.st Thu Feb 05 07:27:07 2015 +0000
@@ -48,6 +48,15 @@
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
"
+!
+
+documentation
+"
+ Package documentation:
+
+ Jan Vrany's productivity tools for the Smalltalk code editor.
+ Includes different code completion engine, bracket insertion and other enhancements.
+"
! !
!stx_goodies_smallsense class methodsFor:'accessing - tests'!
@@ -505,12 +514,20 @@
!stx_goodies_smallsense class methodsFor:'documentation'!
+version
+ ^ '$Header: /cvs/stx/stx/goodies/smallsense/stx_goodies_smallsense.st,v 1.2 2015-02-03 22:23:33 cg Exp $'
+!
+
+version_CVS
+ ^ '$Path: stx/goodies/smallsense/stx_goodies_smallsense.st, Version: 1.0, User: cg, Time: 2015-02-03T23:23:58.941+01$'
+!
+
version_HG
^ '$Changeset: <not expanded> $'
!
version_SVN
- ^ '$Id$'
+ ^ '$Id: stx_goodies_smallsense.st,v 1.2 2015-02-03 22:23:33 cg Exp $'
! !