static void OnParseInformationUpdated(ParseInformationEventArgs e) { if (ParseInformationUpdated != null) { ParseInformationUpdated(null, e); } }
static void OnParseInformationUpdated(ParseInformationEventArgs e) { ParseInformationEventHandler handler = ParseInformationUpdated; if (handler != null) { handler(null, e); } }
void ParseInfoUpdated(object sender, ParseInformationEventArgs e) { if (this.editor == null || !FileUtility.IsEqualFileName(this.editor.FileName, e.FileName)) return; var cu = e.NewCompilationUnit as XamlCompilationUnit; if (cu != null && cu.TreeRootNode != null) UpdateTree(cu.TreeRootNode); }
static void RaiseParseInformationUpdated(ParseInformationEventArgs e) { // RaiseParseInformationUpdated is called inside a lock, but we don't want to raise the event inside that lock. // To ensure events are raised in the same order, we always invoke on the main thread. WorkbenchSingleton.SafeThreadAsyncCall( delegate { LoggingService.Debug("ParseInformationUpdated " + e.FileName + " new!=null:" + (e.NewCompilationUnit != null)); ParseInformationUpdated(null, e); }); }
static void ParserService_ParseInformationUpdated(object sender, ParseInformationEventArgs e) { if (e.NewParseInformation == ParserService.GetExistingParseInformation(e.FileName)) { // Call UpdateCommentTags only for the main parse information (if a file is in multiple projects), // and only if the results haven't already been replaced with a more recent ParseInformation. if (e.NewCompilationUnit != null) { UpdateCommentTags(e.FileName, e.NewCompilationUnit.TagComments); } else { UpdateCommentTags(e.FileName, new List <TagComment>()); } } }
void OnParseInformationUpdated(object sender, ParseInformationEventArgs e) { System.Diagnostics.Debug.WriteLine("ClassDiagramViewContent.OnParseInformationUpdated"); if (e == null) return; if (e.NewCompilationUnit == null) return; if (e.NewCompilationUnit.ProjectContent == null) return; if (e.NewCompilationUnit.ProjectContent.Classes == null) return; if (e.NewCompilationUnit.ProjectContent != projectContent) return; //TODO - this is a wrong way to handle changed parse informtation. // the correct way is to mark removed classes as missing, and to // update changed classes that exist in the diagram. /* List<CanvasItem> addedItems = new List<CanvasItem>(); foreach (IClass ct in e.CompilationUnit.ProjectContent.Classes) { if (!canvas.Contains(ct)) { ClassCanvasItem item = ClassCanvas.CreateItemFromType(ct); canvas.AddCanvasItem(item); addedItems.Add(item); } } WorkbenchSingleton.SafeThreadAsyncCall<ICollection<CanvasItem>>(PlaceNewItems, addedItems); foreach (CanvasItem ci in canvas.GetCanvasItems()) { ClassCanvasItem cci = ci as ClassCanvasItem; if (cci != null) { if (!e.CompilationUnit.ProjectContent.Classes.Contains(cci.RepresentedClassType)) canvas.RemoveCanvasItem(cci); } } */ }
void ParseInformationUpdated(object source, ParseInformationEventArgs e) { lock (pending) { ICompilationUnit[] units = new ICompilationUnit[] {e.OldCompilationUnit, e.NewCompilationUnit}; pending.Add(units); } WorkbenchSingleton.SafeThreadAsyncCall(UpdateParseInfo); }
void ParserServiceParseInformationUpdated(object sender, ParseInformationEventArgs e) { if (e.FileName != this.FileName || !e.IsPrimaryParseInfoForFile) return; this.VerifyAccess(); // When parse information is updated quickly in succession, only do a single update // to the latest version. updateParseInfoTo = e.NewParseInformation; this.Dispatcher.BeginInvoke( DispatcherPriority.Background, new Action( delegate { if (updateParseInfoTo != null) { ParseInformationUpdated(updateParseInfoTo); updateParseInfoTo = null; } })); }
static void RaiseParseInformationUpdated(ParseInformationEventArgs e) { // RaiseParseInformationUpdated is called inside a lock, but we don't want to raise the event inside that lock. // To ensure events are raised in the same order, we always invoke on the main thread. WorkbenchSingleton.SafeThreadAsyncCall( delegate { LoggingService.Debug("ParseInformationUpdated " + e.FileName + " new!=null:" + (e.NewCompilationUnit!=null)); ParseInformationUpdated(null, e); }); }
static void OnParseInformationUpdated(ParseInformationEventArgs e) { if (ParseInformationUpdated != null) { ParseInformationUpdated(null, e); } }
static void ParserService_ParseInformationUpdated(object sender, ParseInformationEventArgs e) { if (e.NewParseInformation == ParserService.GetExistingParseInformation(e.FileName)) { // Call UpdateCommentTags only for the main parse information (if a file is in multiple projects), // and only if the results haven't already been replaced with a more recent ParseInformation. if (e.NewCompilationUnit != null) { UpdateCommentTags(e.FileName, e.NewCompilationUnit.TagComments); } else { UpdateCommentTags(e.FileName, new List<TagComment>()); } } }
static void OnParseInformationUpdated(ParseInformationEventArgs e) { ParseInformationEventHandler handler = ParseInformationUpdated; if (handler != null) { handler(null, e); } }