public string CreateEntry(ProjectCreateInformation projectCreateInformation, string defaultLanguage) { Combine newCombine = new Combine(); string newCombineName = Runtime.StringParserService.Parse(name, new string[,] { {"ProjectName", projectCreateInformation.ProjectName} }); newCombine.Name = newCombineName; string oldCombinePath = projectCreateInformation.CombinePath; string oldProjectPath = projectCreateInformation.ProjectBasePath; if (relativeDirectory != null && relativeDirectory.Length > 0 && relativeDirectory != ".") { projectCreateInformation.CombinePath = projectCreateInformation.CombinePath + Path.DirectorySeparatorChar + relativeDirectory; projectCreateInformation.ProjectBasePath = projectCreateInformation.CombinePath + Path.DirectorySeparatorChar + relativeDirectory; if (!Directory.Exists(projectCreateInformation.CombinePath)) { Directory.CreateDirectory(projectCreateInformation.CombinePath); } if (!Directory.Exists(projectCreateInformation.ProjectBasePath)) { Directory.CreateDirectory(projectCreateInformation.ProjectBasePath); } } // Create sub projects foreach (ICombineEntryDescriptor entryDescriptor in entryDescriptors) { newCombine.AddEntry (entryDescriptor.CreateEntry (projectCreateInformation, defaultLanguage), null); } projectCreateInformation.CombinePath = oldCombinePath; projectCreateInformation.ProjectBasePath = oldProjectPath; // Save combine using (IProgressMonitor monitor = Runtime.TaskService.GetSaveProgressMonitor ()) { string combineLocation = Runtime.FileUtilityService.GetDirectoryNameWithSeparator(projectCreateInformation.CombinePath) + newCombineName + ".mds"; if (File.Exists(combineLocation)) { IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService)); if (messageService.AskQuestion(String.Format (GettextCatalog.GetString ("Solution file {0} already exists, do you want to overwrite\nthe existing file ?"), combineLocation))) { newCombine.Save (combineLocation, monitor); } } else { newCombine.Save (combineLocation, monitor); } newCombine.Dispose(); return combineLocation; } }