Exemple #1
0
        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);
        }
Exemple #2
0
        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
        }
Exemple #3
0
        public HostFactory(
            IVim vim,
            IVsEditorAdaptersFactoryService adaptersFactory,
            IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
            ITextManager textManager,
            IVsAdapter adapter,
            IVimProtectedOperations protectedOperations,
            IVimBufferCoordinatorFactory bufferCoordinatorFactory,
            IKeyUtil keyUtil,
            IEditorToSettingsSynchronizer editorToSettingSynchronizer,
            [ImportMany] IEnumerable<Lazy<ICommandTargetFactory, IOrderable>> commandTargetFactoryList)
        {
            _vim = vim;
            _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
            _adaptersFactory = adaptersFactory;
            _textManager = textManager;
            _adapter = adapter;
            _protectedOperations = protectedOperations;
            _bufferCoordinatorFactory = bufferCoordinatorFactory;
            _keyUtil = keyUtil;
            _editorToSettingSynchronizer = editorToSettingSynchronizer;
            _commandTargetFactoryList = Orderer.Order(commandTargetFactoryList).Select(x => x.Value).ToReadOnlyCollection();

            #if DEBUG
            VimTrace.TraceSwitch.Level = TraceLevel.Info;
            #endif
        }
Exemple #4
0
        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
        }
Exemple #5
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,
            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);
        }
Exemple #6
0
 internal VsVimHost(
     ITextBufferUndoManagerProvider undoManagerProvider,
     IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
     ITextManager textManager,
     SVsServiceProvider serviceProvider)
 {
     _undoManagerProvider = undoManagerProvider;
     _editorAdaptersFactoryService = editorAdaptersFactoryService;
     _dte = (_DTE)serviceProvider.GetService(typeof(_DTE));
     _textManager = textManager;
 }
Exemple #7
0
 internal VsCommandTarget(
     IVimBufferCoordinator vimBufferCoordinator,
     ITextManager textManager,
     IVsAdapter vsAdapter,
     IDisplayWindowBroker broker,
     IKeyUtil keyUtil,
     IOleCommandTarget nextTarget,
     ReadOnlyCollection<ICommandTarget> commandTargets)
     : this(vimBufferCoordinator, textManager, vsAdapter, broker, keyUtil)
 {
     CompleteInit(nextTarget, commandTargets);
 }
Exemple #8
0
 internal VsVimHost(
     IVsAdapter adapter,
     ITextBufferUndoManagerProvider undoManagerProvider,
     IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
     ITextManager textManager,
     ITextDocumentFactoryService textDocumentFactoryService,
     SVsServiceProvider serviceProvider)
     : base(textDocumentFactoryService)
 {
     _adapter = adapter;
     _editorAdaptersFactoryService = editorAdaptersFactoryService;
     _dte = (_DTE)serviceProvider.GetService(typeof(_DTE));
     _textManager = textManager;
 }
 internal StandardCommandTarget(
     IVimBufferCoordinator vimBufferCoordinator,
     ITextManager textManager,
     IDisplayWindowBroker broker,
     IOleCommandTarget nextOleCommandTarget)
 {
     _vimBuffer = vimBufferCoordinator.VimBuffer;
     _vimBufferCoordinator = vimBufferCoordinator;
     _textBuffer = _vimBuffer.TextBuffer;
     _textView = _vimBuffer.TextView;
     _textManager = textManager;
     _broker = broker;
     _nextOleCommandTarget = nextOleCommandTarget;
 }
Exemple #10
0
 private VsCommandTarget(
     IVimBufferCoordinator vimBufferCoordinator,
     ITextManager textManager,
     IVsAdapter vsAdapter,
     IDisplayWindowBroker broker,
     IKeyUtil keyUtil)
 {
     _vimBuffer = vimBufferCoordinator.VimBuffer;
     _vim = _vimBuffer.Vim;
     _vimBufferCoordinator = vimBufferCoordinator;
     _textBuffer = _vimBuffer.TextBuffer;
     _vsAdapter = vsAdapter;
     _broker = broker;
     _keyUtil = keyUtil;
 }
