コード例 #1
0
        public int GetTextViewFilter(IVsIntellisenseHost pISenseHost, IOleCommandTarget pNextCmdTarget, out IVsTextViewFilter pTextViewFilter)
        {
            IVsTextLines buffer;

            ErrorHandler.ThrowOnFailure(bufferCoordinator.GetSecondaryBuffer(out buffer));
            bool doOutlining = LanguageService.Preferences.AutoOutlining;

            LanguageService.Preferences.AutoOutlining = false;
            FoxProSource source = LanguageService.CreateSource(buffer) as FoxProSource;

            LanguageService.Preferences.AutoOutlining = doOutlining;
            CodeWindowManager windowMgr = LanguageService.CreateCodeWindowManager(null, source);

            language.AddCodeWindowManager(windowMgr);
            TextViewWrapper view = new TextViewWrapper(languageHost, pISenseHost, bufferCoordinator, pNextCmdTarget);

            windowMgr.OnNewView(view);
            language.AddSpecialSource(source, view);
            pTextViewFilter = view.InstalledFilter;
            FoxProViewFilter FoxProFilter = pTextViewFilter as FoxProViewFilter;

            if (null != FoxProFilter)
            {
                FoxProFilter.BufferCoordinator = this.bufferCoordinator;
            }
            return(VSConstants.S_OK);
        }
コード例 #2
0
 public override void Init(IVsTextView textView, Declarations declarations, bool completeWord)
 {
     view = textView as TextViewWrapper;
     base.Init(textView, declarations, completeWord);
 }