public Project CreateSingleFileProject(string sourceFile) { ProjectCreateInformation info = new ProjectCreateInformation (); info.ProjectName = Path.GetFileNameWithoutExtension (sourceFile); info.SolutionPath = Path.GetDirectoryName (sourceFile); info.ProjectBasePath = Path.GetDirectoryName (sourceFile); Project project = new RubyProject (info, null, RubyLanguageBinding.RubyLanguage); project.Files.Add (new ProjectFile (sourceFile)); return project; }
public bool Load(RubyProject project, RubyProjectConfiguration config) { int found = 0, count = 0; if (null == config || null == project){ return false; } this.config = config; foreach (ProjectFile pf in project.Files) { projectFilesCB.AppendText (pf.Name); if (pf.Name.Equals (config.MainFile, StringComparison.OrdinalIgnoreCase)) { found = count; } ++count; } projectFilesCB.Active = found; foreach (object path in config.LoadPaths) { if (!string.IsNullOrEmpty ((string)path)) { loadpathStore.AppendValues (path); } } return true; }
public GeneralOptionsPanel(RubyProject project, RubyProjectConfiguration config) : this() { Load (project, config); }