Merged 698883672d5c and c63aea2dcfe5 (branch default - CVS HEAD) jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 19 Sep 2013 10:18:18 +0100
branchjv
changeset 18097 52f3ca7a321f
parent 18096 698883672d5c (current diff)
parent 15756 c63aea2dcfe5 (diff)
child 18098 2bbfe6952a44
Merged 698883672d5c and c63aea2dcfe5 (branch default - CVS HEAD)
CharacterArray.st
ClassDescription.st
Collection.st
OrderedCollection.st
StringCollection.st
UserPreferences.st
--- a/CharacterArray.st	Thu Sep 12 12:17:46 2013 +0100
+++ b/CharacterArray.st	Thu Sep 19 10:18:18 2013 +0100
@@ -2172,18 +2172,18 @@
      in the following, we assume that ommiting a character
      is less of an error than inserting an extra character.
      Therefore the different insertion (i) and deletion (d) values.
-	s: substitution weight
-	k: keyboard weight (typing a nearby key) - or nil (then use s)
-	c: case weight                           - or nil (then use s)
-	e: exchange weight                       - or nil (then use s*2)
-	i: insertion of extra character weight
-	d: delete of a character weight
+        s: substitution weight (4)
+        k: keyboard weight (k) (typing a nearby key) - or nil (then use s)
+        c: case weight (4)                           - or nil (then use s)
+        e: exchange weight (8)                       - or nil (then use s*2)
+        i: insertion of extra character weight (2)
+        d: delete of a character weight (6)
     "
 
     ^ StringUtilities
-	    levenshteinDistanceFrom:self
-	    to:aString
-	    s:4 k:4 c:4 e:nil i:2 d:6
+            levenshteinDistanceFrom:self
+            to:aString
+            s:4 k:4 c:4 e:nil i:2 d:6
 
     "
      'computer' levenshteinTo:'computer'
@@ -6714,11 +6714,11 @@
 !CharacterArray class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.514 2013-09-02 15:06:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.515 2013-09-05 11:41:55 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.514 2013-09-02 15:06:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.515 2013-09-05 11:41:55 cg Exp $'
 !
 
 version_HG
--- a/ClassDescription.st	Thu Sep 12 12:17:46 2013 +0100
+++ b/ClassDescription.st	Thu Sep 19 10:18:18 2013 +0100
@@ -3219,9 +3219,10 @@
     cls := self theNonMetaclass.
     m := cls theMetaclass compiledMethodAt:#documentation.
     m notNil ifTrue:[
+        "/ try documentation method's comment
         s := m comment.
     ] ifFalse:[
-        "try comment"
+        "try classes comment"
         s := cls comment.
         s isString ifTrue:[
             s isEmpty ifTrue:[
@@ -3247,7 +3248,8 @@
             s := nil
         ].
     ].
-    ^ s
+    s isEmptyOrNil ifTrue:[^ s].
+    ^ s withTabsExpanded
 
     "
      Array commentOrDocumentationString
@@ -4299,11 +4301,11 @@
 !ClassDescription class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.245 2013-08-26 09:55:45 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.247 2013-09-06 16:10:58 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.245 2013-08-26 09:55:45 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.247 2013-09-06 16:10:58 cg Exp $'
 !
 
 version_HG
--- a/Collection.st	Thu Sep 12 12:17:46 2013 +0100
+++ b/Collection.st	Thu Sep 19 10:18:18 2013 +0100
@@ -259,6 +259,7 @@
     ^ self withSize:n
 ! !
 
+
 !Collection class methodsFor:'Signal constants'!
 
 emptyCollectionSignal
@@ -530,6 +531,7 @@
     ].
 ! !
 
+
 !Collection methodsFor:'accessing'!
 
 anElement
@@ -767,7 +769,7 @@
 lastIfEmpty:exceptionValue
     "return the last element of the collection.
      If its empty, return the exceptionValue.
