Merge jv
authorMerge Script
Thu, 05 May 2016 06:48:19 +0200
branchjv
changeset 19707 8e312f358d84
parent 19695 d1f2392c58a5 (current diff)
parent 19706 c8923ad3da7a (diff)
child 19811 65fec19facb0
Merge
Behavior.st
CharacterArray.st
ClassCategoryReader.st
Collection.st
Method.st
Number.st
ProjectDefinition.st
SequenceableCollection.st
True.st
UserPreferences.st
--- a/Behavior.st	Wed May 04 06:50:56 2016 +0200
+++ b/Behavior.st	Thu May 05 06:48:19 2016 +0200
@@ -1423,7 +1423,6 @@
     ^ self nameWithoutPrefix
 ! !
 
-
 !Behavior methodsFor:'RefactoringBrowser'!
 
 realClass
@@ -5259,14 +5258,15 @@
 
     |setOfSelectors|
 
-    setOfSelectors := IdentitySet new.
     self methodDictionary keysAndValuesDo:[:sel :mthd |
-	(mthd referencesLiteral:someLiteralConstant) ifTrue:[
-	    setOfSelectors add:sel
-	].
+        (mthd referencesLiteral:someLiteralConstant) ifTrue:[
+            setOfSelectors isNil ifTrue:[
+                setOfSelectors := IdentitySet new.
+            ].    
+            setOfSelectors add:sel
+        ].
     ].
-
-    ^ setOfSelectors
+    ^ setOfSelectors ? #()
 
     "
      String whichSelectorsReferTo:#at:
--- a/CharacterArray.st	Wed May 04 06:50:56 2016 +0200
+++ b/CharacterArray.st	Thu May 05 06:48:19 2016 +0200
@@ -363,6 +363,7 @@
     "
 ! !
 
+
 !CharacterArray class methodsFor:'pattern matching'!
 
 matchEscapeCharacter
@@ -768,6 +769,7 @@
     ^ Unicode32String
 ! !
 
+
 !CharacterArray methodsFor:'Compatibility-ANSI'!
 
 addLineDelimiters
@@ -1722,22 +1724,32 @@
 
 unquote
     "removes double quotes from the receiver.
