public bool SupportsObject(object obj) { ProjectFile file = obj as ProjectFile; if (file != null && file.Project != null) { MakefileData data = file.Project.GetMakefileData(); if (data != null && data.IsFileIntegrationEnabled(file.BuildAction)) { return(true); } } return(false); }
public bool SupportsObject(object obj) { ProjectFile file = obj as ProjectFile; if (file != null && file.Project != null) { MakefileData data = file.Project.ExtendedProperties ["MonoDevelop.Autotools.MakefileInfo"] as MakefileData; if (data != null && data.IsFileIntegrationEnabled(file.BuildAction)) { return(true); } } return(false); }
public void OnExclude() { //if all of the selection is already checked, then toggle checks them off //else it turns them on. hence we need to find if they're all checked, bool allChecked = true; foreach (ITreeNavigator node in CurrentNodes) { ProjectFile file = (ProjectFile)node.DataItem; if (file.Project != null) { MakefileData data = file.Project.ExtendedProperties [infoProperty] as MakefileData; if (data != null && data.IsFileIntegrationEnabled(file.BuildAction)) { if (data.IsFileExcluded(file.FilePath)) { allChecked = false; break; } } } } Set <SolutionEntityItem> projects = new Set <SolutionEntityItem> (); foreach (ITreeNavigator node in CurrentNodes) { ProjectFile file = (ProjectFile)node.DataItem; if (file.Project != null) { projects.Add(file.Project); MakefileData data = file.Project.ExtendedProperties [infoProperty] as MakefileData; if (data != null && data.IntegrationEnabled) { data.SetFileExcluded(file.FilePath, allChecked); } } } IdeApp.ProjectOperations.Save(projects); }
public void OnUpdateExclude(CommandInfo cinfo) { bool anyChecked = false; bool allChecked = true; bool anyEnabled = false; bool allEnabled = true; foreach (ITreeNavigator node in CurrentNodes) { ProjectFile file = (ProjectFile)node.DataItem; if (file.Project != null) { MakefileData data = file.Project.ExtendedProperties [infoProperty] as MakefileData; if (data != null && data.IsFileIntegrationEnabled(file.BuildAction)) { anyEnabled = true; if (!data.IsFileExcluded(file.FilePath)) { anyChecked = true; } else { allChecked = false; } } else { allEnabled = false; } } } cinfo.Visible = anyEnabled; cinfo.Enabled = anyEnabled && allEnabled; cinfo.Checked = anyChecked; cinfo.CheckedInconsistent = anyChecked && !allChecked; }