void HandleSolutionEntrySaved (object sender, SolutionItemEventArgs e) { if (e.SolutionItem is DotNetProject) { projectTimestamps [(DotNetProject)e.SolutionItem] = DateTime.Now; OnChanged (); } }
protected virtual void OnSaved(SolutionItemEventArgs args) { SetFastBuildCheckDirty(); if (Saved != null) { Saved(this, args); } }
private void OnModuleOnShadowSolutionChanged (object o, SolutionItemEventArgs eventArgs) { /*TypeSystemService.UnloadAllProjects (); foreach (var project in eventArgs.Solution.GetAllSolutionItems<ProtobuildDefinition> ()) { TypeSystemService.LoadProject (project); }*/ // Active documents automatically change over because the type system reloads. }
public SolutionEntityItem() { items = new ProjectItemCollection(this); thisItemArgs = new SolutionItemEventArgs(this); configurations = new SolutionItemConfigurationCollection(this); configurations.ConfigurationAdded += new ConfigurationEventHandler(OnConfigurationAddedToCollection); configurations.ConfigurationRemoved += new ConfigurationEventHandler(OnConfigurationRemovedFromCollection); Counters.ItemsLoaded++; fileStatusTracker = new FileStatusTracker <SolutionItemEventArgs> (this, OnReloadRequired, new SolutionItemEventArgs(this)); }
void OnItemReloadRequired(SolutionItemEventArgs e) { if (ParentFolder == null && ParentSolution != null) { ParentSolution.OnItemReloadRequired(e); } if (ItemReloadRequired != null) { ItemReloadRequired(this, e); } }
private void ReloadEditorHosts(object sender, SolutionItemEventArgs e) { if (e.SolutionItem == null) { editorHost.Reload(e.Solution); } else { editorHost.Reload(e.SolutionItem); } }
protected virtual void OnItemSaved(SolutionItemEventArgs e) { if (ParentFolder == null && ParentSolution != null) { ParentSolution.OnEntrySaved(e); } if (ItemSaved != null) { ItemSaved(this, e); } }
protected virtual void OnReloadRequired(SolutionItemEventArgs args) { fileStatusTracker.FireReloadRequired(args); }
static void OnEntryAdded (object o, SolutionItemEventArgs args) { // handles addition of solutions and projects SolutionItem parent = (SolutionItem) args.SolutionItem.ParentFolder; if (parent == null) return; Repository repo = GetRepository (parent); if (repo == null) return; SolutionItem entry = args.SolutionItem; Repository currentRepo = GetRepository (entry); if (currentRepo != null && currentRepo.VersionControlSystem != repo.VersionControlSystem) { // If the item is already under version control using a different version control system // don't add it to the parent repo. return; } string path = entry.BaseDirectory; // While we /could/ call repo.Add with `recursive = true', we don't // necessarily want to add files under the project/solution directory // that may not be a part of this project/solution. ArrayList files = new ArrayList (); files.Add (path); SolutionItemAddFiles (path, entry, files); files.Sort (); using (IProgressMonitor monitor = GetStatusMonitor ()) { string[] paths = (string[]) files.ToArray (typeof (string)); foreach (string p in paths) { if (repo.GetVersionInfo (p).CanAdd) repo.Add (p, false, monitor); } } NotifyFileStatusChanged (new FileUpdateEventArgs (repo, parent.BaseDirectory, true)); }
static void OnEntryAdded (object o, SolutionItemEventArgs args) { // handles addition of solutions and projects SolutionItem parent = (SolutionItem) args.SolutionItem.ParentFolder; if (parent == null) return; Repository repo = GetRepository (parent); if (repo == null) return; SolutionItem entry = args.SolutionItem; string path = entry.BaseDirectory; if (!repo.CanAdd (path)) return; // While we /could/ call repo.Add with `recursive = true', we don't // necessarily want to add files under the project/solution directory // that may not be a part of this project/solution. ArrayList files = new ArrayList (); files.Add (path); SolutionItemAddFiles (path, entry, files); files.Sort (); using (IProgressMonitor monitor = GetStatusMonitor ()) { string[] paths = (string[]) files.ToArray (typeof (string)); for (int i = 0; i < paths.Length; i++) repo.Add (paths[i], false, monitor); } NotifyFileStatusChanged (repo, parent.BaseDirectory, true); }
static void OnSolutionItemRemoved (object sender, SolutionItemEventArgs args) { if (args.SolutionItem is Project) Unload ((Project) args.SolutionItem); }
protected override void OnSaved(SolutionItemEventArgs args) { base.OnSaved(args); if (ExtendedConfiguration != null) { try { var json = JsonConvert.SerializeObject(ExtendedConfiguration, Newtonsoft.Json.Formatting.Indented); File.WriteAllText(BaseDirectory.Combine(ConfigJson), json); } catch { } } }
static void OnEntryAdded (object o, SolutionItemEventArgs args) { if (args is SolutionItemChangeEventArgs && ((SolutionItemChangeEventArgs) args).Reloading) return; // handles addition of solutions and projects SolutionItem parent = (SolutionItem) args.SolutionItem.ParentFolder; if (parent == null) return; Repository repo = GetRepository (parent); if (repo == null) return; SolutionItem entry = args.SolutionItem; Repository currentRepo = GetRepository (entry); if (currentRepo != null && currentRepo.VersionControlSystem != repo.VersionControlSystem) { // If the item is already under version control using a different version control system // don't add it to the parent repo. return; } string path = entry.BaseDirectory; // While we /could/ call repo.Add with `recursive = true', we don't // necessarily want to add files under the project/solution directory // that may not be a part of this project/solution. var files = new HashSet<string> { path }; SolutionItemAddFiles (path, entry, files); using (IProgressMonitor monitor = GetStatusMonitor ()) { var status = repo.GetDirectoryVersionInfo (path, false, true); foreach (var v in status) { if (!v.IsVersioned && files.Contains (v.LocalPath)) repo.Add (v.LocalPath, false, monitor); } } NotifyFileStatusChanged (new FileUpdateEventArgs (repo, parent.BaseDirectory, true)); }
protected override void OnSaved(SolutionItemEventArgs args) { NeedsFullRebuild = true; base.OnSaved (args); }
private static void OnEntryAddedToCombine (object sender, SolutionItemEventArgs e) { CProject p = e.SolutionItem as CProject; if (p == null) return; foreach (ProjectFile f in p.Files) TagDatabaseManager.Instance.UpdateFileTags (p, f.Name); }
void OnEntryRemoved (object sender, SolutionItemEventArgs e) { ITreeBuilder tb = Context.GetTreeBuilder (e.SolutionItem); if (tb != null) tb.Remove (); }
void OnEntryAdded (object sender, SolutionItemEventArgs e) { ITreeBuilder tb = Context.GetTreeBuilder (e.SolutionItem.ParentFolder); if (tb != null) { tb.AddChild (e.SolutionItem, true); tb.Expanded = true; } }
void OnSolutionItemAddedRemoved (object sender, SolutionItemEventArgs e) { ITreeBuilder tb = Context.GetTreeBuilder (e.Solution); if (tb != null) tb.Update (); // Update the entry count }
void OnEntryAdded (object sender, SolutionItemEventArgs e) { ITreeBuilder tb; if (e.SolutionItem.ParentFolder == null) tb = Context.GetTreeBuilder (e.SolutionItem.ParentSolution); else tb = Context.GetTreeBuilder (e.SolutionItem.ParentFolder); if (tb != null) tb.AddChild (e.SolutionItem, true); }
internal void NotifyItemSaved(object sender, SolutionItemEventArgs e) { OnItemSaved(e); }
internal protected virtual void OnReloadRequired(SolutionItemEventArgs args) { next.OnReloadRequired(args); }
private static void OnEntryAddedToCombine (object sender, SolutionItemEventArgs e) { ValaProject p = e.SolutionItem as ValaProject; if (p == null) return; foreach (ProjectPackage package in p.Packages) if (!package.IsProject){ ProjectInformationManager.Instance.Get (p).AddPackage (package.Name); } foreach (ProjectFile f in p.Files) ProjectInformationManager.Instance.Get (p).AddFile (f.FilePath); }
void OnEntryChanged (object sender, SolutionItemEventArgs e) { UpdateTests (); }
static void OnSolutionItemAdded (object sender, SolutionItemEventArgs args) { if (args.SolutionItem is Project) Load ((Project) args.SolutionItem); }
internal void NotifyItemReloadRequired(object sender, SolutionItemEventArgs e) { OnItemReloadRequired(e); }
internal protected virtual void OnReloadRequired (SolutionItemEventArgs args) { next.OnReloadRequired (args); }
void HandleProjectSaved (object sender, SolutionItemEventArgs e) { UpdateCombos (); }
void ProjectSaved (object sender, SolutionItemEventArgs e) { projectSavedHandler (this, new EventArgs ()); }