use of com.intellij.openapi.ui.popup.ListPopup in project intellij-community by JetBrains.
the class QuickFixManager method showIntentionPopup.
final void showIntentionPopup() {
LOG.debug("showIntentionPopup()");
if (myHint == null || !myHint.isVisible()) {
return;
}
final ErrorInfo[] errorInfos = getErrorInfos();
if (!haveFixes(errorInfos)) {
return;
}
final ArrayList<ErrorWithFix> fixList = new ArrayList<>();
for (ErrorInfo errorInfo : errorInfos) {
final QuickFix[] quickFixes = errorInfo.myFixes;
if (quickFixes.length > 0) {
for (QuickFix fix : quickFixes) {
fixList.add(new ErrorWithFix(errorInfo, fix));
}
} else if (errorInfo.getInspectionId() != null) {
buildSuppressFixes(errorInfo, fixList, true);
}
}
final ListPopup popup = JBPopupFactory.getInstance().createListPopup(new QuickFixPopupStep(fixList, true));
popup.showUnderneathOf(myHint.getComponent());
}
use of com.intellij.openapi.ui.popup.ListPopup in project intellij-community by JetBrains.
the class VcsLogPopupComponent method showPopupMenu.
private void showPopupMenu() {
ListPopup popup = createPopupMenu();
popup.showUnderneathOf(this);
}
use of com.intellij.openapi.ui.popup.ListPopup in project intellij-community by JetBrains.
the class VcsLogGearActionGroup method actionPerformed.
@Override
public void actionPerformed(@NotNull AnActionEvent e) {
DefaultActionGroup group = new DefaultActionGroup(ActionManager.getInstance().getAction(myActionGroup));
ListPopup popup = JBPopupFactory.getInstance().createActionGroupPopup(null, group, e.getDataContext(), JBPopupFactory.ActionSelectionAid.MNEMONICS, true, ToolWindowContentUi.POPUP_PLACE);
Component component = e.getInputEvent().getComponent();
if (component instanceof ActionButtonComponent) {
popup.showUnderneathOf(component);
} else {
popup.showInCenterOf(component);
}
}
use of com.intellij.openapi.ui.popup.ListPopup in project intellij-community by JetBrains.
the class SurroundPopupAction method actionPerformed.
protected void actionPerformed(final GuiEditor editor, final List<RadComponent> selection, final AnActionEvent e) {
final ListPopup groupPopup = JBPopupFactory.getInstance().createActionGroupPopup(UIDesignerBundle.message("surround.with.popup.title"), myActionGroup, e.getDataContext(), JBPopupFactory.ActionSelectionAid.ALPHA_NUMBERING, true);
final JComponent component = (JComponent) e.getData(PlatformDataKeys.CONTEXT_COMPONENT);
if (component instanceof ComponentTree) {
groupPopup.show(JBPopupFactory.getInstance().guessBestPopupLocation(component));
} else {
RadComponent selComponent = selection.get(0);
FormEditingUtil.showPopupUnderComponent(groupPopup, selComponent);
}
}
use of com.intellij.openapi.ui.popup.ListPopup in project intellij-community by JetBrains.
the class GitDiffFromHistoryHandler method showPopup.
private void showPopup(@NotNull AnActionEvent event, @NotNull GitFileRevision rev, @NotNull FilePath filePath, @NotNull Collection<GitFileRevision> parents) {
ActionGroup parentActions = createActionGroup(rev, filePath, parents);
DataContext dataContext = SimpleDataContext.getProjectContext(myProject);
ListPopup popup = JBPopupFactory.getInstance().createActionGroupPopup("Choose parent to compare", parentActions, dataContext, JBPopupFactory.ActionSelectionAid.NUMBERING, true);
showPopupInBestPosition(popup, event, dataContext);
}
Aggregations