mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
#IJPL-174344 Fixed: allow executors to override the tool window name
Fix DTRC-31137 as well. GitOrigin-RevId: 41a43aff2b8724655af98cdd70d90fe473df65c2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c3d02ef03e
commit
7b9386b50b
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("ReplacePutWithAssignment", "ReplaceGetOrSet")
|
||||
|
||||
package com.intellij.execution.ui
|
||||
@@ -436,7 +436,7 @@ class RunContentManagerImpl(private val project: Project) : RunContentManager {
|
||||
}
|
||||
|
||||
getToolWindowManager().getToolWindow(id)?.apply {
|
||||
stripeTitle = executor.actionName
|
||||
stripeTitle = executor.toolWindowTitle
|
||||
setIcon(executor.toolWindowIcon)
|
||||
toolWindowIdToBaseIcon[id] = executor.toolWindowIcon
|
||||
}
|
||||
|
||||
@@ -252,6 +252,7 @@ a:com.intellij.execution.Executor
|
||||
- getStartActionText(java.lang.String):java.lang.String
|
||||
- a:getToolWindowIcon():javax.swing.Icon
|
||||
- a:getToolWindowId():java.lang.String
|
||||
- getToolWindowTitle():java.lang.String
|
||||
- isApplicable(com.intellij.openapi.project.Project):Z
|
||||
- s:shortenNameIfNeeded(java.lang.String):java.lang.String
|
||||
a:com.intellij.execution.ExecutorRegistry
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.execution;
|
||||
|
||||
import com.intellij.execution.executors.DefaultRunExecutor;
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.NlsActions;
|
||||
import com.intellij.openapi.util.NlsContexts;
|
||||
import com.intellij.openapi.util.NlsSafe;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
@@ -54,6 +55,13 @@ public abstract class Executor {
|
||||
|
||||
public abstract @NotNull @NlsActions.ActionText String getActionName();
|
||||
|
||||
/**
|
||||
* @return tool window title text that will be applied to a tool window when it's customized.
|
||||
*/
|
||||
public @NotNull @NlsContexts.TabTitle String getToolWindowTitle() {
|
||||
return getActionName();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the unique ID of the executor
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user