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

C# IVsEditorAdaptersFactoryService类代码示例

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

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



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

示例1: HostFactory

        public HostFactory(
            IVim vim,
            IVsEditorAdaptersFactoryService adaptersFactory,
            IReSharperUtil resharperUtil,
            IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
            ITextManager textManager,
            IVsAdapter adapter,
            IVimProtectedOperations protectedOperations,
            IVimBufferCoordinatorFactory bufferCoordinatorFactory,
            IKeyUtil keyUtil,
            IEditorToSettingsSynchronizer editorToSettingSynchronizer)
        {
            _vim = vim;
            _resharperUtil = resharperUtil;
            _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
            _adaptersFactory = adaptersFactory;
            _textManager = textManager;
            _adapter = adapter;
            _protectedOperations = protectedOperations;
            _bufferCoordinatorFactory = bufferCoordinatorFactory;
            _keyUtil = keyUtil;
            _editorToSettingSynchronizer = editorToSettingSynchronizer;

            #if DEBUG
            VimTrace.TraceSwitch.Level = TraceLevel.Info;
            #endif
        }
开发者ID:0-F,项目名称:VsVim,代码行数:27,代码来源:HostFactory.cs


示例2: PackageInstallerService

 public PackageInstallerService(
     VisualStudioWorkspaceImpl workspace,
     IVsEditorAdaptersFactoryService editorAdaptersFactoryService)
 {
     _workspace = workspace;
     _editorAdaptersFactoryService = editorAdaptersFactoryService;
 }
开发者ID:rgani,项目名称:roslyn,代码行数:7,代码来源:PackageInstallerServiceFactory.cs


示例3: VsTextViewListener

 public VsTextViewListener(
     IVsEditorAdaptersFactoryService editorAdaptersFactory,
     SVsServiceProvider serviceProvider)
 {
     this.editorAdaptersFactory = editorAdaptersFactory;
     this.serviceProvider = serviceProvider;
 }
开发者ID:2j2e,项目名称:presentations,代码行数:7,代码来源:VsTextViewListener.cs


示例4: VsVimHost

        internal VsVimHost(
            IVsAdapter adapter,
            ITextBufferFactoryService textBufferFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            ITextDocumentFactoryService textDocumentFactoryService,
            ITextBufferUndoManagerProvider undoManagerProvider,
            IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
            IEditorOperationsFactoryService editorOperationsFactoryService,
            IWordUtilFactory wordUtilFactory,
            ITextManager textManager,
            ISharedServiceFactory sharedServiceFactory,
            SVsServiceProvider serviceProvider)
            : base(textBufferFactoryService, textEditorFactoryService, textDocumentFactoryService, editorOperationsFactoryService)
        {
            _vsAdapter = adapter;
            _editorAdaptersFactoryService = editorAdaptersFactoryService;
            _wordUtilFactory = wordUtilFactory;
            _dte = (_DTE)serviceProvider.GetService(typeof(_DTE));
            _vsExtensibility = (IVsExtensibility)serviceProvider.GetService(typeof(IVsExtensibility));
            _textManager = textManager;
            _sharedService = sharedServiceFactory.Create();
            _vsMonitorSelection = serviceProvider.GetService<SVsShellMonitorSelection, IVsMonitorSelection>();

            uint cookie;
            _vsMonitorSelection.AdviseSelectionEvents(this, out cookie);
        }
开发者ID:0-F,项目名称:VsVim,代码行数:26,代码来源:VsVimHost.cs


示例5: VisualStudioDocumentNavigationService

 public VisualStudioDocumentNavigationService(
     SVsServiceProvider serviceProvider,
     IVsEditorAdaptersFactoryService editorAdaptersFactoryService)
 {
     _serviceProvider = serviceProvider;
     _editorAdaptersFactoryService = editorAdaptersFactoryService;
 }
开发者ID:GuilhermeSa,项目名称:roslyn,代码行数:7,代码来源:VisualStudioDocumentNavigationService.cs


示例6: GoToDefinitionFilterProvider

        public GoToDefinitionFilterProvider(
            [Import(typeof(SVsServiceProvider))] System.IServiceProvider serviceProvider,
            IVsEditorAdaptersFactoryService editorFactory,
            IEditorOptionsFactoryService editorOptionsFactory,
            ITextDocumentFactoryService textDocumentFactoryService,
            [Import(typeof(DotNetReferenceSourceProvider))] ReferenceSourceProvider referenceSourceProvider,
            VSLanguageService fsharpVsLanguageService,
            ProjectFactory projectFactory)
        {
            _serviceProvider = serviceProvider;
            _editorFactory = editorFactory;
            _editorOptionsFactory = editorOptionsFactory;
            _textDocumentFactoryService = textDocumentFactoryService;
            _referenceSourceProvider = referenceSourceProvider;
            _fsharpVsLanguageService = fsharpVsLanguageService;
            _projectFactory = projectFactory;

            var dte = serviceProvider.GetService(typeof(SDTE)) as DTE;
            var events = dte.Events as Events2;
            if (events != null)
            {
                _solutionEvents = events.SolutionEvents;
                _solutionEvents.AfterClosing += Cleanup;
            }
        }
