Search in sources :

Example 1 with ThreesideSyncScrollSupport

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);
    }
}
Also used : TextDiffViewerUtil(com.intellij.diff.tools.util.base.TextDiffViewerUtil) ThreesideSyncScrollSupport(com.intellij.diff.tools.util.SyncScrollSupport.ThreesideSyncScrollSupport) ThreesideSyncScrollSupport(com.intellij.diff.tools.util.SyncScrollSupport.ThreesideSyncScrollSupport) SyncScrollSupport(com.intellij.diff.tools.util.SyncScrollSupport) CalledInAwt(org.jetbrains.annotations.CalledInAwt)

Aggregations

SyncScrollSupport (com.intellij.diff.tools.util.SyncScrollSupport)1 ThreesideSyncScrollSupport (com.intellij.diff.tools.util.SyncScrollSupport.ThreesideSyncScrollSupport)1 TextDiffViewerUtil (com.intellij.diff.tools.util.base.TextDiffViewerUtil)1 CalledInAwt (org.jetbrains.annotations.CalledInAwt)1