mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[diff]: move scrollToChange method implementation to its base class
This commit is contained in:
@@ -957,11 +957,6 @@ public class UnifiedDiffViewer extends ListenerDiffViewerBase {
|
||||
protected int getEndLine(@NotNull UnifiedDiffChange change) {
|
||||
return change.getLine2();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void scrollToChange(@NotNull UnifiedDiffChange change) {
|
||||
DiffUtil.scrollEditor(myEditor, change.getLine1(), true);
|
||||
}
|
||||
}
|
||||
|
||||
private class MyOpenInEditorWithMouseAction extends OpenInEditorWithMouseAction {
|
||||
|
||||
+4
-1
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.diff.tools.util;
|
||||
|
||||
import com.intellij.diff.util.DiffUtil;
|
||||
import com.intellij.openapi.editor.ex.EditorEx;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -31,7 +32,9 @@ public abstract class PrevNextDifferenceIterableBase<T> implements PrevNextDiffe
|
||||
|
||||
protected abstract int getEndLine(@NotNull T change);
|
||||
|
||||
protected abstract void scrollToChange(@NotNull T change);
|
||||
protected void scrollToChange(@NotNull T change) {
|
||||
DiffUtil.scrollEditor(getEditor(), getStartLine(change), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canGoNext() {
|
||||
|
||||
Reference in New Issue
Block a user