Skip to content

Commit 79ecc37

Browse files
authored
[fix] inline removed ActionCenter.getToolWindow (#82)
1 parent d4c5e22 commit 79ecc37

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

third_party/src/main/java/com/jetbrains/lang/dart/ide/errorTreeView/DartProblemsView.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ DartProblemsPresentationHelper getPresentationHelper() {
149149
return content != null ? (DartProblemsViewPanel)content.getComponent() : null;
150150
}
151151

152+
// Inlined from `ActionCenter` (where it was removed).
153+
// see: https://github.com/flutter/dart-intellij-third-party/issues/80
154+
private static @Nullable ToolWindow getToolWindow(@Nullable Project project) {
155+
return project == null ? null : ToolWindowManager.getInstance(project).getToolWindow("Notifications");
156+
}
157+
152158
void setTabTitle(@TabTitle @NotNull String tabTitle) {
153159
ToolWindow toolWindow = getDartAnalysisToolWindow();
154160
Content content = toolWindow != null ? toolWindow.getContentManager().getContent(0) : null;
@@ -251,9 +257,7 @@ else if ("never.show.again".equals(e.getDescription())) {
251257
@Override
252258
protected void hyperlinkActivated(@NotNull Notification notification, @NotNull HyperlinkEvent e) {
253259
notification.expire();
254-
// 2025.1, 251 change in platform, see
255-
// https://github.com/JetBrains/intellij-plugins/commit/762b22a5626c1b47f133cefb483bbc16178caee3
256-
final ToolWindow toolWindow = ActionCenter.getToolWindow(myProject);
260+
final ToolWindow toolWindow = getToolWindow(myProject);
257261
if (toolWindow != null) toolWindow.activate(null);
258262
// ActionCenter.activateLog(myProject);
259263
}

0 commit comments

Comments
 (0)