-     (i.e. dont trigger an error as done in #last)"
+     (i.e. don't trigger an error as done in #last)"
 
     self isEmpty ifTrue:[^ exceptionValue value].
     ^ self last
@@ -3449,7 +3451,7 @@
 conform:aOneArgBlock
     "return true, if every element conforms to some condition.
      I.e. return false, if aBlock returns false for any element;
-     true otherwise."
+     true otherwise. Returns true for empty receivers."
 
     self do:[:element | 
         (aOneArgBlock value:element) ifFalse:[^ false]
@@ -3459,6 +3461,7 @@
     "
      #(1 2 3 4 5) conform:[:el | el even]     
      #(2 4 6 8 10) conform:[:el | el even]    
+     #() conform:[:el | el even]    
     "
 
     "Modified: / 13-09-2006 / 11:19:03 / cg"
@@ -4900,11 +4903,11 @@
 !Collection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.314 2013-09-03 12:53:22 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.316 2013-09-10 07:35:52 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.314 2013-09-03 12:53:22 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.316 2013-09-10 07:35:52 stefan Exp $'
 ! !
 
 
--- a/OrderedCollection.st	Thu Sep 12 12:17:46 2013 +0100
+++ b/OrderedCollection.st	Thu Sep 19 10:18:18 2013 +0100
@@ -50,7 +50,6 @@
 
         lastIndex       <SmallInteger>  index of last valid element
 
-
     [performance hint:]
       Although insertion and removal of inner elements is possible and supported,
       it may be slow, because remaining elements have to be copied.
@@ -2019,6 +2018,6 @@
 !OrderedCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OrderedCollection.st,v 1.108 2013-08-21 00:07:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OrderedCollection.st,v 1.109 2013-09-05 11:04:54 cg Exp $'
 ! !
 
--- a/StringCollection.st	Thu Sep 12 12:17:46 2013 +0100
+++ b/StringCollection.st	Thu Sep 19 10:18:18 2013 +0100
@@ -409,9 +409,29 @@
              new stringCollection (i.e. shared);
              otherwise new strings is created."
 
+    ^ self withTabsExpanded:8
+
+    "
+       |tab|
+       tab := String with:Character tab.
+       ('abcd', tab, 'tef', tab, 'tgh') asStringCollection withTabsExpanded
+    "
+
+    "Created: 12.2.1996 / 22:25:56 / stefan"
+    "Modified: 14.2.1996 / 11:13:01 / stefan"
+    "Modified: 4.3.1996 / 17:10:22 / cg"
+!
+
+withTabsExpanded:n
+    "return a new stringCollection consisting of the receivers lines,
+     where tabs are replaced by space characters (assuming n-col tabs).
+     Notice: lines which do not contain any tab, are copied by reference to the
+             new stringCollection (i.e. shared);
+             otherwise new strings is created."
+
     ^ self collect:[:string|
         string notNil ifTrue:[
-            string withTabsExpanded     
+            string withTabsExpanded:n     
         ] ifFalse:[
             string
         ]
@@ -442,9 +462,10 @@
 !StringCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/StringCollection.st,v 1.46 2012-07-25 17:12:38 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/StringCollection.st,v 1.48 2013-09-06 16:01:40 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/StringCollection.st,v 1.46 2012-07-25 17:12:38 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/StringCollection.st,v 1.48 2013-09-06 16:01:40 cg Exp $'
 ! !
+
--- a/UserPreferences.st	Thu Sep 12 12:17:46 2013 +0100
+++ b/UserPreferences.st	Thu Sep 19 10:18:18 2013 +0100
@@ -516,18 +516,13 @@
         s nextPutLine:'"/'.
         s nextPutLine:'Display notNil ifTrue:['.
         s nextPutLine:' Display displayName = ' , (screen displayName storeString) , ' ifTrue:['.
-        s nextPutLine:'  View defaultFont: ' , (View defaultFont storeString) , '.'.
-        s nextPutLine:'  Label defaultFont: ' , (Label defaultFont storeString) , '.'.
-        s nextPutLine:'  Button defaultFont: ' , (Button defaultFont storeString) , '.'.
-        s nextPutLine:'  Toggle defaultFont: ' , (Toggle defaultFont storeString) , '.'.
-        s nextPutLine:'  SelectionInListView defaultFont: ' , (SelectionInListView defaultFont storeString) , '.'.
-        s nextPutLine:'  MenuView defaultFont: ' , (MenuView defaultFont storeString) , '.'.
-        s nextPutLine:'  MenuPanel defaultFont: ' , (MenuPanel defaultFont storeString) , '.'.
-        s nextPutLine:'  NoteBookView defaultFont: ' , (NoteBookView defaultFont storeString) , '.'.
-        s nextPutLine:'  PullDownMenu defaultFont: ' , (PullDownMenu defaultFont storeString) , '.'.
-        s nextPutLine:'  TextView defaultFont: ' , (TextView defaultFont storeString) , '.'.
-        s nextPutLine:'  EditTextView defaultFont: ' , (EditTextView defaultFont storeString) , '.'.
-        s nextPutLine:'  CodeView defaultFont: ' , (CodeView defaultFont storeString) , '.'.
+        { 
+            View . Label . CheckBox . CheckLabel . Button . Toggle . 
+            SelectionInListView . MenuView . MenuPanel . NoteBookView . PullDownMenu .
+            TextView . EditTextView . CodeView
+        } do:[:cls |
+            s nextPutLine:'  ',cls name,' defaultFont: ' , (cls defaultFont storeString) , '.'.
+        ].
         s nextPutLine:' ].'.
         s nextPutLine:'].'.
 
@@ -3562,6 +3557,30 @@
     "
 !
 
+codeCompletionOnTabKey
+    "show completion with TAB-key - experimental"                                                                 
+
+    ^ self at:#codeCompletionOnTabKey ifAbsent:false
+
+    "
+     UserPreferences current codeCompletionOnTabKey
+     UserPreferences current codeCompletionOnTabKey:true
+     UserPreferences current codeCompletionOnTabKey:false
+    "
+!
+
+codeCompletionOnTabKey:aBoolean 
+    "show completion with TAB-key - experimental"                                                                 
+
+    self at:#codeCompletionOnTabKey put:aBoolean
+
+    "
+     UserPreferences current codeCompletionOnTabKey
+     UserPreferences current codeCompletionOnTabKey:true
+     UserPreferences current codeCompletionOnTabKey:false
+    "
+!
+
 deleteSetsClipboardText
     "if true, a delete also updates the clipboard with the deleted text"
 
@@ -4535,11 +4554,11 @@
 !UserPreferences class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/UserPreferences.st,v 1.346 2013-09-03 11:52:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UserPreferences.st,v 1.348 2013-09-04 22:03:11 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/UserPreferences.st,v 1.346 2013-09-03 11:52:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UserPreferences.st,v 1.348 2013-09-04 22:03:11 cg Exp $'
 !
 
 version_SVN