Exemplo n.º 1
0
        internal GLSLClassifier(VSSource source, IClassificationTypeRegistryService classificationTypeRegistryService)
        {
            this.source = source;
            this.classificationTypeRegistryService = classificationTypeRegistryService;

            this.source.DoneParsing += this.Source_DoneParsing;
        }
Exemplo n.º 2
0
        public CompletionCommand(IVsTextView textViewAdapter, ITextView textView, ICompletionBroker completionBroker) : base(textViewAdapter, textView)
        {
            this.completionBroker = completionBroker;
            this.source           = VSSource.GetOrCreate(this.TextView.TextBuffer);

            this.AddCommand(VSConstants.VSStd2KCmdID.SHOWMEMBERLIST, VSConstants.VSStd2KCmdID.COMPLETEWORD, VSConstants.VSStd2KCmdID.TYPECHAR, VSConstants.VSStd2KCmdID.RETURN, VSConstants.VSStd2KCmdID.TAB, VSConstants.VSStd2KCmdID.BACKSPACE, VSConstants.VSStd2KCmdID.DELETE);
        }
Exemplo n.º 3
0
 internal GLSLCompletionSource(ITextBuffer textBuffer, GLSLCompletionSourceProvider provider, VSSource source)
 {
     this.textBuffer = textBuffer;
     this.provider   = provider;
     this.source     = source;
     this.formatMap  = provider.FormatMap.GetClassificationFormatMap("text");
 }
Exemplo n.º 4
0
        public GLSLOutliningTagger(GLSLOutliningTaggerProvider provider, VSSource source)
        {
            this.source    = source;
            this.provider  = provider;
            this.formatMap = this.provider.FormatMapService.GetClassificationFormatMap("text");

            this.source.DoneParsing += this.Source_DoneParsing;
        }
Exemplo n.º 5
0
        public VSErrorList(IServiceProvider provider, ITextView textView)
        {
            this.source            = VSSource.GetOrCreate(textView.TextBuffer);
            this.provider          = provider;
            this.errorListProvider = new ErrorListProvider(provider);

            this.source.DoneParsing += this.OnDoneParsing;
            textView.Closed         += this.OnClosed;
        }
Exemplo n.º 6
0
        public IClassifier GetClassifier(ITextBuffer textBuffer)
        {
            if (textBuffer == null)
            {
                throw new ArgumentNullException(nameof(textBuffer));
            }

            VSSource source = VSSource.GetOrCreate(textBuffer);

            return(textBuffer.Properties.GetOrCreateSingletonProperty(() => new GLSLClassifier(source, this.ClassificationTypeRegistryService)));
        }
Exemplo n.º 7
0
        public ITagger <T> CreateTagger <T>(ITextBuffer buffer) where T : ITag
        {
            if (buffer == null)
            {
                throw new ArgumentNullException(nameof(buffer));
            }

            VSSource source = VSSource.GetOrCreate(buffer);

            return(buffer.Properties.GetOrCreateSingletonProperty(() => new ErrorTagger(source)) as ITagger <T>);
        }
        public ISuggestedActionsSource CreateSuggestedActionsSource(ITextView textView, ITextBuffer textBuffer)
        {
            if (textBuffer == null && textView == null)
            {
                return(null);
            }

            Source source = VSSource.GetOrCreate(textBuffer);

            return(new PreprocessorSuggestedActionsSource(source, textView));
        }
Exemplo n.º 9
0
        public bool TryCreateContext(ITextView textView, SnapshotPoint openingPoint, char openingBrace, char closingBrace, out IBraceCompletionContext context)
        {
            VSSource source   = VSSource.GetOrCreate(textView.TextBuffer);
            Snapshot snapshot = source.CurrentSnapshot;

            for (int i = 0; i < source.CommentSpans.Count; i++)
            {
                if (source.CommentSpans[i].GetSpan(snapshot).Contains(openingPoint.Position))
                {
                    context = null;
                    return(false);
                }
            }

            context = new GLSLBraceCompletionContext();
            return(true);
        }
Exemplo n.º 10
0
        public GoToDefinitionCommand(IVsTextView textViewAdapter, ITextView textView) : base(textViewAdapter, textView)
        {
            this.source = VSSource.GetOrCreate(this.TextView.TextBuffer);

            this.AddCommand(VSConstants.VSStd97CmdID.GotoDefn);
        }
Exemplo n.º 11
0
 public ISignatureHelpSource TryCreateSignatureHelpSource(ITextBuffer textBuffer)
 {
     return(new GLSLSignatureHelpSource(VSSource.GetOrCreate(textBuffer)));
 }
Exemplo n.º 12
0
 public IIntellisenseController TryCreateIntellisenseController(ITextView textView, IList <ITextBuffer> subjectBuffers)
 {
     return(new GLSLQuickInfoController(this, VSSource.GetOrCreate(textView.TextBuffer), textView, subjectBuffers));
 }
Exemplo n.º 13
0
        public ErrorTagger(VSSource source)
        {
            this.source = source;

            this.source.DoneParsing += this.Source_DoneParsing;
        }
Exemplo n.º 14
0
 public ITagger <T> CreateTagger <T>(ITextBuffer buffer) where T : ITag
 {
     return(buffer.Properties.GetOrCreateSingletonProperty(() => new GLSLOutliningTagger(this, VSSource.GetOrCreate(buffer))) as ITagger <T>);
 }
Exemplo n.º 15
0
 public IQuickInfoSource TryCreateQuickInfoSource(ITextBuffer textBuffer)
 {
     return(new GLSLQuickInfoSource(this, VSSource.GetOrCreate(textBuffer), textBuffer));
 }
Exemplo n.º 16
0
 public ISmartIndent CreateSmartIndent(ITextView textView)
 {
     return(new GLSLSmartIndent(VSSource.GetOrCreate(textView.TextBuffer), textView, GLSLPackage.Instance.Preferences));
 }
Exemplo n.º 17
0
        public ICompletionSource TryCreateCompletionSource(ITextBuffer textBuffer)
        {
            VSSource source = VSSource.GetOrCreate(textBuffer);

            return(new GLSLCompletionSource(textBuffer, this, source));
        }