• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IVsTextLines类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IVsTextLines的典型用法代码示例。如果您正苦于以下问题:C# IVsTextLines类的具体用法?C# IVsTextLines怎么用?C# IVsTextLines使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IVsTextLines类属于命名空间,在下文中一共展示了IVsTextLines类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetColorizer

        public virtual int GetColorizer(IVsTextLines buffer, out IVsColorizer colorizer)
        {
            Contract.Requires<ArgumentNullException>(buffer != null, "buffer");

            colorizer = null;
            return VSConstants.E_FAIL;
        }
开发者ID:sebandraos,项目名称:LangSvcV2,代码行数:7,代码来源:LanguageInfo.cs


示例2: XmlViewModel

        /// <summary>
        /// Default ctor
        /// </summary>
        protected XmlViewModel(IXmlStore xmlStore, IXmlModel xmlModel, IServiceProvider provider, IVsTextLines buffer)
        {
            if (xmlModel == null)
                throw new ArgumentNullException("xmlModel");
            if (xmlStore == null)
                throw new ArgumentNullException("xmlStore");
            if (provider == null)
                throw new ArgumentNullException("provider");
            if (buffer == null)
                throw new ArgumentNullException("buffer");

            BufferDirty = false;
            DesignerDirty = false;

            serviceProvider = provider;
            this.buffer = buffer;
            textBufferSerializer = new TextBufferSerializer(buffer);

            this.xmlStore = xmlStore;
            // OnUnderlyingEditCompleted
            editingScopeCompletedHandler = OnUnderlyingEditCompleted;
            this.xmlStore.EditingScopeCompleted += editingScopeCompletedHandler;
            // OnUndoRedoCompleted
            undoRedoCompletedHandler = OnUndoRedoCompleted;
            this.xmlStore.UndoRedoCompleted += undoRedoCompletedHandler;

            this.xmlModel = xmlModel;
            // BufferReloaded
            bufferReloadedHandler += BufferReloaded;
            this.xmlModel.BufferReloaded += bufferReloadedHandler;
        }
开发者ID:Xtremrules,项目名称:dot42,代码行数:34,代码来源:XmlViewModel.cs


示例3: MySqlColorizer

//        private IScanner scanner;
  //      private IVsTextLines buffer;
    //    private List<TokenInfo>[] tokenList;
      //  private string savedSqlText;

        public MySqlColorizer(LanguageService service, IVsTextLines buffer, IScanner scanner)
            : base(service, buffer, scanner)
        {
            (scanner as MySqlScanner).Colorizer = this;
//            this.scanner = scanner;
  //          this.buffer = buffer;
        }
开发者ID:Top-Cat,项目名称:SteamBot,代码行数:12,代码来源:MySqlColorizer.cs


示例4: GetSource

 public ISource GetSource(IVsTextLines textBuffer)
 {
     var src = languageService.GetSource(textBuffer);
     if (src == null)
         return null;
     return new Source(src);
 }
开发者ID:Xtremrules,项目名称:dot42,代码行数:7,代码来源:XmlLanguageService.cs


示例5: AvaloniaDesignerPane

 public AvaloniaDesignerPane(IVsCodeWindow vsCodeWindow, IVsTextLines textBuffer, string fileName, IAvaloniaDesignerSettings designerSettings)
 {
     _vsCodeWindow = vsCodeWindow;
     _textBuffer = textBuffer.GetTextBuffer();
     _fileName = fileName;
     _designerSettings = designerSettings;
 }
开发者ID:kekekeks,项目名称:PerspexVS,代码行数:7,代码来源:AvaloniaDesignerPane.cs


示例6: GetScanner

        public override IScanner GetScanner(IVsTextLines buffer)
        {
            if (scanner == null)
                this.scanner = new LineScanner();

            return this.scanner;
        }
开发者ID:JohnLouderback,项目名称:shadersense,代码行数:7,代码来源:BabelLanguageService.cs


