2658 changeB := (methodsChangedFiltered at:sel) second. |
2666 changeB := (methodsChangedFiltered at:sel) second. |
2659 self withReadCursorDo:[ |
2667 self withReadCursorDo:[ |
2660 |info| |
2668 |info| |
2661 |
2669 |
2662 info := self shortChangeInfoFor:changeA and:changeB. |
2670 info := self shortChangeInfoFor:changeA and:changeB. |
2663 info notNil ifTrue:[ |
2671 self information:(info ? 'Methods are different'). |
2664 self infoHolder value:info |
|
2665 ]. |
|
2666 self diffTextView |
2672 self diffTextView |
2667 text1:(changeA prettyPrintedSource) |
2673 text1:(changeA prettyPrintedSource) |
2668 text2:(changeB prettyPrintedSource) |
2674 text2:(changeB prettyPrintedSource) |
2669 ]. |
2675 ]. |
2670 self showDiffTextView. |
2676 self showDiffTextView. |
2695 self methodsChangedSelection value:nil. |
2701 self methodsChangedSelection value:nil. |
2696 change := methodsOnlyInAFiltered "self changeSetA" at:sel. |
2702 change := methodsOnlyInAFiltered "self changeSetA" at:sel. |
2697 self methodText value:(change prettyPrintedSource). |
2703 self methodText value:(change prettyPrintedSource). |
2698 self showSingleTextView. |
2704 self showSingleTextView. |
2699 (versionA := diffTextLabelA value) notEmptyOrNil ifTrue:[ |
2705 (versionA := diffTextLabelA value) notEmptyOrNil ifTrue:[ |
2700 self infoHolder value:('Method removed from version: ',versionA). |
2706 self information:'Method removed from %1' with:versionA. |
2701 ]. |
2707 ] ifFalse:[ |
|
2708 self information:'Method removed'. |
|
2709 ]. |
2702 ] ifFalse:[ |
2710 ] ifFalse:[ |
2703 self showVersionInfoIfNothingSelected |
2711 self showVersionInfoIfNothingSelected |
2704 ]. |
2712 ]. |
2705 |
2713 |
2706 "Modified: / 05-02-2017 / 12:08:07 / cg" |
2714 "Modified: / 05-02-2017 / 12:08:07 / cg" |
2711 "the selection in the list of the 'method only in version B' changed. |
2719 "the selection in the list of the 'method only in version B' changed. |
2712 Reset the selection of the two other lists and show the method in |
2720 Reset the selection of the two other lists and show the method in |
2713 the text view. |
2721 the text view. |
2714 <return: self>" |
2722 <return: self>" |
2715 |
2723 |
2716 |change sel versionA| |
2724 |change sel versionB| |
2717 |
2725 |
2718 "/ self information:''. |
2726 "/ self information:''. |
2719 |
2727 |
2720 sel := self methodsOnlyInBSelection value. |
2728 sel := self methodsOnlyInBSelection value. |
2721 sel notNil ifTrue:[ |
2729 sel notNil ifTrue:[ |
2722 self methodsOnlyInASelection value:nil. |
2730 self methodsOnlyInASelection value:nil. |
2723 self methodsChangedSelection value:nil. |
2731 self methodsChangedSelection value:nil. |
2724 change := methodsOnlyInBFiltered "self changeSetB" at:sel. |
2732 change := methodsOnlyInBFiltered "self changeSetB" at:sel. |
2725 self methodText value:(change prettyPrintedSource). |
2733 self methodText value:(change prettyPrintedSource). |
2726 self showSingleTextView. |
2734 self showSingleTextView. |
2727 (versionA := diffTextLabelA value) notEmptyOrNil ifTrue:[ |
2735 (versionB := diffTextLabelB value) notEmptyOrNil ifTrue:[ |
2728 self infoHolder value:('Method added to version: ',versionA). |
2736 self information:'Method added to %1' with:versionB. |
|
2737 ] ifFalse:[ |
|
2738 self information:'Method added'. |
2729 ]. |
2739 ]. |
2730 ] ifFalse:[ |
2740 ] ifFalse:[ |
2731 self showVersionInfoIfNothingSelected |
2741 self showVersionInfoIfNothingSelected |
2732 ]. |
2742 ]. |
2733 |
2743 |
2881 (treeA semanticallyEqualTo:treeB withMapping:(Dictionary new)) ifTrue:[ |
2891 (treeA semanticallyEqualTo:treeB withMapping:(Dictionary new)) ifTrue:[ |
2882 ^ 'Methods seem to do the same'. |
2892 ^ 'Methods seem to do the same'. |
2883 ]. |
2893 ]. |
2884 ^ 'Methods are different'. |
2894 ^ 'Methods are different'. |
2885 ]. |
2895 ]. |
2886 self infoHolder value:'ParseError while comparing - please check the code'. |
2896 self information:'ParseError while comparing - please check the code'. |
2887 ^ nil |
2897 ^ nil |
2888 ]. |
2898 ]. |
2889 |
2899 |
2890 changeA isClassDefinitionChange ifTrue:[ |
2900 changeA isClassDefinitionChange ifTrue:[ |
2891 changeB isClassDefinitionChange ifFalse:[^ 'Different change types']. |
2901 changeB isClassDefinitionChange ifFalse:[^ 'Different change types']. |
4298 v menuHolder:mGen. |
4308 v menuHolder:mGen. |
4299 v menuMessage:#value. |
4309 v menuMessage:#value. |
4300 ] |
4310 ] |
4301 ! |
4311 ! |
4302 |
4312 |
4303 informationUntranslated:msg |
|
4304 self infoHolder value:msg |
|
4305 |
|
4306 "Created: / 09-08-2018 / 15:40:52 / Claus Gittinger" |
|
4307 ! |
|
4308 |
|
4309 printStringForChange:aChange |
4313 printStringForChange:aChange |
4310 "generate a print string for a change." |
4314 "generate a print string for a change." |
4311 |
4315 |
4312 |m changeClassName classOrMetaString useChangesString selectorString |
4316 |m changeClassName classOrMetaString useChangesString selectorString |
4313 singleComparedClass singleComparedClassesName singleComparedMetaclassesName |
4317 singleComparedClass singleComparedClassesName singleComparedMetaclassesName |
4369 m := m originalMethodIfWrapped. |
4373 m := m originalMethodIfWrapped. |
4370 selectorString := m printStringForBrowserWithSelector:aChange changeSelector inClass:aChange changeClass. |
4374 selectorString := m printStringForBrowserWithSelector:aChange changeSelector inClass:aChange changeClass. |
4371 ]. |
4375 ]. |
4372 ]. |
4376 ]. |
4373 changeClassName notEmptyOrNil ifTrue:[ |
4377 changeClassName notEmptyOrNil ifTrue:[ |
4374 selectorString := ' » ',selectorString |
4378 selectorString := ' » ',selectorString |
4375 ] |
4379 ] |
4376 ]. |
4380 ]. |
4377 |
4381 |
4378 printString := changeClassName,classOrMetaString,selectorString. |
4382 printString := changeClassName,classOrMetaString,selectorString. |
4379 aChange isMethodCategoryChange ifTrue:[ |
4383 aChange isMethodCategoryChange ifTrue:[ |