本文整理汇总了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();
}));
}
}
示例2: VimHost
protected VimHost(
ITextDocumentFactoryService textDocumentFactoryService,
IEditorOperationsFactoryService editorOperationsFactoryService)
{
_textDocumentFactoryService = textDocumentFactoryService;
_editorOperationsFactoryService = editorOperationsFactoryService;
}
示例3: BraceCompletionSessionProvider
public BraceCompletionSessionProvider(
ITextBufferUndoManagerProvider undoManager,
IEditorOperationsFactoryService editorOperationsFactoryService)
{
_undoManager = undoManager;
_editorOperationsFactoryService = editorOperationsFactoryService;
}
示例4: SmartTokenFormatterCommandHandler
public SmartTokenFormatterCommandHandler(
ITextUndoHistoryRegistry undoHistoryRegistry,
IEditorOperationsFactoryService editorOperationsFactoryService) :
base(undoHistoryRegistry,
editorOperationsFactoryService)
{
}
示例5: CodeWindowManager
public CodeWindowManager(IVsCodeWindow codeWindow, IWpfTextView textView, IComponentModel componentModel)
{
_window = codeWindow;
_textView = textView;
_editorOperationsFactory = componentModel.GetService<IEditorOperationsFactoryService>();
_textView.Properties.AddProperty(typeof(CodeWindowManager), this);
}
示例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);
}
示例7: CodeWindowManager
public CodeWindowManager(IVsCodeWindow codeWindow, IWpfTextView textView, IComponentModel componentModel)
{
_window = codeWindow;
_textView = textView;
_editorOperationsFactory = componentModel.GetService<IEditorOperationsFactoryService>();
_analyzer = componentModel.GetService<IPythonAnalyzer>();
}
示例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);
}
示例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;
}
示例10: AutomaticLineEnderCommandHandler
public AutomaticLineEnderCommandHandler(
IWaitIndicator waitIndicator,
ITextUndoHistoryRegistry undoRegistry,
IEditorOperationsFactoryService editorOperations)
: base(waitIndicator, undoRegistry, editorOperations)
{
}
示例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;
}
示例12: VimHostImpl
internal VimHostImpl(
ITextBufferFactoryService textBufferFactoryService,
ITextEditorFactoryService textEditorFactoryService,
ITextDocumentFactoryService textDocumentFactoryService,
IEditorOperationsFactoryService editorOperationsFactoryService) :
base(textBufferFactoryService, textEditorFactoryService, textDocumentFactoryService, editorOperationsFactoryService)
{
}
示例13: ExtractMethodCommandHandler
public ExtractMethodCommandHandler(
ITextBufferUndoManagerProvider undoManager,
IEditorOperationsFactoryService editorOperationsFactoryService,
IInlineRenameService renameService,
IWaitIndicator waitIndicator) :
base(undoManager, editorOperationsFactoryService, renameService, waitIndicator)
{
}
示例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;
}
示例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
};
}