internal EditorHostLoader() { var editorHostFactory = new EditorHostFactory(); editorHostFactory.Add(new AssemblyCatalog(typeof(DefaultKeyProcessorProvider).Assembly)); editorHostFactory.Add(new AssemblyCatalog(typeof(MarginFactory).Assembly)); _editorHost = editorHostFactory.CreateEditorHost(); }
internal VimComponentHost() { var editorHostFactory = new EditorHostFactory(); editorHostFactory.Add(new AssemblyCatalog(typeof(IVim).Assembly)); editorHostFactory.Add(new AssemblyCatalog(typeof(VimKeyProcessor).Assembly)); editorHostFactory.Add(new AssemblyCatalog(typeof(VimComponentHost).Assembly)); _editorHost = editorHostFactory.CreateEditorHost(); _vim = _editorHost.CompositionContainer.GetExportedValue<IVim>(); }
internal VimComponentHost() { var editorHostFactory = new EditorHostFactory(); editorHostFactory.Add(new AssemblyCatalog(typeof(IVim).Assembly)); editorHostFactory.Add(new AssemblyCatalog(typeof(VimKeyProcessor).Assembly)); editorHostFactory.Add(new AssemblyCatalog(typeof(VimComponentHost).Assembly)); _editorHost = editorHostFactory.CreateEditorHost(); _vim = _editorHost.CompositionContainer.GetExportedValue <IVim>(); }
private EditorHost GetOrCreateEditorHost() { if (EditorHostCache != null) { return(EditorHostCache); } var editorHostFactory = new EditorHostFactory(); EditorHostCache = editorHostFactory.CreateEditorHost(); return(EditorHostCache); }
public MainWindow() { InitializeComponent(); var editorHostFactory = new EditorHostFactory(EditorVersion.Vs2015); var editorHost = editorHostFactory.CreateEditorHost(); var textBuffer = editorHost.TextBufferFactoryService.CreateTextBuffer(); textBuffer.Insert(0, "Hello Editor"); var wpfTextView = editorHost.TextEditorFactoryService.CreateTextView(textBuffer); var wpfTextViewHost = editorHost.TextEditorFactoryService.CreateTextViewHost(wpfTextView, setFocus: true); Content = wpfTextViewHost.HostControl; }
private EditorHost GetOrCreateEditorHost() { if (EditorHostCache != null) { return EditorHostCache; } var editorHostFactory = new EditorHostFactory(); EditorHostCache = editorHostFactory.CreateEditorHost(); return EditorHostCache; }