public IEnumerable <IDaemonStageProcess> CreateProcess(IDaemonProcess process, IContextBoundSettingsStore settings, DaemonProcessKind processKind) { Handler.Init(); if (processKind != DaemonProcessKind.VISIBLE_DOCUMENT || !IsSupported(process.SourceFile)) { return(EmptyList <IDaemonStageProcess> .InstanceList); } var document = process.Document; if (!documentToProcess.ContainsKey(document)) { var highlightingProcess = new HighlightingProcess(process, settings); documentToProcess.Add(process.Document, highlightingProcess); } else { documentToProcess[document].Update(process, settings); } return(new List <IDaemonStageProcess> { documentToProcess[document] }); }
public IEnumerable<IDaemonStageProcess> CreateProcess(IDaemonProcess process, IContextBoundSettingsStore settings, DaemonProcessKind processKind) { Handler.Init(); if (processKind != DaemonProcessKind.VISIBLE_DOCUMENT || !IsSupported(process.SourceFile)) { return EmptyList<IDaemonStageProcess>.InstanceList; } var document = process.Document; if (!documentToProcess.ContainsKey(document)) { var highlightingProcess = new HighlightingProcess(process, settings); documentToProcess.Add(process.Document, highlightingProcess); } else { documentToProcess[document].Update(process, settings); } return new List<IDaemonStageProcess> { documentToProcess[document] }; }