Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
977d6617
Commit
977d6617
authored
7 years ago
by
Vladislav.Soroka
Browse files
Options
Download
Email Patches
Plain Diff
Allow to customize toolwindow id to be used for test notifications
parent
bf06d4f6
Branches unavailable
Tags unavailable
No related merge requests found
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
java/compiler/impl/src/com/intellij/build/BuildContentManagerImpl.java
+2
-1
.../impl/src/com/intellij/build/BuildContentManagerImpl.java
platform/platform-api/src/com/intellij/openapi/wm/ToolWindowId.java
+1
-0
...latform-api/src/com/intellij/openapi/wm/ToolWindowId.java
platform/platform-resources-en/src/messages/UIBundle.properties
+1
-0
...rm/platform-resources-en/src/messages/UIBundle.properties
platform/testRunner/src/com/intellij/execution/testframework/TestConsoleProperties.java
+6
-0
...tellij/execution/testframework/TestConsoleProperties.java
platform/testRunner/src/com/intellij/execution/testframework/TestsUIUtil.java
+3
-3
...src/com/intellij/execution/testframework/TestsUIUtil.java
plugins/gradle/src/org/jetbrains/plugins/gradle/execution/test/runner/GradleConsoleProperties.java
+7
-0
...gradle/execution/test/runner/GradleConsoleProperties.java
with
20 additions
and
4 deletions
+20
-4
java/compiler/impl/src/com/intellij/build/BuildContentManagerImpl.java
+
2
-
1
View file @
977d6617
...
...
@@ -21,6 +21,7 @@ import com.intellij.openapi.project.Project;
import
com.intellij.openapi.startup.StartupManager
;
import
com.intellij.openapi.wm.ToolWindow
;
import
com.intellij.openapi.wm.ToolWindowAnchor
;
import
com.intellij.openapi.wm.ToolWindowId
;
import
com.intellij.openapi.wm.ToolWindowManager
;
import
com.intellij.openapi.wm.impl.ToolWindowImpl
;
import
com.intellij.openapi.wm.impl.content.ToolWindowContentUi
;
...
...
@@ -57,7 +58,7 @@ public class BuildContentManagerImpl implements BuildContentManager {
private
void
init
(
Project
project
)
{
final
Runnable
runnable
=
()
->
{
ToolWindow
toolWindow
=
ToolWindowManager
.
getInstance
(
project
)
.
registerToolWindow
(
"Build"
,
true
,
ToolWindowAnchor
.
BOTTOM
,
project
,
true
);
.
registerToolWindow
(
ToolWindowId
.
BUILD
,
true
,
ToolWindowAnchor
.
BOTTOM
,
project
,
true
);
toolWindow
.
getComponent
().
putClientProperty
(
ToolWindowContentUi
.
HIDE_ID_LABEL
,
"true"
);
toolWindow
.
setIcon
(
AllIcons
.
Actions
.
Compile
);
myToolWindow
=
toolWindow
;
...
...
This diff is collapsed.
Click to expand it.
platform/platform-api/src/com/intellij/openapi/wm/ToolWindowId.java
+
1
-
0
View file @
977d6617
...
...
@@ -26,6 +26,7 @@ public interface ToolWindowId {
String
ANT_BUILD
=
UIBundle
.
message
(
"tool.window.name.ant.build"
);
String
DEBUG
=
UIBundle
.
message
(
"tool.window.name.debug"
);
String
RUN
=
UIBundle
.
message
(
"tool.window.name.run"
);
String
BUILD
=
UIBundle
.
message
(
"tool.window.name.build"
);
String
FIND
=
UIBundle
.
message
(
"tool.window.name.find"
);
String
CVS
=
UIBundle
.
message
(
"tool.window.name.cvs"
);
String
HIERARCHY
=
UIBundle
.
message
(
"tool.window.name.hierarchy"
);
...
...
This diff is collapsed.
Click to expand it.
platform/platform-resources-en/src/messages/UIBundle.properties
+
1
-
0
View file @
977d6617
...
...
@@ -48,6 +48,7 @@ tool.window.name.ant.build=Ant Build
tool.window.name.preview
=
Preview
tool.window.name.debug
=
Debug
tool.window.name.run
=
Run
tool.window.name.build
=
Build
tool.window.name.find
=
Find
tool.window.name.cvs
=
CVS
tool.window.name.hierarchy
=
Hierarchy
...
...
This diff is collapsed.
Click to expand it.
platform/testRunner/src/com/intellij/execution/testframework/TestConsoleProperties.java
+
6
-
0
View file @
977d6617
...
...
@@ -30,6 +30,7 @@ import com.intellij.openapi.actionSystem.AnAction;
import
com.intellij.openapi.actionSystem.DefaultActionGroup
;
import
com.intellij.openapi.module.Module
;
import
com.intellij.openapi.project.Project
;
import
com.intellij.openapi.wm.ToolWindowId
;
import
com.intellij.psi.search.GlobalSearchScope
;
import
com.intellij.util.config.*
;
import
com.intellij.util.containers.ContainerUtil
;
...
...
@@ -231,4 +232,9 @@ public abstract class TestConsoleProperties extends StoringPropertyContainer imp
public
ExecutionTarget
getExecutionTarget
()
{
return
DefaultExecutionTarget
.
INSTANCE
;
}
@NotNull
public
String
getWindowId
()
{
return
isDebug
()
?
ToolWindowId
.
DEBUG
:
ToolWindowId
.
RUN
;
}
}
This diff is collapsed.
Click to expand it.
platform/testRunner/src/com/intellij/execution/testframework/TestsUIUtil.java
+
3
-
3
View file @
977d6617
...
...
@@ -130,7 +130,7 @@ public class TestsUIUtil {
TestStatusListener
.
notifySuiteFinished
(
root
,
properties
.
getProject
());
final
String
testRunDebug
Id
=
properties
.
isDebug
()
?
ToolWindowId
.
DEBUG
:
Tool
WindowId
.
RUN
;
final
String
window
Id
=
properties
.
get
WindowId
()
;
final
ToolWindowManager
toolWindowManager
=
ToolWindowManager
.
getInstance
(
project
);
final
String
title
=
testResultPresentation
.
getTitle
();
...
...
@@ -138,8 +138,8 @@ public class TestsUIUtil {
final
String
balloonText
=
testResultPresentation
.
getBalloonText
();
final
MessageType
type
=
testResultPresentation
.
getType
();
if
(!
Comparing
.
strEqual
(
toolWindowManager
.
getActiveToolWindowId
(),
testRunDebug
Id
))
{
toolWindowManager
.
notifyByBalloon
(
testRunDebug
Id
,
type
,
balloonText
,
null
,
null
);
if
(!
Comparing
.
strEqual
(
toolWindowManager
.
getActiveToolWindowId
(),
window
Id
))
{
toolWindowManager
.
notifyByBalloon
(
window
Id
,
type
,
balloonText
,
null
,
null
);
}
NOTIFICATION_GROUP
.
createNotification
(
balloonText
,
type
).
notify
(
project
);
...
...
This diff is collapsed.
Click to expand it.
plugins/gradle/src/org/jetbrains/plugins/gradle/execution/test/runner/GradleConsoleProperties.java
+
7
-
0
View file @
977d6617
...
...
@@ -21,6 +21,7 @@ import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties
import
com.intellij.openapi.actionSystem.DefaultActionGroup
;
import
com.intellij.openapi.actionSystem.Separator
;
import
com.intellij.openapi.externalSystem.service.execution.ExternalSystemRunConfiguration
;
import
com.intellij.openapi.wm.ToolWindowId
;
import
com.intellij.util.config.BooleanProperty
;
import
com.intellij.util.config.DumbAwareToggleBooleanProperty
;
import
com.intellij.util.config.ToggleBooleanProperty
;
...
...
@@ -58,6 +59,12 @@ public class GradleConsoleProperties extends SMTRunnerConsoleProperties {
return
TreeSelectionModel
.
DISCONTIGUOUS_TREE_SELECTION
;
}
@NotNull
@Override
public
String
getWindowId
()
{
return
ToolWindowId
.
BUILD
;
}
@Override
public
void
appendAdditionalActions
(
DefaultActionGroup
actionGroup
,
JComponent
parent
,
TestConsoleProperties
target
)
{
super
.
appendAdditionalActions
(
actionGroup
,
parent
,
target
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help