#REFACTORING by exept
class: VersionDiffBrowser
added: #informationHolder
removed: #informationUntranslated:
comment/format in: #methodsChangedSelectionChanged
changed:
#methodsOnlyInASelectionChanged
#methodsOnlyInBSelectionChanged
#shortChangeInfoFor:and:
class: VersionDiffBrowser class
changed:
#windowSpec
#windowSpecForMultipleClasses
#windowSpecForMultipleVersions
--- a/VersionDiffBrowser.st Thu Jan 30 15:01:08 2020 +0100
+++ b/VersionDiffBrowser.st Thu Jan 30 17:42:24 2020 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 2000 by eXept Software AG
All Rights Reserved
@@ -328,7 +330,7 @@
uuid: '90e47868-7175-11e9-a23a-b8f6b1108e05'
level: -1
translateLabel: true
- labelChannel: infoHolder
+ labelChannel: informationHolder
adjust: left
)
)
@@ -610,7 +612,7 @@
uuid: '2b3f4a44-d4fd-11e7-af82-c42c033b4871'
level: -1
translateLabel: true
- labelChannel: infoHolder
+ labelChannel: informationHolder
adjust: left
)
)
@@ -871,7 +873,7 @@
uuid: '2b3f4a44-d4fd-11e7-af82-c42c033b4871'
level: -1
translateLabel: true
- labelChannel: infoHolder
+ labelChannel: informationHolder
adjust: left
)
)
@@ -2285,6 +2287,12 @@
"Modified: / 08-05-2019 / 11:05:10 / Claus Gittinger"
!
+informationHolder
+ ^ infoHolder.
+
+ "Modified: / 08-05-2019 / 11:05:10 / Claus Gittinger"
+!
+
methodText
"aspect for the text in the method text view"
@@ -2660,9 +2668,7 @@
|info|
info := self shortChangeInfoFor:changeA and:changeB.
- info notNil ifTrue:[
- self infoHolder value:info
- ].
+ self information:(info ? 'Methods are different').
self diffTextView
text1:(changeA prettyPrintedSource)
text2:(changeB prettyPrintedSource)
@@ -2697,8 +2703,10 @@
self methodText value:(change prettyPrintedSource).
self showSingleTextView.
(versionA := diffTextLabelA value) notEmptyOrNil ifTrue:[
- self infoHolder value:('Method removed from version: ',versionA).
- ].
+ self information:'Method removed from %1' with:versionA.
+ ] ifFalse:[
+ self information:'Method removed'.
+ ].
] ifFalse:[
self showVersionInfoIfNothingSelected
].
@@ -2713,7 +2721,7 @@
the text view.
<return: self>"
- |change sel versionA|
+ |change sel versionB|
"/ self information:''.
@@ -2724,8 +2732,10 @@
change := methodsOnlyInBFiltered "self changeSetB" at:sel.
self methodText value:(change prettyPrintedSource).
self showSingleTextView.
- (versionA := diffTextLabelA value) notEmptyOrNil ifTrue:[
- self infoHolder value:('Method added to version: ',versionA).
+ (versionB := diffTextLabelB value) notEmptyOrNil ifTrue:[
+ self information:'Method added to %1' with:versionB.
+ ] ifFalse:[
+ self information:'Method added'.
].
] ifFalse:[
self showVersionInfoIfNothingSelected
@@ -2883,7 +2893,7 @@
].
^ 'Methods are different'.
].
- self infoHolder value:'ParseError while comparing - please check the code'.
+ self information:'ParseError while comparing - please check the code'.
^ nil
].
@@ -4300,12 +4310,6 @@
]
!
-informationUntranslated:msg
- self infoHolder value:msg
-
- "Created: / 09-08-2018 / 15:40:52 / Claus Gittinger"
-!
-
printStringForChange:aChange
"generate a print string for a change."
@@ -4371,7 +4375,7 @@
].
].
changeClassName notEmptyOrNil ifTrue:[
- selectorString := ' » ',selectorString
+ selectorString := ' » ',selectorString
]
].