コード例 #1
0
        internal TsLintTagger(
            ITextDocument document,
            ITextStructureNavigatorSelectorService textStructureNavigatorSelector,
            ITextView textView,
            ITextBuffer buffer
            )
        {
            this._view = textView;

            this._textStructureNavigator =
                textStructureNavigatorSelector.GetTextStructureNavigator(
                    this._view.TextBuffer
                    );

            this._queue         = new TsLintQueue(this.CollectTags);
            this._collectedTags = new List <TsLintTag>();

            this._document = document;

            this._document.FileActionOccurred += this.OnDocumentFileActionOccured;
            this._view.Closed += OnViewClosed;

            this._queue.Enqueue(this._document.FilePath)
            .ContinueWith(_ => this.UpdateErrorsList())
            .ContinueWith(_ => this.TriggerTagsChanged());
        }
コード例 #2
0
ファイル: AsyncCompletionSource.cs プロジェクト: int19h/PTVS
        public AsyncCompletionSource(
            ITextView textView,
            ITextStructureNavigatorSelectorService navigatorService,
            IAsyncCompletionBroker editorCompletionBroker,
            PythonLanguageClient languageClient)
        {
            Requires.NotNull(textView, nameof(textView));
            Requires.NotNull(navigatorService, nameof(navigatorService));

            this.textView = textView;
            this.editorCompletionBroker = editorCompletionBroker;
            this.navigatorService       = navigatorService;
            this.languageClient         = languageClient;

            Requires.NotNull(this.navigatorService, nameof(this.navigatorService));

            // Cancel requests which are no longer needed and send telemetry
            this.textView.Closed += this.OnTextViewClosed;

            // Trigger characters actually come from Pylance but we know what they are.
            this.triggerCharacters = new char[] { '.', '[' };

            // Pylance does not support commit characters
            this.serverCommitCharacters = new char[] { }.ToImmutableHashSet();
        }
コード例 #3
0
 public CSharpTextStructureNavigatorProvider(
     ITextStructureNavigatorSelectorService selectorService,
     IContentTypeRegistryService contentTypeService,
     IUIThreadOperationExecutor uIThreadOperationExecutor)
     : base(selectorService, contentTypeService, uIThreadOperationExecutor)
 {
 }
        public SymbolQuickInfoSourceProvider(ITextStructureNavigatorSelectorService navigatorService, 
                                             ITextBufferFactoryService textBufferFactoryService, 
                                             CodeContentControlProvider codeContentControlProvider,
                                             SyntaxQuickinfoBuilderService syntaxQuickinfoBuilderService) {

            SyntaxQuickinfoBuilderService = syntaxQuickinfoBuilderService;
        }
        public GoToDefinitionTextViewCreationListener(SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService, IClassifierAggregatorService classifierAggregatorService, MefProviderOptions mefProviderOptions)
        {
            if (serviceProvider == null)
            {
                throw new ArgumentNullException("serviceProvider");
            }
            if (editorAdaptersFactoryService == null)
            {
                throw new ArgumentNullException("editorAdaptersFactoryService");
            }
            if (textStructureNavigatorSelectorService == null)
            {
                throw new ArgumentNullException("textStructureNavigatorSelectorService");
            }
            if (classifierAggregatorService == null)
            {
                throw new ArgumentNullException("classifierAggregatorService");
            }
            if (mefProviderOptions == null)
            {
                throw new ArgumentNullException("mefProviderOptions");
            }

            ServiceProvider = serviceProvider;
            _editorAdaptersFactoryService         = editorAdaptersFactoryService;
            TextStructureNavigatorSelectorService = textStructureNavigatorSelectorService;
            ClassifierAggregatorService           = classifierAggregatorService;
            MefProviderOptions = mefProviderOptions;
        }
