private void BuildEvents_OnBuildDone(EnvDTE.vsBuildScope scope, EnvDTE.vsBuildAction action)
 {
     if (scope == EnvDTE.vsBuildScope.vsBuildScopeSolution && this.solutionBuildSuccess)
     {
         this.onSuccessfulSolutionBuild();
     }
 }
 //BuildEvents
 public void OnBuildBegin(EnvDTE.vsBuildScope scope, EnvDTE.vsBuildAction action)
 {
     if (IsEnabled)
     {
         if (this.IsMavenRunning)
         {
             m_applicationObject.ExecuteCommand("Build.Cancel", string.Empty);
             m_applicationObject.StatusBar.Highlight(true);
             m_applicationObject.StatusBar.Text = "Build canceled.  Please stop AndroMDA before building.";
         }
         else if (action != vsBuildAction.vsBuildActionClean)
         {
             if (!AreGeneratedFilesUpToDate && m_addInSettings.PromptToGenerateOnBuildIfFilesOutOfDate)
             {
                 System.Windows.Forms.DialogResult result = System.Windows.Forms.MessageBox.Show("The UML model has been updated since the last time code was generated.\nWould you like to regenerate code from the model?", "Android/VS", System.Windows.Forms.MessageBoxButtons.YesNoCancel, System.Windows.Forms.MessageBoxIcon.Question);
                 if (result == System.Windows.Forms.DialogResult.Yes)
                 {
                     m_restartBuild = true;
                     m_applicationObject.ExecuteCommand("Build.Cancel", string.Empty);
                     RunMaven();
                 }
                 if (result == System.Windows.Forms.DialogResult.Cancel)
                 {
                     m_applicationObject.ExecuteCommand("Build.Cancel", string.Empty);
                 }
             }
         }
     }
 }
        private void OnBuildDone(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
        {
            // detach from the event
            buildEvents.OnBuildDone -= OnBuildDone;

            // rollback the properties changes
            Rollback();

            EnvDTE80.ErrorList errorList = ((EnvDTE80.DTE2) this.project.DTE).ToolWindows.ErrorList;
            // ShowResult if there is any WCF rule violation
            int ruleWarnings = RuleWarningsCount(errorList);

            if (ruleWarnings == 0)
            {
                Logger.Write(
                    Resources.CodeAnalysisSuccess, string.Empty, TraceEventType.Information, 1);
            }
            else
            {
                Logger.Write(
                    string.Format(CultureInfo.CurrentCulture, Resources.CodeAnalysisWarnings, ruleWarnings));
                // We may force the Show Warnings button to be ON so the user will always see any
                // warning message from the result of the code analysis run.
                errorList.ShowWarnings = true;
            }
            this.project = null;
        }
Beispiel #4
0
 /// <summary>
 /// Called when solution is built.
 /// </summary>
 /// <param name="Scope">The scope.</param>
 /// <param name="Action">The action.</param>
 void OnBuildDone(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
 {
     if (BuildDone != null)
     {
         BuildDone();
     }
 }
Beispiel #5
0
 private void // ERROR: Handles clauses are not supported in C#
 bldevents_OnBuildDone(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
 {
     if ((Scope == vsBuildScope.vsBuildScopeSolution) && ((Action == vsBuildAction.vsBuildActionBuild) || (Action == vsBuildAction.vsBuildActionRebuildAll)))
     {
         ExecuteConversion(NetVertVsProject.NetVertExecutionEnum.AfterSolutionBuild);
     }
 }
Beispiel #6
0
 //BuildEvents
 public void OnBuildBegin(EnvDTE.vsBuildScope scope, EnvDTE.vsBuildAction action)
 {
     m_isBuilding = true;
     if (m_solutionManager != null)
     {
         m_solutionManager.OnBuildBegin(scope, action);
     }
 }
 private void BuildEvents_OnBuildBegin(EnvDTE.vsBuildScope scope, EnvDTE.vsBuildAction action)
 {
     if (scope == EnvDTE.vsBuildScope.vsBuildScopeSolution)
     {
         // Reset the solution build success to true and let build failures set it to false
         this.solutionBuildSuccess = true;
     }
 }
Beispiel #8
0
 public void OnBuildDone(EnvDTE.vsBuildScope scope, EnvDTE.vsBuildAction action)
 {
     if (m_solutionManager != null)
     {
         m_solutionManager.OnBuildDone(scope, action);
     }
     m_isBuilding = false;
 }
 /// <summary>
 /// This event is fired only when user wants to build, rebuild or clean the project.
 /// </summary>
 /// <param name="Scope"> Represents the scope of the build. </param>
 /// <param name="Action"> Represents the type of build action that is occurring, such as a build or a deploy action. </param>
 public void OnBuildBegin(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
 {
     if ((Action == vsBuildAction.vsBuildActionBuild) || (Action == vsBuildAction.vsBuildActionRebuildAll))
     {
         if ((_hitPlay == false) && (_isDeploying == false)) // means that the "play" building and deploying process was cancelled before, so we have to disable the
         // OnBuildDone event to avoid deploying in case user only wants to build.
         {
             _buildEvents.OnBuildDone -= new _dispBuildEvents_OnBuildDoneEventHandler(this.OnBuildDone);
         }
         _hitPlay = false;
     }
 }
 /// <summary>
 /// This event is fired only when the build/rebuild/clean process ends.
 /// </summary>
 /// <param name="Scope"> Represents the scope of the build. </param>
 /// <param name="Action"> Represents the type of build action that is occurring, such as a build or a deploy action. </param>
 public void OnBuildDone(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
 {
     if (Action == vsBuildAction.vsBuildActionBuild)
     {
         _amountOfProjects -= 1;
         if (_amountOfProjects == 0)
         {
             _buildEvents.OnBuildDone -= new _dispBuildEvents_OnBuildDoneEventHandler(this.OnBuildDone);
             Built();
         }
     }
     else if (Action == vsBuildAction.vsBuildActionDeploy)
     {
         _buildEvents.OnBuildDone -= new _dispBuildEvents_OnBuildDoneEventHandler(this.OnBuildDone);
         _isDeploying              = false;
         Deployed();
     }
 }
Beispiel #11
0
        /// <summary>
        /// Called when the whole build begins.
        ///
        /// Record the start time.
        /// </summary>
        public void OnBuildBegin(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
        {
            // Check for a solution build for Build or RebuildAll
            if ((EnvDTE.vsBuildScope.vsBuildScopeSolution == Scope ||
                 EnvDTE.vsBuildScope.vsBuildScopeBatch == Scope ||
                 EnvDTE.vsBuildScope.vsBuildScopeProject == Scope) &&
                (EnvDTE.vsBuildAction.vsBuildActionBuild == Action || EnvDTE.vsBuildAction.vsBuildActionRebuildAll == Action))
            {
                // Flag our build timer
                m_IsBuildOrRebuild = true;

                amTiming = true;
                dtStart  = DateTime.Now;

                // m_OutputWindowPane.OutputString("\n森科开发项目编译开始...\n");
                m_OutputWindowPane.OutputString(String.Format("\n现在在开始编译,开始时间为:{0}\n", dtStart));
            }
        }
Beispiel #12
0
        /// <summary>
        /// Called when solution is built.
        /// </summary>
        /// <param name="Scope">The scope.</param>
        /// <param name="Action">The action.</param>
        void OnBuildDone(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
        {
            if (_buildSuccessful)
            {
                if (BuildSucceeded != null)
                {
                    BuildSucceeded();
                }
            }
            else
            {
                if (BuildFailed != null)
                {
                    BuildFailed();
                }
            }

            _building        = false;
            _buildSuccessful = true;
        }
Beispiel #13
0
        void BuildEvents_OnBuildDone(EnvDTE.vsBuildScope scope, EnvDTE.vsBuildAction action)
        {
            // Ignore this build event if we didn't start it.
            if (!_customBuildInProgress)
            {
                return;
            }

            _customBuildInProgress = false;

            if (_overallBuildSuccess)
            {
                // Launch the debugger.
                var dte = (DTE2)Package.GetGlobalService(typeof(SDTE));
                dte.ExecuteCommand("Debug.Start");
            }
            else
            {
                WriteToOutputWindow("Build", "Custom build failed.");
            }
        }
Beispiel #14
0
        /// <summary>
        /// Called when the whole build completes.
        ///
        /// Calculate and display the total build time.  Also sort the project durations and display them.
        /// </summary>
        public void OnBuildDone(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
        {
            // Check if we are actually timing this build
            if (amTiming)
            {
                amTiming = false;
                dtEnd    = DateTime.Now;
                m_OutputWindowPane.OutputString(String.Format("\n 现在结束编译,开始时间为: {0},结束时间:{1}\n", dtStart, dtEnd));
                TimeSpan tsElapsed = dtEnd - dtStart;
                m_OutputWindowPane.OutputString(String.Format("\n全部编译时间为: {0}\n", tsElapsed));
            }

            if (m_IsBuildOrRebuild)
            {
                m_IsBuildOrRebuild = false;
                if (m_envcfgs == null)
                {
                    m_envcfgs = new ThkEnvCfgs();
                    m_envcfgs.LoadConfig();
                }
                ThkVCDirSet vcset = m_envcfgs.GetVCConfig();
                if (vcset == null)
                {
                    m_OutputWindowPane.OutputString("\n跨过:未找到森科编译环境配置信息\n");
                    return;
                }
                ThkVCDirItem curVc = vcset.GetCurVCItem();

                if (curVc != null && curVc.StrVCDir != null && curVc.StrVCDir.Length > 0)
                {
                    Environment.SetEnvironmentVariable("VCInstallDir", curVc.StrVCDir, EnvironmentVariableTarget.Process);
                }
                if (curVc.StrVCVer == null)
                {
                    curVc.StrVCVer = "未知版本";
                }
                m_OutputWindowPane.OutputString("\n森科开发项目编译结束,自动转换成缺省配置.." + curVc.StrVCVer + "....成功!\n");
            }
        }
Beispiel #15
0
 void buildEvents_OnBuildBegin(vsBuildScope Scope, vsBuildAction Action)
 {
     currentBuildAction = Action;
 }
        private void OnBuildBegin(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
        {
            ErrorsManager errorsManager = new ErrorsManager(ServiceProvider);

            errorsManager.Clear();
        }
Beispiel #17
0
 private void BuildEvents_OnBuildDone(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
 {
     BuildIsInProgress = false;
     ChangeBuildStatusEvent?.Invoke(false);
 }
Beispiel #18
0
 void buildEvents_OnBuildBegin(vsBuildScope Scope, vsBuildAction Action)
 {
     currentBuildAction = Action;
 }
Beispiel #19
0
 private void BuildEvents_OnBuildBegin(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
 {
     _Action = Action;
 }
 private void BuildEvents_OnBuildDone(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
 {
     _clippy.StartAnimation(ClippyAnimation.Congratulate, true);
 }
Beispiel #21
0
 private void BuildEvents_OnBuildBegin(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
 {
     BuildIsInProgress = true;
     ChangeBuildStatusEvent?.Invoke(true);
 }
 private void BuildEvents_OnBuildBegin(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
 {
     _clippy.StartAnimation(ClippyAnimation.Processing, true); // GetTechy
 }
        private void OnBuildBegin(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
        {
            ErrorsManager errorsManager = new ErrorsManager(this, mDte);

            errorsManager.Clear();
        }
 public void OnBuildDone(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
 {
     _outputWindowPane.OutputString("BuildEvents, OnBuildDone\n");
 }
Beispiel #25
0
 public void OnBuildDone(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
 {
 }
Beispiel #26
0
    // This subroutine is fired when a project or solution is built or rebuilt.

    private void m_BuildEvents_OnBuildBegin(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
    {
        WriteEvent("Build Beginning. Action: " + Action.ToString());
    }