本文整理汇总了C#中ITextBufferFactoryService类的典型用法代码示例。如果您正苦于以下问题:C# ITextBufferFactoryService类的具体用法?C# ITextBufferFactoryService怎么用?C# ITextBufferFactoryService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ITextBufferFactoryService类属于命名空间,在下文中一共展示了ITextBufferFactoryService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EditorTextFactoryService
public EditorTextFactoryService(
ITextBufferFactoryService textBufferFactoryService,
IContentTypeRegistryService contentTypeRegistryService)
{
_textBufferFactory = textBufferFactoryService;
_unknownContentType = contentTypeRegistryService.UnknownContentType;
}
示例2: 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);
}
示例3: JadeClassifierProvider
public JadeClassifierProvider(IClassificationTypeRegistryService registryService,
ITextBufferFactoryService bufferFact,
IContentTypeRegistryService contentTypeService,
[ImportMany(typeof(ITaggerProvider))]Lazy<ITaggerProvider, TaggerProviderMetadata>[] taggerProviders,
[ImportMany(typeof(IClassifierProvider))]Lazy<IClassifierProvider, IClassifierProviderMetadata>[] classifierProviders) {
ClassificationRegistryService = registryService;
BufferFactoryService = bufferFact;
JsContentType = contentTypeService.GetContentType(NodejsConstants.JavaScript);
CssContentType = contentTypeService.GetContentType(NodejsConstants.CSS);
var jsTagger = taggerProviders.Where(
provider =>
provider.Metadata.ContentTypes.Contains(NodejsConstants.JavaScript) &&
provider.Metadata.TagTypes.Any(tagType => tagType.IsSubclassOf(typeof(ClassificationTag)))
).FirstOrDefault();
if (JsTaggerProvider != null) {
JsTaggerProvider = jsTagger.Value;
}
var cssTagger = classifierProviders.Where(
provider => provider.Metadata.ContentTypes.Any(x => x.Equals("css", StringComparison.OrdinalIgnoreCase))
).FirstOrDefault();
if (cssTagger != null) {
CssClassifierProvider = cssTagger.Value;
}
}
示例4: 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;
}
示例5: 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;
}
示例6: 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
}
示例7: HostFactory
public HostFactory(
IVim vim,
ITextBufferFactoryService bufferFactoryService,
ITextEditorFactoryService editorFactoryService,
IEditorOptionsFactoryService editorOptionsFactoryService,
IKeyBindingService keyBindingService,
SVsServiceProvider serviceProvider,
IVsEditorAdaptersFactoryService adaptersFactory,
IExternalEditorManager externalEditorManager,
IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
IVsAdapter adapter,
IProtectedOperations protectedOperations,
IVimBufferCoordinatorFactory bufferCoordinatorFactory)
{
_vim = vim;
_keyBindingService = keyBindingService;
_bufferFactoryService = bufferFactoryService;
_editorFactoryService = editorFactoryService;
_editorOptionsFactoryService = editorOptionsFactoryService;
_externalEditorManager = externalEditorManager;
_displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
_adaptersFactory = adaptersFactory;
_adapter = adapter;
_protectedOperations = protectedOperations;
_bufferCoordinatorFactory = bufferCoordinatorFactory;
}
示例8: MarkdownCodeTest
public MarkdownCodeTest(MarkdownEditorMefCatalogFixture catalogFixture) {
_exportProvider = catalogFixture.CreateExportProvider();
_crs = _exportProvider.GetExportedValue<IClassificationTypeRegistryService>();
_ctrs = _exportProvider.GetExportedValue<IContentTypeRegistryService>();
_cnp = _exportProvider.GetExports<IClassificationNameProvider, IComponentContentTypes>();
_tbfs = _exportProvider.GetExportedValue<ITextBufferFactoryService>();
}
示例9: SymbolQuickInfoSourceProvider
public SymbolQuickInfoSourceProvider(ITextStructureNavigatorSelectorService navigatorService,
ITextBufferFactoryService textBufferFactoryService,
CodeContentControlProvider codeContentControlProvider,
SyntaxQuickinfoBuilderService syntaxQuickinfoBuilderService) {
SyntaxQuickinfoBuilderService = syntaxQuickinfoBuilderService;
}
示例10: StreamingFindReferencesPresenter
public StreamingFindReferencesPresenter(
Shell.SVsServiceProvider serviceProvider,
ITextBufferFactoryService textBufferFactoryService,
IProjectionBufferFactoryService projectionBufferFactoryService,
IEditorOptionsFactoryService editorOptionsFactoryService,
ITextEditorFactoryService textEditorFactoryService,
IContentTypeRegistryService contentTypeRegistryService,
ClassificationTypeMap typeMap,
IEditorFormatMapService formatMapService,
[ImportMany] IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners)
{
_serviceProvider = serviceProvider;
_textBufferFactoryService = textBufferFactoryService;
_projectionBufferFactoryService = projectionBufferFactoryService;
_editorOptionsFactoryService = editorOptionsFactoryService;
_contentTypeRegistryService = contentTypeRegistryService;
_textEditorFactoryService = textEditorFactoryService;
_typeMap = typeMap;
_formatMapService = formatMapService;
_asyncListener = new AggregateAsynchronousOperationListener(
asyncListeners, FeatureAttribute.ReferenceHighlighting);
_vsFindAllReferencesService = (IFindAllReferencesService)_serviceProvider.GetService(typeof(SVsFindAllReferences));
}
示例11: 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);
}
示例12: FirstUseOptimizationLoader
FirstUseOptimizationLoader(IThemeClassificationTypeService themeClassificationTypeService, ITextBufferFactoryService textBufferFactoryService, IRoslynDocumentationProviderFactory docFactory, IRoslynDocumentChangedService roslynDocumentChangedService) {
// This method is currently only called when compiling the code so add an early test
// that it's still working in case ImmutableArray<T> gets updated.
ImmutableArrayUtilities<byte>.ToImmutableArray(Array.Empty<byte>());
new FirstUseOptimization(themeClassificationTypeService, textBufferFactoryService, docFactory, roslynDocumentChangedService);
}
示例13: DocumentProvider
public DocumentProvider(
IVisualStudioHostProjectContainer projectContainer,
IServiceProvider serviceProvider,
bool signUpForFileChangeNotification)
{
var componentModel = (IComponentModel)serviceProvider.GetService(typeof(SComponentModel));
_projectContainer = projectContainer;
this.RunningDocumentTable = (IVsRunningDocumentTable4)serviceProvider.GetService(typeof(SVsRunningDocumentTable));
_textBufferFactoryService = componentModel.GetService<ITextBufferFactoryService>();
this.EditorAdaptersFactoryService = componentModel.GetService<IVsEditorAdaptersFactoryService>();
this.ContentTypeRegistryService = componentModel.GetService<IContentTypeRegistryService>();
_textUndoHistoryRegistry = componentModel.GetService<ITextUndoHistoryRegistry>();
_textManager = (IVsTextManager)serviceProvider.GetService(typeof(SVsTextManager));
// In the CodeSense scenario we will receive file change notifications from the native
// Language Services, so we don't want to sign up for them ourselves.
if (signUpForFileChangeNotification)
{
_fileChangeService = (IVsFileChangeEx)serviceProvider.GetService(typeof(SVsFileChangeEx));
}
var shell = (IVsShell)serviceProvider.GetService(typeof(SVsShell));
int installed;
Marshal.ThrowExceptionForHR(shell.IsPackageInstalled(Guids.RoslynPackageId, out installed));
IsRoslynPackageInstalled = installed != 0;
var runningDocumentTableForEvents = (IVsRunningDocumentTable)RunningDocumentTable;
Marshal.ThrowExceptionForHR(runningDocumentTableForEvents.AdviseRunningDocTableEvents(new RunningDocTableEventsSink(this), out _runningDocumentTableEventCookie));
}
示例14: VimHostImpl
internal VimHostImpl(
ITextBufferFactoryService textBufferFactoryService,
ITextEditorFactoryService textEditorFactoryService,
ITextDocumentFactoryService textDocumentFactoryService,
IEditorOperationsFactoryService editorOperationsFactoryService) :
base(textBufferFactoryService, textEditorFactoryService, textDocumentFactoryService, editorOperationsFactoryService)
{
}
示例15: SymbolQuickInfoSourceProvider
public SymbolQuickInfoSourceProvider(ITextStructureNavigatorSelectorService navigatorService,
ITextBufferFactoryService textBufferFactoryService,
CodeContentControlProvider codeContentControlProvider,
IClassificationFormatMapService classificationFormatMapService,
IClassificationTypeRegistryService classificationTypeRegistryService) {
SyntaxQuickinfoBuilderService = new SyntaxQuickinfoBuilderService(classificationFormatMapService, classificationTypeRegistryService);
}