コード例 #6
0
        public CompletionSource(ITextBuffer buffer, ITextStructureNavigatorSelectorService navigation, IGlyphService glyphService)
        {
            _buffer       = buffer;
            _navigation   = navigation;
            _glyphService = glyphService;

            var keywordImage = _glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupNamespace, StandardGlyphItem.GlyphItemPublic);

            foreach (var str in _poorMansKeywords)
            {
                _completions.Add(new Completion(str, str, str, keywordImage, null));
            }

            var extensionImage = _glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupClass, StandardGlyphItem.GlyphItemPublic);

            foreach (var str in _poorMansExtensionIntellisense)
            {
                _completions.Add(new Completion(str, str, str, extensionImage, null));
            }

            var localVariableImage = _glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupVariable, StandardGlyphItem.GlyphItemPublic);

            foreach (var localVar in new[] { "$localVar1", "$localVar2", "$anotherLocalVar" })
            {
                _completions.Add(new Completion(localVar, localVar, localVar, localVariableImage, null));
            }

            _completions = _completions.OrderBy(x => x.DisplayText).ToList();
        }
コード例 #7
0
 internal TextStructureNavigatorProvider(
     ITextStructureNavigatorSelectorService selectorService,
     IContentTypeRegistryService contentTypeService,
     IWaitIndicator waitIndicator)
     : base(selectorService, contentTypeService, waitIndicator)
 {
 }
コード例 #8
0
        public static TextExtent?GetWordExtent(
            this ITextSnapshot snapshot,
            int line,
            int character,
            ITextStructureNavigatorSelectorService textStructureNavigatorService)
        {
            if (snapshot == null || textStructureNavigatorService == null)
            {
                return(null);
            }

            var navigator        = textStructureNavigatorService.GetTextStructureNavigator(snapshot.TextBuffer);
            var textSnapshotLine = snapshot.GetLineFromLineNumber(line);
            var absoluteIndex    = textSnapshotLine.Start + character;

            if (absoluteIndex > snapshot.Length)
            {
                Debug.Fail("This should never happen given we're operating on snapshots.");
                return(null);
            }

            // Lets walk backwards to the character that caused completion (if one triggered it) to ensure that the "GetExtentOfWord" returns
            // the word we care about and not whitespace following it. For instance:
            //
            //      @Date|\r\n
            //
            // Will return the \r\n as the "word" which is incorrect; however, this is actually fixed in newer VS CoreEditor builds but is behind
            // the "Use word pattern in LSP completion" preview feature. Once this preview feature flag is the default we can remove this -1.
            var completionCharacterIndex = Math.Max(0, absoluteIndex - 1);
            var completionSnapshotPoint  = new SnapshotPoint(snapshot, completionCharacterIndex);
            var wordExtent = navigator.GetExtentOfWord(completionSnapshotPoint);

            return(wordExtent);
        }
コード例 #9
0
 public TextStructureNavigatorProvider(
     ITextStructureNavigatorSelectorService selectorService,
     IContentTypeRegistryService contentTypeService,
     IWaitIndicator waitIndicator)
     : base(selectorService, contentTypeService, waitIndicator)
 {
 }
コード例 #10
0
 public XmlTextStructureNavigatorProvider(
     ITextStructureNavigatorSelectorService navigatorService,
     IContentTypeRegistryService contentTypeRegistry)
 {
     this.navigatorService    = navigatorService;
     this.contentTypeRegistry = contentTypeRegistry;
 }
コード例 #11
0
 internal ToggleBlockCommentCommandHandler(
     ITextUndoHistoryRegistry undoHistoryRegistry,
     IEditorOperationsFactoryService editorOperationsFactoryService,
     ITextStructureNavigatorSelectorService navigatorSelectorService)
     : base(undoHistoryRegistry, editorOperationsFactoryService, navigatorSelectorService)
 {
 }
コード例 #12
0
 public XamlErrorTaggerProvider(
     ITextStructureNavigatorSelectorService navigatorProvider,
     ITableManagerProvider tableManagerProvider)
 {
     _navigatorProvider    = navigatorProvider;
     _tableManagerProvider = tableManagerProvider;
 }
コード例 #13
0
 internal CarCompletionSource(ITextBuffer buffer,
                              ITextStructureNavigatorSelectorService navigatorService)
 {
     Navigator = navigatorService.GetTextStructureNavigator(buffer);
     Buffer    = buffer;
     SetCompletionList();
 }
コード例 #14
0
 public EditorConfigCompletionSource(ITextBuffer buffer, IClassifierAggregatorService classifier, ITextStructureNavigatorSelectorService navigator, ImageSource glyph)
 {
     _buffer = buffer;
     _classifier = classifier.GetClassifier(buffer);
     _navigator = navigator;
     _glyph = glyph;
 }
