--- a/DSVColumnView.st Tue Sep 20 07:03:06 2016 +0200
+++ b/DSVColumnView.st Fri Sep 23 07:02:31 2016 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1997 by Claus Gittinger / eXept Software AG
All Rights Reserved
@@ -3851,8 +3849,8 @@
!
viewOrigin
- "return the viewOrigin; thats the coordinate of the contents
- which is shown topLeft in the view."
+ "return the viewOrigin;
+ that's the coordinate of the contents which is shown topLeft in the view."
^ viewOrigin
!
--- a/DoWhatIMeanSupport.st Tue Sep 20 07:03:06 2016 +0200
+++ b/DoWhatIMeanSupport.st Fri Sep 23 07:02:31 2016 +0200
@@ -5115,7 +5115,7 @@
globalFactor localFactor selectorOfMessageToNode tree implementors argIdx namesUsed kwPart|
classOrNil notNil ifTrue:[
- nonMetaClass := classOrNil theNonMetaclass.
+ nonMetaClass := classOrNil theNonMetaclass.
].
nm := node name.
@@ -5126,87 +5126,87 @@
crsrPos := codeView characterPositionOfCursor.
char := codeView characterAtCharacterPosition:crsrPos-1.
char isSeparator ifTrue:[
- classOrNil isNil ifTrue:[
- nodeVal := Smalltalk at:nm asSymbol.
- ] ifFalse:[
- nodeVal := classOrNil topNameSpace at:nm asSymbol ifAbsent:[Smalltalk at:nm asSymbol].
- ].
- nodeVal isBehavior ifTrue:[
- |methods menu exitKey idx|
-
- methods := nodeVal class methodDictionary values
- select:[:m | |cat|
- cat := m category asLowercase.
- cat = 'instance creation'
- ].
-
- menu := PopUpMenu labels:(methods collect:[:each | each selector]).
- menu hideOnKeyFilter:[:key | |hide|
- hide := ( #( CursorDown CursorUp Escape Return ) includes: key) not.
- hide ifTrue:[
- exitKey := key.
- ].
- hide].
-
- idx := menu startUp.
- idx == 0 ifTrue:[
- exitKey notNil ifTrue:[
- codeView keyPress:exitKey x:0 y:0.
- ].
- ^ self
- ].
- best := (methods at:idx) selector.
- codeView
- undoableDo:[
- codeView insertString:best atCharacterPosition:crsrPos.
- codeView cursorToCharacterPosition:crsrPos+best size.
- ]
- info:'completion'.
- ^ self.
- ].
+ classOrNil isNil ifTrue:[
+ nodeVal := Smalltalk at:nm asSymbol.
+ ] ifFalse:[
+ nodeVal := classOrNil topNameSpace at:nm asSymbol ifAbsent:[Smalltalk at:nm asSymbol].
+ ].
+ nodeVal isBehavior ifTrue:[
+ |methods menu exitKey idx|
+
+ methods := nodeVal class methodDictionary values
+ select:[:m | |cat|
+ cat := m category asLowercase.
+ cat = 'instance creation'
+ ].
+
+ menu := PopUpMenu labels:(methods collect:[:each | each selector]).
+ menu hideOnKeyFilter:[:key | |hide|
+ hide := ( #( CursorDown CursorUp Escape Return ) includes: key) not.
+ hide ifTrue:[
+ exitKey := key.
+ ].
+ hide].
+
+ idx := menu startUp.
+ idx == 0 ifTrue:[
+ exitKey notNil ifTrue:[
+ codeView keyPress:exitKey x:0 y:0.
+ ].
+ ^ self
+ ].
+ best := (methods at:idx) selector.
+ codeView
+ undoableDo:[
+ codeView insertString:best atCharacterPosition:crsrPos.
+ codeView cursorToCharacterPosition:crsrPos+best size.
+ ]
+ info:'completion'.
+ ^ self.
+ ].
].
((parent := node parent) notNil and:[parent isMessage]) ifTrue:[
- node == parent receiver ifTrue:[
- selectorOfMessageToNode := parent selector
- ]
+ node == parent receiver ifTrue:[
+ selectorOfMessageToNode := parent selector
+ ]
].
getDistanceComputeBlockWithWeight :=
- [:weight |
- [:each |
- |dist factor|
-
- dist := each spellAgainst:nm.
- factor := 1.
-
- (each startsWith:nm) ifTrue:[
- factor := 6 * nm size.
- ] ifFalse:[
- (each asLowercase startsWith:nm asLowercase) ifTrue:[
- factor := 4 * nm size.
- ].
- ].
- dist := dist + (weight*factor).
-
- each -> (dist * weight)
- ]
- ].
+ [:weight |
+ [:each |
+ |dist factor|
+
+ dist := each spellAgainst:nm.
+ factor := 1.
+
+ (each startsWith:nm) ifTrue:[
+ factor := 6 * nm size.
+ ] ifFalse:[
+ (each asLowercase startsWith:nm asLowercase) ifTrue:[
+ factor := 4 * nm size.
+ ].
+ ].
+ dist := dist + (weight*factor).
+
+ each -> (dist * weight)
+ ]
+ ].
addWithFactorBlock :=
- [:eachNames :factor | |namesToAdd|
- namesToAdd := eachNames select:[:nameToAdd | nameToAdd ~= nm ].
- namesToAdd := namesToAdd reject:[:each | allVariables includes:each ].
- allVariables addAll:namesToAdd.
- allDistances addAll:(namesToAdd collect:(getDistanceComputeBlockWithWeight value:factor)).
- ].
+ [:eachNames :factor | |namesToAdd|
+ namesToAdd := eachNames select:[:nameToAdd | nameToAdd ~= nm ].
+ namesToAdd := namesToAdd reject:[:each | allVariables includes:each ].
+ allVariables addAll:namesToAdd.
+ allDistances addAll:(namesToAdd collect:(getDistanceComputeBlockWithWeight value:factor)).
+ ].
nm isUppercaseFirst ifTrue:[
- globalFactor := 2. "/ favour globals
- localFactor := 1.
+ globalFactor := 2. "/ favour globals
+ localFactor := 1.
] ifFalse:[
- globalFactor := 1. "/ favour locals
- localFactor := 2.
+ globalFactor := 1. "/ favour locals
+ localFactor := 2.
].
allVariables := OrderedCollection new.
@@ -5216,209 +5216,209 @@
((parent := node parent) notNil
and:[parent isMethod
and:[parent arguments includes:node]]) ifTrue:[
- "/ now thats cool: look how the naem of this argument is in other implementations
- "/ of this method, and take that as a basis of the selection
-
- implementors := SystemBrowser
- findImplementorsOf:(parent selector)
- in:(Smalltalk allClasses)
- ignoreCase:false.
- "/ which argument is it
- argIdx := parent arguments indexOf:node.
- implementors size > 50 ifTrue:[
- implementors := implementors asOrderedCollection copyTo:50.
- ].
- namesUsed := implementors
- collect:[:eachImplementor |
- |parseTree|
- parseTree := eachImplementor parseTree.
- (parseTree notNil and:[parseTree arguments size > 0])
- ifFalse:nil
- ifTrue:[ (parseTree arguments at:argIdx) name] ]
- thenSelect:[:a | a notNil] as:Set.
-
- addWithFactorBlock value:namesUsed value:(2 * localFactor).
-
- classOrNil notNil ifTrue:[
- "/ also, look for the keyword before the argument,
- "/ and see if there is such an instVar
- "/ if so, add it with -Arg
- parent selector isKeyword ifTrue:[
- kwPart := parent selector keywords at:argIdx.
- (classOrNil allInstVarNames includes:(kwPart copyButLast:1)) ifTrue:[
- addWithFactorBlock
- value:(classOrNil allInstVarNames collect:[:nm| nm,'Arg'])
- value:(1 * localFactor).
- ].
- ].
- ]
+ "/ now that's cool: look how the naem of this argument is in other implementations
+ "/ of this method, and take that as a basis of the selection
+
+ implementors := SystemBrowser
+ findImplementorsOf:(parent selector)
+ in:(Smalltalk allClasses)
+ ignoreCase:false.
+ "/ which argument is it
+ argIdx := parent arguments indexOf:node.
+ implementors size > 50 ifTrue:[
+ implementors := implementors asOrderedCollection copyTo:50.
+ ].
+ namesUsed := implementors
+ collect:[:eachImplementor |
+ |parseTree|
+ parseTree := eachImplementor parseTree.
+ (parseTree notNil and:[parseTree arguments size > 0])
+ ifFalse:nil
+ ifTrue:[ (parseTree arguments at:argIdx) name] ]
+ thenSelect:[:a | a notNil] as:Set.
+
+ addWithFactorBlock value:namesUsed value:(2 * localFactor).
+
+ classOrNil notNil ifTrue:[
+ "/ also, look for the keyword before the argument,
+ "/ and see if there is such an instVar
+ "/ if so, add it with -Arg
+ parent selector isKeyword ifTrue:[
+ kwPart := parent selector keywords at:argIdx.
+ (classOrNil allInstVarNames includes:(kwPart copyButLast:1)) ifTrue:[
+ addWithFactorBlock
+ value:(classOrNil allInstVarNames collect:[:nm| nm,'Arg'])
+ value:(1 * localFactor).
+ ].
+ ].
+ ]
] ifFalse:[
- classOrNil notNil ifTrue:[
- "/ locals in the block/method
- |names|
-
- names := node allVariablesOnScope.
- "/ if there were no variables (due to a parse error)
- "/ do another parse and see what we have
- names isEmpty ifTrue:[
- tree := self treeForCode:(codeView contentsAsString string) allowErrors:true.
- "/ better if we already have a body (include locals then)
- "/ otherwise, only the arguments are considered
- tree notNil ifTrue:[
- names := (tree body ? tree) allVariablesOnScope.
- ]
- ].
-
- addWithFactorBlock value:names value:(4 * localFactor).
-
- "/ instance variables
- addWithFactorBlock value:classOrNil instVarNames value:(3 * localFactor).
-
- "/ inherited instance variables
- classOrNil superclass notNil ifTrue:[
- addWithFactorBlock value:classOrNil superclass allInstVarNames value:(2.5 * localFactor).
- ].
- ].
-
- selectorOfMessageToNode notNil ifTrue:[
- |names responders nonResponders|
-
- "/ responding to that messsage
-
- classOrNil notNil ifTrue:[
- "/ private classes
- addWithFactorBlock value:(nonMetaClass privateClasses collect:[:cls | cls nameWithoutPrefix])
- value:(1.75 * globalFactor).
-
- "/ class variables
- names := nonMetaClass classVarNames.
- responders := names select:[:classVar | (nonMetaClass classVarAt:classVar) respondsTo:selectorOfMessageToNode].
- nonResponders := names reject:[:classVar | (nonMetaClass classVarAt:classVar) respondsTo:selectorOfMessageToNode].
-
- addWithFactorBlock value:responders value:(1.5 * globalFactor).
- addWithFactorBlock value:nonResponders value:(0.5 * 1.5 * globalFactor).
-
- "/ superclass var names
- nonMetaClass allSuperclassesDo:[:superClass |
- names := superClass classVarNames.
- responders := names select:[:classVar | (superClass classVarAt:classVar) respondsTo:selectorOfMessageToNode].
- nonResponders := names reject:[:classVar | (superClass classVarAt:classVar) respondsTo:selectorOfMessageToNode].
-
- addWithFactorBlock value:responders value:(1 * globalFactor).
- addWithFactorBlock value:nonResponders value:(0.5 * 1 * globalFactor).
- ].
-
- "/ namespace vars
- classOrNil nameSpace ~~ Smalltalk ifTrue:[
- names := classOrNil topNameSpace keys.
- names := names reject:[:nm | nm includes:$:].
- names := names select:[:nm | nm isUppercaseFirst ].
- responders := names select:[:nsVar | |c| c := classOrNil topNameSpace at:nsVar. c isBehavior not or:[c isLoaded and:[c respondsTo:selectorOfMessageToNode]]].
- nonResponders := names reject:[:nsVar | |c| c := classOrNil topNameSpace at:nsVar. c isBehavior not or:[c isLoaded and:[c respondsTo:selectorOfMessageToNode]]].
- addWithFactorBlock value:responders value:(1.5 * globalFactor).
- addWithFactorBlock value:nonResponders value:(0.5 * 1.5 * globalFactor).
- ].
- ].
-
- "/ globals
- names := Smalltalk keys.
- "/ names := names reject:[:nm | nm includes:$:].
- names := names select:[:nm | nm isUppercaseFirst ].
- responders := names select:[:glblVar | |c| c := Smalltalk at:glblVar. c isBehavior not or:[c isLoaded and:[c respondsTo:selectorOfMessageToNode]]].
- nonResponders := names reject:[:glblVar | |c| c := Smalltalk at:glblVar. c isBehavior not or:[c isLoaded and:[c respondsTo:selectorOfMessageToNode]]].
- addWithFactorBlock value:responders value:(1.5 * globalFactor).
- addWithFactorBlock value:nonResponders value:(0.5 * 1.5 * globalFactor).
-
- "/ pool variables
- classOrNil theNonMetaclass sharedPoolNames do:[:poolName |
- |pool|
-
- pool := Smalltalk at:poolName.
- names := pool classVarNames.
- names := names select:[:nm | nm isUppercaseFirst ].
- responders := names select:[:glblVar | |c| c := Smalltalk at:glblVar. c isBehavior not or:[c isLoaded and:[c respondsTo:selectorOfMessageToNode]]].
- nonResponders := names reject:[:glblVar | |c| c := Smalltalk at:glblVar. c isBehavior not or:[c isLoaded and:[c respondsTo:selectorOfMessageToNode]]].
- addWithFactorBlock value:responders value:(2.5 * globalFactor).
- addWithFactorBlock value:nonResponders value:(0.5 * 2.5 * globalFactor).
- ].
- ] ifFalse:[
- |names|
-
- classOrNil notNil ifTrue:[
- "/ private classes
- addWithFactorBlock value:(nonMetaClass privateClasses collect:[:cls | cls nameWithoutPrefix])
- value:(1.75 * globalFactor).
-
- "/ class variables
- addWithFactorBlock value:nonMetaClass classVarNames value:(2.0 * globalFactor).
- classOrNil superclass notNil ifTrue:[
- addWithFactorBlock value:nonMetaClass superclass allClassVarNames value:(2.0 * globalFactor).
- ].
-
- "/ namespace vars
- classOrNil nameSpace ~~ Smalltalk ifTrue:[
- names := classOrNil nameSpace isNameSpace ifTrue:[classOrNil nameSpace keys] ifFalse:[classOrNil nameSpace privateClasses collect:[:c | c nameWithoutPrefix]].
- names := names select:[:nm | nm isUppercaseFirst ].
- addWithFactorBlock value:names value:(1.5 * globalFactor).
- ].
-
- "/ pool variables
- classOrNil theNonMetaclass sharedPoolNames do:[:poolName |
- |pool|
-
- pool := Smalltalk at:poolName.
- names := pool classVarNames.
- addWithFactorBlock value:names value:(2.5 * globalFactor).
- ].
- ].
-
- "/ globals
- names := Smalltalk keys.
- names := names select:[:nm | nm isUppercaseFirst ].
- addWithFactorBlock value:names value:(1.5 * globalFactor).
- ].
-
- "/ pseudos - assuming that thisContext is seldom used.
- "/ also assuming, that nil is short so its usually typed in.
- addWithFactorBlock value:#('self') value:(2.5 * localFactor).
- addWithFactorBlock value:#('nil') value:(0.5 * localFactor).
- addWithFactorBlock value:#('super' 'false') value:(2 * localFactor).
- addWithFactorBlock value:#('thisContext') value:(1 * localFactor).
- addWithFactorBlock value:#('true') value:(1 * localFactor).
- addWithFactorBlock value:#('false') value:(1 * localFactor).
+ classOrNil notNil ifTrue:[
+ "/ locals in the block/method
+ |names|
+
+ names := node allVariablesOnScope.
+ "/ if there were no variables (due to a parse error)
+ "/ do another parse and see what we have
+ names isEmpty ifTrue:[
+ tree := self treeForCode:(codeView contentsAsString string) allowErrors:true.
+ "/ better if we already have a body (include locals then)
+ "/ otherwise, only the arguments are considered
+ tree notNil ifTrue:[
+ names := (tree body ? tree) allVariablesOnScope.
+ ]
+ ].
+
+ addWithFactorBlock value:names value:(4 * localFactor).
+
+ "/ instance variables
+ addWithFactorBlock value:classOrNil instVarNames value:(3 * localFactor).
+
+ "/ inherited instance variables
+ classOrNil superclass notNil ifTrue:[
+ addWithFactorBlock value:classOrNil superclass allInstVarNames value:(2.5 * localFactor).
+ ].
+ ].
+
+ selectorOfMessageToNode notNil ifTrue:[
+ |names responders nonResponders|
+
+ "/ responding to that messsage
+
+ classOrNil notNil ifTrue:[
+ "/ private classes
+ addWithFactorBlock value:(nonMetaClass privateClasses collect:[:cls | cls nameWithoutPrefix])
+ value:(1.75 * globalFactor).
+
+ "/ class variables
+ names := nonMetaClass classVarNames.
+ responders := names select:[:classVar | (nonMetaClass classVarAt:classVar) respondsTo:selectorOfMessageToNode].
+ nonResponders := names reject:[:classVar | (nonMetaClass classVarAt:classVar) respondsTo:selectorOfMessageToNode].
+
+ addWithFactorBlock value:responders value:(1.5 * globalFactor).
+ addWithFactorBlock value:nonResponders value:(0.5 * 1.5 * globalFactor).
+
+ "/ superclass var names
+ nonMetaClass allSuperclassesDo:[:superClass |
+ names := superClass classVarNames.
+ responders := names select:[:classVar | (superClass classVarAt:classVar) respondsTo:selectorOfMessageToNode].
+ nonResponders := names reject:[:classVar | (superClass classVarAt:classVar) respondsTo:selectorOfMessageToNode].
+
+ addWithFactorBlock value:responders value:(1 * globalFactor).
+ addWithFactorBlock value:nonResponders value:(0.5 * 1 * globalFactor).
+ ].
+
+ "/ namespace vars
+ classOrNil nameSpace ~~ Smalltalk ifTrue:[
+ names := classOrNil topNameSpace keys.
+ names := names reject:[:nm | nm includes:$:].
+ names := names select:[:nm | nm isUppercaseFirst ].
+ responders := names select:[:nsVar | |c| c := classOrNil topNameSpace at:nsVar. c isBehavior not or:[c isLoaded and:[c respondsTo:selectorOfMessageToNode]]].
+ nonResponders := names reject:[:nsVar | |c| c := classOrNil topNameSpace at:nsVar. c isBehavior not or:[c isLoaded and:[c respondsTo:selectorOfMessageToNode]]].
+ addWithFactorBlock value:responders value:(1.5 * globalFactor).
+ addWithFactorBlock value:nonResponders value:(0.5 * 1.5 * globalFactor).
+ ].
+ ].
+
+ "/ globals
+ names := Smalltalk keys.
+ "/ names := names reject:[:nm | nm includes:$:].
+ names := names select:[:nm | nm isUppercaseFirst ].
+ responders := names select:[:glblVar | |c| c := Smalltalk at:glblVar. c isBehavior not or:[c isLoaded and:[c respondsTo:selectorOfMessageToNode]]].
+ nonResponders := names reject:[:glblVar | |c| c := Smalltalk at:glblVar. c isBehavior not or:[c isLoaded and:[c respondsTo:selectorOfMessageToNode]]].
+ addWithFactorBlock value:responders value:(1.5 * globalFactor).
+ addWithFactorBlock value:nonResponders value:(0.5 * 1.5 * globalFactor).
+
+ "/ pool variables
+ classOrNil theNonMetaclass sharedPoolNames do:[:poolName |
+ |pool|
+
+ pool := Smalltalk at:poolName.
+ names := pool classVarNames.
+ names := names select:[:nm | nm isUppercaseFirst ].
+ responders := names select:[:glblVar | |c| c := Smalltalk at:glblVar. c isBehavior not or:[c isLoaded and:[c respondsTo:selectorOfMessageToNode]]].
+ nonResponders := names reject:[:glblVar | |c| c := Smalltalk at:glblVar. c isBehavior not or:[c isLoaded and:[c respondsTo:selectorOfMessageToNode]]].
+ addWithFactorBlock value:responders value:(2.5 * globalFactor).
+ addWithFactorBlock value:nonResponders value:(0.5 * 2.5 * globalFactor).
+ ].
+ ] ifFalse:[
+ |names|
+
+ classOrNil notNil ifTrue:[
+ "/ private classes
+ addWithFactorBlock value:(nonMetaClass privateClasses collect:[:cls | cls nameWithoutPrefix])
+ value:(1.75 * globalFactor).
+
+ "/ class variables
+ addWithFactorBlock value:nonMetaClass classVarNames value:(2.0 * globalFactor).
+ classOrNil superclass notNil ifTrue:[
+ addWithFactorBlock value:nonMetaClass superclass allClassVarNames value:(2.0 * globalFactor).
+ ].
+
+ "/ namespace vars
+ classOrNil nameSpace ~~ Smalltalk ifTrue:[
+ names := classOrNil nameSpace isNameSpace ifTrue:[classOrNil nameSpace keys] ifFalse:[classOrNil nameSpace privateClasses collect:[:c | c nameWithoutPrefix]].
+ names := names select:[:nm | nm isUppercaseFirst ].
+ addWithFactorBlock value:names value:(1.5 * globalFactor).
+ ].
+
+ "/ pool variables
+ classOrNil theNonMetaclass sharedPoolNames do:[:poolName |
+ |pool|
+
+ pool := Smalltalk at:poolName.
+ names := pool classVarNames.
+ addWithFactorBlock value:names value:(2.5 * globalFactor).
+ ].
+ ].
+
+ "/ globals
+ names := Smalltalk keys.
+ names := names select:[:nm | nm isUppercaseFirst ].
+ addWithFactorBlock value:names value:(1.5 * globalFactor).
+ ].
+
+ "/ pseudos - assuming that thisContext is seldom used.
+ "/ also assuming, that nil is short so its usually typed in.
+ addWithFactorBlock value:#('self') value:(2.5 * localFactor).
+ addWithFactorBlock value:#('nil') value:(0.5 * localFactor).
+ addWithFactorBlock value:#('super' 'false') value:(2 * localFactor).
+ addWithFactorBlock value:#('thisContext') value:(1 * localFactor).
+ addWithFactorBlock value:#('true') value:(1 * localFactor).
+ addWithFactorBlock value:#('false') value:(1 * localFactor).
].
allDistances isEmpty ifTrue:[^ self].
bestAssoc := allDistances at:1.
bestAssoc := allDistances inject:bestAssoc into:[:el :best | el value > best value
- ifTrue:[el]
- ifFalse:[best]
- ].
+ ifTrue:[el]
+ ifFalse:[best]
+ ].
allDistances sort:[:a :b |
- a value > b value ifTrue:[
- true
- ] ifFalse:[
- a value = b value ifTrue:[
- a key < b key
- ] ifFalse:[
- false
- ]
- ]
- ].
+ a value > b value ifTrue:[
+ true
+ ] ifFalse:[
+ a value = b value ifTrue:[
+ a key < b key
+ ] ifFalse:[
+ false
+ ]
+ ]
+ ].
((allTheBest := allDistances) count:[:entry | entry value]) > 20 ifTrue:[
- allTheBest := allDistances select:[:entry | entry value >= (bestAssoc value * 0.5)].
- allTheBest size > 15 ifTrue:[
- allTheBest := allDistances select:[:entry | entry value >= (bestAssoc value * 0.8)].
- ].
+ allTheBest := allDistances select:[:entry | entry value >= (bestAssoc value * 0.5)].
+ allTheBest size > 15 ifTrue:[
+ allTheBest := allDistances select:[:entry | entry value >= (bestAssoc value * 0.8)].
+ ].
].
start := node start.
stop := node stop.
best := self askUserForCompletion:('Variable for "%1"' bindWith:node name)
- for:codeView at: start
- from:(allTheBest collect:[:assoc | assoc key]).
+ for:codeView at: start
+ from:(allTheBest collect:[:assoc | assoc key]).
best isNil ifTrue:[^ self].
"/ self showInfo:best.
@@ -5426,14 +5426,14 @@
oldVar := (codeView textFromCharacterPosition:start to:stop) asString string withoutSeparators.
codeView
- undoableDo:[ codeView replaceFromCharacterPosition:start to:stop with:best ]
- info:'Completion'.
+ undoableDo:[ codeView replaceFromCharacterPosition:start to:stop with:best ]
+ info:'Completion'.
(best startsWith:oldVar) ifTrue:[
- oldLen := stop - start + 1.
- newLen := best size.
- codeView selectFromCharacterPosition:start+oldLen to:start+newLen-1.
- codeView dontReplaceSelectionOnInput
+ oldLen := stop - start + 1.
+ newLen := best size.
+ codeView selectFromCharacterPosition:start+oldLen to:start+newLen-1.
+ codeView dontReplaceSelectionOnInput
].
"Created: / 10-11-2006 / 13:16:33 / cg"
--- a/FileSelectionTree.st Tue Sep 20 07:03:06 2016 +0200
+++ b/FileSelectionTree.st Fri Sep 23 07:02:31 2016 +0200
@@ -635,7 +635,7 @@
p1 := Filename components:p1.
p2 := (Filename components:p2) copyFrom:(p1 size).
- "/ thats a kludge for network drives
+ "/ that's a kludge for network drives
(p2 first endsWith:$\) ifTrue:[
(p2 first endsWith:':\') ifFalse:[
p2 := p2 copy.
--- a/FilenameEditField.st Tue Sep 20 07:03:06 2016 +0200
+++ b/FilenameEditField.st Fri Sep 23 07:02:31 2016 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1994 by Claus Gittinger
All Rights Reserved
@@ -11,6 +13,8 @@
"
"{ Package: 'stx:libwidg2' }"
+"{ NameSpace: Smalltalk }"
+
EditField subclass:#FilenameEditField
instanceVariableNames:'directoriesOnly filesOnly directory acceptOnExpand'
classVariableNames:''
@@ -174,8 +178,8 @@
!
initialText:aString selected:aBoolean
- "move the cursor to the end - thats the most interesting part of
- a filename
+ "redefined to move the cursor to the end
+ - that's the most interesting part of a filename
"
super initialText:aString selected:aBoolean.
@@ -297,8 +301,8 @@
!
mapped
- "move the cursor to the end - thats the most interesting part of
- a filename
+ "redefined to move the cursor to the end
+ - that's the most interesting part of a filename
"
super mapped.
"/ self cursorToEndOfLine.
@@ -308,9 +312,10 @@
!FilenameEditField class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/FilenameEditField.st,v 1.44 2012-01-23 17:24:40 cg Exp $'
+ ^ '$Header$'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg2/FilenameEditField.st,v 1.44 2012-01-23 17:24:40 cg Exp $'
+ ^ '$Header$'
! !
+
--- a/ListModelView.st Tue Sep 20 07:03:06 2016 +0200
+++ b/ListModelView.st Fri Sep 23 07:02:31 2016 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1999 by eXept Software AG
All Rights Reserved
@@ -447,24 +449,24 @@
!
lineSpacing
- "get the lineSpacing - thats an additional number of pixels,
+ "get the lineSpacing - that's an additional number of pixels,
by which lines are vertically separated.
"
^ lineSpacing
!
lineSpacing:aNumber
- "set the lineSpacing - thats an additional number of pixels,
+ "set the lineSpacing - that's an additional number of pixels,
by which lines are vertically separated.
"
lineSpacing ~= aNumber ifTrue:[
- lineSpacing := aNumber.
-
- realized ifTrue:[
- self recomputeHeightOfContents.
- self invalidate
- ].
- self contentsChanged.
+ lineSpacing := aNumber.
+
+ realized ifTrue:[
+ self recomputeHeightOfContents.
+ self invalidate
+ ].
+ self contentsChanged.
]
!
@@ -1579,11 +1581,10 @@
!
viewOrigin
- "return the viewOrigin; thats the coordinate of the contents
+ "return the viewOrigin; that's the coordinate of the contents
which is shown topLeft in the view.
"
^ viewOrigin
-
!
widthOfContents
--- a/MenuPanel.st Tue Sep 20 07:03:06 2016 +0200
+++ b/MenuPanel.st Fri Sep 23 07:02:31 2016 +0200
@@ -1385,7 +1385,7 @@
!
menuPerformer:anObject
- "set the menu-receiver. Thats the one who gets the messages ( both from myself and
+ "set the menu-receiver. That's the one who gets the messages ( both from myself and
from all submenus no specific receiver is defined )."
^ self receiver:anObject
@@ -1430,17 +1430,17 @@
!
receiver
- "get the menu-receiver. Thats the one who gets the messages ( both from myself and
+ "get the menu-receiver. That's the one who gets the messages ( both from myself and
from all submenus no specific receiver is defined )."
(receiver isNil and:[superMenu notNil]) ifTrue:[
- ^ superMenu receiver
+ ^ superMenu receiver
].
^ receiver
!
receiver:anObject
- "set the menu-receiver. Thats the one who gets the messages ( both from myself and
+ "set the menu-receiver. That's the one who gets the messages ( both from myself and
from all submenus no specific receiver is defined )."
receiver := anObject
@@ -4651,7 +4651,7 @@
super fetchDeviceResources.
- "/ thats a kludge - will be replaced by values from the styleSheet ...
+ "/ that's a kludge - will be replaced by values from the styleSheet ...
"/ (i.e. read menu.buttonActiveLevel & menu.buttonPassiveLevel)
superMenu isNil ifTrue:[
--- a/SelectionInTreeView.st Tue Sep 20 07:03:06 2016 +0200
+++ b/SelectionInTreeView.st Fri Sep 23 07:02:31 2016 +0200
@@ -429,7 +429,7 @@
imageClosed
"return the value of the instance variable 'imageClosed'.
- Thats the (default) bitmap image shown for closed folders
+ That's the (default) bitmap image shown for closed folders
(initialized to a file-directory bitmap)"
^ imageClosed
@@ -439,7 +439,7 @@
imageItem
"return the value of the instance variable 'imageItem'.
- Thats the (default) bitmap image shown for regular items
+ That's the (default) bitmap image shown for regular items
(initialized to a plain-file bitmap)"
^ imageItem
@@ -458,7 +458,7 @@
imageOpened
"return the value of the instance variable 'imageOpened'.
- Thats the (default) bitmap image shown for opened folders
+ That's the (default) bitmap image shown for opened folders
(initialized to an open file-directory bitmap)"
^ imageOpened
--- a/ThumbWheel.st Tue Sep 20 07:03:06 2016 +0200
+++ b/ThumbWheel.st Fri Sep 23 07:02:31 2016 +0200
@@ -217,20 +217,18 @@
keyboardStep
"return the scrollers keyboard step. If non-nil,
- thats the stepping value used with cursorUp/cursorDown keys.
+ that's the stepping value used with cursorUp/cursorDown keys.
(not used with Scrollers, but provided for subclasses)"
^ keyboardStep
-
!
keyboardStep:aNumber
"set the scrollers keyboard step. If non-nil,
- thats the stepping value used with cursorUp/cursorDown keys.
+ that's the stepping value used with cursorUp/cursorDown keys.
(not used with Scrollers, but provided for subclasses)"
keyboardStep := aNumber
-
!
start
--- a/stx_libwidg2.st Tue Sep 20 07:03:06 2016 +0200
+++ b/stx_libwidg2.st Fri Sep 23 07:02:31 2016 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 2006 by eXept Software AG
All Rights Reserved
@@ -73,6 +75,8 @@
#'stx:libhtml' "HTMLDocumentView - referenced by LicenceBox>>initialize "
#'stx:goodies/refactoryBrowser/browser' "RefactoryTyper - referenced by DoWhatIMeanSupport>>codeCompletionForMessage:inClass:instance:context:codeView:"
#'stx:libboss' "ObsoleteObject - referenced by DoWhatIMeanSupport>>codeCompletionForMessage:inClass:instance:context:codeView:"
+ #'stx:libbasic3' "SourceCodeManagerError - referenced by DoWhatIMeanSupport>>addClassesOfInstVarNamed:inClass:to:"
+ #'stx:libjavascript' "JavaScriptCompletionEngine - referenced by DoWhatIMeanSupport>>codeCompletionForJavascriptMethod:orClass:context:codeView:into:"
)
!
@@ -261,8 +265,10 @@
!
extensionMethodNames
- "list class/selector pairs of extensions.
- A correponding method with real names must be present in my concrete subclasses"
+ "lists the extension methods which are to be included in the project.
+ Entries are 2-element array literals, consisting of class-name and selector.
+ A correponding method with real names must be present in my concrete subclasses
+ if it has extensions."
^ #(
)