Exemplo n.º 1
0
 /// <summary>
 /// Event raised when a build begins.
 /// </summary>
 /// <param name="scope">The scope.</param>
 /// <param name="action">The action.</param>
 private void BuildEvents_OnBuildBegin(vsBuildScope scope, vsBuildAction action)
 {
     if (BuildBegin != null)
     {
         BuildBegin(scope, action);
     }
 }
Exemplo n.º 2
0
        private void OnBuildDone(vsBuildScope Scope, vsBuildAction Action)
        {
            FartOptions options = (FartOptions)GetDialogPage(typeof(FartOptions));

            if (!options.Enabled)
            {
                return;
            }

            bool isSuccess = _dte.Solution.SolutionBuild.LastBuildInfo == 0;

            if (isSuccess)
            {
                _successfulBuilds++;

                if (_hasBuildFailed)
                {
                    SetBuildMessage();
                }
            }
            else
            {
                FartPlayer.PlayFart(options.SelectedErrorFart);
                _hasBuildFailed   = true;
                _successfulBuilds = 0;
            }
        }
Exemplo n.º 3
0
        private async void _buildEvents_OnBuildDone(vsBuildScope scope, vsBuildAction action)
        {
            if (!WorkspaceHasBitConfigV1JsonFile())
            {
                return;
            }

            try
            {
                if (action == vsBuildAction.vsBuildActionClean)
                {
                    await CallCleanCodes();

                    lastActionWasClean = true;
                }
                else
                {
                    await CallGenerateCodes();
                }
            }
            catch (Exception ex)
            {
                LogException("Generate|Clean codes failed.", ex);
            }
        }
Exemplo n.º 4
0
 public void OnBuildDone(vsBuildScope Scope, vsBuildAction Action)
 {
     if (Action != vsBuildAction.vsBuildActionClean)
     {
         CompilePDBs();
     }
 }
 private void BuildEvents_OnBuildBegin(vsBuildScope scope, vsBuildAction action)
 {
     if (this.buildBegan == null && this.Timing != BuildTiming.None)
     {
         this.Clear(DateTime.UtcNow, action);
     }
 }
Exemplo n.º 6
0
            void OnBuildDone(vsBuildScope Scope, vsBuildAction Action)
            {
                if (Scope != vsBuildScope.vsBuildScopeSolution)
                {
                    return;
                }

                DateTime now = DateTime.Now;

                m_timer.Stop();
                TimeSpan ts          = m_timer.Elapsed;
                string   timeMessage = String.Format("Total solution build time: {0:00}:{1:00}:{2:00}.{3:00} (started {4} {5} and ended {6} {7})\n",
                                                     ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10, m_start.ToShortDateString(), m_start.ToLongTimeString(), now.ToShortDateString(), now.ToLongTimeString());
                OutputWindowPane pane = Plugin.FindOutputPane(m_plugin.App, "Build");

                pane.OutputString(timeMessage);

                m_timer.Reset();


                if (m_logfilename != "")
                {
                    using (StreamWriter w = new StreamWriter(m_logfilename, true))
                    {
                        string logMessage = String.Format("{0} {1}|{2:00}:{3:00}:{4:00}", now.ToShortDateString(), now.ToLongTimeString(), ts.Hours, ts.Minutes, ts.Seconds);
                        w.WriteLine(logMessage);
                    }
                }
            }
Exemplo n.º 7
0
 /// <summary>
 ///     Invoked when a user starts a build (clean, rebuild, ...) of a solution, project, or batch build.
 /// </summary>
 private void _buildEvents_OnBuildBegin(vsBuildScope scope, vsBuildAction action)
 {
     Asserts.Null(_currentEvent, "another build is running.");
     _currentEvent        = Create <BuildEvent>();
     _currentEvent.Scope  = scope.ToString();
     _currentEvent.Action = action.ToString();
 }
Exemplo n.º 8
0
        private void OnBuildDone(vsBuildScope Scope, vsBuildAction Action)
        {
            Dispatcher.CurrentDispatcher.BeginInvoke(new Action(() => // Execute after VS finishes its tasks
            {
                FartOptions options = (FartOptions)GetDialogPage(typeof(FartOptions));

                if (options.Enabled)
                {
                    bool isSuccess = _dte.Solution.SolutionBuild.LastBuildInfo == 0;
                    Fart(isSuccess, options);

                    if (isSuccess)
                    {
                        _successfulBuilds++;

                        if (_hasBuildFailed)
                            SetBuildMessage();
                    }
                    else
                    {
                        _hasBuildFailed = true;
                        _successfulBuilds = 0;
                    }
                }

            }), DispatcherPriority.ApplicationIdle, null);
        }
