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


C# IEditorOperationsFactoryService类代码示例

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


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

示例1: WpfTextViewHost

		public WpfTextViewHost(IWpfTextViewMarginProviderCollectionProvider wpfTextViewMarginProviderCollectionProvider, IDsWpfTextView wpfTextView, IEditorOperationsFactoryService editorOperationsFactoryService, bool setFocus) {
			if (wpfTextViewMarginProviderCollectionProvider == null)
				throw new ArgumentNullException(nameof(wpfTextViewMarginProviderCollectionProvider));
			if (wpfTextView == null)
				throw new ArgumentNullException(nameof(wpfTextView));
			if (editorOperationsFactoryService == null)
				throw new ArgumentNullException(nameof(editorOperationsFactoryService));
			this.editorOperationsFactoryService = editorOperationsFactoryService;
			grid = CreateGrid();
			TextView = wpfTextView;
			Focusable = false;
			Content = grid;

			UpdateBackground();
			TextView.BackgroundBrushChanged += TextView_BackgroundBrushChanged;

			containerMargins = new IWpfTextViewMargin[5];
			containerMargins[0] = CreateContainerMargin(wpfTextViewMarginProviderCollectionProvider, PredefinedMarginNames.Top, true, 0, 0, 3);
			containerMargins[1] = CreateContainerMargin(wpfTextViewMarginProviderCollectionProvider, PredefinedMarginNames.Bottom, true, 2, 0, 2);
			containerMargins[2] = CreateContainerMargin(wpfTextViewMarginProviderCollectionProvider, PredefinedMarginNames.BottomRightCorner, true, 2, 2, 1);
			containerMargins[3] = CreateContainerMargin(wpfTextViewMarginProviderCollectionProvider, PredefinedMarginNames.Left, false, 1, 0, 1);
			containerMargins[4] = CreateContainerMargin(wpfTextViewMarginProviderCollectionProvider, PredefinedMarginNames.Right, false, 1, 2, 1);
			Add(TextView.VisualElement, 1, 1, 1);
			Debug.Assert(!containerMargins.Any(a => a == null));

			if (setFocus) {
				Dispatcher.BeginInvoke(DispatcherPriority.Render, new Action(() => {
					if (!TextView.IsClosed)
						TextView.VisualElement.Focus();
				}));
			}
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:32,代码来源:WpfTextViewHost.cs

示例2: VimHost

 protected VimHost(
     ITextDocumentFactoryService textDocumentFactoryService,
     IEditorOperationsFactoryService editorOperationsFactoryService)
 {
     _textDocumentFactoryService = textDocumentFactoryService;
     _editorOperationsFactoryService = editorOperationsFactoryService;
 }
开发者ID:bentayloruk,项目名称:VsVim,代码行数:7,代码来源:VimHost.cs

示例3: BraceCompletionSessionProvider

 public BraceCompletionSessionProvider(
     ITextBufferUndoManagerProvider undoManager,
     IEditorOperationsFactoryService editorOperationsFactoryService)
 {
     _undoManager = undoManager;
     _editorOperationsFactoryService = editorOperationsFactoryService;
 }
开发者ID:Rickinio,项目名称:roslyn,代码行数:7,代码来源:BraceCompletionSessionProvider.cs

示例4: SmartTokenFormatterCommandHandler

 public SmartTokenFormatterCommandHandler(
     ITextUndoHistoryRegistry undoHistoryRegistry,
     IEditorOperationsFactoryService editorOperationsFactoryService) :
     base(undoHistoryRegistry,
          editorOperationsFactoryService)
 {
 }
开发者ID:Rickinio,项目名称:roslyn,代码行数:7,代码来源:SmartTokenFormatterCommandHandler.cs

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

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

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

示例8: VsVimHost

        internal VsVimHost(
            IVsAdapter adapter,
            ITextBufferFactoryService textBufferFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            ITextDocumentFactoryService textDocumentFactoryService,
            ITextBufferUndoManagerProvider undoManagerProvider,
            IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
            IEditorOperationsFactoryService editorOperationsFactoryService,
            ISmartIndentationService smartIndentationService,
            ITextManager textManager,
            ISharedServiceFactory sharedServiceFactory,
            IVimApplicationSettings vimApplicationSettings,
            SVsServiceProvider serviceProvider)
            : base(textBufferFactoryService, textEditorFactoryService, textDocumentFactoryService, editorOperationsFactoryService)
        {
            _vsAdapter = adapter;
            _editorAdaptersFactoryService = editorAdaptersFactoryService;
            _dte = (_DTE)serviceProvider.GetService(typeof(_DTE));
            _vsExtensibility = (IVsExtensibility)serviceProvider.GetService(typeof(IVsExtensibility));
            _textManager = textManager;
            _sharedService = sharedServiceFactory.Create();
            _vsMonitorSelection = serviceProvider.GetService<SVsShellMonitorSelection, IVsMonitorSelection>();
            _fontProperties = new TextEditorFontProperties(serviceProvider);
            _vimApplicationSettings = vimApplicationSettings;
            _smartIndentationService = smartIndentationService;

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

示例9: ReplWindowTextViewCreationListener

 public ReplWindowTextViewCreationListener(IVsEditorAdaptersFactoryService adaptersFactory, IEditorOperationsFactoryService editorOperationsFactory, [Import(typeof(SVsServiceProvider))]IServiceProvider serviceProvider, IEditorOptionsFactoryService editorOptionsFactory) {
     _serviceProvider = serviceProvider;
     _adaptersFactory = adaptersFactory;
     _editorOperationsFactory = editorOperationsFactory;
     _compModel = (IComponentModel)serviceProvider.GetService(typeof(SComponentModel));
     _editorOptionsFactory = editorOptionsFactory;
 }
开发者ID:CforED,项目名称:Node.js-Tools-for-Visual-Studio,代码行数:7,代码来源:TextViewCreationListener.cs

示例10: AutomaticLineEnderCommandHandler

 public AutomaticLineEnderCommandHandler(
     IWaitIndicator waitIndicator,
     ITextUndoHistoryRegistry undoRegistry,
     IEditorOperationsFactoryService editorOperations)
     : base(waitIndicator, undoRegistry, editorOperations)
 {
 }
开发者ID:SoumikMukherjeeDOTNET,项目名称:roslyn,代码行数:7,代码来源:AutomaticLineEnderCommandHandler.cs

示例11: InteractiveWindowProvider

 public InteractiveWindowProvider(
     IContentTypeRegistryService contentTypeRegistry,
     ITextBufferFactoryService bufferFactory,
     IProjectionBufferFactoryService projectionBufferFactory,
     IEditorOperationsFactoryService editorOperationsFactory,
     ITextBufferUndoManagerProvider textBufferUndoManagerProvider,
     ITextEditorFactoryService editorFactory,
     IRtfBuilderService rtfBuilderService,
     IIntellisenseSessionStackMapService intellisenseSessionStackMap,
     ISmartIndentationService smartIndenterService,
     IInteractiveWindowEditorFactoryService windowFactoryService,
     IWaitIndicator waitIndicator)
 {
     _contentTypeRegistry = contentTypeRegistry;
     _bufferFactory = bufferFactory;
     _projectionBufferFactory = projectionBufferFactory;
     _editorOperationsFactory = editorOperationsFactory;
     _textBufferUndoManagerProvider = textBufferUndoManagerProvider;
     _editorFactory = editorFactory;
     _rtfBuilderService = rtfBuilderService;
     _intellisenseSessionStackMap = intellisenseSessionStackMap;
     _smartIndenterService = smartIndenterService;
     _windowFactoryService = windowFactoryService;
     _waitIndicator = waitIndicator;
 }
开发者ID:Rickinio,项目名称:roslyn,代码行数:25,代码来源:InteractiveWindowProvider.cs

示例12: VimHostImpl

 internal VimHostImpl(
     ITextBufferFactoryService textBufferFactoryService,
     ITextEditorFactoryService textEditorFactoryService,
     ITextDocumentFactoryService textDocumentFactoryService,
     IEditorOperationsFactoryService editorOperationsFactoryService) :
     base(textBufferFactoryService, textEditorFactoryService, textDocumentFactoryService, editorOperationsFactoryService)
 {
 }
开发者ID:Yzzl,项目名称:VsVim,代码行数:8,代码来源:VimHostTests.cs

示例13: ExtractMethodCommandHandler

 public ExtractMethodCommandHandler(
     ITextBufferUndoManagerProvider undoManager,
     IEditorOperationsFactoryService editorOperationsFactoryService,
     IInlineRenameService renameService,
     IWaitIndicator waitIndicator) :
     base(undoManager, editorOperationsFactoryService, renameService, waitIndicator)
 {
 }
开发者ID:Rickinio,项目名称:roslyn,代码行数:8,代码来源:ExtractMethodCommandHandler.cs

示例14: SearchServiceProvider

		SearchServiceProvider(ITextSearchService2 textSearchService2, ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService, ISearchSettings searchSettings, IMessageBoxService messageBoxService, [ImportMany] IEnumerable<Lazy<IReplaceListenerProvider>> replaceListenerProviders, IEditorOperationsFactoryService editorOperationsFactoryService) {
			this.textSearchService2 = textSearchService2;
			this.textStructureNavigatorSelectorService = textStructureNavigatorSelectorService;
			this.searchSettings = searchSettings;
			this.messageBoxService = messageBoxService;
			this.replaceListenerProviders = replaceListenerProviders.ToArray();
			this.editorOperationsFactoryService = editorOperationsFactoryService;
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:8,代码来源:SearchServiceProvider.cs

示例15: CreateEditTransaction

 /// <summary>
 /// create caret preserving edit transaction with automatic code change undo merging policy
 /// </summary>
 public static CaretPreservingEditTransaction CreateEditTransaction(
     this ITextView view, string description, ITextUndoHistoryRegistry registry, IEditorOperationsFactoryService service)
 {
     return new CaretPreservingEditTransaction(description, view, registry, service)
     {
         MergePolicy = AutomaticCodeChangeMergePolicy.Instance
     };
 }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:11,代码来源:Extensions.cs


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