update links to Oracle Java docs

This commit is contained in:
Yann Cébron 2025-04-29 14:46:33 +02:00
parent ddf9ad8e09
commit e5a640b7ab
9 changed files with 25 additions and 21 deletions

View File

@ -10,7 +10,7 @@
The IntelliJ Platform is a highly concurrent environment. The IntelliJ Platform is a highly concurrent environment.
Code is executed in many threads simultaneously. 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. - [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. 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. EDT executes events taken from the Event Queue.

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Class Loaders # Class Loaders
@ -46,7 +46,7 @@ This allows a plugin to reference classes from other plugins.
## Using `ServiceLoader` ## 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: 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 ```java

View File

@ -46,8 +46,8 @@ To pass custom data between the invocation of the same builder between multiple
### Services and Extensions in External Builder ### 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. 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. 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 <path>META-INF/services/\$service-interface-fqn\$</path> file containing the implementation class's qualified name. An implementation of a service needs to be registered by creating the <path>META-INF/services/\$service-interface-fqn\$</path> file containing the implementation class's qualified name.
E.g. `BuilderService` implementations are registered in <path>META-INF/services/org.jetbrains.jps.incremental.BuilderService</path> file. E.g. `BuilderService` implementations are registered in <path>META-INF/services/org.jetbrains.jps.incremental.BuilderService</path> file.
These files don't have extensions, so you need to map corresponding patterns to text files in IDE settings. These files don't have extensions, so you need to map corresponding patterns to text files in IDE settings.

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Internationalization # Internationalization
@ -259,7 +259,7 @@ Example:
#### Concatenation of Localized Strings and User Input #### 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: For example, to internationalize `"Delete Class " + className` add the following property:
``` ```

View File

@ -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. 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. 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. To create instances of `FilePath`, the [`VcsContextFactory`](%gh-ic%/platform/vcs-api/src/com/intellij/openapi/vcs/actions/VcsContextFactory.java) API is used.

View File

@ -6,7 +6,7 @@
## `EditorTextField` ## `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. [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. This is enabled by the [`EditorTextField`](%gh-ic%/platform/platform-impl/src/com/intellij/ui/EditorTextField.java) component.

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# List and Tree Controls # List and Tree Controls
@ -6,7 +6,9 @@
### `JBList` and `Tree` ### `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 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. * 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. * 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()`. 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. 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` ### `ColoredListCellRenderer` and `ColoredTreeCellRenderer`

View File

@ -19,7 +19,8 @@ The `showCheckboxMessageDialog()` function provides an easy way to implement a <
### `JBSplitter` ### `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. 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`. However, to achieve a consistent user experience, it is recommended to use `JBSplitter` instead of the standard `JSplitPane`.

View File

@ -1,4 +1,4 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Popups # 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 [`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: The most commonly used methods are:
| Method | Description | | Method | Description |
|---------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |---------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `createComponentPopupBuilder()` | <p>Generic, allows showing any [Swing](https://docs.oracle.com/javase/tutorial/uiswing/start/index.html) component.</p><p>See [`ComponentPopupBuilder`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/popup/ComponentPopupBuilder.java)'s methods for possible options.</p><p>**Example:** [`IntentionPreviewPopupUpdateProcessor`](%gh-ic%/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/preview/IntentionPreviewPopupUpdateProcessor.kt) creating a popup rendering the intention preview.</p> | | `createComponentPopupBuilder()` | <p>Generic, allows showing any [Swing](https://docs.oracle.com/javase/tutorial/uiswing/) component.</p><p>See [`ComponentPopupBuilder`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/popup/ComponentPopupBuilder.java)'s methods for possible options.</p><p>**Example:** [`IntentionPreviewPopupUpdateProcessor`](%gh-ic%/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/preview/IntentionPreviewPopupUpdateProcessor.kt) creating a popup rendering the intention preview.</p> |
| `createPopupChooserBuilder()` | <p>For choosing one or more items from a plain `java.util.List`.</p><p>See [`PopupChooserBuilder`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/popup/PopupChooserBuilder.java)'s methods for possible options.</p><p>**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.</p> | | `createPopupChooserBuilder()` | <p>For choosing one or more items from a plain `java.util.List`.</p><p>See [`PopupChooserBuilder`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/popup/PopupChooserBuilder.java)'s methods for possible options.</p><p>**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.</p> |
| `createConfirmation()` | <p>For choosing between two options, and performing different actions depending on which option is selected.</p><p>**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.</p> | | `createConfirmation()` | <p>For choosing between two options, and performing different actions depending on which option is selected.</p><p>**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.</p> |
| `createActionGroupPopup()` | <p>Show actions from an [Action Group](grouping_actions_tutorial.md) and executes the action selected by the user.</p><p>**Example:** [`ShowRecentFindUsagesGroup`](%gh-ic%/platform/lang-impl/src/com/intellij/find/impl/ShowRecentFindUsagesGroup.java) invoked via <ui-path>Edit / Find Usages / Recent Find Usages</ui-path> and showing recent find usages group popup.</p> | | `createActionGroupPopup()` | <p>Show actions from an [Action Group](grouping_actions_tutorial.md) and executes the action selected by the user.</p><p>**Example:** [`ShowRecentFindUsagesGroup`](%gh-ic%/platform/lang-impl/src/com/intellij/find/impl/ShowRecentFindUsagesGroup.java) invoked via <ui-path>Edit / Find Usages / Recent Find Usages</ui-path> and showing recent find usages group popup.</p> |
### Action Groups ### Action Groups
@ -33,7 +33,7 @@ For popups with a variable and potentially large number of items, speed search t
### List Popups ### List Popups
To create a list-like popup which is more flexible than a simple 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 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) [`JBPopupFactory.createListPopup()`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/popup/JBPopupFactory.java)
with a with a