Exemplo n.º 9
0
 private static void OnBuildBegin(vsBuildScope Scope, vsBuildAction Action)
 {
     if (Options.Instance.SaveAllOnBuild)
     {
         _dte.ExecuteCommand("File.SaveAll");
     }
 }
Exemplo n.º 10
0
        private void OnBuildBegin(vsBuildScope scope, vsBuildAction action)
        {
            if (!Options.RunOnBuild)
            {
                return;
            }

            IEnumerable <Project> projects;

            switch (scope)
            {
            case vsBuildScope.vsBuildScopeProject:
            case vsBuildScope.vsBuildScopeBatch:
                projects = ((object[])_dte.ActiveSolutionProjects).OfType <Project>();
                break;

            case vsBuildScope.vsBuildScopeSolution:
            default:
                // Sometimes when you hit F5 to run a project, VS gives the undefined value 0 as vsBuildScope,
                // so in this case we default to running templates for all projects
                projects = _dte.Solution.Projects.OfType <Project>();
                break;
            }

            _controller.RunTemplates(projects);
        }
Exemplo n.º 11
0
 public void OnBuildBegin(vsBuildScope Scope, vsBuildAction Action)
 {
     if (Action != vsBuildAction.vsBuildActionClean)
     {
         VsOutputPane.LogMessage("Building (" + Scope.ToString() + ").");
     }
 }
Exemplo n.º 12
0
        public void onBuildBegin(vsBuildScope scope, vsBuildAction action)
        {
            dumpState();
            Log.D("VS build begin {scope}, {action}", scope, action);

            prepareForVSBuild();
        }
        /// <summary>
        /// Build finished. We can now transfer the files to the remote host and start debugging the program
        /// </summary>
        private async void BuildEvents_OnBuildDone(vsBuildScope scope, vsBuildAction action)
        {
            if (_isBuildSucceeded)
            {
                int exitcode = await TransferFilesAsync().ConfigureAwait(true);

                if (exitcode == 0)
                {
                    if (Settings.NoDebug)
                    {
                        Mbox("Files sucessfully transfered to remote machine", "Success");
                    }
                    else
                    {
                        Debug();
                    }

                    Cleanup();
                }
                else
                {
                    Mbox("Transferring files failed");
                }
            }
        }
Exemplo n.º 14
0
            void OnBuildDone(vsBuildScope Scope, vsBuildAction Action)
            {
                if (Scope != vsBuildScope.vsBuildScopeSolution)
                    return;

                DateTime now = DateTime.Now;

                m_timer.Stop();
                TimeSpan ts = m_timer.Elapsed;
                string timeMessage = String.Format("Total solution build time: {0:00}:{1:00}:{2:00}.{3:00} (started {4} {5} and ended {6} {7})\n",
                    ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10, m_start.ToShortDateString(), m_start.ToLongTimeString(), now.ToShortDateString(), now.ToLongTimeString());
                OutputWindowPane pane = Plugin.FindOutputPane(m_plugin.App, "Build");
                pane.OutputString(timeMessage);

                m_timer.Reset();

                if (m_logfilename != "")
                {
                    using (StreamWriter w = new StreamWriter(m_logfilename, true))
                    {
                        string logMessage = String.Format("{0} {1}|{2:00}:{3:00}:{4:00}", now.ToShortDateString(), now.ToLongTimeString(), ts.Hours, ts.Minutes, ts.Seconds );
                        w.WriteLine(logMessage);
                    }
                }
            }
 void BuildEvents_OnBuildBegin(vsBuildScope Scope, vsBuildAction Action)
 {
     Succeeded      = 0;
     Failed         = 0;
     BuildStartedOn = DateTime.Now;
     BuildStarted   = true;
 }
Exemplo n.º 16
0
 /// <summary>
 /// The fire on build begin.
 /// </summary>
 /// <param name="scope">
 /// The scope.
 /// </param>
 /// <param name="action">
 /// The action.
 /// </param>
 public void FireOnBuildBegin(vsBuildScope scope, vsBuildAction action)
 {
     if (this.OnBuildBegin != null)
     {
         this.OnBuildBegin(scope, action);
     }
 }