コード例 #15
0
        public CompletionSource(ITextStructureNavigatorSelectorService navigatorSelectorService, WorkspaceDocument <ITextBuffer> document)
        {
            this.navigatorSelectorService = navigatorSelectorService;
            this.document = document;

            this.keywords = ImmutableArray.Create(
                new CompletionItem("break", this, CompletionItemIcon),
                new CompletionItem("default", this, CompletionItemIcon),
                new CompletionItem("func", this, CompletionItemIcon),
                new CompletionItem("interface", this, CompletionItemIcon),
                new CompletionItem("select", this, CompletionItemIcon),
                new CompletionItem("case", this, CompletionItemIcon),
                new CompletionItem("defer", this, CompletionItemIcon),
                new CompletionItem("go", this, CompletionItemIcon),
                new CompletionItem("map", this, CompletionItemIcon),
                new CompletionItem("struct", this, CompletionItemIcon),
                new CompletionItem("chan", this, CompletionItemIcon),
                new CompletionItem("else", this, CompletionItemIcon),
                new CompletionItem("goto", this, CompletionItemIcon),
                new CompletionItem("package", this, CompletionItemIcon),
                new CompletionItem("switch", this, CompletionItemIcon),
                new CompletionItem("const", this, CompletionItemIcon),
                new CompletionItem("fallthrough", this, CompletionItemIcon),
                new CompletionItem("if", this, CompletionItemIcon),
                new CompletionItem("range", this, CompletionItemIcon),
                new CompletionItem("type", this, CompletionItemIcon),
                new CompletionItem("continue", this, CompletionItemIcon),
                new CompletionItem("for", this, CompletionItemIcon),
                new CompletionItem("import", this, CompletionItemIcon),
                new CompletionItem("return", this, CompletionItemIcon),
                new CompletionItem("var", this, CompletionItemIcon));
        }
 public EditorConfigCompletionSource(ITextBuffer buffer, IClassifierAggregatorService classifier, ITextStructureNavigatorSelectorService navigator, ImageSource glyph)
 {
     _buffer     = buffer;
     _classifier = classifier.GetClassifier(buffer);
     _navigator  = navigator;
     _glyph      = glyph;
 }
コード例 #17
0
        public CompletionHandler(
            JoinableTaskContext joinableTaskContext,
            LSPRequestInvoker requestInvoker,
            LSPDocumentManager documentManager,
            LSPProjectionProvider projectionProvider,
            ITextStructureNavigatorSelectorService textStructureNavigator,
            CompletionRequestContextCache completionRequestContextCache,
            FormattingOptionsProvider formattingOptionsProvider,
            HTMLCSharpLanguageServerLogHubLoggerProvider loggerProvider)
        {
            if (joinableTaskContext is null)
            {
                throw new ArgumentNullException(nameof(joinableTaskContext));
            }

            if (requestInvoker is null)
            {
                throw new ArgumentNullException(nameof(requestInvoker));
            }

            if (documentManager is null)
            {
                throw new ArgumentNullException(nameof(documentManager));
            }

            if (projectionProvider is null)
            {
                throw new ArgumentNullException(nameof(projectionProvider));
            }

            if (textStructureNavigator is null)
            {
                throw new ArgumentNullException(nameof(textStructureNavigator));
            }

            if (completionRequestContextCache is null)
            {
                throw new ArgumentNullException(nameof(completionRequestContextCache));
            }

            if (formattingOptionsProvider is null)
            {
                throw new ArgumentNullException(nameof(formattingOptionsProvider));
            }

            if (loggerProvider is null)
            {
                throw new ArgumentNullException(nameof(loggerProvider));
            }

            _joinableTaskFactory           = joinableTaskContext.Factory;
            _requestInvoker                = requestInvoker;
            _documentManager               = documentManager;
            _projectionProvider            = projectionProvider;
            _textStructureNavigator        = textStructureNavigator;
            _completionRequestContextCache = completionRequestContextCache;
            _formattingOptionsProvider     = formattingOptionsProvider;
            _logger = loggerProvider.CreateLogger(nameof(CompletionHandler));
        }
