public CompletionSource(CompletionSourceProvider provider, ITextBuffer buffer, ITextDocumentFactoryService textDocumentFactory, DartAnalysisServiceFactory analysisServiceFactory)
 {
     this.provider = provider;
     this.buffer = buffer;
     this.textDocumentFactory = textDocumentFactory;
     this.analysisServiceFactory = analysisServiceFactory;
 }
 public CompletionSource(CompletionSourceProvider provider, ITextBuffer buffer, ITextDocumentFactoryService textDocumentFactory, DartAnalysisServiceFactory analysisServiceFactory)
 {
     this.provider               = provider;
     this.buffer                 = buffer;
     this.textDocumentFactory    = textDocumentFactory;
     this.analysisServiceFactory = analysisServiceFactory;
 }
        public AnalysisNotificationTagger(ITextBuffer buffer, ITextDocumentFactoryService textDocumentFactory, DartAnalysisServiceFactory analysisServiceFactory)
        {
            this.buffer = buffer;
            this.textDocumentFactory    = textDocumentFactory;
            this.analysisServiceFactory = analysisServiceFactory;

            textDocumentFactory.TryGetTextDocument(this.buffer, out this.textDocument);
        }
        public DartCodeWindowManager(ITextDocumentFactoryService textDocumentFactory, IVsEditorAdaptersFactoryService editorAdapterFactory, IVsCodeWindow codeWindow, DartAnalysisServiceFactory analysisServiceFactory)
        {
            this.barManager = ((IVsDropdownBarManager)codeWindow);
            this.analysisServiceFactory = analysisServiceFactory;

            // Figure out the filename (seriously; this is the best way?!).
            IVsTextView textView;
            codeWindow.GetPrimaryView(out textView);
            wpfTextView = editorAdapterFactory.GetWpfTextView(textView);
            textDocumentFactory.TryGetTextDocument(wpfTextView.TextBuffer, out this.textDocument);
        }
        public DartCodeWindowManager(ITextDocumentFactoryService textDocumentFactory, IVsEditorAdaptersFactoryService editorAdapterFactory, IVsCodeWindow codeWindow, DartAnalysisServiceFactory analysisServiceFactory)
        {
            this.barManager             = ((IVsDropdownBarManager)codeWindow);
            this.analysisServiceFactory = analysisServiceFactory;

            // Figure out the filename (seriously; this is the best way?!).
            IVsTextView textView;

            codeWindow.GetPrimaryView(out textView);
            wpfTextView = editorAdapterFactory.GetWpfTextView(textView);
            textDocumentFactory.TryGetTextDocument(wpfTextView.TextBuffer, out this.textDocument);
        }
Example #6
0
        public NavigationDropdown(DartAnalysisServiceFactory analysisServiceFactory, string file, IWpfTextView wpfTextView)
        {
            this.analysisServiceFactory = analysisServiceFactory;
            this.file        = file;
            this.wpfTextView = wpfTextView;

            this.wpfTextView.Caret.PositionChanged += CaretPositionChanged;

            // Capture dispatcher so we can call RefreshCombo on the correct thread.
            dispatcher = Dispatcher.CurrentDispatcher;

            // Subscribe to outline updates for this file
            subscription = SubscribeAsync();
        }
        public DartOleCommandTarget(ITextDocumentFactoryService textDocumentFactory, IVsTextView textViewAdapter, IWpfTextView textView, DartAnalysisServiceFactory analysisServiceFactory, params T[] commandIDs)
        {
            this.textViewAdapter        = textViewAdapter;
            this.textView               = textView;
            this.analysisServiceFactory = analysisServiceFactory;
            this.commandIDs             = commandIDs.Select(commandID => Convert.ToUInt32(commandID, CultureInfo.InvariantCulture)).ToArray();

            textDocumentFactory.TryGetTextDocument(textView.TextBuffer, out this.textDocument);

            Dispatcher.CurrentDispatcher.InvokeAsync(() =>
            {
                // Add the target later to make sure it makes it in before other command handlers.
                ErrorHandler.ThrowOnFailure(textViewAdapter.AddCommandFilter(this, out nextCommandTarget));
            }, DispatcherPriority.ApplicationIdle);
        }