Exemplo n.º 17
0
 /// <summary>
 /// The fire on build done.
 /// </summary>
 /// <param name="scope">
 /// The scope.
 /// </param>
 /// <param name="action">
 /// The action.
 /// </param>
 public void FireOnBuildDone(vsBuildScope scope, vsBuildAction action)
 {
     if (this.OnBuildDone != null)
     {
         this.OnBuildDone(scope, action);
     }
 }
Exemplo n.º 18
0
        private void OnBuildDone(vsBuildScope scope, vsBuildAction action)
        {
            OutputWindowPane BuildOutputPane = null;
            foreach (OutputWindowPane pane in _dte2.ToolWindows.OutputWindow.OutputWindowPanes)
            {
                if (pane.Guid == VSConstants.OutputWindowPaneGuid.BuildOutputPane_string)
                {
                    BuildOutputPane = pane;
                    break;
                }
            }

            if (BuildOutputPane == null)
                return;

            if (ShowBuildReport)
            {
                BuildOutputPane.OutputString("\r\nProjects build report:\r\n");
                BuildOutputPane.OutputString("  Status    | Project [Config|platform]\r\n");
                BuildOutputPane.OutputString(" -----------|---------------------------------------------------------------------------------------------------\r\n");

                foreach (string ReportItem in _projectsBuildReport)
                    BuildOutputPane.OutputString(ReportItem + "\r\n");
            }

            if (ShowElapsedBuildTimeEnabled)
            {
                var elapsed = DateTime.Now - _buildStartTime;
                var time = elapsed.ToString(@"hh\:mm\:ss\.ff");
                var text = string.Format("Time Elapsed {0}", time);

                BuildOutputPane.OutputString("\r\n" + text + "\r\n");
            }
        }
 private void OnBuildDone(vsBuildScope scope, vsBuildAction action)
 {
     if (this.patternManager.IsOpen)
     {
         this.patternManager.ValidateProductState();
     }
 }
Exemplo n.º 20
0
 /// <summary>
 /// Event raised when a build is done.
 /// </summary>
 /// <param name="scope">The scope.</param>
 /// <param name="action">The action.</param>
 private void BuildEvents_OnBuildDone(vsBuildScope scope, vsBuildAction action)
 {
     if (BuildDone != null)
     {
         BuildDone(scope, action);
     }
 }
 private void OnBuildDone(vsBuildScope Scope, vsBuildAction Action)
 {
     if (isCompiling)
     {
         RunTemplates(Scope, BuildEvent.AfterBuild);
     }
 }
        public void OnBuildBegin(vsBuildScope Scope, vsBuildAction Action)
        {
            VsBuildRunning = true;
            ErrorsManager errorsManager = new ErrorsManager(mServiceProvider);

            errorsManager.Clear();
        }
Exemplo n.º 23
0
        public static void BuildDone(vsBuildScope buildScope, vsBuildAction buildAction)
        {
            Trace.WriteLine("Build done");

            // Once the project has built then try and clean up the files copied into the Bootstrapper
            CopiedFiles.RemoveAll();
        }
Exemplo n.º 24
0
 private void ProcessBuildBeginEvents(vsBuildScope scope, vsBuildAction action)
 {
     if (_eventProcessor.HasIslandwoodProjects())
     {
         _eventProcessor.BeginIslandWoodBuild();
     }
 }
Exemplo n.º 25
0
 void OnBuildBegin(vsBuildScope Scope, vsBuildAction Action)
 {
     if (Scope != vsBuildScope.vsBuildScopeSolution)
         return;
     m_timer.Start();
     m_start = DateTime.Now;
 }
 /// <summary>
 /// The fire on build begin.
 /// </summary>
 /// <param name="scope">
 /// The scope.
 /// </param>
 /// <param name="action">
 /// The action.
 /// </param>
 public void FireOnBuildBegin(vsBuildScope scope, vsBuildAction action)
 {
     if (this.OnBuildBegin != null)
     {
         this.OnBuildBegin(scope, action);
     }
 }
Exemplo n.º 27
0
 private void OnBuildDone(vsBuildScope scope, vsBuildAction action)
 {
     if (this.patternManager.IsOpen)
     {
         this.patternManager.ValidateProductState();
     }
 }
