Here are two
simple changes that make a huge difference for comparison browsers. This scrolls
text in the right view as text in the left view is scrolled. The
right text view can still be scrolled independently to adjust alignment. It is a
big time saver because text in both panes can be kept visually aligned when
viewing differences. I'd like linked scrolling to become a product
feature.
ComparisonBrowser>>postOpenWith: aBuilder
"Scroll right text pane with
left. Concept by Paul
Baumann."
| scrollWrapper |
super postOpenWith:
aBuilder.
scrollWrapper := (text2 dependents detect: [:ea | ea
isKindOf: TextEditorView ]) container.
(text dependents detect: [:ea |
ea isKindOf: TextEditorView ])
when: #scrollUp evaluate:
[scrollWrapper scrollVertically: 21];
when: #scrollDown evaluate:
[scrollWrapper scrollVertically:
-21];
yourself.
Differator>>postOpenWith:
aBuilder
"Scroll right text
pane with left. Concept by
Paul Baumann."
| scrollWrapper |
super postOpenWith:
aBuilder.
scrollWrapper := (text2 dependents detect: [:ea | ea
isKindOf: TextEditorView ]) container.
(text1 dependents detect: [:ea |
ea isKindOf: TextEditorView ])
when: #scrollUp evaluate:
[scrollWrapper scrollVertically: 21];
when: #scrollDown evaluate:
[scrollWrapper scrollVertically:
-21];
yourself.
I'm confident a
windowing whiz could improve on this implementation with better lookup
and smart scroll increments. This is a quick-and-dirty implementation to
demonstrate the value of this feature.
Paul
Baumann
This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.