mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
vcs: remove unused parameter
This commit is contained in:
@@ -15,13 +15,11 @@
|
||||
*/
|
||||
package com.intellij.openapi.vcs.checkin;
|
||||
|
||||
import com.intellij.openapi.util.Getter;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.util.PairConsumer;
|
||||
import com.intellij.util.containers.Convertor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
@@ -43,15 +41,11 @@ public class StepIntersection<Data, Area> {
|
||||
private Area myCurArea;
|
||||
private final List<Area> myAreas;
|
||||
private final HackSearch<Data,Area,TextRange> myHackSearch;
|
||||
// EA-28497, EA-26379
|
||||
private final Getter<String> myDebugDocumentTextGetter;
|
||||
|
||||
public StepIntersection(Convertor<Data, TextRange> dataConvertor,
|
||||
Convertor<Area, TextRange> areasConvertor,
|
||||
final List<Area> areas,
|
||||
Getter<String> debugDocumentTextGetter) {
|
||||
final List<Area> areas) {
|
||||
myAreas = areas;
|
||||
myDebugDocumentTextGetter = debugDocumentTextGetter;
|
||||
myAreaIndex = 0;
|
||||
myDataConvertor = dataConvertor;
|
||||
myAreasConvertor = areasConvertor;
|
||||
|
||||
@@ -20,7 +20,6 @@ import com.intellij.openapi.editor.markup.TextAttributes;
|
||||
import com.intellij.openapi.fileTypes.FileType;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.openapi.util.Getter;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.openapi.vcs.checkin.StepIntersection;
|
||||
@@ -74,8 +73,7 @@ public abstract class TodoForRanges {
|
||||
public TextRange convert(TodoItemData o) {
|
||||
return o.getTextRange();
|
||||
}
|
||||
}, Convertor.SELF, myRanges, () -> ""
|
||||
);
|
||||
}, Convertor.SELF, myRanges);
|
||||
final List<TodoItemData> filtered = stepIntersection.process(Arrays.asList(todoItems));
|
||||
final List<Pair<TextRange, TextAttributes>> result = new ArrayList<>(filtered.size());
|
||||
int offset = 0;
|
||||
|
||||
+2
-14
@@ -29,7 +29,6 @@ import com.intellij.openapi.diff.impl.util.TextDiffTypeEnum;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.openapi.util.Getter;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
@@ -219,13 +218,7 @@ public class TodoCheckinHandlerWorker {
|
||||
}
|
||||
}
|
||||
final StepIntersection<TodoItem, LineFragment> intersection =
|
||||
new StepIntersection<>(TodoItemConvertor.getInstance(), LineFragmentConvertor.getInstance(), lineFragments,
|
||||
new Getter<String>() {
|
||||
@Override
|
||||
public String get() {
|
||||
return myAfterContent;
|
||||
}
|
||||
});
|
||||
new StepIntersection<>(TodoItemConvertor.getInstance(), LineFragmentConvertor.getInstance(), lineFragments);
|
||||
|
||||
intersection.process(newTodoItems, new PairConsumer<TodoItem, LineFragment>() {
|
||||
|
||||
@@ -279,12 +272,7 @@ public class TodoCheckinHandlerWorker {
|
||||
}
|
||||
if (myOldTodoTexts == null) {
|
||||
final StepIntersection<LineFragment, TodoItem> intersection = new StepIntersection<>(
|
||||
LineFragmentConvertor.getInstance(), TodoItemConvertor.getInstance(), myOldItems, new Getter<String>() {
|
||||
@Override
|
||||
public String get() {
|
||||
return myBeforeContent;
|
||||
}
|
||||
});
|
||||
LineFragmentConvertor.getInstance(), TodoItemConvertor.getInstance(), myOldItems);
|
||||
myOldTodoTexts = new HashSet<>();
|
||||
intersection.process(Collections.singletonList(myCurrentLineFragment), new PairConsumer<LineFragment, TodoItem>() {
|
||||
@Override
|
||||
|
||||
@@ -101,8 +101,7 @@ public class IntersectionTest extends TestCase {
|
||||
public TextRange convert(Area o) {
|
||||
return o.getTextRange();
|
||||
}
|
||||
}, Arrays.asList(areas), () -> ""
|
||||
);
|
||||
}, Arrays.asList(areas));
|
||||
}
|
||||
|
||||
private static class Data {
|
||||
|
||||
Reference in New Issue
Block a user