开发者ID:bryanhunter,项目名称:VisualFSharpPowerTools,代码行数:25,代码来源:GotoDefinitionFilterProvider.cs


示例7: PreviewEngine

 public PreviewEngine(
     string title,
     string helpString,
     string description,
     string topLevelItemName,
     Glyph topLevelGlyph,
     Solution newSolution,
     Solution oldSolution,
     IComponentModel componentModel,
     IVsImageService2 imageService,
     bool showCheckBoxes = true)
 {
     _topLevelName = topLevelItemName;
     _topLevelGlyph = topLevelGlyph;
     _title = title;
     _helpString = helpString;
     _description = description;
     _newSolution = newSolution.WithMergedLinkedFileChangesAsync(oldSolution, cancellationToken: CancellationToken.None).Result;
     _oldSolution = oldSolution;
     _diffSelector = componentModel.GetService<ITextDifferencingSelectorService>();
     _editorFactory = componentModel.GetService<IVsEditorAdaptersFactoryService>();
     _componentModel = componentModel;
     this.ShowCheckBoxes = showCheckBoxes;
     _imageService = imageService;
 }
开发者ID:Rickinio,项目名称:roslyn,代码行数:25,代码来源:PreviewEngine.cs


示例8: HostFactory

        public HostFactory(
            IVim vim,
            ITextBufferFactoryService bufferFactoryService,
            ITextEditorFactoryService editorFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            IKeyBindingService keyBindingService,
            SVsServiceProvider serviceProvider,
            IVsEditorAdaptersFactoryService adaptersFactory,
            IResharperUtil resharperUtil,
            IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
            IVsAdapter adapter,
            IProtectedOperations protectedOperations,
            IVimBufferCoordinatorFactory bufferCoordinatorFactory)
        {
            _vim = vim;
            _keyBindingService = keyBindingService;
            _bufferFactoryService = bufferFactoryService;
            _editorFactoryService = editorFactoryService;
            _editorOptionsFactoryService = editorOptionsFactoryService;
            _resharperUtil = resharperUtil;
            _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
            _adaptersFactory = adaptersFactory;
            _adapter = adapter;
            _protectedOperations = protectedOperations;
            _bufferCoordinatorFactory = bufferCoordinatorFactory;

            _vim.AutoLoadVimRc = false;
        }
开发者ID:bajtos,项目名称:VsVim,代码行数:28,代码来源:HostFactory.cs


示例9: OutliningFilterProvider

 public OutliningFilterProvider(
     [Import(typeof(SVsServiceProvider))] System.IServiceProvider serviceProvider,
     IVsEditorAdaptersFactoryService editorFactory)
 {
     _serviceProvider = serviceProvider;
     _editorFactory = editorFactory;
 }
开发者ID:JoshVarty,项目名称:VisualFSharpPowerTools,代码行数:7,代码来源:OutliningFilterProvider.cs


示例10: FormatCommentHandler

 public FormatCommentHandler(
     IVsEditorAdaptersFactoryService adaptersFactoryService,
     ICommentFormatter commentFormatter)
 {
     _adaptersFactoryService = adaptersFactoryService;
       _commentFormatter = commentFormatter;
 }
开发者ID:nick-chromium,项目名称:vs-chromium,代码行数:7,代码来源:FormatCommentHandler.cs


示例11: VsInteractiveWindowEditorFactoryService

 public VsInteractiveWindowEditorFactoryService(IVsEditorAdaptersFactoryService adaptersFactory, IContentTypeRegistryService contentTypeRegistry, [ImportMany]IEnumerable<Lazy<IVsInteractiveWindowOleCommandTargetProvider, ContentTypeMetadata>> oleCommandTargetProviders)
 {
     _adapterFactory = adaptersFactory;
     _provider = (IOleServiceProvider)InteractiveWindowPackage.GetGlobalService(typeof(IOleServiceProvider));
     _contentTypeRegistry = contentTypeRegistry;
     _oleCommandTargetProviders = oleCommandTargetProviders;
 }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:7,代码来源:VsInteractiveWindowEditorFactoryService.cs


示例12: ViewCreationListener

 public ViewCreationListener(
     IVsEditorAdaptersFactoryService adaptersFactory,
     CopyDataService copyDataService)
 {
     this.adaptersFactory = adaptersFactory;
     this.copyDataService = copyDataService;
 }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:7,代码来源:ViewCreationListener.cs


