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

Code before:
#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)
        {
            switch ((BuildMenuOptions)id)
            {
                case BuildMenuOptions.BuildProject:
                    BuildProject();
                    break;

                case BuildMenuOptions.RebuildProject:
                    RebuildProject();
                    break;

                case BuildMenuOptions.CleanProject:
                    CleanProject();
                    break;


Review comment (suggestion):
```suggestion
            DockIcon = icon;
            ForceShowIcon = icon != null;
```

Code after:
#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)
        {
            switch ((BuildMenuOptions)id)
            {
                case BuildMenuOptions.BuildProject:
                    BuildProject();
                    break;

                case BuildMenuOptions.RebuildProject:
                    RebuildProject();
                    break;

                case BuildMenuOptions.CleanProject:
                    CleanProject();
                    break;