示例#1
0
        public void BuildStarted(BuildAction buildAction, BuildScope buildScope)
        {
            _currentQueuePosOfBuildingProject          = 0;
            ErrorNavigationService.BuildErrorNavigated = false;
            _buildOutputLogger.Attach();

            ResetBuildInformationModel();
            ReloadCurrentProjects();

            BuildInformationModel.BuildStartTime    = DateTime.Now;
            BuildInformationModel.BuildFinishTime   = null;
            BuildInformationModel.CurrentBuildState = BuildState.InProgress;
            BuildInformationModel.BuildAction       = buildAction;
            BuildInformationModel.BuildScope        = buildScope;
            BuildInformationModel.BuildId           = Guid.NewGuid();

            _windowStateService.ApplyToolWindowStateAction(_packageSettingsProvider.Settings.WindowSettings.WindowActionOnBuildBegin);
            _timer = new Timer(state => BuildUpdate(), null, BuildInProcessQuantumSleep, BuildInProcessQuantumSleep);

            string message = _buildMessagesFactory.GetBuildBeginMajorMessage(BuildInformationModel);

            _statusBarNotificationService.ShowTextWithFreeze(message);
            _origTextCurrentState = message;
            BuildInformationModel.StateMessage = _origTextCurrentState;
            UpdateTaskBar();
            BuildStateChanged();

            DiagnosticsClient.TrackEvent("BuildStarted", new Dictionary <string, string>
            {
                { "BuildId", BuildInformationModel.BuildId.ToString() },
                { "BuildAction", buildAction.ToString() },
                { "BuildScope", buildScope.ToString() }
            });
        }
        protected override void WhatIfAction()
        {
            TaskLogger.LogInfo(MessageImportance.High, "Projects will be categorized for Scope '{0}'", BuildScope.ToString());
            TaskLogger.LogInfo(MessageImportance.High, "Project Type '{0}' will be used ", ProjType.ToString());
            TaskLogger.LogInfo(MessageImportance.High, "Project Category '{0}' will be used ", ProjCat.ToString());
            TaskLogger.LogInfo(MessageImportance.High, "Tokens to be included '{0}'", CmdLineIncludeScope);
            TaskLogger.LogInfo(MessageImportance.High, "Tokens to be excluded '{0}'", CmdLineExcludeScope);

            TaskLogger.LogInfo(MessageImportance.High, "Repository Root Dir Path '{0}'", RepositoryRootDirPath);

            ProjectSearchUtility psu = new ProjectSearchUtility(RepositoryRootDirPath, MultipleScopes, BuildScope, FullyQualifiedBuildScopeDirPath, CmdLineExcludeScope, CmdLineIncludeScope, ProjType, ProjCat);

            psu.UseLegacyDirs = UseLegacyDirStructure;
            TaskLogger.LogInfo(MessageImportance.High, "Use Legacy Directory Strucuture is set to '{0}'", psu.UseLegacyDirs.ToString());
            TaskLogger.LogInfo(MessageImportance.High, "SDK Root Dir Path '{0}'", psu.SDKRootDir);
            TaskLogger.LogInfo(MessageImportance.High, psu.SearchDirPaths, "Search Dir Path(s)");
        }