diff --git a/topics/user_interface_components/popups.md b/topics/user_interface_components/popups.md index 35ffe1829..990d671b4 100644 --- a/topics/user_interface_components/popups.md +++ b/topics/user_interface_components/popups.md @@ -12,12 +12,12 @@ Popups can optionally display a title, are optionally movable and resizable (and The [`JBPopupFactory`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/popup/JBPopupFactory.java) interface allows you to create popups that display different kinds of components, depending on your specific needs. The most commonly used methods are: -| Method | Description | -|---------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `createComponentPopupBuilder()` |

Generic, allows showing any [Swing](https://docs.oracle.com/javase/tutorial/uiswing/start/index.html) component.

**Example:** [`IntentionPreviewPopupUpdateProcessor`](%gh-ic%/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/preview/IntentionPreviewPopupUpdateProcessor.kt) creating a popup rendering the intention preview.

| -| `createPopupChooserBuilder()` |

For choosing one or more items from a plain `java.util.List`.

**Example:** [`ShowMessageHistoryAction`](%gh-ic%/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/ShowMessageHistoryAction.kt) creating a popup with recent commit messages history in the commit message text area.

| -| `createConfirmation()` |

For choosing between two options, and performing different actions depending on which option is selected.

**Example:** [`VariableInplaceRenamer`](%gh-ic%/platform/lang-impl/src/com/intellij/refactoring/rename/inplace/VariableInplaceRenamer.java) creating confirmation popup after invalid variable name is provided in the inplace rename action.

| -| `createActionGroupPopup()` |

Show actions from an [Action Group](grouping_action.md) and executes the action selected by the user.

**Example:** [`ShowRecentFindUsagesGroup`](%gh-ic%/platform/lang-impl/src/com/intellij/find/impl/ShowRecentFindUsagesGroup.java) invoked via Edit / Find Usages / Recent Find Usages and showing recent find usages group popup.

| +| Method | Description | +|---------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `createComponentPopupBuilder()` |

Generic, allows showing any [Swing](https://docs.oracle.com/javase/tutorial/uiswing/start/index.html) component.

See [`ComponentPopupBuilder`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/popup/ComponentPopupBuilder.java)'s methods for possible options.

**Example:** [`IntentionPreviewPopupUpdateProcessor`](%gh-ic%/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/preview/IntentionPreviewPopupUpdateProcessor.kt) creating a popup rendering the intention preview.

| +| `createPopupChooserBuilder()` |

For choosing one or more items from a plain `java.util.List`.

See [`PopupChooserBuilder`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/popup/PopupChooserBuilder.java)'s methods for possible options.

**Example:** [`ShowMessageHistoryAction`](%gh-ic%/platform/vcs-impl/src/com/intellij/openapi/vcs/actions/ShowMessageHistoryAction.kt) creating a popup with recent commit messages history in the commit message text area.

| +| `createConfirmation()` |

For choosing between two options, and performing different actions depending on which option is selected.

**Example:** [`VariableInplaceRenamer`](%gh-ic%/platform/lang-impl/src/com/intellij/refactoring/rename/inplace/VariableInplaceRenamer.java) creating confirmation popup after invalid variable name is provided in the inplace rename action.

| +| `createActionGroupPopup()` |

Show actions from an [Action Group](grouping_action.md) and executes the action selected by the user.

**Example:** [`ShowRecentFindUsagesGroup`](%gh-ic%/platform/lang-impl/src/com/intellij/find/impl/ShowRecentFindUsagesGroup.java) invoked via Edit / Find Usages / Recent Find Usages and showing recent find usages group popup.

| ### Action Groups