public BackgroundParser(ITextBuffer textBuffer, ITextDocumentFactoryService textDocumentFactoryService, IOutputWindowService outputWindowService) : this(textBuffer, TaskScheduler.Default, textDocumentFactoryService, outputWindowService, PredefinedOutputWindowPanes.TvlDiagnostics) { Contract.Requires(textBuffer != null); Contract.Requires(textDocumentFactoryService != null); Contract.Requires(outputWindowService != null); }
public AntlrBackgroundParser(ITextBuffer textBuffer, TaskScheduler taskScheduler, ITextDocumentFactoryService textDocumentFactoryService, IOutputWindowService outputWindowService) : base(textBuffer, taskScheduler, textDocumentFactoryService, outputWindowService) { Contract.Requires(textBuffer != null); Contract.Requires(taskScheduler != null); Contract.Requires(textDocumentFactoryService != null); Contract.Requires(outputWindowService != null); if (!_initialized) { try { // have to create an instance of the tool to make sure the error manager gets initialized new AntlrTool(); } catch (Exception e) { if (ErrorHandler.IsCriticalException(e)) throw; } _initialized = true; } }
public SpecRunTestRunnerGateway(IOutputWindowService outputWindowService, IIdeTracer tracer, IProjectScopeFactory projectScopeFactory, DTE2 dte) { this.outputWindowService = outputWindowService; this.dte = dte; this.projectScopeFactory = projectScopeFactory; this.tracer = tracer; }
private PhpOutliningBackgroundParser(ITextBuffer textBuffer, TaskScheduler taskScheduler, IOutputWindowService outputWindowService, ITextDocumentFactoryService textDocumentFactoryService) : base(textBuffer, taskScheduler, textDocumentFactoryService, outputWindowService) { Contract.Requires(textBuffer != null); Contract.Requires(taskScheduler != null); Contract.Requires(outputWindowService != null); Contract.Requires(textDocumentFactoryService != null); }
/// <summary> /// Initializes a new instance of the <see cref="T:OutputWindowTraceListener"/> class. /// </summary> /// <param name="outputWindow">The output window.</param> /// <param name="traceSwitch">The trace switch.</param> public OutputWindowTraceListener(IOutputWindowService outputWindow, TraceSwitch traceSwitch) { Guard.ArgumentNotNull(outputWindow, "outputWindow"); Guard.ArgumentNotNull(traceSwitch, "traceSwitch"); this.traceSwitch = traceSwitch; this.outputWindowService = outputWindow; }
internal static PhpOutliningBackgroundParser CreateParser(ITextBuffer textBuffer, TaskScheduler taskScheduler, IOutputWindowService outputWindowService, ITextDocumentFactoryService textDocumentFactoryService) { Contract.Requires<ArgumentNullException>(textBuffer != null, "textBuffer"); Contract.Requires<ArgumentNullException>(taskScheduler != null, "taskScheduler"); Contract.Requires<ArgumentNullException>(outputWindowService != null, "outputWindowService"); Contract.Requires<ArgumentNullException>(textDocumentFactoryService != null, "textDocumentFactoryService"); return new PhpOutliningBackgroundParser(textBuffer, taskScheduler, outputWindowService, textDocumentFactoryService); }
private AlloyEditorNavigationSourceWalker(ITreeNodeStream input, ITextSnapshot snapshot, ReadOnlyCollection<IToken> tokens, IEditorNavigationTypeRegistryService editorNavigationTypeRegistryService, IGlyphService glyphService, IOutputWindowService outputWindowService) : base(input, snapshot, outputWindowService) { Contract.Requires<ArgumentNullException>(editorNavigationTypeRegistryService != null, "editorNavigationTypeRegistryService"); Contract.Requires<ArgumentNullException>(glyphService != null, "glyphService"); _tokens = tokens; _editorNavigationTypeRegistryService = editorNavigationTypeRegistryService; _glyphService = glyphService; }
public BackgroundParser(ITextBuffer textBuffer, TaskScheduler taskScheduler, ITextDocumentFactoryService textDocumentFactoryService, IOutputWindowService outputWindowService, string outputPaneName) { Contract.Requires<ArgumentNullException>(textBuffer != null, "textBuffer"); Contract.Requires<ArgumentNullException>(taskScheduler != null, "taskScheduler"); Contract.Requires<ArgumentNullException>(textDocumentFactoryService != null, "textDocumentFactoryService"); Contract.Requires<ArgumentNullException>(outputWindowService != null, "outputWindowService"); this._textBuffer = new WeakReference<ITextBuffer>(textBuffer); this._taskScheduler = taskScheduler; this._textDocumentFactoryService = textDocumentFactoryService; this._outputWindowService = outputWindowService; this._outputWindowName = outputPaneName; textBuffer.PostChanged += TextBufferPostChanged; this._dirty = true; this._reparseDelay = TimeSpan.FromMilliseconds(1500); this._timer = new Timer(ParseTimerCallback, null, _reparseDelay, _reparseDelay); this._lastEdit = DateTimeOffset.MinValue; }
public BackgroundParserTaskScheduler(string name, int maximumConcurrencyLevel, IOutputWindowService outputWindowService) { Contract.Requires<ArgumentOutOfRangeException>(maximumConcurrencyLevel > 0); Contract.Requires<ArgumentNullException>(outputWindowService != null, "outputWindowService"); _blockingQueue = new BlockingCollection<Task>(); _outputWindowService = outputWindowService; _maximumConcurrencyLevel = maximumConcurrencyLevel; _workerThreads = new Thread[_maximumConcurrencyLevel]; for (int i = 0; i < maximumConcurrencyLevel; i++) { _workerThreads[i] = new Thread(DispatchLoop) { IsBackground = true, Name = string.Format("{0} Thread {1}", name, i), }; _workerThreads[i].Start(); } }
public AlloyBaseWalker(ITreeNodeStream input, ITextSnapshot snapshot, IOutputWindowService outputWindowService) : base(input) { _snapshot = snapshot; _outputWindowService = outputWindowService; }
private AlloyEditorNavigationSourceWalker(ITreeNodeStream input, ITextSnapshot snapshot, ReadOnlyCollection <IToken> tokens, IEditorNavigationTypeRegistryService editorNavigationTypeRegistryService, IGlyphService glyphService, IOutputWindowService outputWindowService) : base(input, snapshot, outputWindowService) { Contract.Requires <ArgumentNullException>(editorNavigationTypeRegistryService != null, "editorNavigationTypeRegistryService"); Contract.Requires <ArgumentNullException>(glyphService != null, "glyphService"); _tokens = tokens; _editorNavigationTypeRegistryService = editorNavigationTypeRegistryService; _glyphService = glyphService; }
public BackgroundParser(ITextBuffer textBuffer, TaskScheduler taskScheduler, ITextDocumentFactoryService textDocumentFactoryService, IOutputWindowService outputWindowService, string outputPaneName) { Contract.Requires <ArgumentNullException>(textBuffer != null, "textBuffer"); Contract.Requires <ArgumentNullException>(taskScheduler != null, "taskScheduler"); Contract.Requires <ArgumentNullException>(textDocumentFactoryService != null, "textDocumentFactoryService"); Contract.Requires <ArgumentNullException>(outputWindowService != null, "outputWindowService"); this._textBuffer = new WeakReference <ITextBuffer>(textBuffer); this._taskScheduler = taskScheduler; this._textDocumentFactoryService = textDocumentFactoryService; this._outputWindowService = outputWindowService; this._outputWindowName = outputPaneName; textBuffer.PostChanged += TextBufferPostChanged; this._dirty = true; this._reparseDelay = TimeSpan.FromMilliseconds(1500); this._timer = new Timer(ParseTimerCallback, null, _reparseDelay, _reparseDelay); this._lastEdit = DateTimeOffset.MinValue; }
public BackgroundParser(ITextBuffer textBuffer, TaskScheduler taskScheduler, ITextDocumentFactoryService textDocumentFactoryService, IOutputWindowService outputWindowService) : this(textBuffer, taskScheduler, textDocumentFactoryService, outputWindowService, PredefinedOutputWindowPanes.TvlDiagnostics) { Contract.Requires(textBuffer != null); Contract.Requires(taskScheduler != null); Contract.Requires(textDocumentFactoryService != null); Contract.Requires(outputWindowService != null); }
public AntlrBackgroundParser(ITextBuffer textBuffer, TaskScheduler taskScheduler, ITextDocumentFactoryService textDocumentFactoryService, IOutputWindowService outputWindowService) : base(textBuffer, taskScheduler, textDocumentFactoryService, outputWindowService) { Contract.Requires(textBuffer != null); Contract.Requires(taskScheduler != null); Contract.Requires(textDocumentFactoryService != null); Contract.Requires(outputWindowService != null); if (!_initialized) { try { // have to create an instance of the tool to make sure the error manager gets initialized new AntlrTool(); } catch (Exception e) { if (ErrorHandler.IsCriticalException(e)) { throw; } } _initialized = true; } }
public VisualStudioTracer(IOutputWindowService outputWindowService) : this() { this.OutputWindowService = outputWindowService; }
internal static PhpEditorNavigationBackgroundParser CreateParser(ITextBuffer textBuffer, TaskScheduler taskScheduler, IOutputWindowService outputWindowService, ITextDocumentFactoryService textDocumentFactoryService) { Contract.Requires <ArgumentNullException>(textBuffer != null, "textBuffer"); Contract.Requires <ArgumentNullException>(taskScheduler != null, "taskScheduler"); Contract.Requires <ArgumentNullException>(outputWindowService != null, "outputWindowService"); Contract.Requires <ArgumentNullException>(textDocumentFactoryService != null, "textDocumentFactoryService"); return(new PhpEditorNavigationBackgroundParser(textBuffer, taskScheduler, outputWindowService, textDocumentFactoryService)); }
public BackgroundParserTaskScheduler(string name, int maximumConcurrencyLevel, IOutputWindowService outputWindowService) { Contract.Requires <ArgumentOutOfRangeException>(maximumConcurrencyLevel > 0); Contract.Requires <ArgumentNullException>(outputWindowService != null, "outputWindowService"); _blockingQueue = new BlockingCollection <Task>(); _outputWindowService = outputWindowService; _maximumConcurrencyLevel = maximumConcurrencyLevel; _workerThreads = new Thread[_maximumConcurrencyLevel]; for (int i = 0; i < maximumConcurrencyLevel; i++) { _workerThreads[i] = new Thread(DispatchLoop) { IsBackground = true, Name = string.Format("{0} Thread {1}", name, i), }; _workerThreads[i].Start(); } }
public StandardTaskSchedulers(IOutputWindowService outputWindowService) { ProjectCacheIntelliSenseScheduler = new BackgroundParserTaskScheduler("TVL Low Priority Background", BackgroundParserTaskScheduler.DefaultConcurrencyLevel, outputWindowService); BackgroundIntelliSenseScheduler = new BackgroundParserTaskScheduler(outputWindowService); PriorityIntelliSenseScheduler = new BackgroundParserTaskScheduler("TVL Priority IntelliSense", 2, outputWindowService); }
public JavaSymbolTagger(ITextBuffer textBuffer, IClassificationTypeRegistryService classificationTypeRegistryService, TaskScheduler taskScheduler, ITextDocumentFactoryService textDocumentFactoryService, IOutputWindowService outputWindowService) : base(textBuffer, taskScheduler, textDocumentFactoryService, outputWindowService) { _classificationTypeRegistryService = classificationTypeRegistryService; RequestParse(false); }
internal static PhpEditorNavigationBackgroundParser CreateParser([NotNull] ITextBuffer textBuffer, [NotNull] TaskScheduler taskScheduler, [NotNull] IOutputWindowService outputWindowService, [NotNull] ITextDocumentFactoryService textDocumentFactoryService) { Requires.NotNull(textBuffer, nameof(textBuffer)); Requires.NotNull(taskScheduler, nameof(taskScheduler)); Requires.NotNull(outputWindowService, nameof(outputWindowService)); Requires.NotNull(textDocumentFactoryService, nameof(textDocumentFactoryService)); return(new PhpEditorNavigationBackgroundParser(textBuffer, taskScheduler, outputWindowService, textDocumentFactoryService)); }
private PhpEditorNavigationBackgroundParser([NotNull] ITextBuffer textBuffer, [NotNull] TaskScheduler taskScheduler, [NotNull] IOutputWindowService outputWindowService, [NotNull] ITextDocumentFactoryService textDocumentFactoryService) : base(textBuffer, taskScheduler, textDocumentFactoryService, outputWindowService) { Debug.Assert(textBuffer != null); Debug.Assert(taskScheduler != null); Debug.Assert(outputWindowService != null); Debug.Assert(textDocumentFactoryService != null); }
public StringTemplateBackgroundParser([NotNull] ITextBuffer textBuffer, [NotNull] TaskScheduler taskScheduler, [NotNull] ITextDocumentFactoryService textDocumentFactoryService, [NotNull] IOutputWindowService outputWindowService) : base(textBuffer, taskScheduler, textDocumentFactoryService, outputWindowService) { Debug.Assert(textBuffer != null); Debug.Assert(taskScheduler != null); Debug.Assert(textDocumentFactoryService != null); Debug.Assert(outputWindowService != null); }
public CSharpInheritanceAnalyzer(ITextBuffer textBuffer, TaskScheduler taskScheduler, ITextDocumentFactoryService textDocumentFactoryService, IOutputWindowService outputWindowService, SVsServiceProvider serviceProvider, IInheritanceTagFactory tagFactory) : base(textBuffer, taskScheduler, textDocumentFactoryService, outputWindowService) { if (serviceProvider == null) { throw new ArgumentNullException("serviceProvider"); } _serviceProvider = serviceProvider; _tagFactory = tagFactory; }
public BackgroundParserTaskScheduler(IOutputWindowService outputWindowService) : this("TVL IntelliSense", DefaultConcurrencyLevel, outputWindowService) { Contract.Requires(outputWindowService != null); }
private AlloyEditorNavigationSourceWalker(ITreeNodeStream input, ITextSnapshot snapshot, ReadOnlyCollection <IToken> tokens, [NotNull] IEditorNavigationTypeRegistryService editorNavigationTypeRegistryService, [NotNull] IGlyphService glyphService, IOutputWindowService outputWindowService) : base(input, snapshot, outputWindowService) { Requires.NotNull(editorNavigationTypeRegistryService, nameof(editorNavigationTypeRegistryService)); Requires.NotNull(glyphService, nameof(glyphService)); _tokens = tokens; _editorNavigationTypeRegistryService = editorNavigationTypeRegistryService; _glyphService = glyphService; }
public BackgroundParser(ITextBuffer textBuffer, TaskScheduler taskScheduler, ITextDocumentFactoryService textDocumentFactoryService, IOutputWindowService outputWindowService) : this(textBuffer, taskScheduler, textDocumentFactoryService, outputWindowService, PredefinedOutputWindowPanes.TvlDiagnostics) { }
internal Dictionary <string, IAssetReference> GetAvailableRecipes(GuidancePackage guidancePackage) { #if DEBUG DateTime startTime = DateTime.Now; Debug.WriteLine(String.Format("GetAvailableRecipes - Start time {0}.", startTime.ToLongTimeString())); #endif Dictionary <string, IAssetReference> availableRecipes = new Dictionary <string, IAssetReference>(); IAssetReferenceService referenceService = (IAssetReferenceService)guidancePackage.GetService(typeof(IAssetReferenceService), true); IOutputWindowService outputWindow = guidancePackage.GetService <IOutputWindowService>(); IPersistenceService persistenceService = guidancePackage.GetService <IPersistenceService>(); IAssetReference[] allReferences = null; allReferences = persistenceService.LoadReferences(guidancePackage.Configuration.Name); #if DEBUG Debug.WriteLine(String.Format("GetAvailableRecipes - Probing using {0} references.", allReferences.Length)); #endif List <IUnboundAssetReference> unboundAssetReferenceList; List <IAssetReference> otherAssetList; GetAssetLists(allReferences, out unboundAssetReferenceList, out otherAssetList); #if DEBUG Debug.WriteLine(String.Format("GetAvailableRecipes - Probing using {0} unbound references.", unboundAssetReferenceList.Count)); Debug.WriteLine(String.Format("GetAvailableRecipes - Probing using {0} other references.", otherAssetList.Count)); #endif List <object> allPossibleTargets = GetAllSolutionExplorerItems(); #if DEBUG Debug.WriteLine(String.Format("GetAvailableRecipes - Probing against {0} targets.", allPossibleTargets.Count)); #endif List <IUnboundAssetReference> unboundAssetReferenceWithNoTargetList = new List <IUnboundAssetReference>(); foreach (IUnboundAssetReference unboundAssetReference in unboundAssetReferenceList) { bool referenceHasValidTarget = false; foreach (object item in allPossibleTargets) { try { if (unboundAssetReference.IsEnabledFor(item)) { referenceHasValidTarget = true; break; } } catch (Exception resolveReferenceException) { // The reference is not valid for this item. outputWindow.Display(string.Format(Resources.Navigator_ReferenceThrowException, unboundAssetReference.AssetName, resolveReferenceException.Message)); } } if (!referenceHasValidTarget) { unboundAssetReferenceWithNoTargetList.Add(unboundAssetReference); } } #if DEBUG Debug.WriteLine(String.Format("GetAvailableRecipes - Removing {0} unbound referenes with no valid targets", unboundAssetReferenceWithNoTargetList.Count)); #endif // remove those unbound asset references that don't have a valid target in the whole solution foreach (IUnboundAssetReference reference in unboundAssetReferenceWithNoTargetList) { unboundAssetReferenceList.Remove(reference); } // add the unbound asset references that have a valid target foreach (IAssetReference reference in unboundAssetReferenceList) { otherAssetList.Add(reference); } foreach (IAssetReference reference in otherAssetList) { if (!availableRecipes.ContainsKey(reference.AssetName)) { availableRecipes.Add(reference.AssetName, reference); } } #if DEBUG DateTime endTime = DateTime.Now; Debug.WriteLine(String.Format("GetAvailableRecipes - End time {0}.", endTime.ToLongTimeString())); TimeSpan ts = endTime.Subtract(startTime); Debug.WriteLine(String.Format("GetAvailableRecipes - Executed in {0} ms.", ts.Milliseconds)); #endif return(availableRecipes); }
public BackgroundParser(ITextBuffer textBuffer, ITextDocumentFactoryService textDocumentFactoryService, IOutputWindowService outputWindowService) : this(textBuffer, TaskScheduler.Default, textDocumentFactoryService, outputWindowService, PredefinedOutputWindowPanes.TvlDiagnostics) { }
private PhpEditorNavigationBackgroundParser(ITextBuffer textBuffer, TaskScheduler taskScheduler, IOutputWindowService outputWindowService, ITextDocumentFactoryService textDocumentFactoryService) : base(textBuffer, taskScheduler, textDocumentFactoryService, outputWindowService) { Contract.Requires(textBuffer != null); Contract.Requires(taskScheduler != null); Contract.Requires(outputWindowService != null); Contract.Requires(textDocumentFactoryService != null); }
public BackgroundParser(ITextBuffer textBuffer, TaskScheduler taskScheduler, ITextDocumentFactoryService textDocumentFactoryService, IOutputWindowService outputWindowService, string outputPaneName) { if (textBuffer == null) { throw new ArgumentNullException("textBuffer"); } if (taskScheduler == null) { throw new ArgumentNullException("taskScheduler"); } if (textDocumentFactoryService == null) { throw new ArgumentNullException("textDocumentFactoryService"); } if (outputWindowService == null) { throw new ArgumentNullException("outputWindowService"); } _textBuffer = new WeakReference(textBuffer); _taskScheduler = taskScheduler; _textDocumentFactoryService = textDocumentFactoryService; _outputWindowService = outputWindowService; _outputWindowName = outputPaneName; textBuffer.PostChanged += TextBufferPostChanged; _dirty = true; _reparseDelay = TimeSpan.FromMilliseconds(1500); _timer = new Timer(ParseTimerCallback, null, _reparseDelay, _reparseDelay); _lastEdit = DateTimeOffset.MinValue; }
public Antlr4BackgroundParser(ITextBuffer textBuffer, TaskScheduler taskScheduler, ITextDocumentFactoryService textDocumentFactoryService, IOutputWindowService outputWindowService) : base(textBuffer, taskScheduler, textDocumentFactoryService, outputWindowService) { Contract.Requires(textBuffer != null); Contract.Requires(taskScheduler != null); Contract.Requires(textDocumentFactoryService != null); Contract.Requires(outputWindowService != null); }