diff --git a/packages/Sandblocks-Core/SBTabView.class.st b/packages/Sandblocks-Core/SBTabView.class.st index 9a242208..dd898345 100644 --- a/packages/Sandblocks-Core/SBTabView.class.st +++ b/packages/Sandblocks-Core/SBTabView.class.st @@ -408,8 +408,8 @@ SBTabView >> paddedDiffTexts [ | diffs maxLines | diffs := self namedBlocks collect: [:aNamedBlock | (TextDiffBuilder - from: (self plainSourceStringFor: aNamedBlock) - to: (self plainSourceStringFor: self active)) buildDisplayPatch]. + from: (self sourceStringFor: aNamedBlock) + to: (self sourceStringFor: self active)) buildDisplayPatch]. maxLines := (diffs collect: [:aText | aText lineCount]) max. @@ -419,17 +419,6 @@ SBTabView >> paddedDiffTexts [ paddedText] ] -{ #category : #diffing } -SBTabView >> plainSourceStringFor: aNamedBlock [ - - ^ aNamedBlock block isBlockBody - ifFalse: [aNamedBlock block sourceString] - ifTrue: [ ((aNamedBlock block statements - reject: #isUnknown) - collect: #unwrappedSourceString) - fold: [:a :b | a, Character cr, b]] -] - { #category : #ui } SBTabView >> rebuild [ @@ -479,6 +468,15 @@ SBTabView >> setActive: aNamedBlock [ (self switchCommandFor: (self namedBlocks indexOf: aNamedBlock ifAbsent: 1)) ] +{ #category : #diffing } +SBTabView >> sourceStringFor: aNamedBlock [ + + ^ aNamedBlock block isBlockBody + ifFalse: [aNamedBlock block sourceString] + ifTrue: [ (aNamedBlock block statements collect: #sourceString) + fold: [:a :b | a, Character cr, b]] +] + { #category : #commands } SBTabView >> switchCommandFor: aNumber [ diff --git a/packages/Sandblocks-Smalltalk/SBStMessageSend.class.st b/packages/Sandblocks-Smalltalk/SBStMessageSend.class.st index 299e0e79..7fb01188 100644 --- a/packages/Sandblocks-Smalltalk/SBStMessageSend.class.st +++ b/packages/Sandblocks-Smalltalk/SBStMessageSend.class.st @@ -553,15 +553,6 @@ SBStMessageSend >> tryReplacements [ option automatic ifTrue: [option apply: c]] ] -{ #category : #converting } -SBStMessageSend >> unwrappedSourceString [ - - ^ String streamContents: [:aStream | - self actualReceiver writeSourceOn: aStream. - aStream space. - signature writeSourceOn: aStream.] -] - { #category : #accessing } SBStMessageSend >> useAsVariable [