mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
diff: cleanup
This commit is contained in:
@@ -19,7 +19,6 @@ import com.intellij.diff.chains.DiffRequestChain;
|
||||
import com.intellij.diff.chains.DiffRequestProducer;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.popup.JBPopup;
|
||||
import com.intellij.openapi.ui.popup.JBPopupFactory;
|
||||
import com.intellij.openapi.ui.popup.PopupStep;
|
||||
@@ -27,7 +26,6 @@ import com.intellij.openapi.ui.popup.util.BaseListPopupStep;
|
||||
import com.intellij.ui.awt.RelativePoint;
|
||||
import com.intellij.util.Consumer;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.awt.event.InputEvent;
|
||||
import java.awt.event.MouseEvent;
|
||||
@@ -82,8 +80,7 @@ public class GoToChangePopupBuilder {
|
||||
protected abstract JBPopup createPopup(@NotNull AnActionEvent e);
|
||||
}
|
||||
|
||||
private static class SimpleGoToChangePopupAction extends BaseGoToChangePopupAction {
|
||||
|
||||
private static class SimpleGoToChangePopupAction extends BaseGoToChangePopupAction<DiffRequestChain> {
|
||||
public SimpleGoToChangePopupAction(@NotNull DiffRequestChain chain, @NotNull Consumer<Integer> onSelected) {
|
||||
super(chain, onSelected);
|
||||
}
|
||||
@@ -91,16 +88,13 @@ public class GoToChangePopupBuilder {
|
||||
@NotNull
|
||||
@Override
|
||||
protected JBPopup createPopup(@NotNull AnActionEvent e) {
|
||||
return JBPopupFactory.getInstance().createListPopup(new MyListPopupStep(e.getProject()));
|
||||
return JBPopupFactory.getInstance().createListPopup(new MyListPopupStep());
|
||||
}
|
||||
|
||||
private class MyListPopupStep extends BaseListPopupStep<DiffRequestProducer> {
|
||||
private final Project myProject;
|
||||
|
||||
public MyListPopupStep(@Nullable Project project) {
|
||||
public MyListPopupStep() {
|
||||
super("Go To Change", myChain.getRequests());
|
||||
setDefaultOptionIndex(myChain.getIndex());
|
||||
myProject = project;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@ import java.util.List;
|
||||
|
||||
public abstract class ChangeGoToChangePopupAction<Chain extends DiffRequestChain>
|
||||
extends GoToChangePopupBuilder.BaseGoToChangePopupAction<Chain>{
|
||||
public ChangeGoToChangePopupAction(@NotNull Chain chain, @NotNull Consumer onSelected) {
|
||||
public ChangeGoToChangePopupAction(@NotNull Chain chain, @NotNull Consumer<Integer> onSelected) {
|
||||
super(chain, onSelected);
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ public abstract class ChangeGoToChangePopupAction<Chain extends DiffRequestChain
|
||||
private final int mySelection;
|
||||
|
||||
@SuppressWarnings("AbstractMethodCallInConstructor")
|
||||
public Fake(@NotNull Chain chain, int selection, @NotNull Consumer onSelected) {
|
||||
public Fake(@NotNull Chain chain, int selection, @NotNull Consumer<Integer> onSelected) {
|
||||
super(chain, onSelected);
|
||||
|
||||
mySelection = selection;
|
||||
|
||||
Reference in New Issue
Block a user