From 54e90697dcb11c97cdf169fbf09f5e1c7a9e5dea Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Tue, 18 Aug 2009 00:08:37 +0000 Subject: [PATCH] Fixed bug in ParserService (ParseInformationUpdated event was not raised). git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4720 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/Src/Services/ParserService/ParserService.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Main/Base/Project/Src/Services/ParserService/ParserService.cs b/src/Main/Base/Project/Src/Services/ParserService/ParserService.cs index 1a94828278..9c485bc00b 100644 --- a/src/Main/Base/Project/Src/Services/ParserService/ParserService.cs +++ b/src/Main/Base/Project/Src/Services/ParserService/ParserService.cs @@ -424,12 +424,15 @@ namespace ICSharpCode.SharpDevelop // update the compilation unit ICompilationUnit oldUnit = oldUnits.FirstOrDefault(o => o.ProjectContent == pc); pc.UpdateCompilationUnit(oldUnit, newUnits[i], fileName); + RaiseParseInformationUpdated(new ParseInformationEventArgs(fileName, pc, oldUnit, newUnits[i])); } // remove all old units that don't exist anymore foreach (ICompilationUnit oldUnit in oldUnits) { - if (!newUnits.Any(n => n.ProjectContent == oldUnit.ProjectContent)) + if (!newUnits.Any(n => n.ProjectContent == oldUnit.ProjectContent)) { oldUnit.ProjectContent.RemoveCompilationUnit(oldUnit); + RaiseParseInformationUpdated(new ParseInformationEventArgs(fileName, oldUnit.ProjectContent, oldUnit, null)); + } } this.bufferVersion = fileContentVersion; @@ -451,8 +454,10 @@ namespace ICSharpCode.SharpDevelop this.oldUnits = null; this.bufferVersion = null; } - foreach (ICompilationUnit oldUnit in oldUnits) + foreach (ICompilationUnit oldUnit in oldUnits) { oldUnit.ProjectContent.RemoveCompilationUnit(oldUnit); + RaiseParseInformationUpdated(new ParseInformationEventArgs(fileName, oldUnit.ProjectContent, oldUnit, null)); + } } public Task BeginParse(ITextBuffer fileContent)