Exemple #11
0
 public TextManagerTest()
 {
     _factory = new MockRepository(MockBehavior.Loose);
     _adapter = _factory.Create<IVsAdapter>();
     _adapter.SetupGet(x => x.EditorAdapter).Returns(_factory.Create<IVsEditorAdaptersFactoryService>().Object);
     _table = _factory.Create<IVsRunningDocumentTable>();
     _serviceProvider = _factory.Create<SVsServiceProvider>();
     _serviceProvider
         .Setup(x => x.GetService(typeof(SVsRunningDocumentTable)))
         .Returns(_table.Object);
     _managerRaw = new TextManager(
         _adapter.Object,
         _factory.Create<ITextDocumentFactoryService>().Object,
         _factory.Create<ITextBufferFactoryService>().Object,
         _serviceProvider.Object);
     _manager = _managerRaw;
 }
Exemple #12
0
 internal VsVimHost(
     IVsAdapter adapter,
     ITextBufferFactoryService textBufferFactoryService,
     ITextEditorFactoryService textEditorFactoryService,
     ITextDocumentFactoryService textDocumentFactoryService,
     ITextBufferUndoManagerProvider undoManagerProvider,
     IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
     IEditorOperationsFactoryService editorOperationsFactoryService,
     IWordUtilFactory wordUtilFactory,
     ITextManager textManager,
     SVsServiceProvider serviceProvider)
     : base(textBufferFactoryService, textEditorFactoryService, textDocumentFactoryService, editorOperationsFactoryService)
 {
     _vsAdapter = adapter;
     _editorAdaptersFactoryService = editorAdaptersFactoryService;
     _wordUtilFactory = wordUtilFactory;
     _dte = (_DTE)serviceProvider.GetService(typeof(_DTE));
     _textManager = textManager;
 }
Exemple #13
0
 private VsCommandTarget(
     IVimBufferCoordinator bufferCoordinator,
     ITextManager textManager,
     IVsAdapter vsAdapter,
     IDisplayWindowBroker broker,
     IResharperUtil resharperUtil,
     IKeyUtil keyUtil)
 {
     _vimBuffer = bufferCoordinator.VimBuffer;
     _vim = _vimBuffer.Vim;
     _bufferCoordinator = bufferCoordinator;
     _textBuffer = _vimBuffer.TextBuffer;
     _textView = _vimBuffer.TextView;
     _textManager = textManager;
     _vsAdapter = vsAdapter;
     _broker = broker;
     _resharperUtil = resharperUtil;
     _keyUtil = keyUtil;
 }
 internal StandardCommandTargetFactory(ITextManager textManager, IDisplayWindowBrokerFactoryService displayWindowBrokerFactory)
 {
     _textManager = textManager;
     _displayWindowBrokerFactory = displayWindowBrokerFactory;
 }
 public MatchesPresenter(ITextManager textManager) : base(textManager)
 {
     Matches = new List <MatchModel>();
     Teams   = new List <TeamModel>();
     Leagues = new List <LeagueModel>();
 }
 internal NavigateToItemProviderFactory(ITextManager textManager)
 {
     _textManager            = textManager;
     _synchronizationContext = WindowsFormsSynchronizationContext.Current;
 }
 public PlayerPresenter(ITextManager textManager) : base(textManager)
 {
 }
        private string GetLocalizedStatutoryServiceDescription(IEnumerable <StatutoryServiceDescription> statutoryServiceDescriptions, Guid localizedId, Guid defaultLocalizedId, ITextManager textManager)
        {
            var descriptionTypeCode = DescriptionTypeEnum.Description.ToString();
            var backgroundTypeCode  = DescriptionTypeEnum.BackgroundDescription.ToString();

            return(CheckGeneralDescription(statutoryServiceDescriptions?.FirstOrDefault(x => x.LocalizationId == localizedId && x.Type.Code == descriptionTypeCode)?.Description, textManager) ??
                   CheckGeneralDescription(statutoryServiceDescriptions?.FirstOrDefault(x => x.LocalizationId == localizedId && x.Type.Code == backgroundTypeCode)?.Description, textManager) ??
                   CheckGeneralDescription(statutoryServiceDescriptions?.FirstOrDefault(x => x.LocalizationId == defaultLocalizedId && x.Type.Code == descriptionTypeCode)?.Description, textManager) ??
                   CheckGeneralDescription(statutoryServiceDescriptions?.FirstOrDefault(x => x.LocalizationId == defaultLocalizedId && x.Type.Code == backgroundTypeCode)?.Description, textManager) ??
                   null);
        }
 public EntitySearchPresenter(ITextManager textManager) : base(textManager)
 {
 }
