List of usage examples for com.intellij.openapi.ui.popup ListPopup isVisible
boolean isVisible();
From source file:net.groboclown.idea.p4ic.ui.P4MultipleConnectionWidget.java
License:Apache License
private void showPopup(@NotNull MouseEvent event) { // it isn't getting bubbled up to the parent DataContext dataContext = getContext(); final ListPopup popup = createListPopup(dataContext); if (popup.isVisible()) { popup.cancel();/*from www. ja v a2s. co m*/ return; } final Dimension dimension = popup.getContent().getPreferredSize(); final Point at = new Point(0, -dimension.height); popup.show(new RelativePoint(event.getComponent(), at)); Disposer.register(this, popup); // destroy popup on unexpected project close }