示例13: ConnectController

        public static CommandTargetToOleShim ConnectController(IVsEditorAdaptersFactoryService adapterService, ITextView textView, Controller controller) {
            IVsTextView viewAdapter = adapterService.GetViewAdapter(textView);
            CommandTargetToOleShim oleControllerShim = null;

            // Connect main controller to VS text view filter chain.
            // The chain looks like VS IDE -> language main controller -> Core editor
            // However, IDE wants IOleCommandTarget and core editor, although managed,
            // is represented by OLE command target as well. Since R controller
            // is not specific to VS and does not use OLE, we create OLE-to-managed target shim
            // and managed target-to-OLE shims. 
            if (viewAdapter != null) {
                // Create OLE shim that wraps main controller ICommandTarget and represents
                // it as IOleCommandTarget that is accepted by VS IDE.
                oleControllerShim = new CommandTargetToOleShim(textView, controller);

                IOleCommandTarget nextOleTarget;
                viewAdapter.AddCommandFilter(oleControllerShim, out nextOleTarget);

                // nextOleTarget is typically a core editor wrapped into OLE layer.
                // Create a wrapper that will present OLE target as ICommandTarget to
                // HTML main controller so controller can operate in platform-agnostic way.
                ICommandTarget nextCommandTarget = VsAppShell.Current.TranslateCommandTarget(textView, nextOleTarget);
                controller.ChainedController = nextCommandTarget;
            }
            return oleControllerShim;
        }
开发者ID:Microsoft,项目名称:RTVS,代码行数:26,代码来源:OleControllerChain.cs


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


示例15: TemplateCompletionHandlerProvider

        public TemplateCompletionHandlerProvider(
            ITemplateEditorOptions options, 
            IVsEditorAdaptersFactoryService editorAdapterFactory,
            SVsServiceProvider serviceProvider,
            ICompletionBroker completionBroker)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            if (editorAdapterFactory == null)
            {
                throw new ArgumentNullException(nameof(editorAdapterFactory));
            }

            if (serviceProvider == null)
            {
                throw new ArgumentNullException(nameof(serviceProvider));
            }

            if (completionBroker == null)
            {
                throw new ArgumentNullException(nameof(completionBroker));
            }

            this.options = options;
            this.editorAdapterFactory = editorAdapterFactory;
            this.serviceProvider = serviceProvider;
            this.completionBroker = completionBroker;
        }
开发者ID:icool123,项目名称:T4Toolbox,代码行数:31,代码来源:TemplateCompletionHandlerProvider.cs


示例16: XmlResourceCompletionSource

 /// <summary>
 /// Default ctor
 /// </summary>
 protected XmlResourceCompletionSource(ITextBuffer textBuffer, SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService vsEditorAdaptersFactoryService, IGlyphService glyphService)
 {
     this.textBuffer = textBuffer;
     this.serviceProvider = serviceProvider;
     this.vsEditorAdaptersFactoryService = vsEditorAdaptersFactoryService;
     this.glyphService = glyphService;
 }
开发者ID:Xtremrules,项目名称:dot42,代码行数:10,代码来源:XmlResourceCompletionSource.cs


示例17: VsInteractiveWindowCommandFilter

        public VsInteractiveWindowCommandFilter(IVsEditorAdaptersFactoryService adapterFactory, IInteractiveWindow window, IVsTextView textViewAdapter, IVsTextBuffer bufferAdapter, IEnumerable<Lazy<IVsInteractiveWindowOleCommandTargetProvider, ContentTypeMetadata>> oleCommandTargetProviders, IContentTypeRegistryService contentTypeRegistry)
        {
            _window = window;
            _oleCommandTargetProviders = oleCommandTargetProviders;
            _contentTypeRegistry = contentTypeRegistry;

            this.textViewAdapter = textViewAdapter;

            // make us a code window so we'll have the same colors as a normal code window.
            IVsTextEditorPropertyContainer propContainer;
            ErrorHandler.ThrowOnFailure(((IVsTextEditorPropertyCategoryContainer)textViewAdapter).GetPropertyCategory(Microsoft.VisualStudio.Editor.DefGuidList.guidEditPropCategoryViewMasterSettings, out propContainer));
            propContainer.SetProperty(VSEDITPROPID.VSEDITPROPID_ViewComposite_AllCodeWindowDefaults, true);
            propContainer.SetProperty(VSEDITPROPID.VSEDITPROPID_ViewGlobalOpt_AutoScrollCaretOnTextEntry, true);

            // editor services are initialized in textViewAdapter.Initialize - hook underneath them:
            _preEditorCommandFilter = new CommandFilter(this, CommandFilterLayer.PreEditor);
            ErrorHandler.ThrowOnFailure(textViewAdapter.AddCommandFilter(_preEditorCommandFilter, out _editorCommandFilter));

            textViewAdapter.Initialize(
                (IVsTextLines)bufferAdapter,
                IntPtr.Zero,
                (uint)TextViewInitFlags.VIF_HSCROLL | (uint)TextViewInitFlags.VIF_VSCROLL | (uint)TextViewInitFlags3.VIF_NO_HWND_SUPPORT,
                new[] { new INITVIEW { fSelectionMargin = 0, fWidgetMargin = 0, fVirtualSpace = 0, fDragDropMove = 1 } });

            // disable change tracking because everything will be changed
            var textViewHost = adapterFactory.GetWpfTextViewHost(textViewAdapter);

            _preLanguageCommandFilter = new CommandFilter(this, CommandFilterLayer.PreLanguage);
            ErrorHandler.ThrowOnFailure(textViewAdapter.AddCommandFilter(_preLanguageCommandFilter, out _editorServicesCommandFilter));

            _textViewHost = textViewHost;
        }
