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


C# IVsEditorAdaptersFactoryService类代码示例

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


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


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