当前位置: 首页>>代码示例>>C#>>正文


C# IVsCodeWindow类代码示例

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


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

示例1: CodeWindowManager

 public CodeWindowManager(IVsCodeWindow codeWindow, IWpfTextView textView, IComponentModel componentModel)
 {
     _window = codeWindow;
     _textView = textView;
     _editorOperationsFactory = componentModel.GetService<IEditorOperationsFactoryService>();
     _textView.Properties.AddProperty(typeof(CodeWindowManager), this);
 }
开发者ID:TerabyteX,项目名称:main,代码行数:7,代码来源:CodeWindowManager.cs

示例2: NavigationBarClient

        public NavigationBarClient(
            IVsDropdownBarManager manager,
            IVsCodeWindow codeWindow,
            IServiceProvider serviceProvider,
            VisualStudioWorkspaceImpl workspace)
        {
            _manager = manager;
            _codeWindow = codeWindow;
            _workspace = workspace;
            _imageService = (IVsImageService2)serviceProvider.GetService(typeof(SVsImageService));
            _projectItems = SpecializedCollections.EmptyList<NavigationBarProjectItem>();
            _currentTypeItems = SpecializedCollections.EmptyList<NavigationBarItem>();

            var vsShell = serviceProvider.GetService(typeof(SVsShell)) as IVsShell;
            if (vsShell != null)
            {
                object varImageList;
                int hresult = vsShell.GetProperty((int)__VSSPROPID.VSSPROPID_ObjectMgrTypesImgList, out varImageList);
                if (ErrorHandler.Succeeded(hresult) && varImageList != null)
                {
                    _imageList = (IntPtr)(int)varImageList;
                }
            }

            _codeWindowEventsSink = ComEventSink.Advise<IVsCodeWindowEvents>(codeWindow, this);
            _editorAdaptersFactoryService = serviceProvider.GetMefService<IVsEditorAdaptersFactoryService>();

            IVsTextView pTextView;
            codeWindow.GetPrimaryView(out pTextView);
            StartTrackingView(pTextView);

            pTextView = null;
            codeWindow.GetSecondaryView(out pTextView);
            StartTrackingView(pTextView);
        }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:35,代码来源:NavigationBarClient.cs

示例3: CodeWindowManager

 public CodeWindowManager(IVsCodeWindow codeWindow, IWpfTextView textView, IComponentModel componentModel)
 {
     _window = codeWindow;
     _textView = textView;
     _editorOperationsFactory = componentModel.GetService<IEditorOperationsFactoryService>();
     _analyzer = componentModel.GetService<IPythonAnalyzer>();
 }
开发者ID:TerabyteX,项目名称:main,代码行数:7,代码来源:CodeWindowManager.cs

示例4: 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

