Browse Source

Fixed bug in ParserService (ParseInformationUpdated event was not raised).

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4720 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 16 years ago
parent
commit
54e90697dc
  1. 9
      src/Main/Base/Project/Src/Services/ParserService/ParserService.cs

9
src/Main/Base/Project/Src/Services/ParserService/ParserService.cs

@ -424,12 +424,15 @@ namespace ICSharpCode.SharpDevelop @@ -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 @@ -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<ParseInformation> BeginParse(ITextBuffer fileContent)

Loading…
Cancel
Save