示例7: InitializeLanguageService

        protected override void InitializeLanguageService(IVsTextLines textLines)
        {
            var userData = textLines as IVsUserData;
            if (userData == null) return;
            var langSid = typeof(PowerShellLanguageInfo).GUID;
            if (langSid == Guid.Empty) return;

            var vsCoreSid = new Guid("{8239bec4-ee87-11d0-8c98-00c04fc2ab22}");
            Guid currentSid;
            ErrorHandler.ThrowOnFailure(textLines.GetLanguageServiceID(out currentSid));
            // If the language service is set to the default SID, then
            // set it to our language
            if (currentSid == vsCoreSid)
            {
                ErrorHandler.ThrowOnFailure(textLines.SetLanguageServiceID(ref langSid));
            }
            else if (currentSid != langSid)
            {
                // Some other language service has it, so return VS_E_INCOMPATIBLEDOCDATA
                throw new COMException("Incompatible doc data", VSConstants.VS_E_INCOMPATIBLEDOCDATA);
            }

            var bufferDetectLang = VSConstants.VsTextBufferUserDataGuid.VsBufferDetectLangSID_guid;
            ErrorHandler.ThrowOnFailure(userData.SetData(ref bufferDetectLang, false));
        }
开发者ID:vairam-svs,项目名称:poshtools,代码行数:25,代码来源:PowerShellEditorFactory.cs


示例8: GetScanner

        /// <summary>
        /// Create and return instantiation of a parser represented by RegularExpressionScanner object.
        /// </summary>
        /// <param name="buffer">An <see cref="IVsTextLines"/> represents lines of source to parse.</param>
        /// <returns>Returns a RegularExpressionScanner object</returns>
        public override IScanner GetScanner(IVsTextLines buffer)
        {
            SpecFlowProject specFlowProject = DteProjectReader.LoadSpecFlowProjectFromDteProject(CurrentProject);
            scanner = new RegularExpressionScanner(specFlowProject.Configuration.GeneratorConfiguration.FeatureLanguage);

            return scanner;
        }
开发者ID:roffster,项目名称:SpecFlow,代码行数:12,代码来源:RegExLangServ.cs


示例9: XSharpSource

        public XSharpSource( XSharpLanguageService service,
                        IVsTextLines textLines,
                        Colorizer colorizer)
            : base(service, textLines, colorizer)
        {

        }
开发者ID:X-Sharp,项目名称:XSharpPublic,代码行数:7,代码来源:XSharpSource.cs


示例10: CodeDomFileCodeModel

 public CodeDomFileCodeModel(DTE dte, IVsTextLines buffer, CodeDomProvider provider, string moniker)
     : base(dte, moniker)
 {
     this.textBuffer = buffer;
     this.provider = provider as IMergableProvider;
     if (provider == null) throw new ArgumentException("provider must implement IMergeableProvider interface");
 }
开发者ID:smartmobili,项目名称:parsing,代码行数:7,代码来源:FileCodeModel.cs


示例11: GetScanner

        public override IScanner GetScanner(IVsTextLines buffer)
        {
            if (this.scanner == null)
                this.scanner = new LightScanner(grammar);

            return this.scanner;
        }
开发者ID:ashmind,项目名称:light,代码行数:7,代码来源:LightLanguageService.cs


示例12: IsCSharpOrCppOrC

 private static bool IsCSharpOrCppOrC(IVsTextLines textLines)
 {
     Guid languageServiceId;
     textLines.GetLanguageServiceID(out languageServiceId);
     //return GuidList.CSHARP_LANGUAGE_GUID.Equals(languageServiceId);
     return true;
 }
开发者ID:qianlifeng,项目名称:easyvsx,代码行数:7,代码来源:TextBufferDataEventSink.cs


示例13: TextBufferMerger

 internal TextBufferMerger(IVsTextLines buffer)
 {
     if (null == buffer) {
         throw new ArgumentNullException("buffer");
     }
     this.textBuffer = buffer;
 }
开发者ID:kageyamaginn,项目名称:VSSDK-Extensibility-Samples,代码行数:7,代码来源:TextBufferMerger.cs


示例14: EditorPane

 /// <summary>
 /// Constructor that calls the Microsoft.VisualStudio.Shell.WindowPane constructor then
 /// our initialization functions.
 /// </summary>
 /// <param name="package">Our Package instance.</param>
 public EditorPane(ServiceDesignerPackage package, string fileName, IVsTextLines textBuffer)
     : base(null)
 {
     _thisPackage = package;
     _fileName = fileName;
     _textBuffer = textBuffer;
 }
