From f7ce721898fd594539aa2af1f9962642668c067e Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 30 Jan 2017 17:18:58 -0800 Subject: [PATCH 1/3] Properly loop deleted nodes and notify ProjectMgr of changes --- Common/Product/SharedProject/HierarchyNode.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Common/Product/SharedProject/HierarchyNode.cs b/Common/Product/SharedProject/HierarchyNode.cs index 95cc335ca..1650ecc30 100644 --- a/Common/Product/SharedProject/HierarchyNode.cs +++ b/Common/Product/SharedProject/HierarchyNode.cs @@ -931,7 +931,7 @@ public virtual void Remove(bool removeFromStorage) { // When we don't call this it behaves properly also in Solution Explorer search result set // Notify hierarchy event listeners that items have been invalidated - //ProjectMgr.OnInvalidateItems(this); + ProjectMgr.OnInvalidateItems(this); // Dispose the node now that is deleted. this.Dispose(true); @@ -996,8 +996,12 @@ internal void RemoveNonDocument(bool removeFromStorage) { ProjectMgr.OnItemDeleted(this); // Remove child if any before removing from the hierarchy - for (HierarchyNode child = this.FirstChild; child != null; child = child.NextSibling) { + HierarchyNode child = this.FirstChild; + while (child != null) { + // Need to read NextSibling before calling Remove + var next = child.NextSibling; child.Remove(removeFromStorage); + child = next; } // the project node has no parentNode From 6787b6c758d919762d1b8643a892b4ad6e0b47be Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 30 Jan 2017 17:19:09 -0800 Subject: [PATCH 2/3] Version bump --- Nodejs/Product/InteractiveWindow/source.extension.vsixmanifest | 2 +- Nodejs/Product/Nodejs/source.extension.vsixmanifest | 2 +- Nodejs/Product/Profiling/source.extension.vsixmanifest | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Nodejs/Product/InteractiveWindow/source.extension.vsixmanifest b/Nodejs/Product/InteractiveWindow/source.extension.vsixmanifest index 1e76be19f..c33526804 100644 --- a/Nodejs/Product/InteractiveWindow/source.extension.vsixmanifest +++ b/Nodejs/Product/InteractiveWindow/source.extension.vsixmanifest @@ -1,6 +1,6 @@ - + Node.js Tools - Interactive Window Node.js Tools - Interactive Window. http://go.microsoft.com/fwlink/?LinkId=785971 diff --git a/Nodejs/Product/Nodejs/source.extension.vsixmanifest b/Nodejs/Product/Nodejs/source.extension.vsixmanifest index ae613ec06..3524ca282 100644 --- a/Nodejs/Product/Nodejs/source.extension.vsixmanifest +++ b/Nodejs/Product/Nodejs/source.extension.vsixmanifest @@ -1,6 +1,6 @@ - + Node.js Tools Provides support for editing and debugging Node.js programs. http://go.microsoft.com/fwlink/?LinkId=785971 diff --git a/Nodejs/Product/Profiling/source.extension.vsixmanifest b/Nodejs/Product/Profiling/source.extension.vsixmanifest index 5220b3627..21711873e 100644 --- a/Nodejs/Product/Profiling/source.extension.vsixmanifest +++ b/Nodejs/Product/Profiling/source.extension.vsixmanifest @@ -1,6 +1,6 @@ - + Node.js Tools - Profiling Provides support for profiling Node.js projects http://go.microsoft.com/fwlink/?LinkId=785971 From e2c377a356abf8212bc27a642d783c05f9073231 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Wed, 1 Feb 2017 16:35:29 -0800 Subject: [PATCH 3/3] Update comment --- Common/Product/SharedProject/HierarchyNode.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Common/Product/SharedProject/HierarchyNode.cs b/Common/Product/SharedProject/HierarchyNode.cs index 1650ecc30..414337d31 100644 --- a/Common/Product/SharedProject/HierarchyNode.cs +++ b/Common/Product/SharedProject/HierarchyNode.cs @@ -929,7 +929,6 @@ public virtual void Remove(bool removeFromStorage) { RaiseOnItemRemoved(documentToRemove, filesToBeDeleted); - // When we don't call this it behaves properly also in Solution Explorer search result set // Notify hierarchy event listeners that items have been invalidated ProjectMgr.OnInvalidateItems(this);