Skip to content

Open build toolwindow when the sync ends with an error #7304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

LeFrosch
Copy link
Collaborator

To avoid silent errors, open the build toolwindow if the sync exists with an error or a warning. Otherwise, it could be confusing for the user if they don't notice that the sync has failed.

@LeFrosch LeFrosch marked this pull request as ready for review February 11, 2025 14:19
@github-actions github-actions bot added product: CLion CLion plugin product: IntelliJ IntelliJ plugin product: GoLand GoLand plugin awaiting-review Awaiting review from Bazel team on PRs labels Feb 11, 2025
Copy link
Collaborator

@odisseus odisseus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@@ -82,6 +84,15 @@ class BuildViewScope(project: Project, private val title: String) : BlazeScope {
else -> progress.finish()
}

if (ctx.hasErrors() || ctx.hasWarnings()) {
// show the toolwindow of there was an error or warning during the sync
invokeLater {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pluginProjectScope(project).launch(Dispatcher.EDT) {
  BuildContentManager.getInstance(project).getOrCreateToolWindow().activate(null)
}

To avoid silent errors, open the build toolwindow if the sync exists with
an error or a warning. Otherwise, it could be confusing for the user if
they don't notice that the sync has failed.
@LeFrosch LeFrosch merged commit 28b75d2 into bazelbuild:master Feb 17, 2025
5 checks passed
@LeFrosch LeFrosch deleted the sync-view-on-error branch February 17, 2025 12:21
@github-actions github-actions bot removed the awaiting-review Awaiting review from Bazel team on PRs label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: CLion CLion plugin product: GoLand GoLand plugin product: IntelliJ IntelliJ plugin
Projects
Development

Successfully merging this pull request may close these issues.

5 participants