Exemplo n.º 28
0
        private static void BuildEventsOnOnBuildDone(vsBuildScope scope, vsBuildAction action)
        {
            var files = DteExtensions.DTE.Solution.Projects()
                        .Select(_ => _.FindOutputPath())
                        .SelectMany(s => Directory.GetFiles($"{Path.GetDirectoryName(s)}", "*.dll"))
                        .Distinct().ToArray();

            if (files.Any(s => $"{Path.GetFileName(s)}".Contains("ModelMapper")))
            {
                var targetDirectory  = $@"{AppDomain.CurrentDomain.SetupInformation.ApplicationBase}\CommonExtensions\DataDesign";
                var modelMapperFiles = $@"{targetDirectory}\ModelMapperFiles.txt";
                var deleteFiles      = Observable.Empty <Unit>();
                if (File.Exists(modelMapperFiles))
                {
                    deleteFiles = File.ReadAllText(modelMapperFiles).Split(Environment.NewLine.ToCharArray()).ToObservable()
                                  .SelectMany(s => Observable.Start(() => File.Delete($@"{targetDirectory}\{s}")).OnErrorResumeNext(Observable.Return(Unit.Default)))
                                  .Finally(() => File.Delete(modelMapperFiles));
                }
                DteExtensions.DTE.WriteToOutput($"Copying files to {targetDirectory}", false);
                deleteFiles.Concat(files.ToObservable()
                                   .SelectMany(s => CopyFile(s, targetDirectory))
                                   .Select(s => Unit.Default))
                .Finally(() => {
                    File.WriteAllText(modelMapperFiles, string.Join(Environment.NewLine, files.Select(Path.GetFileName)));
                    DteExtensions.DTE.WriteToOutput("Finished", false);
                })
                .Subscribe();
            }
        }
Exemplo n.º 29
0
 private void OnBuildBegin(vsBuildScope scope, vsBuildAction action)
 {
     foreach (Project project in _dte.Solution.Projects)
     {
         Generate(project.ProjectItems);
     }
 }
Exemplo n.º 30
0
        private void buildEvents_OnBuildBegin(vsBuildScope Scope, vsBuildAction Action)
        {
            _buildScope  = Scope;
            _buildAction = Action;

            _errorListHelper?.Clear();
        }
Exemplo n.º 31
0
 private void BuildEvents_OnBuildDone(vsBuildScope Scope, vsBuildAction Action)
 {
     this._applicationObject.ToolWindows.ErrorList.ShowErrors   = true;
     this._applicationObject.ToolWindows.ErrorList.ShowWarnings = false;
     this._applicationObject.ToolWindows.ErrorList.ShowMessages = false;
     if (this._applicationObject.ToolWindows.ErrorList.ErrorItems.Count == 0)
     {
         foreach (Project item in (Array)this._applicationObject.ActiveSolutionProjects)
         {
             string designRootPath = Path.GetDirectoryName(item.FileName);
             string configFile     = designRootPath + "\\EntityDesignConfig.xml";
             if (File.Exists(configFile))
             {
                 try
                 {
                     System.Diagnostics.Process.Start(Path.GetDirectoryName(this.GetType().Assembly.CodeBase).Replace("file:\\", "") + "\\MySoft.Tools.EntityDesign.exe", "\"" + designRootPath + "\"");
                 }
                 catch (Exception ex)
                 {
                     System.Windows.Forms.MessageBox.Show("EntityDesign实体生成工具错误提示:\r\n" + ex.Message);
                 }
             }
         }
     }
 }
Exemplo n.º 32
0
        private void BuildEvents_OnBuildBegin(vsBuildScope scope, vsBuildAction action)
        {
            Chroma.Instance.Initialize();
            Chroma.Instance.SetAll(Color.White);

            System.Threading.Thread.Sleep(500);
        }
