本文整理汇总了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
}
示例2: PackageInstallerService
public PackageInstallerService(
VisualStudioWorkspaceImpl workspace,
IVsEditorAdaptersFactoryService editorAdaptersFactoryService)
{
_workspace = workspace;
_editorAdaptersFactoryService = editorAdaptersFactoryService;
}
示例3: VsTextViewListener
public VsTextViewListener(
IVsEditorAdaptersFactoryService editorAdaptersFactory,
SVsServiceProvider serviceProvider)
{
this.editorAdaptersFactory = editorAdaptersFactory;
this.serviceProvider = serviceProvider;
}
示例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);
}
示例5: VisualStudioDocumentNavigationService
public VisualStudioDocumentNavigationService(
SVsServiceProvider serviceProvider,
IVsEditorAdaptersFactoryService editorAdaptersFactoryService)
{
_serviceProvider = serviceProvider;
_editorAdaptersFactoryService = editorAdaptersFactoryService;
}
示例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;
}
}
示例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;
}
示例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;
}
示例9: OutliningFilterProvider
public OutliningFilterProvider(
[Import(typeof(SVsServiceProvider))] System.IServiceProvider serviceProvider,
IVsEditorAdaptersFactoryService editorFactory)
{
_serviceProvider = serviceProvider;
_editorFactory = editorFactory;
}
示例10: FormatCommentHandler
public FormatCommentHandler(
IVsEditorAdaptersFactoryService adaptersFactoryService,
ICommentFormatter commentFormatter)
{
_adaptersFactoryService = adaptersFactoryService;
_commentFormatter = commentFormatter;
}
示例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;
}
示例12: ViewCreationListener
public ViewCreationListener(
IVsEditorAdaptersFactoryService adaptersFactory,
CopyDataService copyDataService)
{
this.adaptersFactory = adaptersFactory;
this.copyDataService = copyDataService;
}
示例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;
}
示例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);
}
示例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;
}