use of com.intellij.diff.tools.util.SyncScrollSupport.ThreesideSyncScrollSupport in project intellij-community by JetBrains.
the class ThreesideTextDiffViewer method installEditorListeners.
//
// Listeners
//
@CalledInAwt
protected void installEditorListeners() {
new TextDiffViewerUtil.EditorActionsPopup(createEditorPopupActions()).install(getEditors());
new TextDiffViewerUtil.EditorFontSizeSynchronizer(getEditors()).install(this);
getEditor(ThreeSide.LEFT).getScrollingModel().addVisibleAreaListener(myVisibleAreaListener1);
getEditor(ThreeSide.BASE).getScrollingModel().addVisibleAreaListener(myVisibleAreaListener1);
getEditor(ThreeSide.BASE).getScrollingModel().addVisibleAreaListener(myVisibleAreaListener2);
getEditor(ThreeSide.RIGHT).getScrollingModel().addVisibleAreaListener(myVisibleAreaListener2);
SyncScrollSupport.SyncScrollable scrollable1 = getSyncScrollable(Side.LEFT);
SyncScrollSupport.SyncScrollable scrollable2 = getSyncScrollable(Side.RIGHT);
if (scrollable1 != null && scrollable2 != null) {
mySyncScrollSupport = new ThreesideSyncScrollSupport(getEditors(), scrollable1, scrollable2);
myEditorSettingsAction.setSyncScrollSupport(mySyncScrollSupport);
}
}
Aggregations