Example #8
0
 public DartFileChangeTracker(IVsEditorAdaptersFactoryService editorAdaptersFactoryService, DartAnalysisServiceFactory analysisServiceFactory)
 {
     this.editorAdaptersFactoryService = editorAdaptersFactoryService;
     this.analysisService = analysisServiceFactory.GetAnalysisServiceAsync();
 }
Example #9
0
 public ErrorSquiggleTagger(ITextBuffer buffer, ITextDocumentFactoryService textDocumentFactory, DartAnalysisServiceFactory analysisServiceFactory)
     : base(buffer, textDocumentFactory, analysisServiceFactory)
 {
     this.Subscribe();
 }
Example #10
0
 public DartLanguageInfo(ITextDocumentFactoryService textDocumentFactory, IVsEditorAdaptersFactoryService editorAdapterFactory, DartAnalysisServiceFactory analysisServiceFactory)
 {
     this.textDocumentFactory    = textDocumentFactory;
     this.editorAdapterFactory   = editorAdapterFactory;
     this.analysisServiceFactory = analysisServiceFactory;
 }
        public ClassificationTagger(ITextBuffer buffer, ITextDocumentFactoryService textDocumentFactory, DartAnalysisServiceFactory analysisServiceFactory, IClassificationTypeRegistryService typeService)
            : base(buffer, textDocumentFactory, analysisServiceFactory)
        {
            Array values = Enum.GetValues(typeof(HighlightRegionType));

            classificationMapping = new IClassificationType[values.Length];
            for (int i = 0; i < classificationMapping.Length; i++)
            {
                classificationMapping[i] = typeService.GetClassificationType(DartConstants.ContentType + ((HighlightRegionType)i).ToString());
            }

            this.Subscribe();
        }
Example #12
0
 public CompletionController(ITextDocumentFactoryService textDocumentFactory, IVsTextView textViewAdapter, IWpfTextView textView, ICompletionBroker broker, DartAnalysisServiceFactory analysisServiceFactory)
     : base(textDocumentFactory, textViewAdapter, textView, analysisServiceFactory, VSConstants.VSStd2KCmdID.AUTOCOMPLETE, VSConstants.VSStd2KCmdID.COMPLETEWORD, VSConstants.VSStd2KCmdID.RETURN, VSConstants.VSStd2KCmdID.TAB, VSConstants.VSStd2KCmdID.Cancel, VSConstants.VSStd2KCmdID.TYPECHAR, VSConstants.VSStd2KCmdID.BACKSPACE)
 {
     this.broker = broker;
 }
Example #13
0
        public DartGoToDefinition(SVsServiceProvider serviceProvider, ITextDocumentFactoryService textDocumentFactory, IVsTextView textViewAdapter, IWpfTextView textView, DartAnalysisServiceFactory analysisServiceFactory)
            : base(textDocumentFactory, textViewAdapter, textView, analysisServiceFactory, VSConstants.VSStd97CmdID.GotoDefn)
        {
            this.serviceProvider = serviceProvider;

            // Subscribe to outline updates for this file.
            subscription = SubscribeAsync();
        }
Example #14
0
 public DartLanguageInfo(ITextDocumentFactoryService textDocumentFactory, IVsEditorAdaptersFactoryService editorAdapterFactory, DartAnalysisServiceFactory analysisServiceFactory)
 {
     this.textDocumentFactory = textDocumentFactory;
     this.editorAdapterFactory = editorAdapterFactory;
     this.analysisServiceFactory = analysisServiceFactory;
 }
Example #15
0
 public DartFormatDocument(ITextDocumentFactoryService textDocumentFactory, IVsTextView textViewAdapter, IWpfTextView textView, DartAnalysisServiceFactory analysisServiceFactory)
     : base(textDocumentFactory, textViewAdapter, textView, analysisServiceFactory, VSConstants.VSStd2KCmdID.FORMATDOCUMENT)
 {
     analysisService = analysisServiceFactory.GetAnalysisServiceAsync();
 }