Exemple #20
0
 public CounterManager(ITextManager textManager)
 {
     _textManager     = textManager;
     _words           = new ConcurrentDictionary <string, int>();
     _threadSentences = new ConcurrentDictionary <int, int>();
 }
Exemple #21
0
        internal static Result<VsCommandTarget> Create(
            IVimBufferCoordinator bufferCoordinator,
            IVsTextView vsTextView,
            ITextManager textManager,
            IVsAdapter adapter,
            IDisplayWindowBroker broker,
            IResharperUtil resharperUtil,
            IKeyUtil keyUtil)
        {
            var vsCommandTarget = new VsCommandTarget(bufferCoordinator, textManager, adapter, broker, resharperUtil, keyUtil);
            var hresult = vsTextView.AddCommandFilter(vsCommandTarget, out vsCommandTarget._nextTarget);
            var result = Result.CreateSuccessOrError(vsCommandTarget, hresult);
            if (result.IsSuccess)
            {
                bufferCoordinator.VimBuffer.TextView.Properties[Key] = vsCommandTarget;
            }

            return result;
        }
 public LeaguePresenter(ITextManager textManager) : base(textManager)
 {
 }
Exemple #23
0
 public CharacterManager(CharactersConfiguration config, CameraConfiguration cameraConfig, ITextManager textManager,
                         ILocalizationManager localizationManager, ITextPrinterManager textPrinterManager)
     : base(config, cameraConfig)
 {
     this.textManager         = textManager;
     this.localizationManager = localizationManager;
     this.textPrinterManager  = textPrinterManager;
 }
 internal NavigateToItemProviderFactory(ITextManager textManager)
 {
     _textManager = textManager;
     _synchronizationContext = WindowsFormsSynchronizationContext.Current;
 }
 public DeleteRowCommand(ILogger logger, ITextManager textManager, int lineIndex)
 {
     _textManager = textManager ?? throw new ArgumentNullException(nameof(textManager));
     _lineIndex   = lineIndex;
     _logger      = logger;
 }
Exemple #26
0
 public GameManager
 (
     IBossManager bossManager,
     IBulletManager bulletManager,
     ICollisionManager collisionManager,
     ICommandManager commandManager,
     IConfigManager configManager,
     IContentManager contentManager,
     IControlManager controlManager,
     IDebugManager debugManager,
     IDelayManager delayManager,
     IDeviceManager deviceManager,
     IEnemyManager enemyManager,
     IEventManager eventManager,
     IExplosionManager explosionManager,
     IIconManager iconManager,
     IImageManager imageManager,
     IInputManager inputManager,
     ILevelManager levelManager,
     IMoverManager moverManager,
     IRandomManager randomManager,
     IRenderManager renderManager,
     IResolutionManager resolutionManager,
     IScoreManager scoreManager,
     IScreenManager screenManager,
     ISoundManager soundManager,
     ISpriteManager spriteManager,
     IStateManager stateManager,
     IStopwatchManager stopwatchManager,
     IStorageManager storageManager,
     ITextManager textManager,
     IThreadManager threadManager,
     IFileManager fileManager,
     ILogger logger
 )
 {
     BossManager       = bossManager;
     BulletManager     = bulletManager;
     CollisionManager  = collisionManager;
     CommandManager    = commandManager;
     ConfigManager     = configManager;
     ContentManager    = contentManager;
     ControlManager    = controlManager;
     DebugManager      = debugManager;
     DelayManager      = delayManager;
     DeviceManager     = deviceManager;
     EnemyManager      = enemyManager;
     EventManager      = eventManager;
     ExplosionManager  = explosionManager;
     ImageManager      = imageManager;
     IconManager       = iconManager;
     InputManager      = inputManager;
     LevelManager      = levelManager;
     MoverManager      = moverManager;
     RandomManager     = randomManager;
     RenderManager     = renderManager;
     ResolutionManager = resolutionManager;
     ScoreManager      = scoreManager;
     ScreenManager     = screenManager;
     SoundManager      = soundManager;
     SpriteManager     = spriteManager;
     StateManager      = stateManager;
     StopwatchManager  = stopwatchManager;
     StorageManager    = storageManager;
     TextManager       = textManager;
     ThreadManager     = threadManager;
     FileManager       = fileManager;
     Logger            = logger;
 }
