void (Project project, JBPopup balloon) { Point savedLocation = WindowStateService.getInstance(myProject).getLocation(LOCATION_SETTINGS_KEY); if (project != null) { balloon.showCenteredInCurrentWindow(project); } else { balloon.showInFocusCenter(); } //for first show and short mode popup should be shifted to the top screen half if (savedLocation == null && myRunAnythingUI.getViewType() == RunAnythingPopupUI.ViewType.SHORT) { Point location = balloon.getLocationOnScreen(); location.y /= 2; balloon.setLocation(location); } }