public static IRInteractiveWorkflowProvider Create(string brokerConnectorName , IRSessionProvider sessionProvider = null , IConnectionManagerProvider connectionsProvider = null , IRHistoryProvider historyProvider = null , IRPackageManagerProvider packagesProvider = null , IRPlotManagerProvider plotsProvider = null , IActiveWpfTextViewTracker activeTextViewTracker = null , IDebuggerModeTracker debuggerModeTracker = null , IRHostBrokerConnector brokerConnector = null , ICoreShell shell = null , IRSettings settings = null , IWorkspaceServices wss = null) { sessionProvider = sessionProvider ?? new RSessionProviderMock(); connectionsProvider = connectionsProvider ?? ConnectionManagerProviderStubFactory.CreateDefault(); historyProvider = historyProvider ?? RHistoryProviderStubFactory.CreateDefault(); packagesProvider = packagesProvider ?? RPackageManagerProviderStubFactory.CreateDefault(); plotsProvider = plotsProvider ?? RPlotManagerProviderStubFactory.CreateDefault(); activeTextViewTracker = activeTextViewTracker ?? new ActiveTextViewTrackerMock(string.Empty, RContentTypeDefinition.ContentType); debuggerModeTracker = debuggerModeTracker ?? new VsDebuggerModeTracker(); brokerConnector = brokerConnector ?? new RHostBrokerConnectorMock(); shell = shell ?? VsAppShell.Current; settings = settings ?? RToolsSettings.Current; return(new TestRInteractiveWorkflowProvider( sessionProvider, connectionsProvider, historyProvider, packagesProvider, plotsProvider, activeTextViewTracker, debuggerModeTracker, brokerConnector, shell, settings, wss) { BrokerName = brokerConnectorName }); }
public TestRInteractiveWorkflowProvider(IRSessionProvider sessionProvider , IConnectionManagerProvider connectionManagerProvider , IRHistoryProvider historyProvider , IRPackageManagerProvider packagesProvider , IRPlotManagerProvider plotsProvider , IActiveWpfTextViewTracker activeTextViewTracker , IDebuggerModeTracker debuggerModeTracker // Required for the tests that create TestRInteractiveWorkflowProvider explicitly , [Import(AllowDefault = true)] IRHostBrokerConnector brokerConnector , ICoreShell shell , IRSettings settings , [Import(AllowDefault = true)] IWorkspaceServices wss ) { _sessionProvider = sessionProvider; _connectionManagerProvider = connectionManagerProvider; _historyProvider = historyProvider; _packagesProvider = packagesProvider; _plotsProvider = plotsProvider; _activeTextViewTracker = activeTextViewTracker; _debuggerModeTracker = debuggerModeTracker; _brokerConnector = brokerConnector; _shell = shell; _settings = settings; _wss = wss; }
public RInteractiveWorkflow(IRSessionProvider sessionProvider , IConnectionManagerProvider connectionsProvider , IRHistoryProvider historyProvider , IRPackageManagerProvider packagesProvider , IRPlotManagerProvider plotsProvider , IActiveWpfTextViewTracker activeTextViewTracker , IDebuggerModeTracker debuggerModeTracker , IRHostBrokerConnector brokerConnector , ICoreShell coreShell , IRSettings settings , Action onDispose) { _activeTextViewTracker = activeTextViewTracker; _debuggerModeTracker = debuggerModeTracker; _settings = settings; _onDispose = onDispose; Shell = coreShell; BrokerConnector = brokerConnector; RSession = sessionProvider.GetOrCreate(GuidList.InteractiveWindowRSessionGuid, brokerConnector); Connections = connectionsProvider.CreateConnectionManager(this); History = historyProvider.CreateRHistory(this); Packages = packagesProvider.CreateRPackageManager(sessionProvider, settings, this); Plots = plotsProvider.CreatePlotManager(settings, this); _operations = new RInteractiveWorkflowOperations(this, _debuggerModeTracker, Shell); _activeTextViewTracker.LastActiveTextViewChanged += LastActiveTextViewChanged; RSession.Disconnected += RSessionDisconnected; _debuggerModeTracker.EnterBreakMode += DebuggerEnteredBreakMode; _debuggerModeTracker.LeaveBreakMode += DebuggerLeftBreakMode; }
public VsRInteractiveWorkflowProvider(ICoreShell shell) { _shell = shell; _connectionsProvider = shell.GetService <IConnectionManagerProvider>(); _historyProvider = shell.GetService <IRHistoryProvider>(); _packagesProvider = shell.GetService <IRPackageManagerProvider>(); _plotsProvider = shell.GetService <IRPlotManagerProvider>(); _activeTextViewTracker = shell.GetService <IActiveWpfTextViewTracker>(); _debuggerModeTracker = shell.GetService <IDebuggerModeTracker>(); _connectionsProvider = shell.GetService <IConnectionManagerProvider>(); _shell.Terminating += OnApplicationTerminating; }
public TestRInteractiveWorkflowProvider(IConnectionManagerProvider connectionManagerProvider , IRHistoryProvider historyProvider , IRPackageManagerProvider packagesProvider , IRPlotManagerProvider plotsProvider , IActiveWpfTextViewTracker activeTextViewTracker , IDebuggerModeTracker debuggerModeTracker , ICoreShell shell) { _connectionManagerProvider = connectionManagerProvider; _historyProvider = historyProvider; _packagesProvider = packagesProvider; _plotsProvider = plotsProvider; _activeTextViewTracker = activeTextViewTracker; _debuggerModeTracker = debuggerModeTracker; _shell = shell; }
public RInteractiveWorkflow(IRSessionProvider sessionProvider , IConnectionManagerProvider connectionsProvider , IRHistoryProvider historyProvider , IRPackageManagerProvider packagesProvider , IRPlotManagerProvider plotsProvider , IActiveWpfTextViewTracker activeTextViewTracker , IDebuggerModeTracker debuggerModeTracker , ICoreShell coreShell , IRSettings settings , IWorkspaceServices wss , Action onDispose) { _activeTextViewTracker = activeTextViewTracker; _debuggerModeTracker = debuggerModeTracker; _settings = settings; _wss = wss; _onDispose = onDispose; Shell = coreShell; RSessions = sessionProvider; RSession = sessionProvider.GetOrCreate(GuidList.InteractiveWindowRSessionGuid); Connections = connectionsProvider.CreateConnectionManager(this); History = historyProvider.CreateRHistory(this); Packages = packagesProvider.CreateRPackageManager(settings, this); Plots = plotsProvider.CreatePlotManager(settings, this, new FileSystem()); _operations = new RInteractiveWorkflowOperations(this, _debuggerModeTracker, Shell); _activeTextViewTracker.LastActiveTextViewChanged += LastActiveTextViewChanged; RSession.Disconnected += RSessionDisconnected; _debuggerModeTracker.EnterBreakMode += DebuggerEnteredBreakMode; _debuggerModeTracker.LeaveBreakMode += DebuggerLeftBreakMode; _settings.PropertyChanged += OnSettingsChanged; _disposableBag = DisposableBag.Create <RInteractiveWorkflow>() .Add(() => _settings.PropertyChanged -= OnSettingsChanged) .Add(() => _debuggerModeTracker.EnterBreakMode -= DebuggerEnteredBreakMode) .Add(() => _debuggerModeTracker.LeaveBreakMode -= DebuggerLeftBreakMode) .Add(() => _activeTextViewTracker.LastActiveTextViewChanged -= LastActiveTextViewChanged) .Add(() => RSession.Disconnected -= RSessionDisconnected) .Add(Operations) .Add(Connections). Add(_onDispose); }
public TestRInteractiveWorkflowProvider(IConnectionManagerProvider connectionManagerProvider , IRHistoryProvider historyProvider , IRPackageManagerProvider packagesProvider , IRPlotManagerProvider plotsProvider , IActiveWpfTextViewTracker activeTextViewTracker , IDebuggerModeTracker debuggerModeTracker , ICoreShell shell , IRSettings settings) { _connectionManagerProvider = connectionManagerProvider; _historyProvider = historyProvider; _packagesProvider = packagesProvider; _plotsProvider = plotsProvider; _activeTextViewTracker = activeTextViewTracker; _debuggerModeTracker = debuggerModeTracker; _shell = shell; _settings = settings; }
public RInteractiveWorkflow(IConnectionManagerProvider connectionsProvider , IRHistoryProvider historyProvider , IRPackageManagerProvider packagesProvider , IRPlotManagerProvider plotsProvider , IActiveWpfTextViewTracker activeTextViewTracker , IDebuggerModeTracker debuggerModeTracker , ICoreShell coreShell , IRSettings settings) { _activeTextViewTracker = activeTextViewTracker; _debuggerModeTracker = debuggerModeTracker; _settings = settings; Shell = coreShell; RSessions = new RSessionProvider(coreShell.Services, new InteractiveWindowConsole(this)); RSession = RSessions.GetOrCreate(SessionGuids.InteractiveWindowRSessionGuid); RSession.RestartOnBrokerSwitch = true; Connections = connectionsProvider.CreateConnectionManager(this); History = historyProvider.CreateRHistory(this); Packages = packagesProvider.CreateRPackageManager(settings, this); Plots = plotsProvider.CreatePlotManager(settings, this, new FileSystem()); _operations = new RInteractiveWorkflowOperations(this, _debuggerModeTracker, Shell); _activeTextViewTracker.LastActiveTextViewChanged += LastActiveTextViewChanged; RSession.Disconnected += RSessionDisconnected; _debuggerModeTracker.EnterBreakMode += DebuggerEnteredBreakMode; _debuggerModeTracker.LeaveBreakMode += DebuggerLeftBreakMode; _settings.PropertyChanged += OnSettingsChanged; _disposableBag = DisposableBag.Create<RInteractiveWorkflow>() .Add(() => _settings.PropertyChanged -= OnSettingsChanged) .Add(() => _debuggerModeTracker.EnterBreakMode -= DebuggerEnteredBreakMode) .Add(() => _debuggerModeTracker.LeaveBreakMode -= DebuggerLeftBreakMode) .Add(() => _activeTextViewTracker.LastActiveTextViewChanged -= LastActiveTextViewChanged) .Add(() => RSession.Disconnected -= RSessionDisconnected) .Add(RSessions) .Add(Operations) .Add(Connections); }
public VsRInteractiveWorkflowProvider(IConnectionManagerProvider connectionsProvider , IRHistoryProvider historyProvider , IRPackageManagerProvider packagesProvider , IRPlotManagerProvider plotsProvider , IActiveWpfTextViewTracker activeTextViewTracker , IDebuggerModeTracker debuggerModeTracker , IApplicationShell shell , IRSettings settings) { _connectionsProvider = connectionsProvider; _historyProvider = historyProvider; _packagesProvider = packagesProvider; _plotsProvider = plotsProvider; _activeTextViewTracker = activeTextViewTracker; _debuggerModeTracker = debuggerModeTracker; _shell = shell; _settings = settings; _shell.Terminating += OnApplicationTerminating; }
public VsRInteractiveWorkflowProvider(IRSessionProvider sessionProvider , IConnectionManagerProvider connectionsProvider , IRHistoryProvider historyProvider , IRPackageManagerProvider packagesProvider , IRPlotManagerProvider plotsProvider , IActiveWpfTextViewTracker activeTextViewTracker , IDebuggerModeTracker debuggerModeTracker , ICoreShell shell , IWorkspaceServices wss) { _sessionProvider = sessionProvider; _connectionsProvider = connectionsProvider; _historyProvider = historyProvider; _packagesProvider = packagesProvider; _plotsProvider = plotsProvider; _activeTextViewTracker = activeTextViewTracker; _debuggerModeTracker = debuggerModeTracker; _shell = shell; _wss = wss; }
public VsRInteractiveWorkflowProvider(IConnectionManagerProvider connectionsProvider , IRHistoryProvider historyProvider , IRPackageManagerProvider packagesProvider , IRPlotManagerProvider plotsProvider , IActiveWpfTextViewTracker activeTextViewTracker , IDebuggerModeTracker debuggerModeTracker , IApplicationShell shell , IRSettings settings) { _connectionsProvider = connectionsProvider; _historyProvider = historyProvider; _packagesProvider = packagesProvider; _plotsProvider = plotsProvider; _activeTextViewTracker = activeTextViewTracker; _debuggerModeTracker = debuggerModeTracker; _shell = shell; _settings = settings; _shell.Terminating += OnApplicationTerminating; }
public RInteractiveWorkflow(IConnectionManagerProvider connectionsProvider , IRHistoryProvider historyProvider , IRPackageManagerProvider packagesProvider , IRPlotManagerProvider plotsProvider , IActiveWpfTextViewTracker activeTextViewTracker , IDebuggerModeTracker debuggerModeTracker , ICoreShell coreShell) { _activeTextViewTracker = activeTextViewTracker; _debuggerModeTracker = debuggerModeTracker; _settings = coreShell.GetService <IRSettings>(); _mainThread = coreShell.MainThread(); Shell = coreShell; var console = new InteractiveWindowConsole(this); Console = console; RSessions = new RSessionProvider(coreShell.Services, Console); RSession = RSessions.GetOrCreate(SessionNames.InteractiveWindow); Connections = connectionsProvider.CreateConnectionManager(this); History = historyProvider.CreateRHistory(this); Packages = packagesProvider.CreateRPackageManager(_settings, this); Plots = plotsProvider.CreatePlotManager(_settings, this, coreShell.FileSystem()); _operations = new RInteractiveWorkflowOperations(this, _debuggerModeTracker, Shell); _activeTextViewTracker.LastActiveTextViewChanged += LastActiveTextViewChanged; RSession.Disconnected += RSessionDisconnected; _settings.PropertyChanged += OnSettingsChanged; _disposableBag = DisposableBag.Create <RInteractiveWorkflow>() .Add(() => _settings.PropertyChanged -= OnSettingsChanged) .Add(() => _activeTextViewTracker.LastActiveTextViewChanged -= LastActiveTextViewChanged) .Add(() => RSession.Disconnected -= RSessionDisconnected) .Add(RSessions) .Add(Operations) .Add(Connections) .Add(console); }
public static TestRInteractiveWorkflowProvider Create(IConnectionManagerProvider connectionsProvider = null , IRHistoryProvider historyProvider = null , IRPackageManagerProvider packagesProvider = null , IRPlotManagerProvider plotsProvider = null , IActiveWpfTextViewTracker activeTextViewTracker = null , IDebuggerModeTracker debuggerModeTracker = null , ICoreShell shell = null , IRSettings settings = null) { connectionsProvider = connectionsProvider ?? ConnectionManagerProviderStubFactory.CreateDefault(); historyProvider = historyProvider ?? RHistoryProviderStubFactory.CreateDefault(); packagesProvider = packagesProvider ?? RPackageManagerProviderStubFactory.CreateDefault(); plotsProvider = plotsProvider ?? RPlotManagerProviderStubFactory.CreateDefault(); activeTextViewTracker = activeTextViewTracker ?? new ActiveTextViewTrackerMock(string.Empty, RContentTypeDefinition.ContentType); debuggerModeTracker = debuggerModeTracker ?? new VsDebuggerModeTracker(shell ?? Substitute.For <ICoreShell>()); shell = shell ?? VsAppShell.Current; return(new TestRInteractiveWorkflowProvider( connectionsProvider, historyProvider, packagesProvider, plotsProvider, activeTextViewTracker, debuggerModeTracker, shell)); }
public static TestRInteractiveWorkflowProvider Create(IConnectionManagerProvider connectionsProvider = null , IRHistoryProvider historyProvider = null , IRPackageManagerProvider packagesProvider = null , IRPlotManagerProvider plotsProvider = null , IActiveWpfTextViewTracker activeTextViewTracker = null , IDebuggerModeTracker debuggerModeTracker = null , ICoreShell shell = null , IRSettings settings = null) { connectionsProvider = connectionsProvider ?? ConnectionManagerProviderStubFactory.CreateDefault(); historyProvider = historyProvider ?? RHistoryProviderStubFactory.CreateDefault(); packagesProvider = packagesProvider ?? RPackageManagerProviderStubFactory.CreateDefault(); plotsProvider = plotsProvider ?? RPlotManagerProviderStubFactory.CreateDefault(); activeTextViewTracker = activeTextViewTracker ?? new ActiveTextViewTrackerMock(string.Empty, RContentTypeDefinition.ContentType); debuggerModeTracker = debuggerModeTracker ?? new VsDebuggerModeTracker(); shell = shell ?? VsAppShell.Current; settings = settings ?? RToolsSettings.Current; return new TestRInteractiveWorkflowProvider( connectionsProvider, historyProvider, packagesProvider, plotsProvider, activeTextViewTracker, debuggerModeTracker, shell, settings); }
public RInteractiveWorkflow(IConnectionManagerProvider connectionsProvider , IContainerManagerProvider containerProvider , IRHistoryProvider historyProvider , IRPackageManagerProvider packagesProvider , IRPlotManagerProvider plotsProvider , IActiveWpfTextViewTracker activeTextViewTracker , IDebuggerModeTracker debuggerModeTracker , IServiceManager services) { _services = services .AddService <IRInteractiveWorkflow>(this) .AddService <IConsole, InteractiveWindowConsole>() .AddService <IRSessionProvider, RSessionProvider>() .AddService(s => connectionsProvider.CreateConnectionManager(this)) .AddService(s => containerProvider.CreateContainerManager(this)) .AddService(s => historyProvider.CreateRHistory(this)) .AddService(s => packagesProvider.CreateRPackageManager(this)) .AddService(s => plotsProvider.CreatePlotManager(this)); _settings = _services.GetService <IRSettings>(); _mainThread = _services.MainThread(); _operations = new RInteractiveWorkflowOperations(this, debuggerModeTracker, Services); RSession = RSessions.GetOrCreate(SessionNames.InteractiveWindow); _settings.PropertyChanged += OnSettingsChanged; activeTextViewTracker.LastActiveTextViewChanged += LastActiveTextViewChanged; RSession.Disconnected += RSessionDisconnected; _disposableBag = DisposableBag.Create <RInteractiveWorkflow>() .Add(() => _settings.PropertyChanged -= OnSettingsChanged) .Add(() => activeTextViewTracker.LastActiveTextViewChanged -= LastActiveTextViewChanged) .Add(() => RSession.Disconnected -= RSessionDisconnected) .Add(Operations) .Add(_services); }