Exemplo n.º 33
0
        public override void OnBuildDone(vsBuildScope Scope, vsBuildAction Action)
        {
            if (false == mExecuteCompile)
            {
                return;
            }

            var exitCode = int.MaxValue;

            if (VsServiceProvider.TryGetService(typeof(DTE), out object dte))
            {
                exitCode = (dte as DTE2).Solution.SolutionBuild.LastBuildInfo;
            }

            // VS compile detected errors and there is not necessary to run clang compile
            if (0 != exitCode)
            {
                mExecuteCompile = false;
                return;
            }

            // Run clang compile after the VS compile succeeded
            RunClangCompile(new object(), new EventArgs());
            mExecuteCompile = false;
        }
        private void BuildEvents_OnBuildDone(vsBuildScope Scope, vsBuildAction Action)
        {
            if (Action != vsBuildAction.vsBuildActionClean)
            {
                if (WESettings.GetBoolean(WESettings.Keys.LessCompileOnBuild))
                {
                    _dte.Commands.Raise(GuidList.guidBuildCmdSetString, (int)PkgCmdIDList.cmdBuildLess, null, null);
                }
                //LessProjectCompiler.CompileProject();

                if (WESettings.GetBoolean(WESettings.Keys.CoffeeScriptCompileOnBuild))
                {
                    _dte.Commands.Raise(GuidList.guidBuildCmdSetString, (int)PkgCmdIDList.cmdBuildCoffeeScript, null, null);
                }

                //BundleFilesMenu.UpdateBundles(null, true);
                _dte.Commands.Raise(GuidList.guidBuildCmdSetString, (int)PkgCmdIDList.cmdBuildBundles, null, null);

                if (WESettings.GetBoolean(WESettings.Keys.RunJsHintOnBuild))
                {
                    Dispatcher.CurrentDispatcher.BeginInvoke(
                        new Action(() => JsHintProjectRunner.RunOnAllFilesInProject()), DispatcherPriority.ApplicationIdle, null);
                }
            }
            else if (Action == vsBuildAction.vsBuildActionClean)
            {
                System.Threading.Tasks.Task.Run(() => JsHintRunner.Reset());
            }
        }
Exemplo n.º 35
0
        private void OnBuildDone(vsBuildScope Scope, vsBuildAction Action)
        {
            Dispatcher.CurrentDispatcher.BeginInvoke(new Action(() => // Execute after VS finishes its tasks
            {
                FartOptions options = (FartOptions)GetDialogPage(typeof(FartOptions));

                if (options.Enabled)
                {
                    bool isSuccess = _dte.Solution.SolutionBuild.LastBuildInfo == 0;
                    Fart(isSuccess, options);

                    if (isSuccess)
                    {
                        _successfulBuilds++;

                        if (_hasBuildFailed)
                        {
                            SetBuildMessage();
                        }
                    }
                    else
                    {
                        _hasBuildFailed   = true;
                        _successfulBuilds = 0;
                    }
                }
            }), DispatcherPriority.ApplicationIdle, null);
        }
        private void BuildEventsOnOnBuildBegin(vsBuildScope scope, vsBuildAction action)
        {
            Debug.WriteLine("BuildEventsOnOnBuildBegin {0} {1}", scope, action);

            _projects          = _dte.AllProjects();
            _solutionDirectory = Path.GetDirectoryName(_dte.Solution.FullName);

            // unhook event handlers to reduce risk of memory leaks
            foreach (MissingErrorTask task in _errorListProvider.Tasks)
            {
                task.Navigate -= SelectParentProjectInSolution;
                task.Navigate -= NewErrorOnNavigate;
            }

            _errorListProvider.Tasks.Clear();

            _gitignores.Clear();
            AddGitIgnoreFromDirectory(_solutionDirectory);

            _filters = new List <Regex>();

            if (!string.IsNullOrEmpty(Options.IgnorePhysicalFiles))
            {
                _filters.AddRange(Options.IgnorePhysicalFiles.Split(new[] { "\r\n" },
                                                                    StringSplitOptions.RemoveEmptyEntries).Select(p => FindFilesPatternToRegex.Convert(p.Trim())));
            }
        }
Exemplo n.º 37
0
        private void BuildEvents_OnBuildBegin(vsBuildScope scope, vsBuildAction action)
        {
            if (action == vsBuildAction.vsBuildActionClean)
                return;

            Restore();
        }
Exemplo n.º 38
0
        /// <summary>
        /// Gets the build type string from the specified build scope and action.
        /// </summary>
        /// <param name="buildScope">The build scope.</param>
        /// <param name="buildAction">The build action.</param>
        /// <returns>The build type string.</returns>
        private static string GetBuildTypeString(vsBuildScope buildScope, vsBuildAction buildAction)
        {
            var stringBuilder = new StringBuilder();

            // First append the word 'Batch ' if this is a batch build event.
            if (buildScope == vsBuildScope.vsBuildScopeBatch)
            {
                stringBuilder.Append("Batch ");
            }

            // Next append the action-specific build string.
            switch (buildAction)
            {
            case vsBuildAction.vsBuildActionBuild:
                stringBuilder.Append("Building");
                break;

            case vsBuildAction.vsBuildActionClean:
                stringBuilder.Append("Cleaning");
                break;

            case vsBuildAction.vsBuildActionDeploy:
                stringBuilder.Append("Deploying");
                break;

            case vsBuildAction.vsBuildActionRebuildAll:
                stringBuilder.Append("Rebuilding");
                break;
            }

            return(stringBuilder.ToString());
        }
 private void OnBuildBegin(vsBuildScope scope, vsBuildAction action)
 {
     foreach (Project project in _dte.Solution.Projects)
     {
         Generate(project.ProjectItems);
     }
 }
