public void Execute(IProgressMonitor progressMonitor) { if (Files == null || Files.Count == 0) { throw new Exception("No files to add"); } using (progressMonitor.BeginTask(Resources.AddingFiles, 100)) { using (var subProgressMonitor = progressMonitor.CreateSubProgressMonitor(10)) { projectController.AddFiles(subProgressMonitor, Files); } using (var subProgressMonitor = progressMonitor.CreateSubProgressMonitor(90)) { var loadPackageCommand = commandFactory.CreateLoadPackageCommand(); loadPackageCommand.Execute(subProgressMonitor); } } }