开发者ID:ralfkang,项目名称:roslyn,代码行数:32,代码来源:VsInteractiveWindowCommandFilter.cs


示例18: HostFactory

        public HostFactory(
            IVim vim,
            ITextBufferFactoryService bufferFactoryService,
            ITextEditorFactoryService editorFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            IKeyBindingService keyBindingService,
            SVsServiceProvider serviceProvider,
            IVsEditorAdaptersFactoryService adaptersFactory,
            IResharperUtil resharperUtil,
            IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
            ITextManager textManager,
            IVsAdapter adapter,
            [EditorUtilsImport] IProtectedOperations protectedOperations,
            IVimBufferCoordinatorFactory bufferCoordinatorFactory,
            IKeyUtil keyUtil)
        {
            _vim = vim;
            _keyBindingService = keyBindingService;
            _bufferFactoryService = bufferFactoryService;
            _editorFactoryService = editorFactoryService;
            _editorOptionsFactoryService = editorOptionsFactoryService;
            _resharperUtil = resharperUtil;
            _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
            _adaptersFactory = adaptersFactory;
            _textManager = textManager;
            _adapter = adapter;
            _protectedOperations = protectedOperations;
            _bufferCoordinatorFactory = bufferCoordinatorFactory;
            _keyUtil = keyUtil;

            #if DEBUG
            VimTrace.TraceSwitch.Level = TraceLevel.Info;
            #endif
        }
开发者ID:nligerakis,项目名称:VsVim,代码行数:34,代码来源:HostFactory.cs


示例19: AbstractSnippetExpansionClient

 public AbstractSnippetExpansionClient(Guid languageServiceGuid, ITextView textView, ITextBuffer subjectBuffer, IVsEditorAdaptersFactoryService editorAdaptersFactoryService)
 {
     this.LanguageServiceGuid = languageServiceGuid;
     this.TextView = textView;
     this.SubjectBuffer = subjectBuffer;
     this.EditorAdaptersFactoryService = editorAdaptersFactoryService;
 }
开发者ID:elemk0vv,项目名称:roslyn-1,代码行数:7,代码来源:AbstractSnippetExpansionClient.cs


示例20: HostFactory

        public HostFactory(
            IVim vim,
            IVsEditorAdaptersFactoryService adaptersFactory,
            IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
            ITextManager textManager,
            IVsAdapter adapter,
            IVimProtectedOperations protectedOperations,
            IVimBufferCoordinatorFactory bufferCoordinatorFactory,
            IKeyUtil keyUtil,
            IEditorToSettingsSynchronizer editorToSettingSynchronizer,
            [ImportMany] IEnumerable<Lazy<ICommandTargetFactory, IOrderable>> commandTargetFactoryList)
        {
            _vim = vim;
            _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
            _adaptersFactory = adaptersFactory;
            _textManager = textManager;
            _adapter = adapter;
            _protectedOperations = protectedOperations;
            _bufferCoordinatorFactory = bufferCoordinatorFactory;
            _keyUtil = keyUtil;
            _editorToSettingSynchronizer = editorToSettingSynchronizer;
            _commandTargetFactoryList = Orderer.Order(commandTargetFactoryList).Select(x => x.Value).ToReadOnlyCollection();

            #if DEBUG
            VimTrace.TraceSwitch.Level = TraceLevel.Info;
            #endif
        }
开发者ID:louisfeng,项目名称:VsVim,代码行数:27,代码来源:HostFactory.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IVsExpansionSession类代码示例发布时间:2022-05-24
下一篇:
C# IVsCodeWindow类代码示例发布时间: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