public void Run (NewProjectConfiguration config)
		{
			if (config.UseGit) {
				if (config.CreateGitIgnoreFile) {
					CreateGitIgnoreFile (config.SolutionLocation);
				}

				CreateGitRepository (config.SolutionLocation);
			}
		}
        public static void RenameItem(IWorkspaceFileObject item, string newName)
        {
            if (newName == item.Name)
            {
                return;
            }

            if (!NewProjectConfiguration.IsValidSolutionName(newName))
            {
                MessageService.ShowError(GettextCatalog.GetString("Illegal project name.\nOnly use letters, digits, space, '.' or '_'."));
                return;
            }

            FilePath oldFile = item.FileName;
            string   oldName = item.Name;
            FilePath newFile = oldFile.ParentDirectory.Combine(newName + oldFile.Extension);

            // Rename the physical file first as changing the name of an IWorkspaceFileObject
            // can result in the filesystem being probed for a file with that name.
            if (!RenameItemFile(oldFile, newFile))
            {
                return;
            }

            try {
                item.Name        = newName;
                item.NeedsReload = false;
                // We renamed it to the wrong thing...
                if (item.FileName != newFile)
                {
                    LoggingService.LogError("File {0} was renamed to {1} instead of {2}.", item.FileName, item.FileName.FileName, newFile.FileName);
                    // File name changed, rename the project file
                    if (!RenameItemFile(newFile, item.FileName))
                    {
                        RenameItemFile(newFile, oldFile);
                        item.Name        = oldName;
                        item.NeedsReload = false;
                        return;
                    }
                }
            } catch (Exception ex) {
                if (File.Exists(item.FileName))
                {
                    FileService.RenameFile(item.FileName, oldFile);
                }
                else if (File.Exists(newFile))
                {
                    FileService.RenameFile(newFile, oldFile);
                }
                item.Name = oldName;
                MessageService.ShowError(GettextCatalog.GetString("The project could not be renamed."), ex);
                return;
            }
            item.NeedsReload = false;
        }
		ProjectCreateInformation CreateProjectCreateInformation (NewProjectConfiguration config, SolutionFolder parentFolder)
		{
			ProjectCreateInformation cinfo = new ProjectCreateInformation ();
			cinfo.SolutionPath = new FilePath (config.SolutionLocation).ResolveLinks ();
			cinfo.ProjectBasePath = new FilePath (config.ProjectLocation).ResolveLinks ();
			cinfo.ProjectName = config.ProjectName;
			cinfo.SolutionName = config.SolutionName;
			cinfo.ParentFolder = parentFolder;
			cinfo.ActiveConfiguration = IdeApp.Workspace.ActiveConfiguration;
			cinfo.Parameters = config.Parameters;
			return cinfo;
		}
		ProcessedTemplateResult ProcessTemplate (DefaultSolutionTemplate template, NewProjectConfiguration config, SolutionFolder parentFolder)
		{
			IEnumerable<IWorkspaceFileObject> newItems = null;
			ProjectCreateInformation cinfo = CreateProjectCreateInformation (config, parentFolder);

			if (parentFolder == null) {
				IWorkspaceFileObject newItem = template.Template.CreateWorkspaceItem (cinfo);
				if (newItem != null) {
					newItems = new [] { newItem };
				}
			} else {
				newItems = template.Template.CreateProjects (parentFolder, cinfo);
			}
			return new DefaultProcessedTemplateResult (template.Template, newItems, cinfo.ProjectBasePath);
		}
		public ProcessedTemplateResult ProcessTemplate (SolutionTemplate template, NewProjectConfiguration config, SolutionFolder parentFolder)
		{
			return ProcessTemplate ((DefaultSolutionTemplate)template, config, parentFolder);
		}
 public FinalProjectConfigurationPage(NewProjectConfiguration config)
 {
     this.config = config;
 }
		void CreateProjectConfig (string location)
		{
			config = new NewProjectConfiguration {
				Location = ToNativePath (location)
			};
		}
        public FinalProtobuildModuleConfigurationPage (NewProjectConfiguration config) : base(config)
		{
			this.config = config;
		}
		public FinalProjectConfigurationPage (NewProjectConfiguration config)
		{
			this.config = config;
		}
		public ProcessedTemplateResult ProcessTemplate (SolutionTemplate template, NewProjectConfiguration config, SolutionFolder parentFolder)
		{
			IProjectTemplatingProvider provider = GetTemplatingProviderForTemplate (template);
			if (provider != null) {
				return provider.ProcessTemplate (template, config, parentFolder);
			}
			return null;
		}
        private void FinishCreation (NewProjectConfiguration creationParameters)
        {
			Gtk.Application.Invoke ((sender, args) => {
				IAsyncOperation asyncOperation = IdeApp.Workspace.OpenWorkspaceItem(Path.Combine(creationParameters.SolutionLocation, "Protobuild.exe"));
				asyncOperation.Completed += delegate
				{
					if (asyncOperation.Success)
					{
					}
				};

                dialog.CloseDialog ();
                wizardProvider.Dispose ();
                imageProvider.Dispose ();
            });
        }