示例5: CodeWindowManager

 /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="CodeWindowManager.CodeWindowManager"]/*' />
 /// <summary>
 /// The CodeWindowManager is constructed by the base LanguageService class when VS calls
 /// the IVsLanguageInfo.GetCodeWindowManager method.  You can override CreateCodeWindowManager
 /// on your LanguageService if you want to plug in a different CodeWindowManager.
 /// </summary>
 public CodeWindowManager(LanguageService service, IVsCodeWindow codeWindow, Source source) {
     this.service = service;
     this.codeWindow = codeWindow;
     this.viewFilters = new ArrayList();
     this.source = source;
     this.properties = service.CreateDocumentProperties(this);
 }
开发者ID:hesam,项目名称:SketchSharp,代码行数:13,代码来源:CodeWindowManager.cs

示例6: CodeWindowManager

        /// <summary>
        /// The CodeWindowManager is constructed by the base LanguageService class when VS calls
        /// the IVsLanguageInfo.GetCodeWindowManager method.  You can override CreateCodeWindowManager
        /// on your LanguageService if you want to plug in a different CodeWindowManager.
        /// </summary>
        internal CodeWindowManager(LanguageService service, IVsCodeWindow codeWindow, ISource source) {
            this.service = service;
            this.codeWindow = codeWindow;
            this.viewFilters = new ArrayList();
            this.source = source;
#if DOCUMENT_PROPERTIES
            this.properties = service.CreateDocumentProperties(this);
#endif
        }
开发者ID:xenocons,项目名称:visualfsharp,代码行数:14,代码来源:CodeWindowManager.cs

示例7: CreateCodeWindowManager

        int IVsLanguageInfo.GetCodeWindowManager(IVsCodeWindow codeWindow, out IVsCodeWindowManager codeWindowManager)
        {
            codeWindowManager = CreateCodeWindowManager(codeWindow);

            if (codeWindowManager != null)
                return VSConstants.S_OK;
            else
                return VSConstants.E_NOTIMPL;
        }
开发者ID:necora,项目名称:ank_git,代码行数:9,代码来源:AnkhLanguage.cs

示例8: DartCodeWindowManager

        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);
        }
开发者ID:modulexcite,项目名称:DartVS,代码行数:11,代码来源:DartCodeWindowManager.cs

示例9: CodeWindowManager

        public CodeWindowManager(IVsCodeWindow codeWindow, SVsServiceProvider serviceProvider, LanguagePreferences languagePreferences)
        {
            Contract.Requires<ArgumentNullException>(codeWindow != null, "codeWindow");
            Contract.Requires<ArgumentNullException>(serviceProvider != null, "serviceProvider");
            Contract.Requires<ArgumentNullException>(languagePreferences != null, "languagePreferences");

            _codeWindow = codeWindow;
            _serviceProvider = serviceProvider;
            _languagePreferences = languagePreferences;
            _languagePreferences.PreferencesChanged += WeakEvents.AsWeak(HandleLanguagePreferencesChanged, handler => _languagePreferences.PreferencesChanged -= handler);
        }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:11,代码来源:CodeWindowManager.cs

示例10: VisualGitCodeWindowManager

        public VisualGitCodeWindowManager(VisualGitLanguage language, IVsCodeWindow window)
            : base(language)
        {
            if (window == null)
                throw new ArgumentNullException("window");

            _window = window;
            _views = new List<IVsTextView>();

            if (!TryHookConnectionPoint<IVsCodeWindowEvents>(_window, this, out _cookie))
                _cookie = 0;
        }
开发者ID:pvginkel,项目名称:VisualGit,代码行数:12,代码来源:VisualGitCodeWindowManager.cs

示例11: VsFilterKeysAdapter

        internal VsFilterKeysAdapter(
            IVsFilterKeys filterKeys,
            IVsCodeWindow codeWindow,
            IVsAdapter vsAdapter,
            IVimBuffer buffer)
        {
            _filterKeys = filterKeys;
            _buffer = buffer;
            _vsAdapter = vsAdapter;
            _codeWindow = codeWindow;

            _buffer.Closed += delegate { Uninstall(); };
        }
开发者ID:rride,项目名称:VsVim,代码行数:13,代码来源:VsFilterKeysAdapter.cs

示例12: GetCodeWindowManager

        public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
        {
            var model = _serviceProvider.GetService(typeof(SComponentModel)) as IComponentModel;
            var service = model.GetService<IVsEditorAdaptersFactoryService>();

            IVsTextView textView;
            if (ErrorHandler.Succeeded(pCodeWin.GetPrimaryView(out textView))) {
                ppCodeWinMgr = new CodeWindowManager(pCodeWin, service.GetWpfTextView(textView), _componentModel);

                return VSConstants.S_OK;
            }

            ppCodeWinMgr = null;
            return VSConstants.E_FAIL;
        }
开发者ID:TerabyteX,项目名称:main,代码行数:15,代码来源:PythonLanguageInfo.cs

示例13: CodeWindowManager

        public CodeWindowManager(IVsCodeWindow codeWindow, IWpfTextView textView)
        {
            _window = codeWindow;
            _textView = textView;

            var model = CommonPackage.ComponentModel;
            var adaptersFactory = model.GetService<IVsEditorAdaptersFactoryService>();
            var factory = model.GetService<IEditorOperationsFactoryService>();

            EditFilter editFilter = _filter = new EditFilter(textView, factory.GetEditorOperations(textView));
            var adapter = adaptersFactory.GetViewAdapter(textView);
            editFilter.AttachKeyboardFilter(adapter);

            var viewFilter = new TextViewFilter();
            viewFilter.AttachFilter(adapter);
        }
开发者ID:vairam-svs,项目名称:poshtools,代码行数:16,代码来源:CodeWindowManager.cs

示例14: GetCodeWindowManager

        public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
        {
            var adaptersFactory = _serviceProvider.GetComponentModel().GetService<IVsEditorAdaptersFactoryService>();

            IVsTextLines textLines;
            ErrorHandler.ThrowOnFailure(pCodeWin.GetBuffer(out textLines));
            var textBuffer = adaptersFactory.GetDataBuffer(textLines);
            if (textBuffer == null)
            {
                ppCodeWinMgr = null;
                return VSConstants.E_FAIL;
            }

            ppCodeWinMgr = _serviceProvider.GetHlslToolsService().GetOrCreateCodeWindowManager(pCodeWin);
            return VSConstants.S_OK;
        }
开发者ID:pminiszewski,项目名称:HlslTools,代码行数:16,代码来源:HlslLanguageInfo.cs

示例15: CodeWindowManager

 public CodeWindowManager(IVsCodeWindow codeWindow, SVsServiceProvider serviceProvider, Smi.VisualStudio.Language.LanguagePreferences languagePreferences)
 {
     //System.Diagnostics.Contracts.Contract.Requires<ArgumentNullException>(codeWindow != null, "codeWindow");
     //System.Diagnostics.Contracts.Contract.Requires<ArgumentNullException>(serviceProvider != null, "serviceProvider");
     //System.Diagnostics.Contracts.Contract.Requires<ArgumentNullException>(languagePreferences != null, "languagePreferences");
     Action<EventHandler> unregister = null;
     this._codeWindow = codeWindow;
     this._serviceProvider = serviceProvider;
     this._languagePreferences = languagePreferences;
     if (unregister == null)
     {
         unregister = delegate (EventHandler handler) {
             this._languagePreferences.PreferencesChanged -= handler;
         };
     }
     this._languagePreferences.PreferencesChanged += WeakEvents.AsWeak(new EventHandler(this.HandleLanguagePreferencesChanged), unregister);
 }
开发者ID:smartmobili,项目名称:parsing,代码行数:17,代码来源:CodeWindowManager.cs


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