Search in sources :

Example 1 with TwosideSyncScrollSupport

use of com.intellij.diff.tools.util.SyncScrollSupport.TwosideSyncScrollSupport in project intellij-community by JetBrains.

the class TwosideTextDiffViewer method installEditorListeners.

//
// Listeners
//
@CalledInAwt
protected void installEditorListeners() {
    new TextDiffViewerUtil.EditorActionsPopup(createEditorPopupActions()).install(getEditors());
    new TextDiffViewerUtil.EditorFontSizeSynchronizer(getEditors()).install(this);
    getEditor(Side.LEFT).getScrollingModel().addVisibleAreaListener(myVisibleAreaListener);
    getEditor(Side.RIGHT).getScrollingModel().addVisibleAreaListener(myVisibleAreaListener);
    SyncScrollSupport.SyncScrollable scrollable = getSyncScrollable();
    if (scrollable != null) {
        mySyncScrollSupport = new TwosideSyncScrollSupport(getEditors(), scrollable);
        myEditorSettingsAction.setSyncScrollSupport(mySyncScrollSupport);
    }
}
Also used : TextDiffViewerUtil(com.intellij.diff.tools.util.base.TextDiffViewerUtil) TwosideSyncScrollSupport(com.intellij.diff.tools.util.SyncScrollSupport.TwosideSyncScrollSupport) TwosideSyncScrollSupport(com.intellij.diff.tools.util.SyncScrollSupport.TwosideSyncScrollSupport) SyncScrollSupport(com.intellij.diff.tools.util.SyncScrollSupport) CalledInAwt(org.jetbrains.annotations.CalledInAwt)

Aggregations

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