コード例 #18
0
 internal AbstractToggleBlockCommentBase(
     ITextUndoHistoryRegistry undoHistoryRegistry,
     IEditorOperationsFactoryService editorOperationsFactoryService,
     ITextStructureNavigatorSelectorService navigatorSelectorService)
     : base(undoHistoryRegistry, editorOperationsFactoryService)
 {
     _navigatorSelectorService = navigatorSelectorService;
 }
コード例 #19
0
		SearchServiceProvider(ITextSearchService2 textSearchService2, ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService, ISearchSettings searchSettings, IMessageBoxService messageBoxService, [ImportMany] IEnumerable<Lazy<IReplaceListenerProvider>> replaceListenerProviders, IEditorOperationsFactoryService editorOperationsFactoryService) {
			this.textSearchService2 = textSearchService2;
			this.textStructureNavigatorSelectorService = textStructureNavigatorSelectorService;
			this.searchSettings = searchSettings;
			this.messageBoxService = messageBoxService;
			this.replaceListenerProviders = replaceListenerProviders.ToArray();
			this.editorOperationsFactoryService = editorOperationsFactoryService;
		}
コード例 #20
0
 public SpringQuickInfoSource(ITextBuffer textBuffer, ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService,
                              IVsEditorAdaptersFactoryService vsEditorAdaptersFactoryService, System.IServiceProvider serviceProvider)
 {
     this.textBuffer = textBuffer;
     this.textStructureNavigatorSelectorService = textStructureNavigatorSelectorService;
     this.vsEditorAdaptersFactoryService        = vsEditorAdaptersFactoryService;
     this.serviceProvider = serviceProvider;
 }
コード例 #21
0
 SearchServiceProvider(ITextSearchService2 textSearchService2, ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService, ISearchSettings searchSettings, IMessageBoxService messageBoxService, [ImportMany] IEnumerable <Lazy <IReplaceListenerProvider> > replaceListenerProviders)
 {
     this.textSearchService2 = textSearchService2;
     this.textStructureNavigatorSelectorService = textStructureNavigatorSelectorService;
     this.searchSettings           = searchSettings;
     this.messageBoxService        = messageBoxService;
     this.replaceListenerProviders = replaceListenerProviders.ToArray();
 }
        public SymbolQuickInfoSourceProvider(ITextStructureNavigatorSelectorService navigatorService, 
                                             ITextBufferFactoryService textBufferFactoryService, 
                                             CodeContentControlProvider codeContentControlProvider, 
                                             IClassificationFormatMapService classificationFormatMapService,
                                             IClassificationTypeRegistryService classificationTypeRegistryService) {

            SyntaxQuickinfoBuilderService = new SyntaxQuickinfoBuilderService(classificationFormatMapService, classificationTypeRegistryService);
        }
コード例 #23
0
 public ToggleBlockCommentCommandHandler(
     ITextUndoHistoryRegistry undoHistoryRegistry,
     IEditorOperationsFactoryService editorOperationsFactoryService,
     ITextStructureNavigatorSelectorService navigatorSelectorService,
     IGlobalOptionService globalOptions)
     : base(undoHistoryRegistry, editorOperationsFactoryService, navigatorSelectorService, globalOptions)
 {
 }
コード例 #24
0
 public SassCompletionSource(ISassEditor editor, IIntellisenseManager intellisenseManager, ICompletionCompiler compiler, ITextStructureNavigatorSelectorService textNavigator)
 {
     Editor = editor;
     Cache  = intellisenseManager.Get(editor.Document);
     IntellisenseManager = intellisenseManager;
     Compiler            = compiler;
     TextNavigator       = textNavigator;
 }
コード例 #25
0
 public SpringQuickInfoSource(ITextBuffer textBuffer, ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService,
     IVsEditorAdaptersFactoryService vsEditorAdaptersFactoryService, System.IServiceProvider serviceProvider)
 {
     this.textBuffer = textBuffer;
     this.textStructureNavigatorSelectorService = textStructureNavigatorSelectorService;
     this.vsEditorAdaptersFactoryService = vsEditorAdaptersFactoryService;
     this.serviceProvider = serviceProvider;
 }
コード例 #26
0
 public SassCompletionSource(ISassEditor editor, IIntellisenseManager intellisenseManager, ICompletionCompiler compiler, ITextStructureNavigatorSelectorService textNavigator)
 {
     Editor = editor;
     Cache = intellisenseManager.Get(editor.Document);
     IntellisenseManager = intellisenseManager;
     Compiler = compiler;
     TextNavigator = textNavigator;
 }
コード例 #27
0
 public CompletionSourceProvider(
     ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService,
     GoWorkspace workspace)
 {
     this.textStructureNavigatorSelectorService = textStructureNavigatorSelectorService ??
                                                  throw new ArgumentNullException(nameof(textStructureNavigatorSelectorService));
     this.workspace = workspace ?? throw new ArgumentNullException(nameof(workspace));
 }
コード例 #28
0
        public CompletionController(ITextView textView, ITextStructureNavigatorSelectorService navigatorService, ISignatureHelpBroker signatureHelpBroker)
        {
            _textView            = textView;
            _navigatorService    = navigatorService;
            _signatureHelpBroker = signatureHelpBroker;

            textView.TextBuffer.Properties.TryGetProperty(typeof(ITextDocument), out _document);
        }
コード例 #29
0
        public CompletionSource(ElementCatalog catalog, ITextStructureNavigatorSelectorService structureNavigatorSelector, ITextView textView)
        {
            Catalog = catalog;
            StructureNavigatorSelector = structureNavigatorSelector;

            SLangTokenTagger generalTagger = new SLangTokenTaggerProvider().CreateTagger <SLangTokenTag>(textView.TextBuffer) as SLangTokenTagger;

            _lastTags = generalTagger._lastTags;
        }
コード例 #30
0
        internal XmlResourceCompletionController(System.IServiceProvider serviceProvider, IVsTextView vsTextView, ITextView textView, ICompletionBroker completionBroker, ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService)
        {
            this.serviceProvider = serviceProvider;
            this.textView = textView;
            this.completionBroker = completionBroker;

            //add the command to the command chain
            vsTextView.AddCommandFilter(this, out nextCommandTarget);
        }
コード例 #31
0
 public PkgdefCompletionSource(ITextBuffer buffer, IClassifierAggregatorService classifier, ITextStructureNavigatorSelectorService navigator, IGlyphService glyphService)
 {
     _buffer       = buffer;
     _classifier   = classifier.GetClassifier(buffer);
     _navigator    = navigator;
     _glyphService = glyphService;
     _defaultGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupField, StandardGlyphItem.GlyphItemPublic);
     _snippetGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphCSharpExpansion, StandardGlyphItem.GlyphItemPublic);
 }
コード例 #32
0
 public PkgdefCompletionSource(ITextBuffer buffer, IClassifierAggregatorService classifier, ITextStructureNavigatorSelectorService navigator, IGlyphService glyphService)
 {
     _buffer = buffer;
     _classifier = classifier.GetClassifier(buffer);
     _navigator = navigator;
     _glyphService = glyphService;
     _defaultGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupField, StandardGlyphItem.GlyphItemPublic);
     _snippetGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphCSharpExpansion, StandardGlyphItem.GlyphItemPublic);
 }
コード例 #33
0
 public VsctCompletionSource(ITextBuffer buffer, IClassifierAggregatorService classifier, ITextStructureNavigatorSelectorService navigator, IGlyphService glyphService)
 {
     _buffer       = buffer;
     _classifier   = classifier.GetClassifier(buffer);
     _navigator    = navigator;
     _glyphService = glyphService;
     _defaultGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupField, StandardGlyphItem.GlyphItemPublic);
     _builtInGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupProperty, StandardGlyphItem.TotalGlyphItems);
     _imageService = ExtensibilityToolsPackage.GetGlobalService(typeof(SVsImageService)) as IVsImageService2;
 }
コード例 #34
0
 public NavigableSymbolSourceProvider(
     [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider,
     IClassifierAggregatorService classifierFactory,
     ITextStructureNavigatorSelectorService navigatorService
     )
 {
     _serviceProvider   = serviceProvider;
     _classifierFactory = classifierFactory;
     _navigatorService  = navigatorService;
 }
コード例 #35
0
 public VsctCompletionSource(ITextBuffer buffer, IClassifierAggregatorService classifier, ITextStructureNavigatorSelectorService navigator, IGlyphService glyphService)
 {
     _buffer = buffer;
     _classifier = classifier.GetClassifier(buffer);
     _navigator = navigator;
     _glyphService = glyphService;
     _defaultGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupField, StandardGlyphItem.GlyphItemPublic);
     _builtInGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupProperty, StandardGlyphItem.TotalGlyphItems);
     _imageService = ExtensibilityToolsPackage.GetGlobalService(typeof(SVsImageService)) as IVsImageService2;
 }