-     This is the JavaSccript standard unquote function."
-
-    |mySize|
-
-    (mySize := self size) >= 2 ifTrue:[
-	((self first == $") and:[self last == $"]) ifTrue:[
-	    ^ self copyFrom:2 to:mySize-1
-	].
-    ].
-    ^ self
+     This is the JavaScript standard unquote function."
+
+    ^ self unquote:$"
 
     "
      'hello' quote unquote
 
      JavaScriptParser evaluate:'''hello''.quote.unquote'
     "
+!
+
+unquote:quoteCharacter
+    "removes quoteCharacter from either end of the receiver."
+
+    |mySize|
+
+    (mySize := self size) >= 2 ifTrue:[
+        ((self first == quoteCharacter) and:[self last == quoteCharacter]) ifTrue:[
+            ^ self copyFrom:2 to:mySize-1
+        ].
+    ].
+    ^ self
+
+    "
+     '*hello*' unquote:$*
+    "
 ! !
 
 
@@ -5840,6 +5852,7 @@
     "Modified: 17.4.1997 / 12:50:23 / cg"
 ! !
 
+
 !CharacterArray methodsFor:'special string converting'!
 
 asUnixFilenameString
@@ -6901,6 +6914,7 @@
     "
 ! !
 
+
 !CharacterArray methodsFor:'substring searching'!
 
 findRangeOfString:subString
--- a/ClassCategoryReader.st	Wed May 04 06:50:56 2016 +0200
+++ b/ClassCategoryReader.st	Thu May 05 06:48:19 2016 +0200
@@ -11,6 +11,8 @@
 "
 "{ Package: 'stx:libbasic' }"
 
+"{ NameSpace: Smalltalk }"
+
 Object subclass:#ClassCategoryReader
 	instanceVariableNames:'myClass myCategory privacy ignore primSpec'
 	classVariableNames:'SourceMode SkipUnchangedMethods'
@@ -166,12 +168,6 @@
     "Created: 9.2.1996 / 17:23:00 / cg"
 ! !
 
-!ClassCategoryReader class methodsFor:'others'!
-
-version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.54 2013-08-10 11:14:34 stefan Exp $'
-! !
-
 !ClassCategoryReader methodsFor:'fileIn'!
 
 fileInFrom:aStream
@@ -440,7 +436,11 @@
 !ClassCategoryReader class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.54 2013-08-10 11:14:34 stefan Exp $'
+    ^ '$Header$'
+!
+
+version_CVS
+    ^ '$Header$'
 ! !
 
 
--- a/Collection.st	Wed May 04 06:50:56 2016 +0200
+++ b/Collection.st	Thu May 05 06:48:19 2016 +0200
@@ -762,7 +762,8 @@
 
 last
     "return the last element of the collection.
-     This should be redefined in subclasses."
+     This is a slow fallback implementation,    
+     and should be redefined in subclasses which can do indexed accesses."
 
     |theLastOne any|
 
@@ -875,6 +876,24 @@
     "
 !
 
+secondLast
+    "return the second last element of the collection.
+     This is a slow fallback implementation,    
+     and should be redefined in subclasses which can do indexed accesses."
+
+    |theSecondLastOne theLastOne cnt|
+
+    cnt := 0.
+    
+    self do:[:e | cnt := cnt+1. theSecondLastOne := theLastOne. theLastOne := e].
+    cnt > 1 ifTrue:[
+        ^ theSecondLastOne
+    ].
+
+    "error if collection did not enumerate at least 2 elements"
+    ^ self notEnoughElementsError
+!
+
 seventh
     "return the seventh element of the collection.
      For unordered collections, this simply returns the sixth
@@ -5883,6 +5902,7 @@
     ^ aVisitor visitCollection:self with:aParameter
 ! !
 
+
 !Collection class methodsFor:'documentation'!
 
 version
--- a/Method.st	Wed May 04 06:50:56 2016 +0200
+++ b/Method.st	Thu May 05 06:48:19 2016 +0200
@@ -3490,7 +3490,8 @@
     |resources|
 
     resources := self resources.
-    ^ resources notNil and:[ resources includesKey:#skipInDebuggersWalkBack ].
+    ^ resources notNil 
+        and:[ resources includesKey:#skipInDebuggersWalkBack ].
 !
 
 superMessages
--- a/Number.st	Wed May 04 06:50:56 2016 +0200
+++ b/Number.st	Thu May 05 06:48:19 2016 +0200
@@ -503,7 +503,6 @@
     ^ Integer readFrom:aStream radix:radix
 ! !
 
-
 !Number class methodsFor:'constants'!
 
 decimalPointCharacter 
@@ -934,7 +933,6 @@
     ^ self rounded printString
 ! !
 
-
 !Number methodsFor:'coercing & converting'!
 
 i
@@ -1056,6 +1054,19 @@
     ^ self.
 !
 
+asPercentFrom:fullAmount
+    "what is the percentage
+     taking the receiver's value from the argument"
+    
+    ^ (self / fullAmount) * 100.
+
+    "
+     20 asPercentFrom:100
+     (10 asPercentFrom:156) asFixedPoint:2
+     (15.6 asPercentFrom:156) asFixedPoint:2
+    "
+!
+
 asPoint
     "return a new Point with the receiver as all coordinates;  
      often used to supply the same value in two dimensions, as with 
@@ -1114,6 +1125,18 @@
     "Modified: 22.4.1996 / 13:00:27 / cg"
 !
 
+percentOf:hundredPercent
+    "how many is self-percent from the argument"
+    
+    ^ (hundredPercent / 100 * self)
+
+    "
+     20 percentOf:100
+     (10 percentOf:156) asFixedPoint:2
+     (105 percentOf:156) asFixedPoint:2
+    "
+!
+
 radiansToDegrees
     "interpreting the receiver as degrees, return the radians"
 
--- a/ProjectDefinition.st	Wed May 04 06:50:56 2016 +0200
+++ b/ProjectDefinition.st	Thu May 05 06:48:19 2016 +0200
@@ -2254,8 +2254,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."
 
     "/ should this be a subclassResponsibility here ?
     ^ #()
@@ -2744,7 +2746,6 @@
     "Created: / 18-08-2006 / 12:51:38 / cg"
 ! !
 
-
 !ProjectDefinition class methodsFor:'description - project information'!
 
 applicationAdditionalIconFileNames
@@ -4788,7 +4789,6 @@
     ^ self subProjectMakeCallsUsing:'call vcmake %1 %2'.
 ! !
 
-
 !ProjectDefinition class methodsFor:'file templates'!
 
 autopackage_default_dot_apspec
--- a/SequenceableCollection.st	Wed May 04 06:50:56 2016 +0200
+++ b/SequenceableCollection.st	Thu May 05 06:48:19 2016 +0200
@@ -1050,6 +1050,26 @@
     "Modified: / 20.5.1998 / 14:50:25 / cg"
 !
 
+secondLast
+    "return the second last element;
+     report an error, if the collection does not contain at least
+     2 elements."
+
+    |sz|
+
+    (sz := self size) > 1 ifTrue:[
+        ^ self at:(sz-1)
+    ].
+    "error if collection does not contain at least 2 elments"
+    ^ self notEnoughElementsError
+
+    "
+     #(1 2 3 4 5) secondLast
+     #(1) secondLast
+     #() secondLast
+    "
+!
+
 swap:index1 with:index2
     "exchange two elements"
 
--- a/True.st	Wed May 04 06:50:56 2016 +0200
+++ b/True.st	Thu May 05 06:48:19 2016 +0200
@@ -11,6 +11,8 @@
 "
 "{ Package: 'stx:libbasic' }"
 
+"{ NameSpace: Smalltalk }"
+
 Boolean subclass:#True
 	instanceVariableNames:''
 	classVariableNames:''
@@ -55,12 +57,6 @@
 "
 ! !
 
-!True class methodsFor:'others'!
-
-version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/True.st,v 1.30 2011-08-20 14:32:02 cg Exp $'
-! !
-
 
 !True methodsFor:'conditional evaluation'!
 
@@ -246,5 +242,10 @@
 !True class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/True.st,v 1.30 2011-08-20 14:32:02 cg Exp $'
+    ^ '$Header$'
+!
+
+version_CVS
+    ^ '$Header$'
 ! !
+
--- a/UserPreferences.st	Wed May 04 06:50:56 2016 +0200
+++ b/UserPreferences.st	Thu May 05 06:48:19 2016 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1998 by eXept Software AG
 	      All Rights Reserved
@@ -864,6 +862,8 @@
     ^ modified ? false
 ! !
 
+
+
 !UserPreferences methodsFor:'accessing-locale'!
 
 dateInputFormat
@@ -5291,6 +5291,13 @@
     "Created: / 14-07-2007 / 16:42:09 / cg"
 !
 
+useJavaCompletionEngineSimple
+    "/ switch to false, when the JavaCompletionEngine is
+    "/ finished.
+    
+    ^ true
+!
+
 useNewLayoutInDebugger
     ^ self at:#useNewLayoutInDebugger ifAbsent:true