ThreeSide (@NotNull ThreesideTextDiffViewerEx viewer, @NotNull Editor editor) { ThreeSide side = null; // we can't just use getCurrentSide() here, popup can be called on unfocused editor if (viewer.getEditor(ThreeSide.LEFT) == editor) side = ThreeSide.LEFT; if (viewer.getEditor(ThreeSide.BASE) == editor) side = ThreeSide.BASE; if (viewer.getEditor(ThreeSide.RIGHT) == editor) side = ThreeSide.RIGHT; return side; }