mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
status_bar_widgets.md: Add information about how to get a widget programmatically
This commit is contained in:
parent
48b0413cad
commit
a8b77e1ab1
@ -113,3 +113,13 @@ By default, widgets aren't shown in [LightEdit](https://www.jetbrains.com/help/i
|
|||||||
To show a widget, implement
|
To show a widget, implement
|
||||||
[`LightEditCompatible`](%gh-ic%/platform/core-api/src/com/intellij/ide/lightEdit/LightEditCompatible.java)
|
[`LightEditCompatible`](%gh-ic%/platform/core-api/src/com/intellij/ide/lightEdit/LightEditCompatible.java)
|
||||||
in your factory.
|
in your factory.
|
||||||
|
|
||||||
|
## FAQ
|
||||||
|
|
||||||
|
### How to get a widget programmatically?
|
||||||
|
|
||||||
|
```kotlin
|
||||||
|
val widget = WindowManager.getInstance().getStatusBar(project)
|
||||||
|
.getWidget(MyWidget.ID) as MyWidget
|
||||||
|
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user