public RInteractiveWorkflow(IRSessionProvider sessionProvider , IRHistoryProvider historyProvider , IRPackageManagerProvider packagesProvider , IRPlotManagerProvider plotsProvider , IActiveWpfTextViewTracker activeTextViewTracker , IDebuggerModeTracker debuggerModeTracker , ICoreShell coreShell , IRSettings settings , Action onDispose) { _activeTextViewTracker = activeTextViewTracker; _debuggerModeTracker = debuggerModeTracker; _settings = settings; _onDispose = onDispose; Shell = coreShell; RSession = sessionProvider.GetOrCreate(GuidList.InteractiveWindowRSessionGuid); History = historyProvider.CreateRHistory(this); Packages = packagesProvider.CreateRPackageManager(sessionProvider, settings, this); Plots = plotsProvider.CreatePlotManager(sessionProvider, settings, this); _operations = new RInteractiveWorkflowOperations(this, _debuggerModeTracker, Shell); _activeTextViewTracker.LastActiveTextViewChanged += LastActiveTextViewChanged; RSession.Disconnected += RSessionDisconnected; }
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 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 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 RInteractiveWorkflow(IRSessionProvider sessionProvider , IConnectionManagerProvider connectionsProvider , IRHistoryProvider historyProvider , IRPackageManagerProvider packagesProvider , IRPlotManagerProvider plotsProvider , IActiveWpfTextViewTracker activeTextViewTracker , IDebuggerModeTracker debuggerModeTracker , IRHostBrokerConnector brokerConnector , ICoreShell coreShell , IRSettings settings , IWorkspaceServices wss , Action onDispose) { _activeTextViewTracker = activeTextViewTracker; _debuggerModeTracker = debuggerModeTracker; _settings = settings; _wss = wss; _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 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); }