mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 06:51:17 +07:00
ui: document ToolWindow API limitations
GitOrigin-RevId: 2c63c1ad3eabc9501c0bfed778e8036161903aae
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0ff3e93614
commit
566c7c026a
@@ -16,6 +16,11 @@ import javax.swing.Icon
|
||||
* See [Tool Windows](https://plugins.jetbrains.com/docs/intellij/tool-windows.html) in SDK Docs.
|
||||
*/
|
||||
interface ToolWindowFactory : PossiblyDumbAware {
|
||||
/**
|
||||
* This will be called once, and cannot be undone.
|
||||
*
|
||||
* @return false to deactivate the factory
|
||||
*/
|
||||
suspend fun isApplicableAsync(project: Project): Boolean {
|
||||
return blockingContext {
|
||||
@Suppress("DEPRECATION")
|
||||
@@ -42,8 +47,12 @@ interface ToolWindowFactory : PossiblyDumbAware {
|
||||
|
||||
/**
|
||||
* Check if the tool window (and its stripe button) should be visible after startup.
|
||||
* Unavailable tool windows are still visible in the "Main Menu | View | Tool Windows".
|
||||
*
|
||||
* This will be called once. Use [ToolWindow.setAvailable] on state changes.
|
||||
*
|
||||
* @see ToolWindow.isAvailable
|
||||
* @see ToolWindowManager.unregisterToolWindow
|
||||
*/
|
||||
fun shouldBeAvailable(project: Project): Boolean = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user