mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
notnull & cleanup
This commit is contained in:
+2
-1
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.intellij.openapi.ui.popup;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.awt.*;
|
||||
@@ -26,7 +27,7 @@ public interface IdePopupEventDispatcher {
|
||||
@Nullable
|
||||
Component getComponent();
|
||||
|
||||
@Nullable
|
||||
@NotNull
|
||||
Stream<JBPopup> getPopupStream();
|
||||
|
||||
boolean dispatch(AWTEvent event);
|
||||
|
||||
@@ -38,10 +38,6 @@ public abstract class StackingPopupDispatcher implements IdePopupEventDispatcher
|
||||
|
||||
public abstract void eventDispatched(AWTEvent event);
|
||||
|
||||
protected abstract boolean dispatchMouseEvent(AWTEvent event);
|
||||
|
||||
protected abstract JBPopup findPopup();
|
||||
|
||||
public abstract boolean dispatchKeyEvent(KeyEvent e);
|
||||
|
||||
public abstract boolean requestFocus();
|
||||
|
||||
@@ -21,7 +21,7 @@ import com.intellij.openapi.application.ex.ApplicationManagerEx;
|
||||
import com.intellij.openapi.ui.popup.IdePopupEventDispatcher;
|
||||
import com.intellij.openapi.ui.popup.JBPopup;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -149,7 +149,7 @@ public class PopupDispatcher implements AWTEventListener, KeyEventDispatcher, Id
|
||||
return ourShowingStep != null ? ourShowingStep.getContent() : null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@NotNull
|
||||
@Override
|
||||
public Stream<JBPopup> getPopupStream() {
|
||||
return Stream.of(ourActiveWizardRoot);
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.ui.popup.JBPopup;
|
||||
import com.intellij.openapi.ui.popup.StackingPopupDispatcher;
|
||||
import com.intellij.util.containers.WeakList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -94,8 +95,7 @@ public class StackingPopupDispatcherImpl extends StackingPopupDispatcher impleme
|
||||
dispatchMouseEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean dispatchMouseEvent(AWTEvent event) {
|
||||
private boolean dispatchMouseEvent(AWTEvent event) {
|
||||
if (event.getID() != MouseEvent.MOUSE_PRESSED) {
|
||||
return false;
|
||||
}
|
||||
@@ -147,8 +147,8 @@ public class StackingPopupDispatcherImpl extends StackingPopupDispatcher impleme
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JBPopup findPopup() {
|
||||
@Nullable
|
||||
private JBPopup findPopup() {
|
||||
while(true) {
|
||||
if (myStack.isEmpty()) break;
|
||||
final AbstractPopup each = (AbstractPopup)myStack.peek();
|
||||
@@ -177,7 +177,7 @@ public class StackingPopupDispatcherImpl extends StackingPopupDispatcher impleme
|
||||
return myStack.isEmpty() ? null : myStack.peek().getContent();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@NotNull
|
||||
@Override
|
||||
public Stream<JBPopup> getPopupStream() {
|
||||
return myStack.stream();
|
||||
|
||||
Reference in New Issue
Block a user