Exemple #27
0
 internal StandardCommandTargetFactory(ITextManager textManager, IDisplayWindowBrokerFactoryService displayWindowBrokerFactory)
 {
     _textManager = textManager;
     _displayWindowBrokerFactory = displayWindowBrokerFactory;
 }
 public MatchSearchPresenter(ITextManager textManager) : base(textManager)
 {
 }
Exemple #29
0
 public TextController(ITextManager textManager)
 {
     _textManager = textManager;
 }
 public StadiumSearchPresenter(ITextManager textManager) : base(textManager)
 {
 }
Exemple #31
0
 public RefereePresenter(ITextManager textManager) : base(textManager)
 {
 }
Exemple #32
0
 public TeamSearchPresenter(ITextManager textManager) : base(textManager)
 {
 }
Exemple #33
0
 public TextService(ITextManager textManager)
 {
     _textManager = textManager;
 }
Exemple #34
0
 public EventHandler(IEventManager eventManager, ISourceManager sourceManager, ITextManager textManager,
                     ICallManager callManager, IVoiceService voiceService, IBlobManager blobManager, ITelephonyHandler telephonyHandler)
 {
     _eventManager     = eventManager;
     _sourceManager    = sourceManager;
     _textManager      = textManager;
     _callManager      = callManager;
     _voiceService     = voiceService;
     _blobManager      = blobManager;
     _telephonyHandler = telephonyHandler;
     _textConverter    = new TemplateToTextConverter();
     _audioConverter   = new AudioFileConverter();
 }
Exemple #35
0
        internal static Result<VsCommandTarget> Create(
            IVimBufferCoordinator vimBufferCoordinator,
            IVsTextView vsTextView,
            ITextManager textManager,
            IVsAdapter adapter,
            IDisplayWindowBroker broker,
            IKeyUtil keyUtil,
            IVimApplicationSettings vimApplicationSettings,
            ReadOnlyCollection<ICommandTargetFactory> commandTargetFactoryList)
        {
            var vsCommandTarget = new VsCommandTarget(vimBufferCoordinator, textManager, adapter, broker, keyUtil, vimApplicationSettings);

            IOleCommandTarget nextCommandTarget;
            var hresult = vsTextView.AddCommandFilter(vsCommandTarget, out nextCommandTarget);
            if (ErrorHandler.Failed(hresult))
            {
                return Result.CreateError(hresult);
            }

            var commandTargets = commandTargetFactoryList
                .Select(x => x.CreateCommandTarget(nextCommandTarget, vimBufferCoordinator))
                .Where(x => x != null)
                .ToReadOnlyCollection();
            vsCommandTarget.CompleteInit(nextCommandTarget, commandTargets);
            return Result.CreateSuccess(vsCommandTarget);
        }
 public ClientController(IWebHostEnvironment webHostEnvironment, ITextManager textManager)
 {
     _env       = webHostEnvironment;
     _txtconfig = textManager;
 }