コード例 #1
0
ファイル: VsVimHost.cs プロジェクト: 0-F/VsVim
        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);
        }
コード例 #2
0
ファイル: HostFactory.cs プロジェクト: 0-F/VsVim
        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
        }
コード例 #3
0
ファイル: HostFactory.cs プロジェクト: louisfeng/VsVim
        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
        }
コード例 #4
0
ファイル: HostFactory.cs プロジェクト: nligerakis/VsVim
        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
        }
コード例 #5
0
ファイル: VsVimHost.cs プロジェクト: honeyhoneywell/VsVim
        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);
        }
コード例 #6
0
ファイル: VsVimHost.cs プロジェクト: praveennet/VsVim
 internal VsVimHost(
     ITextBufferUndoManagerProvider undoManagerProvider,
     IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
     ITextManager textManager,
     SVsServiceProvider serviceProvider)
 {
     _undoManagerProvider = undoManagerProvider;
     _editorAdaptersFactoryService = editorAdaptersFactoryService;
     _dte = (_DTE)serviceProvider.GetService(typeof(_DTE));
     _textManager = textManager;
 }
コード例 #7
0
ファイル: VsCommandTarget.cs プロジェクト: louisfeng/VsVim
 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);
 }
コード例 #8
0
ファイル: VsVimHost.cs プロジェクト: rride/VsVim
 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;
 }
コード例 #9
0
ファイル: StandardCommandTarget.cs プロジェクト: aesire/VsVim
 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;
 }
コード例 #10
0
ファイル: VsCommandTarget.cs プロジェクト: louisfeng/VsVim
 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;
 }
コード例 #11
0
ファイル: TextManagerTest.cs プロジェクト: ericbock/VsVim
 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;
 }
コード例 #12
0
ファイル: VsVimHost.cs プロジェクト: rschatz/VsVim
 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;
 }
コード例 #13
0
ファイル: VsCommandTarget.cs プロジェクト: wmchristie/VsVim
 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;
 }
コード例 #14
0
 internal StandardCommandTargetFactory(ITextManager textManager, IDisplayWindowBrokerFactoryService displayWindowBrokerFactory)
 {
     _textManager = textManager;
     _displayWindowBrokerFactory = displayWindowBrokerFactory;
 }
コード例 #15
0
 public MatchesPresenter(ITextManager textManager) : base(textManager)
 {
     Matches = new List <MatchModel>();
     Teams   = new List <TeamModel>();
     Leagues = new List <LeagueModel>();
 }
コード例 #16
0
 internal NavigateToItemProviderFactory(ITextManager textManager)
 {
     _textManager            = textManager;
     _synchronizationContext = WindowsFormsSynchronizationContext.Current;
 }
コード例 #17
0
 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);
        }
コード例 #19
0
 public EntitySearchPresenter(ITextManager textManager) : base(textManager)
 {
 }
コード例 #20
0
ファイル: CounterManager.cs プロジェクト: marikci/WordCounter
 public CounterManager(ITextManager textManager)
 {
     _textManager     = textManager;
     _words           = new ConcurrentDictionary <string, int>();
     _threadSentences = new ConcurrentDictionary <int, int>();
 }
コード例 #21
0
ファイル: VsCommandTarget.cs プロジェクト: wmchristie/VsVim
        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;
        }
コード例 #22
0
 public LeaguePresenter(ITextManager textManager) : base(textManager)
 {
 }
コード例 #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;
 }
コード例 #24
0
 internal NavigateToItemProviderFactory(ITextManager textManager)
 {
     _textManager = textManager;
     _synchronizationContext = WindowsFormsSynchronizationContext.Current;
 }
コード例 #25
0
 public DeleteRowCommand(ILogger logger, ITextManager textManager, int lineIndex)
 {
     _textManager = textManager ?? throw new ArgumentNullException(nameof(textManager));
     _lineIndex   = lineIndex;
     _logger      = logger;
 }
コード例 #26
0
ファイル: GameManager.cs プロジェクト: StevePro7/3Dcity
 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;
 }
コード例 #27
0
ファイル: StandardCommandTarget.cs プロジェクト: aesire/VsVim
 internal StandardCommandTargetFactory(ITextManager textManager, IDisplayWindowBrokerFactoryService displayWindowBrokerFactory)
 {
     _textManager = textManager;
     _displayWindowBrokerFactory = displayWindowBrokerFactory;
 }
コード例 #28
0
 public MatchSearchPresenter(ITextManager textManager) : base(textManager)
 {
 }
コード例 #29
0
 public TextController(ITextManager textManager)
 {
     _textManager = textManager;
 }
コード例 #30
0
 public StadiumSearchPresenter(ITextManager textManager) : base(textManager)
 {
 }
コード例 #31
0
 public RefereePresenter(ITextManager textManager) : base(textManager)
 {
 }
コード例 #32
0
 public TeamSearchPresenter(ITextManager textManager) : base(textManager)
 {
 }
コード例 #33
0
 public TextService(ITextManager textManager)
 {
     _textManager = textManager;
 }
コード例 #34
0
ファイル: EventHandler.cs プロジェクト: Begunini/Notificall
 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();
 }
コード例 #35
0
ファイル: VsCommandTarget.cs プロジェクト: Yzzl/VsVim
        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);
        }
コード例 #36
0
 public ClientController(IWebHostEnvironment webHostEnvironment, ITextManager textManager)
 {
     _env       = webHostEnvironment;
     _txtconfig = textManager;
 }