Merge jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 23 Aug 2016 10:02:37 +0100
branchjv
changeset 5228 4644e610c1b9
parent 5222 12c1ffb5326f (current diff)
parent 5224 941b9aba81cc (diff)
child 5229 5b8d65dfdb83
Merge
DoWhatIMeanSupport.st
NoteBookView.st
TerminalView.st
--- a/DoWhatIMeanSupport.st	Mon Aug 15 08:22:45 2016 +0100
+++ b/DoWhatIMeanSupport.st	Tue Aug 23 10:02:37 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 2002 by eXept Software AG
 	      All Rights Reserved
@@ -2348,7 +2346,7 @@
 "/
 "/    info := best storeString.
 "/    implClass notNil ifTrue:[
-"/        info := implClass name , ' » ' , info.
+"/        info := implClass name , '  ' , info.
 "/    ].
 "/    self information:info.
 "/].
@@ -3388,12 +3386,14 @@
                         |pool names|
 
                         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).
+                        pool notNil ifTrue:[
+                            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).
+                        ].
                     ].
                 ]
             ]
@@ -4980,7 +4980,7 @@
 "/
 "/    info := best storeString.
 "/    implClass notNil ifTrue:[
-"/        info := implClass name , ' » ' , info.
+"/        info := implClass name , '  ' , info.
 "/    ].
 "/    self information:info.
 
--- a/NoteBookView.st	Mon Aug 15 08:22:45 2016 +0100
+++ b/NoteBookView.st	Tue Aug 23 10:02:37 2016 +0100
@@ -14,39 +14,39 @@
 "{ NameSpace: Smalltalk }"
 
 View subclass:#NoteBookView
-        instanceVariableNames:'list listHolder foregroundColor backgroundColor selection enabled
-                action useIndex direction numberOfLines selectConditionBlock
-                accessTabMenuAction canvas canvasInset canvasHolder
-                halfLightColor halfShadowColor fitLastRow tabModus
-                lastComputedExtent keepCanvas activeForegroundColor
-                activeBackgroundColor drawLightColor edgeStyle tabInset
-                tabLabelInset disabledForegroundColor tabLevel tabTopMargin
-                tabBottomMargin selectionInsetX selectionInsetY translateLabel
-                buttonPrev buttonNext tabRightMargin tabLeftMargin
-                showDestroyTabButton destroyTabAction activeTabMarkerColor
-                activeTabMarkerFGColor tabWasActiveWhenPressed removeTabIcon
-                removeTabEnteredIcon removeTabDisabledIcon
-                showingEnteredRemoveTabButton lastUserSelection minimumTabWidth
-                addTabAction addTabIcon addTabEnteredIcon addTabDisabledIcon
-                showingEnteredAddTabButton canvasLevel
-                showDestroyTabButtonOnSingleTab'
-        classVariableNames:'DefaultForegroundColor DefaultBackgroundColor
-                DefaultActiveForegroundColor DefaultActiveBackgroundColor
-                DefaultShadowColor DefaultHalfShadowColor DefaultLightColor
-                DefaultHalfLightColor DefaultEdgeStyle DisabledForegroundColor
-                DefaultActiveTabMarkerColor DefaultActiveTabMarkerFgColor
-                RemoveTabIcon RemoveTabEnteredIcon AddTabIcon AddTabEnteredIcon'
-        poolDictionaries:''
-        category:'Views-Layout'
+	instanceVariableNames:'list listHolder foregroundColor backgroundColor selection enabled
+		action useIndex direction numberOfLines selectConditionBlock
+		accessTabMenuAction canvas canvasInset canvasHolder
+		halfLightColor halfShadowColor fitLastRow tabModus
+		lastComputedExtent keepCanvas activeForegroundColor
+		activeBackgroundColor drawLightColor edgeStyle tabInset
+		tabLabelInset disabledForegroundColor tabLevel tabTopMargin
+		tabBottomMargin selectionInsetX selectionInsetY translateLabel
+		buttonPrev buttonNext tabRightMargin tabLeftMargin
+		showDestroyTabButton destroyTabAction activeTabMarkerColor
+		activeTabMarkerFGColor tabWasActiveWhenPressed removeTabIcon
+		removeTabEnteredIcon removeTabDisabledIcon
+		showingEnteredRemoveTabButton lastUserSelection minimumTabWidth
+		addTabAction addTabIcon addTabEnteredIcon addTabDisabledIcon
+		showingEnteredAddTabButton canvasLevel
+		showDestroyTabButtonOnSingleTab'
+	classVariableNames:'DefaultForegroundColor DefaultBackgroundColor
+		DefaultActiveForegroundColor DefaultActiveBackgroundColor
+		DefaultShadowColor DefaultHalfShadowColor DefaultLightColor
+		DefaultHalfLightColor DefaultEdgeStyle DisabledForegroundColor
+		DefaultActiveTabMarkerColor DefaultActiveTabMarkerFgColor
+		RemoveTabIcon RemoveTabEnteredIcon AddTabIcon AddTabEnteredIcon'
+	poolDictionaries:''
+	category:'Views-Layout'
 !
 
 Object subclass:#Tab
-        instanceVariableNames:'label tabItem printableLabel disabledLabel lineNr
-                unselectedLayout selectedLayout layout extent accessCharacter
-                lastFocusViewId'
-        classVariableNames:''
-        poolDictionaries:''
-        privateIn:NoteBookView
+	instanceVariableNames:'label tabItem printableLabel disabledLabel lineNr
+		unselectedLayout selectedLayout layout extent accessCharacter
+		lastFocusViewId'
+	classVariableNames:''
+	poolDictionaries:''
+	privateIn:NoteBookView
 !
 
 !NoteBookView class methodsFor:'documentation'!
@@ -3410,8 +3410,6 @@
     nextTab := list at:(index + 1) ifAbsent:nil.
 
   ^ nextTab isNil or:[nextTab lineNr ~~ aTab lineNr]
-!
-
 ! !
 
 !NoteBookView methodsFor:'selection'!
--- a/TerminalView.st	Mon Aug 15 08:22:45 2016 +0100
+++ b/TerminalView.st	Tue Aug 23 10:02:37 2016 +0100
@@ -2723,7 +2723,7 @@
     "paste - redefined to send the chars to the shell instead
      of pasting into the view"
 
-    |s nLines|
+    |s nLines doLineEditMode|
 
     inStream isNil ifTrue:[
         self flash.
@@ -2740,21 +2740,23 @@
         ]
     ].
     (nLines := s size) == 0 ifTrue:[^ self].
-    (nLines == 1 and:[(s at:1) size == 0]) ifTrue:[^ self].
-
+    (nLines == 1 and:[(s at:1) isEmptyOrNil]) ifTrue:[^ self].
+
+    doLineEditMode := ((nLines == 1) and:[self shouldProcessInputInLineEditMode]).
+    
     s keysAndValuesDo:[:idx :line |
         line notNil ifTrue:[
             (Debug or:[DebugKeyboard]) ifTrue:[
                 Transcript showCR:'send paste line: ',line asByteArray hexPrintString
             ].
         ].
-        self shouldProcessInputInLineEditMode ifTrue:[
+        doLineEditMode ifTrue:[
             line do:[:ch | self keyPressInLineEditMode:ch ].
             idx ~~ nLines ifTrue:[
                 self keyPressInLineEditMode:#Return
             ]
         ] ifFalse:[
-            self send:line.
+            self send:(line ? '').
             idx ~~ nLines ifTrue:[
                 self sendLineEnd
             ]