Exemplo n.º 40
0
 private void BuildEvents_OnBuildDone(vsBuildScope Scope, vsBuildAction Action)
 {
     this._applicationObject.ToolWindows.ErrorList.ShowErrors = true;
     this._applicationObject.ToolWindows.ErrorList.ShowWarnings = false;
     this._applicationObject.ToolWindows.ErrorList.ShowMessages = false;
     if (this._applicationObject.ToolWindows.ErrorList.ErrorItems.Count == 0)
     {
         foreach (Project item in (Array)this._applicationObject.ActiveSolutionProjects)
         {
             string designRootPath = Path.GetDirectoryName(item.FileName);
             string configFile = designRootPath + "\\EntityDesignConfig.xml";
             if (File.Exists(configFile))
             {
                 try
                 {
                     System.Diagnostics.Process.Start(Path.GetDirectoryName(this.GetType().Assembly.CodeBase).Replace("file:\\", "") + "\\MySoft.Tools.EntityDesign.exe", "\"" + designRootPath + "\"");
                 }
                 catch (Exception ex)
                 {
                     System.Windows.Forms.MessageBox.Show("EntityDesign实体生成工具错误提示:\r\n" + ex.Message);
                 }
             }
         }
     }
 }
 private void OnBuildBegin(vsBuildScope Scope, vsBuildAction Action)
 {
     if (Action == vsBuildAction.vsBuildActionClean || Action == vsBuildAction.vsBuildActionRebuildAll)
     {
         TableDataSource.Instance.CleanAllErrors();
     }
 }
Exemplo n.º 42
0
		// Do we need this method?
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Called when [build begin].
		/// </summary>
		/// <param name="scope">The scope.</param>
		/// <param name="action">The action.</param>
		/// <remarks>Do we need this method?</remarks>
		/// ------------------------------------------------------------------------------------
		public void OnBuildBegin(vsBuildScope scope, vsBuildAction action)
		{
#if DEBUG
			//			m_nantCommands.OutputBuildDebug.WriteLine("BuildEvents::OnBuildBegin");
#endif
			if (action == vsBuildAction.vsBuildActionRebuildAll)
				throw new Exception();
		}
        private void BuildEvents_OnBuildDone(vsBuildScope scope, vsBuildAction action)
        {
            if (action != vsBuildAction.vsBuildActionBuild ||
                buildSucceeded == false)
                return;

            OnBuildSucceeded();
        }
Exemplo n.º 44
0
 private void OnBuildBegin(vsBuildScope Scope, vsBuildAction Action)
 {
     if (Action == vsBuildAction.vsBuildActionClean || Action == vsBuildAction.vsBuildActionRebuildAll)
     {
         if (WebLinterPackage.Settings.CleanErrorsOnBuild)
             TableDataSource.Instance.CleanAllErrors();
     }
 }
Exemplo n.º 45
0
        private void OnBuildDone(vsBuildScope scope, vsBuildAction action)
        {
            TaskbarManager.Instance.SetProgressState(_buildErrorDetected
                                                         ? TaskbarProgressBarState.Error
                                                         : TaskbarProgressBarState.Normal);

            System.Threading.Thread.Sleep(100);
        }
Exemplo n.º 46
0
 private void BuildEventsOnOnBuildDone(vsBuildScope scope, vsBuildAction action)
 {
     this.tracer.Trace("Build Done.", "VsProjectFileTracker");
     ProjectItem item = VsxHelper.FindProjectItemByProjectRelativePath(project, fileName);
     var newChangeDate = VsxHelper.GetLastChangeDate(item);
     if (newChangeDate != LastChangeDate)
         OnFileChanged(item);
 }
