Ejemplo n.º 1
0
            public SettingsSync(IVimApplicationSettings vimApplicationSettings, IMarkDisplayUtil markDisplayUtil, IControlCharUtil controlCharUtil)
            {
                VimApplicationSettings = vimApplicationSettings;
                MarkDisplayUtil        = markDisplayUtil;
                ControlCharUtil        = controlCharUtil;

                MarkDisplayUtil.HideMarksChanged           += SyncToApplicationSettings;
                ControlCharUtil.DisplayControlCharsChanged += SyncToApplicationSettings;
                VimApplicationSettings.SettingsChanged     += SyncFromApplicationSettings;
            }
Ejemplo n.º 2
0
        internal VsVimHost(
            IVsAdapter adapter,
            ITextBufferFactoryService textBufferFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            ITextDocumentFactoryService textDocumentFactoryService,
            ITextBufferUndoManagerProvider undoManagerProvider,
            IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
            IEditorOperationsFactoryService editorOperationsFactoryService,
            ISmartIndentationService smartIndentationService,
            ITextManager textManager,
            ISharedServiceFactory sharedServiceFactory,
            IVimApplicationSettings vimApplicationSettings,
            IExtensionAdapterBroker extensionAdapterBroker,
            IProtectedOperations protectedOperations,
            IMarkDisplayUtil markDisplayUtil,
            IControlCharUtil controlCharUtil,
            ICommandDispatcher commandDispatcher,
            SVsServiceProvider serviceProvider,
            IClipboardDevice clipboardDevice)
            : 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>();
            _vimApplicationSettings  = vimApplicationSettings;
            _smartIndentationService = smartIndentationService;
            _extensionAdapterBroker  = extensionAdapterBroker;
            _runningDocumentTable    = serviceProvider.GetService <SVsRunningDocumentTable, IVsRunningDocumentTable>();
            _vsShell                 = (IVsShell)serviceProvider.GetService(typeof(SVsShell));
            _protectedOperations     = protectedOperations;
            _commandDispatcher       = commandDispatcher;
            _clipboardDevice         = clipboardDevice;

            _vsMonitorSelection.AdviseSelectionEvents(this, out uint selectionCookie);
            _runningDocumentTable.AdviseRunningDocTableEvents(this, out uint runningDocumentTableCookie);

            InitOutputPane();

            _settingsSync = new SettingsSync(vimApplicationSettings, markDisplayUtil, controlCharUtil, _clipboardDevice);
            _settingsSync.SyncFromApplicationSettings();
        }
Ejemplo n.º 3
0
        internal MarkGlyphTaggerSource(IVimBufferData vimBufferData, IMarkDisplayUtil markDisplayUtil)
        {
            _vimBufferData   = vimBufferData;
            _markMap         = _vimBufferData.Vim.MarkMap;
            _lineNumberMap   = new Dictionary <Mark, int>();
            _glyphPairs      = new List <Tuple <string, int> >();
            _isVisible       = true;
            _activeMarks     = 0;
            _markDisplayUtil = markDisplayUtil;
            _hideMarks       = ExpandHideMarksSetting(_markDisplayUtil.HideMarks);

            LoadNewBufferMarks();
            CachePairs();

            _markMap.MarkSet     += OnBufferMarkSet;
            _markMap.MarkDeleted += OnMarkDeleted;
            _markDisplayUtil.HideMarksChanged           += OnHideMarksChanged;
            _vimBufferData.VimTextBuffer.MarkSet        += OnBufferMarkSet;
            _vimBufferData.JumpList.MarkSet             += OnWindowMarkSet;
            _vimBufferData.TextBuffer.Changed           += OnTextBufferChanged;
            _vimBufferData.Vim.VimHost.IsVisibleChanged += OnIsVisibleChanged;
        }
 internal MarkGlyphTaggerSourceFactory(IVim vim, IMarkDisplayUtil markDisplayUtil)
 {
     _vim             = vim;
     _markDisplayUtil = markDisplayUtil;
 }