Ejemplo n.º 1
0
 public CompletionSource(CompletionSourceProvider provider, ITextBuffer buffer, ITextDocumentFactoryService textDocumentFactory, DartAnalysisServiceFactory analysisServiceFactory)
 {
     this.provider = provider;
     this.buffer = buffer;
     this.textDocumentFactory = textDocumentFactory;
     this.analysisServiceFactory = analysisServiceFactory;
 }
Ejemplo n.º 2
0
 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);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 7
0
        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);
        }
Ejemplo n.º 8
0
 public DartFileChangeTracker(IVsEditorAdaptersFactoryService editorAdaptersFactoryService, DartAnalysisServiceFactory analysisServiceFactory)
 {
     this.editorAdaptersFactoryService = editorAdaptersFactoryService;
     this.analysisService = analysisServiceFactory.GetAnalysisServiceAsync();
 }
Ejemplo n.º 9
0
 public ErrorSquiggleTagger(ITextBuffer buffer, ITextDocumentFactoryService textDocumentFactory, DartAnalysisServiceFactory analysisServiceFactory)
     : base(buffer, textDocumentFactory, analysisServiceFactory)
 {
     this.Subscribe();
 }
Ejemplo n.º 10
0
 public DartLanguageInfo(ITextDocumentFactoryService textDocumentFactory, IVsEditorAdaptersFactoryService editorAdapterFactory, DartAnalysisServiceFactory analysisServiceFactory)
 {
     this.textDocumentFactory    = textDocumentFactory;
     this.editorAdapterFactory   = editorAdapterFactory;
     this.analysisServiceFactory = analysisServiceFactory;
 }
Ejemplo n.º 11
0
        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();
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 14
0
 public DartLanguageInfo(ITextDocumentFactoryService textDocumentFactory, IVsEditorAdaptersFactoryService editorAdapterFactory, DartAnalysisServiceFactory analysisServiceFactory)
 {
     this.textDocumentFactory = textDocumentFactory;
     this.editorAdapterFactory = editorAdapterFactory;
     this.analysisServiceFactory = analysisServiceFactory;
 }
Ejemplo n.º 15
0
 public DartFormatDocument(ITextDocumentFactoryService textDocumentFactory, IVsTextView textViewAdapter, IWpfTextView textView, DartAnalysisServiceFactory analysisServiceFactory)
     : base(textDocumentFactory, textViewAdapter, textView, analysisServiceFactory, VSConstants.VSStd2KCmdID.FORMATDOCUMENT)
 {
     analysisService = analysisServiceFactory.GetAnalysisServiceAsync();
 }