Exemplo n.º 47
0
        private void BuildEvents_OnBuildDone(vsBuildScope scope, vsBuildAction action)
        {
            var mainWnd = new IntPtr(dte.MainWindow.HWnd);
            int failuresCount = dte.Solution.SolutionBuild.LastBuildInfo;

            taskbarList.SetProgressValue(mainWnd, 100, 100);

            taskbarList.SetProgressState(mainWnd,
                                         failuresCount == 0 ? TBPF.NORMAL : TBPF.ERROR);
        }
 public void OnBuildBegin(vsBuildScope scope, vsBuildAction action)
 {
     Logger.Write("BuildEvents_OnBuildBegin scope: " + scope.ToString() + " action " + action.ToString(), LogLevel.Debug);
     this._currentBuildState = vsBuildState.vsBuildStateInProgress;
     this._currentBuildAction = action;
     this._currentBuildScope = scope;
     this._buildStartDate = DateTime.Now;
     this.ExecuteIncrement();
     this._updatedItems.Clear();
 }
Exemplo n.º 49
0
        private void OnBuildBegin(vsBuildScope scope, vsBuildAction action)
        {
            InitialiseTaskBar();

            _buildErrorDetected = false;
            _numberOfProjectsBuilt = 0;
            _numberOfProjects = _applicationObject.Solution.SolutionBuild.BuildDependencies.Count;

            UpdateProgressValueAndState(false);
        }
        /// <summary>
        /// Event raised when a build begins.
        /// </summary>
        /// <param name="scope">The scope.</param>
        /// <param name="action">The action.</param>
        private void BuildEvents_OnBuildBegin(vsBuildScope scope, vsBuildAction action)
        {
            var buildBegin = BuildBegin;
            if (buildBegin != null)
            {
                OutputWindowHelper.DiagnosticWriteLine("BuildProgressEventListener.BuildBegin raised");

                buildBegin(scope, action);
            }
        }
Exemplo n.º 51
0
        void BuildEvents_OnBuildDone(vsBuildScope Scope, vsBuildAction Action)
        {
            string solutionName = System.IO.Path.GetFileNameWithoutExtension(this._applicationObject.Solution.FullName);
            bool success = (this._applicationObject.Solution.SolutionBuild.LastBuildInfo == 0);

            // use another thread so that we dont slow the build down
            BuildInfo info = new BuildInfo(solutionName, success, true);
            System.Threading.ParameterizedThreadStart pts = new System.Threading.ParameterizedThreadStart(SendNotification);
            System.Threading.Thread t = new System.Threading.Thread(pts);
            t.Start(info);
        }
Exemplo n.º 52
0
 /*
 private void buildBeginAction(string Project, string ProjectConfig, string Platform, string SolutionConfig)
 {
     if (this.gochiusaIDE != null)
     {
         this.gochiusaIDE.buildBeginAction();
     }
 }
 */
 private void buildBeginAction2(vsBuildScope Scope, vsBuildAction Action)
 {
     if (Action == vsBuildAction.vsBuildActionBuild || Action == vsBuildAction.vsBuildActionRebuildAll)
     {
         this.gochiusaIDE.buildBeginAction(false);
     }
     else if(Action == vsBuildAction.vsBuildActionClean)
     {
         this.gochiusaIDE.buildBeginAction(true);
     }
 }
Exemplo n.º 53
0
 /// <summary>
 /// Global Build Done Callback
 /// </summary>
 /// <param name="scope"></param>
 /// <param name="action"></param>
 private void NotifyBuildEnd(vsBuildScope scope, vsBuildAction action)
 {
     Console.WriteLine("BuildEnd: " + scope + "/" + action);
     if (action < vsBuildAction.vsBuildActionBuild || action > vsBuildAction.vsBuildActionRebuildAll)
     {
         //Not an actual build event, we are here if user hits Start and there is nothing to build
         DesignerKiller.KillAllDesigners();
         return;
     }
     BuildEnd?.Invoke();
 }
        /// <summary>
        /// Called when a build is done.
        /// </summary>
        /// <param name="scope">The scope.</param>
        /// <param name="action">The action.</param>
        internal void OnBuildDone(vsBuildScope scope, vsBuildAction action)
        {
            var buildProgress = Package.BuildProgress;
            if (buildProgress != null)
            {
                buildProgress.NotifyBuildDone(scope, action);

                if (Settings.Default.Progressing_HideBuildProgressOnBuildStop)
                {
                    HideBuildProgressToolWindow();
                }
            }
        }
        /// <summary>
        /// Called when a build has begun.
        /// </summary>
        /// <param name="scope">The scope.</param>
        /// <param name="action">The action.</param>
        internal void OnBuildBegin(vsBuildScope scope, vsBuildAction action)
        {
            var buildProgress = Package.BuildProgress;
            if (buildProgress != null)
            {
                buildProgress.NotifyBuildBegin(scope, action);

                if (Settings.Default.Progressing_ShowBuildProgressOnBuildStart)
                {
                    ShowBuildProgressToolWindowWithoutActivation();
                }
            }
        }
