Repository: godotengine/godot
File: modules/mono/editor/GodotTools/GodotTools/Build/MSBuildPanel.cs (C#)

Code before:
using GodotTools.Internals;
using static GodotTools.Internals.Globals;
using File = GodotTools.Utils.File;

namespace GodotTools.Build
{
    public partial class MSBuildPanel : EditorDock, ISerializationListener
    {
#nullable disable
        private MenuButton _buildMenuButton;
        private Button _openLogsFolderButton;

        private BuildProblemsView _problemsView;
        private BuildOutputView _outputView;
#nullable enable

        public BuildInfo? LastBuildInfo { get; private set; }
        public bool IsBuildingOngoing { get; private set; }
        public BuildResult? BuildResult { get; private set; }

        private readonly object _pendingBuildLogTextLock = new object();
        private string _pendingBuildLogText = string.Empty;

        public void UpdateBuildStateIcon()
        {
            Texture2D icon = null;
            if (IsBuildingOngoing)
                icon = GetThemeIcon("Stop", "EditorIcons");

            if (_problemsView.WarningCount > 0 && _problemsView.ErrorCount > 0)
                icon = GetThemeIcon("ErrorWarning", "EditorIcons");

            if (_problemsView.WarningCount > 0)
                icon = GetThemeIcon("Warning", "EditorIcons");

            if (_problemsView.ErrorCount > 0)
                icon = GetThemeIcon("Error", "EditorIcons");

            SetDockIcon(icon);
            SetForceShowIcon(icon != null);
        }

        private enum BuildMenuOptions
        {
            BuildProject,
            RebuildProject,
            CleanProject,
        }

        private void BuildMenuOptionPressed(long id)
        {

Review comment (suggestion):
```suggestion
            Texture2D? icon = null;
```

Code after:
using GodotTools.Internals;
using static GodotTools.Internals.Globals;
using File = GodotTools.Utils.File;

namespace GodotTools.Build
{
    public partial class MSBuildPanel : EditorDock, ISerializationListener
    {
#nullable disable
        private MenuButton _buildMenuButton;
        private Button _openLogsFolderButton;

        private BuildProblemsView _problemsView;
        private BuildOutputView _outputView;
#nullable enable

        public BuildInfo? LastBuildInfo { get; private set; }
        public bool IsBuildingOngoing { get; private set; }
        public BuildResult? BuildResult { get; private set; }

        private readonly object _pendingBuildLogTextLock = new object();
        private string _pendingBuildLogText = string.Empty;

        public void UpdateBuildStateIcon()
        {
            Texture2D? icon = null;
            if (IsBuildingOngoing)
                icon = GetThemeIcon("Stop", "EditorIcons");

            if (_problemsView.WarningCount > 0 && _problemsView.ErrorCount > 0)
                icon = GetThemeIcon("ErrorWarning", "EditorIcons");

            if (_problemsView.WarningCount > 0)
                icon = GetThemeIcon("Warning", "EditorIcons");

            if (_problemsView.ErrorCount > 0)
                icon = GetThemeIcon("Error", "EditorIcons");

            DockIcon = icon;
            ForceShowIcon = icon != null;
        }

        private enum BuildMenuOptions
        {
            BuildProject,
            RebuildProject,
            CleanProject,
        }

        private void BuildMenuOptionPressed(long id)
        {