diff --git a/platform/platform-api/src/com/intellij/openapi/ui/popup/IdePopupEventDispatcher.java b/platform/platform-api/src/com/intellij/openapi/ui/popup/IdePopupEventDispatcher.java index bc7a2aba00c3..e2bbdc935eee 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/popup/IdePopupEventDispatcher.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/popup/IdePopupEventDispatcher.java @@ -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 getPopupStream(); boolean dispatch(AWTEvent event); diff --git a/platform/platform-api/src/com/intellij/openapi/ui/popup/StackingPopupDispatcher.java b/platform/platform-api/src/com/intellij/openapi/ui/popup/StackingPopupDispatcher.java index 5c5b58ec894e..c953e9d7dcbc 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/popup/StackingPopupDispatcher.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/popup/StackingPopupDispatcher.java @@ -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(); diff --git a/platform/platform-impl/src/com/intellij/ui/popup/PopupDispatcher.java b/platform/platform-impl/src/com/intellij/ui/popup/PopupDispatcher.java index 69616f1bba5a..b4c367ea2bfe 100644 --- a/platform/platform-impl/src/com/intellij/ui/popup/PopupDispatcher.java +++ b/platform/platform-impl/src/com/intellij/ui/popup/PopupDispatcher.java @@ -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 getPopupStream() { return Stream.of(ourActiveWizardRoot); diff --git a/platform/platform-impl/src/com/intellij/ui/popup/StackingPopupDispatcherImpl.java b/platform/platform-impl/src/com/intellij/ui/popup/StackingPopupDispatcherImpl.java index ab598f26926d..d446dd5e6b9c 100644 --- a/platform/platform-impl/src/com/intellij/ui/popup/StackingPopupDispatcherImpl.java +++ b/platform/platform-impl/src/com/intellij/ui/popup/StackingPopupDispatcherImpl.java @@ -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 getPopupStream() { return myStack.stream();