protected async override void Run()
        {
            var wob = IdeApp.ProjectOperations.CurrentSelectedItem;

            if (wob is ProjectFile pf)
            {
                await CustomToolService.UpdateAsync(pf, pf.Project, true);

                return;
            }

            IEnumerable <ProjectFile> files;

            if (wob is Solution solution)
            {
                files = solution.GetAllProjects().SelectMany(GetFilesToUpdate);
            }
            else if (wob is Project proj)
            {
                files = GetFilesToUpdate(proj);
            }
            else
            {
                return;
            }

            await CustomToolService.Update(files, true);
        }
        protected async override void Run()
        {
            var wob = IdeApp.ProjectOperations.CurrentSelectedItem;

            var pf = wob as ProjectFile;

            if (pf != null)
            {
                CustomToolService.Update(pf, pf.Project, true);
                return;
            }

            IEnumerable <ProjectFile> files;

            var solution = wob as Solution;

            if (solution != null)
            {
                files = solution.GetAllProjects().SelectMany(GetFilesToUpdate);
            }
            else if (wob is Project)
            {
                files = GetFilesToUpdate((Project)wob);
            }
            else
            {
                return;
            }

            await CustomToolService.Update(files, true);
        }
        protected override void Run()
        {
            var file = IdeApp.ProjectOperations.CurrentSelectedItem as ProjectFile;

            if (CustomToolServiceExtensions.ShouldRunCustomTool(file))
            {
                CustomToolService.Update(file, file.Project, true);
            }
        }
        public static async Task Update(IEnumerable <ProjectFile> files, bool force = true)
        {
            if (updateMethod == null)
            {
                await CustomToolService.Update(files, force);

                return;
            }

            IEnumerator <ProjectFile> fileEnumerator;

            var progressMonitor = IdeApp.Workbench.ProgressMonitors.GetToolOutputProgressMonitor(false, null);

            if (files == null || !(fileEnumerator = files.GetEnumerator()).MoveNext())
            {
                progressMonitor.ReportSuccess(GettextCatalog.GetString("No custom tools found"));
                progressMonitor.Dispose();
            }
            else
            {
                progressMonitor.BeginTask(GettextCatalog.GetString("Running custom tools"), 1);
                await Update(progressMonitor, fileEnumerator, force);
            }
        }