diff --git a/topics/basics/architectural_overview/threading/threading_model.md b/topics/basics/architectural_overview/threading/threading_model.md index 8459c7bc5..ff60f06ae 100644 --- a/topics/basics/architectural_overview/threading/threading_model.md +++ b/topics/basics/architectural_overview/threading/threading_model.md @@ -10,7 +10,7 @@ The IntelliJ Platform is a highly concurrent environment. Code is executed in many threads simultaneously. -In general, as in a regular [Swing](https://docs.oracle.com/javase%2Ftutorial%2Fuiswing%2F%2F/index.html) application, threads can be categorized into two main groups: +In general, as in a regular [Swing](https://docs.oracle.com/javase/tutorial/uiswing/) application, threads can be categorized into two main groups: - [Event Dispatch Thread](https://docs.oracle.com/javase/tutorial/uiswing/concurrency/dispatch.html) (EDT) – also known as the UI thread. Its main purpose is handling UI events (such as reacting to clicking a button or updating the UI), but the platform uses it also for writing data. EDT executes events taken from the Event Queue. diff --git a/topics/basics/plugin_structure/plugin_class_loaders.md b/topics/basics/plugin_structure/plugin_class_loaders.md index ed17d467e..e5cb92189 100644 --- a/topics/basics/plugin_structure/plugin_class_loaders.md +++ b/topics/basics/plugin_structure/plugin_class_loaders.md @@ -1,4 +1,4 @@ - + # Class Loaders @@ -46,7 +46,7 @@ This allows a plugin to reference classes from other plugins. ## Using `ServiceLoader` -Some libraries use [`ServiceLoader`](https://docs.oracle.com/javase/8/docs/api/index.html?java/util/ServiceLoader.html) to detect and load implementations. +Some libraries use [`ServiceLoader`](https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/util/ServiceLoader.html) to detect and load implementations. For this to work in a plugin, the context class loader must be set to the plugin's classloader and restored afterwards with the original one around initialization code: ```java diff --git a/topics/reference_guide/frameworks_and_external_apis/external_builder_api.md b/topics/reference_guide/frameworks_and_external_apis/external_builder_api.md index 60eac48f5..526b29611 100644 --- a/topics/reference_guide/frameworks_and_external_apis/external_builder_api.md +++ b/topics/reference_guide/frameworks_and_external_apis/external_builder_api.md @@ -46,8 +46,8 @@ To pass custom data between the invocation of the same builder between multiple ### Services and Extensions in External Builder -The external builder process uses the standard Java [services](https://docs.oracle.com/javase/8/docs/api/java/util/ServiceLoader.html) mechanism to support plugins. -There are several service interfaces (e.g. [`BuilderService`](%gh-ic%/jps/jps-builders/src/org/jetbrains/jps/incremental/BuilderService.java) which can be implemented in plugins to extend the builder functionality. +The external builder process uses the standard Java [services](https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/util/ServiceLoader.html) mechanism to support plugins. +There are several service interfaces (e.g. [`BuilderService`](%gh-ic%/jps/jps-builders/src/org/jetbrains/jps/incremental/BuilderService.java)) which can be implemented in plugins to extend the builder functionality. An implementation of a service needs to be registered by creating the META-INF/services/\$service-interface-fqn\$ file containing the implementation class's qualified name. E.g. `BuilderService` implementations are registered in META-INF/services/org.jetbrains.jps.incremental.BuilderService file. These files don't have extensions, so you need to map corresponding patterns to text files in IDE settings. diff --git a/topics/reference_guide/localization/internationalization.md b/topics/reference_guide/localization/internationalization.md index ffd527b2a..37d02ffbb 100644 --- a/topics/reference_guide/localization/internationalization.md +++ b/topics/reference_guide/localization/internationalization.md @@ -1,4 +1,4 @@ - + # Internationalization @@ -259,7 +259,7 @@ Example: #### Concatenation of Localized Strings and User Input -If an NLS string is not a simple literal but obtained as a concatenation of several values, always use [MessageFormat](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/text/MessageFormat.html) pattern to extract it to a message bundle. +If an NLS string is not a simple literal but obtained as a concatenation of several values, always use [MessageFormat](https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/text/MessageFormat.html) pattern to extract it to a message bundle. For example, to internationalize `"Delete Class " + className` add the following property: ``` diff --git a/topics/reference_guide/vcs_integration_for_plugins.md b/topics/reference_guide/vcs_integration_for_plugins.md index 503877cf4..06116f454 100644 --- a/topics/reference_guide/vcs_integration_for_plugins.md +++ b/topics/reference_guide/vcs_integration_for_plugins.md @@ -22,7 +22,7 @@ This page gives an overview of the Version Control Integration API. A [`FilePath`](%gh-ic%/platform/ide-core/src/com/intellij/openapi/vcs/FilePath.java) represents a path to a file or directory on disk or in the VCS repository. Unlike a [virtual file](virtual_file.md), a `FilePath` can represent a path to a file which doesn't exist on disk. -The main difference between a `FilePath` and a [`java.io.File`](https://docs.oracle.com/javase/8/docs/api/java/io/File.html) is that a `FilePath` caches the `VirtualFile` corresponding to the path, so it can be retrieved without doing a VFS search. +The main difference between a `FilePath` and a [`java.io.File`](https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/io/File.html) is that a `FilePath` caches the `VirtualFile` corresponding to the path, so it can be retrieved without doing a VFS search. To create instances of `FilePath`, the [`VcsContextFactory`](%gh-ic%/platform/vcs-api/src/com/intellij/openapi/vcs/actions/VcsContextFactory.java) API is used. diff --git a/topics/user_interface_components/editor_components.md b/topics/user_interface_components/editor_components.md index 4c899c1ee..c5b3daeae 100644 --- a/topics/user_interface_components/editor_components.md +++ b/topics/user_interface_components/editor_components.md @@ -6,7 +6,7 @@ ## `EditorTextField` -Compared to [Swing `JTextArea`](https://docs.oracle.com/javase/8/docs/api/javax/swing/JTextArea.html), the IntelliJ Platform's editor component has a ton of advantages: syntax highlighting support, code completion, code folding, and much more. +Compared to [Swing `JTextArea`](https://docs.oracle.com/en/java/javase/24/docs/api/java.desktop/javax/swing/JTextArea.html), the IntelliJ Platform's editor component has a ton of advantages: syntax highlighting support, code completion, code folding, and much more. [Editors](editors.md) are normally displayed in editor tabs, but they can be embedded in dialogs or tool windows, too. This is enabled by the [`EditorTextField`](%gh-ic%/platform/platform-impl/src/com/intellij/ui/EditorTextField.java) component. diff --git a/topics/user_interface_components/lists_and_trees.md b/topics/user_interface_components/lists_and_trees.md index 05fe27367..324ab356e 100644 --- a/topics/user_interface_components/lists_and_trees.md +++ b/topics/user_interface_components/lists_and_trees.md @@ -1,4 +1,4 @@ - + # List and Tree Controls @@ -6,7 +6,9 @@ ### `JBList` and `Tree` -Whenever you would normally use a standard [Swing `JList`](https://docs.oracle.com/javase/8/docs/api/javax/swing/JList.html) component, it's recommended to use the [`JBList`](%gh-ic%/platform/platform-api/src/com/intellij/ui/components/JBList.java) class as drop-in replacement. [`JBList`](%gh-ic%/platform/platform-api/src/com/intellij/ui/components/JBList.java) supports the following additional features on top of [`JList`](https://docs.oracle.com/javase/8/docs/api/javax/swing/JList.html): +Whenever you would normally use a standard [Swing `JList`](https://docs.oracle.com/en/java/javase/24/docs/api/java.desktop/javax/swing/JList.html) component, +it's recommended to use the [`JBList`](%gh-ic%/platform/platform-api/src/com/intellij/ui/components/JBList.java) class as drop-in replacement. +`JBList` supports the following additional features on top of `JList`: * Drawing a tooltip with complete text of an item if the item doesn't fit into the list box width. * Drawing a gray text message in the middle of the list box when it contains no items. @@ -14,7 +16,8 @@ Whenever you would normally use a standard [Swing `JList`](https://docs.oracle.c * Drawing a busy icon in the top right corner of the list box to indicate that a background operation is being performed. This can be enabled by calling `setPaintBusy()`. -Similarly, the [`Tree`](%gh-ic%/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java) class provides a replacement for the standard [`JTree`](https://docs.oracle.com/javase/8/docs/api/javax/swing/JTree.html) class. +Similarly, the [`Tree`](%gh-ic%/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java) class provides a replacement for the standard +[Swing `JTree`](https://docs.oracle.com/en/java/javase/24/docs/api/java.desktop/javax/swing/JTree.html) class. In addition to the features of [`JBList`](%gh-ic%/platform/platform-api/src/com/intellij/ui/components/JBList.java), it supports wide selection painting (Mac style) and auto-scroll on drag & drop. ### `ColoredListCellRenderer` and `ColoredTreeCellRenderer` diff --git a/topics/user_interface_components/misc_swing_components.md b/topics/user_interface_components/misc_swing_components.md index 5530c8e86..ba7a2707e 100644 --- a/topics/user_interface_components/misc_swing_components.md +++ b/topics/user_interface_components/misc_swing_components.md @@ -19,7 +19,8 @@ The `showCheckboxMessageDialog()` function provides an easy way to implement a < ### `JBSplitter` -[`JBSplitter`](%gh-ic%/platform/platform-api/src/com/intellij/ui/JBSplitter.java) is a replacement for the standard [`JSplitPane`](https://docs.oracle.com/javase/8/docs/api/javax/swing/JSplitPane.html) class. +[`JBSplitter`](%gh-ic%/platform/platform-api/src/com/intellij/ui/JBSplitter.java) is a replacement for the standard +[Swing `JSplitPane`](https://docs.oracle.com/en/java/javase/24/docs/api/java.desktop/javax/swing/JSplitPane.html) class. Unlike some other JetBrains-enhanced Swing components, it is not a drop-in replacement and has a different API. However, to achieve a consistent user experience, it is recommended to use `JBSplitter` instead of the standard `JSplitPane`. diff --git a/topics/user_interface_components/popups.md b/topics/user_interface_components/popups.md index 509142e7d..aca245867 100644 --- a/topics/user_interface_components/popups.md +++ b/topics/user_interface_components/popups.md @@ -1,4 +1,4 @@ - + # Popups @@ -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.

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_actions_tutorial.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/) 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_actions_tutorial.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 @@ -33,7 +33,7 @@ For popups with a variable and potentially large number of items, speed search t ### List Popups To create a list-like popup which is more flexible than a simple -[`JList`](https://docs.oracle.com/javase/8/docs/api/javax/swing/JList.html) +[`JList`](https://docs.oracle.com/en/java/javase/24/docs/api/java.desktop/javax/swing/JList.html) and doesn't represent the possible choices as actions in an action group, use [`JBPopupFactory.createListPopup()`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/popup/JBPopupFactory.java) with a