Exemplo n.º 56
0
 void BuildEvents_OnBuildDone(vsBuildScope Scope, vsBuildAction Action)
 {
     if(mBuildHasErrors)
     {
         // send build failed
         mSerialPort.Write(new byte[] { 2 }, 0, 1);
     }
     else
     {
         // send build succeeded
         mSerialPort.Write(new byte[] { 1 }, 0, 1);
     }
 }
Exemplo n.º 57
0
        private void buildStarted(vsBuildScope scope, vsBuildAction action)
        {
            // fetch the number of projects just once
            _numProjectsToBeBuilt = numProjectsToBeBuilt();

            _numBuiltProjects = 0;
            taskbarItemInfo.ProgressValue = 0;
            taskbarItemInfo.ProgressState = TaskbarItemProgressState.Indeterminate;

            if (scope != vsBuildScope.vsBuildScopeSolution)
                return;

            _buildStartTime = DateTime.Now;
        }
Exemplo n.º 58
0
 void _buildEvents_OnBuildDone(vsBuildScope Scope, vsBuildAction Action)
 {
     switch (Action)
     {
         case vsBuildAction.vsBuildActionClean:
         case vsBuildAction.vsBuildActionDeploy:
             break;
         case vsBuildAction.vsBuildActionBuild:
         case vsBuildAction.vsBuildActionRebuildAll:
             var outputDir = getOutputPath();
             var dlls = getBuiltDlls(outputDir);
             _previewControl.processBuiltDlls(dlls);
             break;
     }
 }
Exemplo n.º 59
0
        private void buildDone(vsBuildScope scope, vsBuildAction action)
        {
            // fill it up
            taskbarItemInfo.ProgressValue = 1;

            // keep it red
            if (taskbarItemInfo.ProgressState != TaskbarItemProgressState.Error)
                taskbarItemInfo.ProgressState = TaskbarItemProgressState.None;

            if (scope != vsBuildScope.vsBuildScopeSolution)
                return;

            string msg = String.Format("Total build time: {0}", DateTime.Now - _buildStartTime);
            _vspkg.writeToBuildWindow("\n" + msg);
            _vspkg.writeStatus(msg);
        }
Exemplo n.º 60
0
        private void OnBuildDone(vsBuildScope scope, vsBuildAction action)
        {
            OutputWindowPane buildOutputPane = null;
            // ReSharper disable once LoopCanBeConvertedToQuery
            foreach (OutputWindowPane pane in _dte2.ToolWindows.OutputWindow.OutputWindowPanes)
            {
                if (pane.Guid == VSConstants.OutputWindowPaneGuid.BuildOutputPane_string)
                {
                    buildOutputPane = pane;
                    break;
                }
            }

            if (buildOutputPane == null)
            {
                return;
            }

            if (ShowBuildReport)
            {
                buildOutputPane.OutputString("\r\nProjects build report:\r\n");
                buildOutputPane.OutputString("  Status    | Project [Config|platform]\r\n");
                buildOutputPane.OutputString(" -----------|---------------------------------------------------------------------------------------------------\r\n");
                foreach (var reportItem in _projectsBuildReport)
                {
                    buildOutputPane.OutputString(reportItem + "\r\n");
                }
            }

            if (ShowElapsedBuildTimeEnabled)
            {
                var elapsed = DateTime.Now - _buildStartTime;
                var time = elapsed.ToString(@"hh\:mm\:ss\.ff");
                var text = $"Time Elapsed {time}";
                buildOutputPane.OutputString("\r\n" + text + "\r\n");
            }

            if (ShowDonation)
            {
                buildOutputPane.OutputString("\r\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
                buildOutputPane.OutputString("\r\n+++                    Please consider donating to VSColorOutput                       +++");
                buildOutputPane.OutputString("\r\n+++ https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=REEP6X7DSPMZU +++");
                buildOutputPane.OutputString("\r\n+++              (this message can be turned off in the settings panel)                +++");
                buildOutputPane.OutputString("\r\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n");
            }
        }