コード例 #36
0
 internal SpringCompletionSource(ITextBuffer textBuffer, IGlyphService glyphService,
     IVsEditorAdaptersFactoryService vsEditorAdaptersFactoryService,
     ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService,
     System.IServiceProvider serviceProvider)
 {
     this.textBuffer = textBuffer;
     this.glyphService = glyphService;
     this.vsEditorAdaptersFactoryService = vsEditorAdaptersFactoryService;
     this.textStructureNavigatorSelectorService = textStructureNavigatorSelectorService;
     this.serviceProvider = serviceProvider;
 }
コード例 #37
0
 internal SpringCompletionSource(ITextBuffer textBuffer, IGlyphService glyphService,
                                 IVsEditorAdaptersFactoryService vsEditorAdaptersFactoryService,
                                 ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService,
                                 System.IServiceProvider serviceProvider)
 {
     this.textBuffer   = textBuffer;
     this.glyphService = glyphService;
     this.vsEditorAdaptersFactoryService        = vsEditorAdaptersFactoryService;
     this.textStructureNavigatorSelectorService = textStructureNavigatorSelectorService;
     this.serviceProvider = serviceProvider;
 }
コード例 #38
0
        protected AbstractTextStructureNavigatorProvider(
            ITextStructureNavigatorSelectorService selectorService,
            IContentTypeRegistryService contentTypeService,
            IWaitIndicator waitIndicator)
        {
            Contract.ThrowIfNull(selectorService);
            Contract.ThrowIfNull(contentTypeService);

            _selectorService = selectorService;
            _contentTypeService = contentTypeService;
            _waitIndicator = waitIndicator;
        }
コード例 #39
0
 public TextInformationManager(IServiceProvider serviceProvider, IComponentModel componentModel)
 {
     this.serviceProvider = serviceProvider;
     this.componentModel = componentModel;
     fontAndColorStorage = (IVsFontAndColorStorage) serviceProvider.GetService(typeof (SVsFontAndColorStorage));
     fontAndColorUtilities = fontAndColorStorage as IVsFontAndColorUtilities;
     fontAndColorCache = (IVsFontAndColorCacheManager)serviceProvider.GetService(typeof(SVsFontAndColorCacheManager));
     textManager = (IVsTextManager) serviceProvider.GetService(typeof (SVsTextManager));
     editorAdaptersFactoryService = componentModel.GetService<IVsEditorAdaptersFactoryService>();
     textStructureNavigatorSelectorService = componentModel.GetService<ITextStructureNavigatorSelectorService>();
     classicationFormatMapService = componentModel.GetService<IClassificationFormatMapService>();
     classificationAggregatorService = componentModel.GetService<IClassifierAggregatorService>();
 }
コード例 #40
0
        internal EmacsCommandContext(
            EmacsCommandsManager manager,
            ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService,
            IEditorOperations editorOperations,
            ITextView view,
            CommandRouter commandRouter)
        {
            this.Manager = manager;
            this.EditorOperations = editorOperations;
            this.TextView = view;
            this.CommandRouter = commandRouter;

            this.TextStructureNavigator = textStructureNavigatorSelectorService.GetTextStructureNavigator(view.TextBuffer);
            this.MarkSession = MarkSession.GetSession(view);
        }
コード例 #41
0
        public GoToDefinitionTextViewCreationListener(SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService, IClassifierAggregatorService classifierAggregatorService, MefProviderOptions mefProviderOptions)
        {
            if (serviceProvider == null)
                throw new ArgumentNullException("serviceProvider");
            if (editorAdaptersFactoryService == null)
                throw new ArgumentNullException("editorAdaptersFactoryService");
            if (textStructureNavigatorSelectorService == null)
                throw new ArgumentNullException("textStructureNavigatorSelectorService");
            if (classifierAggregatorService == null)
                throw new ArgumentNullException("classifierAggregatorService");
            if (mefProviderOptions == null)
                throw new ArgumentNullException("mefProviderOptions");

            ServiceProvider = serviceProvider;
            _editorAdaptersFactoryService = editorAdaptersFactoryService;
            TextStructureNavigatorSelectorService = textStructureNavigatorSelectorService;
            ClassifierAggregatorService = classifierAggregatorService;
            MefProviderOptions = mefProviderOptions;
        }
コード例 #42
0
 public TextStructureNavigator(ITextBuffer textBuffer, IContentTypeRegistryService crs, ITextStructureNavigatorSelectorService nss) {
     ContentType = crs.GetContentType(RContentTypeDefinition.ContentType);
     _textBuffer = textBuffer;
     _plainTextNavigator = nss.CreateTextStructureNavigator(textBuffer, crs.GetContentType("text"));
 }
コード例 #43
0
 public JavaScriptCompletionSource(ITextBuffer buffer, ITextStructureNavigatorSelectorService navigator, ICssNameCache classNames)
 {
     _buffer = buffer;
     _navigator = navigator;
     _classNames = classNames;
 }
 public JavaScriptFindReferences(IVsTextView adapter, IWpfTextView textView, ITextStructureNavigatorSelectorService navigator)
     : base(adapter, textView, typeof(VSConstants.VSStd97CmdID).GUID, (uint)VSConstants.VSStd97CmdID.FindReferences)
 {
     _navigator = navigator.GetTextStructureNavigator(textView.TextBuffer);
     _dte = EditorExtensionsPackage.DTE;
 }
コード例 #45
0
ファイル: EditorOperations.cs プロジェクト: manojdjoshi/dnSpy
		public EditorOperations(ITextView textView, ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService, ISmartIndentationService smartIndentationService, IHtmlBuilderService htmlBuilderService) {
			if (textView == null)
				throw new ArgumentNullException(nameof(textView));
			if (textStructureNavigatorSelectorService == null)
				throw new ArgumentNullException(nameof(textStructureNavigatorSelectorService));
			if (htmlBuilderService == null)
				throw new ArgumentNullException(nameof(htmlBuilderService));
			TextView = textView;
			TextView.Closed += TextView_Closed;
			TextView.TextViewModel.DataModel.ContentTypeChanged += OnContentTypeChanged;
			this.textStructureNavigatorSelectorService = textStructureNavigatorSelectorService;
			this.smartIndentationService = smartIndentationService;
			this.htmlBuilderService = htmlBuilderService;
		}
コード例 #46
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CompletionSource"/> class.
 /// </summary>
 /// <param name="navigatorSelectorService">The navigator selector service.</param>
 /// <param name="buffer">The text buffer.</param>
 public CompletionSource(ITextStructureNavigatorSelectorService navigatorSelectorService, ITextBuffer buffer)
 {
     this.buffer = buffer;
     this.navigatorSelectorService = navigatorSelectorService;
     keywords = new ProtobufWordListProvider().GetWordsWithDescription(' ');
 }
コード例 #47
0
 public TypeScriptFindReferences(IVsTextView adapter, IWpfTextView textView, ITextStructureNavigatorSelectorService navigator)
     : base(adapter, textView, typeof(VSConstants.VSStd97CmdID).GUID, (uint)VSConstants.VSStd97CmdID.FindReferences)
 {
     _navigator = navigator.GetTextStructureNavigator(textView.TextBuffer);
 }
コード例 #48
0
ファイル: TextSearchService.cs プロジェクト: 0xd4d/dnSpy
		TextSearchService(ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService) {
			this.textStructureNavigatorSelectorService = textStructureNavigatorSelectorService;
			cachedRegexes = new List<CachedRegex>(MAX_CACHED_REGEXES);
			cachedRegexDictLock = new object();
		}
 public DebugQuickInfoSourceProvider(ITextStructureNavigatorSelectorService navigatorService, ITextBufferFactoryService textBufferFactoryService, CodeContentControlProvider codeContentControlProvider) {
 }
コード例 #50
0
		EditorOperationsFactoryService(ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService, ISmartIndentationService smartIndentationService, IHtmlBuilderService htmlBuilderService) {
			this.textStructureNavigatorSelectorService = textStructureNavigatorSelectorService;
			this.smartIndentationService = smartIndentationService;
			this.htmlBuilderService = htmlBuilderService;
		}