开发者ID:distantcam,项目名称:ServiceDesigner,代码行数:12,代码来源:EditorPane.cs


示例15: CreateSource

 public override Source CreateSource(IVsTextLines buffer)
 {
     var filePath = FilePathUtilities.GetFilePath(buffer);
     if (GlobalServices.GetProjectManagerForFile(filePath) == null)
         return base.CreateSource(buffer);
     return new BooSource(this, filePath, buffer, GetColorizer(buffer)) {LastParseTime = 0};
 }
开发者ID:Rfvgyhn,项目名称:Boo-Plugin,代码行数:7,代码来源:BooLanguageService.cs


示例16: ViewModel

        public ViewModel(XmlStore xmlStore, XmlModel xmlModel, IServiceProvider provider, IVsTextLines buffer)
        {
            if (xmlModel == null)
                throw new ArgumentNullException("xmlModel");
            if (xmlStore == null)
                throw new ArgumentNullException("xmlStore");
            if (provider == null)
                throw new ArgumentNullException("provider");
            if (buffer == null)
                throw new ArgumentNullException("buffer");

            this.BufferDirty = false;
            this.DesignerDirty = false;

            this._serviceProvider = provider;
            this._buffer = buffer;

            this._xmlStore = xmlStore;
            // OnUnderlyingEditCompleted
            _editingScopeCompletedHandler = new EventHandler<XmlEditingScopeEventArgs>(OnUnderlyingEditCompleted);
            this._xmlStore.EditingScopeCompleted += _editingScopeCompletedHandler;
            // OnUndoRedoCompleted
            _undoRedoCompletedHandler = new EventHandler<XmlEditingScopeEventArgs>(OnUndoRedoCompleted);
            this._xmlStore.UndoRedoCompleted += _undoRedoCompletedHandler;

            this._xmlModel = xmlModel;
            // BufferReloaded
            _bufferReloadedHandler += new EventHandler(BufferReloaded);
            this._xmlModel.BufferReloaded += _bufferReloadedHandler;

            LoadModelFromXmlModel();
        }
开发者ID:Konctantin,项目名称:VS_SDK_samples,代码行数:32,代码来源:ViewModel.cs


示例17: AnkhColorizer

        public AnkhColorizer(AnkhLanguage language, IVsTextLines lines)
            : base(language)
        {
            if (lines == null)
                throw new ArgumentNullException("lines");

            _lines = lines;
        }
开发者ID:necora,项目名称:ank_git,代码行数:8,代码来源:AnkhColorizer.cs


示例18: GetScanner

 public override IScanner GetScanner(IVsTextLines buffer)
 {
     if (m_scanner == null)
     {
         m_scanner = new CQLScanner(buffer);
     }
     return m_scanner;
 }
开发者ID:krondor,项目名称:clinical_quality_language,代码行数:8,代码来源:CQLLanguageService.cs


示例19: ParseLine

        public List<TokenInfo> ParseLine(IVsTextLines textLines, int line, int maxTokens, out string lineOut)
        {
            int maxColumn;
            textLines.GetLengthOfLine(line, out maxColumn);
            textLines.GetLineText(line, 0, line, maxColumn, out lineOut);

            return Parse(lineOut, maxTokens);
        }
开发者ID:ntwerdochlib,项目名称:AsmHighlighter,代码行数:8,代码来源:AsmHighlighterScanner.cs


示例20: CodeBlocksEnumerator

 /// <summary>
 /// Builds a new enumerator from a text buffer.
 /// </summary>
 public CodeBlocksEnumerator(IVsTextLines buffer)
 {
     if (null == buffer) {
         throw new ArgumentNullException("buffer");
     }
     blocks = new List<TextSpanAndCookie>();
     SearchForCodeBlocks(buffer);
 }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:11,代码来源:CodeBlocksEnumerator.cs



注:本文中的IVsTextLines类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IVsTextView类代码示例发布时间:2022-05-24
下一篇:
C# IVsTextBuffer类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap