some links to IJ Platform UI Guideline articles

This commit is contained in:
Yann Cébron 2020-11-18 15:58:14 +01:00
parent 7a1a72bebc
commit 123c88a3a6
9 changed files with 20 additions and 3 deletions

View File

@ -360,3 +360,5 @@ To get a Swing component from such an object, call the respective `getComponent(
If an action toolbar is attached to a specific component (for example, a panel in a tool window), call `ActionToolbar.setTargetComponent()` and pass the related component's instance as a parameter.
Setting the target ensures that the toolbar buttons' state depends on the state of the related component, not on the current focus location within the IDE frame.
See [Toolbar](https://jetbrains.design/intellij/controls/toolbar/) in _IntelliJ Platform UI Guidelines_ for an overview.

View File

@ -44,6 +44,8 @@ When the file is changed, the annotator is called incrementally to process only
To highlight a region of text as a warning or error, the annotator calls `createErrorAnnotation()` or `createWarningAnnotation()` on the [`AnnotationHolder`](upsource:///platform/analysis-api/src/com/intellij/lang/annotation/AnnotationHolder.java) object passed to it, and optionally calls `registerFix()` on the returned [`Annotation`](upsource:///platform/analysis-api/src/com/intellij/lang/annotation/Annotation.java) object to add a quick fix for the error or warning.
To apply additional syntax highlighting, the annotator can call [`AnnotationHolder.createInfoAnnotation()`](upsource:///platform/analysis-api/src/com/intellij/lang/annotation/AnnotationHolder.java) with an empty message and then call [`Annotation.setTextAttributes()`](upsource:///platform/analysis-api/src/com/intellij/lang/annotation/Annotation.java) to specify the text attributes key for the highlighting.
See [Inspections](https://jetbrains.design/intellij/text/inspections/) topic in _IntelliJ Platform UI Guidelines_ on how to write message texts for highlighting/quick fixes.
> **NOTE** See also [Code Inspections](code_inspections_and_intentions.md) which offer a more fine-grained control and some additional features.

View File

@ -137,6 +137,8 @@ The color of a replaced icon takes precedence over any `ColorPalette` overrides.
UI Themes can change the appearance of more general controls in the IntelliJ Platform UI.
Examples of these controls are labels, buttons, checkboxes, trees, lists, and menus.
See also [Platform theme colors — UI components](https://jetbrains.design/intellij/principles/platform_theme_colors/#UI-components) in _IntelliJ Platform UI Guidelines_.
### Custom UI Control Colors
A UI control's custom color is specified by adding a key-value pair to the `"ui": {}` section of a Theme description file.

View File

@ -9,7 +9,7 @@ Plugins need icons mostly for actions, custom components renderers, tool windows
> **NOTE** Plugin Icons, which represent a plugin itself, have different requirements than icons and images used within a plugin.
For more information see the [Plugin Icon](/basics/plugin_structure/plugin_icon_file.md) page.
> **TIP** Plugins should reuse existing platform icons whenever possible, see [`AllIcons`](upsource:///platform/util/src/com/intellij/icons/AllIcons.java).
> **TIP** Plugins should reuse existing platform icons whenever possible, see [Icons list](https://jetbrains.design/intellij/resources/icons_list/) and [`AllIcons`](upsource:///platform/util/src/com/intellij/icons/AllIcons.java).
> A detailed [design guideline](https://jetbrains.design/intellij/principles/icons/) is available for creating custom icons.
## How to organize and how to use icons?

View File

@ -10,6 +10,8 @@ In addition, the comparing_references_inspection code sample demonstrates implem
You can also create custom inspections through the IntelliJ IDEA user interface.
See [Code Inspection](https://www.jetbrains.com/idea/webhelp/code-inspection.html) and [Creating Custom Inspections](https://www.jetbrains.com/idea/help/creating-custom-inspections.html) for more information.
See [Inspections](https://jetbrains.design/intellij/text/inspections/) topic in _IntelliJ Platform UI Guidelines_ on naming, writing description, and message texts for inspections.
## Creating an Inspection Plugin

View File

@ -31,4 +31,7 @@ The [`JBTabs`](upsource:///platform/platform-api/src/com/intellij/ui/tabs/JBTabs
It has a significantly different look & feel compared to the standard Swing tabs, and looks less native on the macOS platform, so it's up to the developer to choose which tab control would be more appropriate.
### Toolbars
See [Building UI from Actions](/basics/action_system.md#building-ui-from-actions) on how to create `AnAction`-based toolbars.
See [Toolbar](https://jetbrains.design/intellij/controls/toolbar/) in _IntelliJ Platform UI Guidelines_ for an overview.
[Building UI from Actions](/basics/action_system.md#building-ui-from-actions) covers creating `AnAction`-based toolbars.

View File

@ -5,6 +5,8 @@ title: Notifications
One of the leading design principles is avoiding the use of modal message boxes for notifying the user about errors and other situations that may warrant the user's attention. As a replacement, the *IntelliJ Platform* provides multiple non-modal notification UI options.
For an overview, refer to [Notifications](https://jetbrains.design/intellij/controls/notifications/) in _IntelliJ Platform UI Guidelines_.
### Dialogs
When working in dialog, instead of checking the validity of the input when the _OK_ button is pressed and notifying the user about invalid data with a modal dialog, the recommended approach is to use [`DialogWrapper.doValidate()`](upsource:///platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java), which was described previously.
@ -22,6 +24,8 @@ It has two main advantages:
* The user can control the way each notification type is displayed under `Settings | Appearance & Behavior | Notifications`
* All displayed notifications are gathered in the Event Log tool window and can be reviewed later
For UI reference, see [Balloon](https://jetbrains.design/intellij/controls/balloon/) in _IntelliJ Platform UI Guidelines_.
The specific method used to display a notification is [`Notifications.Bus.notify()`](upsource:///platform/platform-api/src/com/intellij/notification/Notifications.java). If the current Project is known, please use overload with `Project` parameter, so the notification is shown in its associated frame.

View File

@ -7,7 +7,7 @@ title: Tool Windows
_Tool windows_ are child windows of the IDE used to display information.
These windows generally have their own toolbars (referred to as _tool window bars_) along the outer edges of the main window containing one or more _tool window buttons_, which activate panels displayed on the left, bottom and right sides of the main IDE window.
For detailed information about tool windows, please see [IntelliJ IDEA Web Help ](https://www.jetbrains.com/idea/help/tool-windows.html).
For detailed information about tool windows, please see [IntelliJ IDEA Web Help](https://www.jetbrains.com/idea/help/tool-windows.html) and [Tool window](https://jetbrains.design/intellij/components/tool_window/) topic in _IntelliJ Platform UI Guidelines_.
Each side contains two tool window groups, the primary and the secondary one, and only one tool window from each group can be active at a time.

View File

@ -10,6 +10,8 @@ Using those components in your plugins will ensure that your plugin looks and wo
> **NOTE** The recommended way of building UIs on the IntelliJ Platform (2019.2 and later) is using [Kotlin UI DSL](/user_interface_components/kotlin_ui_dsl.md).
> Using GUI designer with Kotlin is currently [not supported](https://youtrack.jetbrains.com/issue/KT-6660).
Please refer to [Writing short and clear](https://jetbrains.design/intellij/text/writing_short/) in _IntelliJ Platform UI Guidelines_ on writing UI-related texts.
The following components are particularly noteworthy: