public RtvsTelemetry(IPackageIndex packageIndex, IRToolsSettings settings, IREditorSettings editorSettings, ITelemetryService service = null) { _packageIndex = packageIndex; _settings = settings; _editorSettings = editorSettings; TelemetryService = service ?? VsAppShell.Current.GetService <ITelemetryService>(); }
public VariableView(IRToolsSettings settings, ICoreShell shell) { _settings = settings; _shell = shell; InitializeComponent(); _aggregator = _shell.ExportProvider.GetExportedValue <IObjectDetailsViewerAggregator>(); SetRootNode(VariableViewModel.Ellipsis); SortDirection = ListSortDirection.Ascending; RootTreeGrid.Sorting += RootTreeGrid_Sorting; var theme = shell.ExportProvider.GetExportedValue <IThemeUtilities>(); theme.SetImageBackgroundColor(RootTreeGrid, Brushes.ToolWindowBackgroundColorKey); theme.SetThemeScrollBars(RootTreeGrid); var workflow = VsAppShell.Current.ExportProvider.GetExportedValue <IRInteractiveWorkflowProvider>().GetOrCreate(); _session = workflow.RSession; _environmentProvider = new REnvironmentProvider(_session, shell.Services.MainThread); EnvironmentComboBox.DataContext = _environmentProvider; _environmentProvider.RefreshEnvironmentsAsync().DoNotWait(); }
public RProjectLoadHooks(UnconfiguredProject unconfiguredProject , [ImportMany("Microsoft.VisualStudio.ProjectSystem.Microsoft.VisualStudio.Shell.Interop.IVsProject")] IEnumerable <Lazy <IVsProject> > cpsIVsProjects , IProjectLockService projectLockService , IRInteractiveWorkflowProvider workflowProvider , IInteractiveWindowComponentContainerFactory componentContainerFactory , IRToolsSettings toolsSettings , IThreadHandling threadHandling , ISurveyNewsService surveyNews , [Import(AllowDefault = true)] IProjectItemDependencyProvider dependencyProvider , ICoreShell coreShell) { _unconfiguredProject = unconfiguredProject; _cpsIVsProjects = cpsIVsProjects; _projectLockService = projectLockService; _workflowProvider = workflowProvider; _toolsSettings = toolsSettings; _threadHandling = threadHandling; _surveyNews = surveyNews; _dependencyProvider = dependencyProvider; _coreShell = coreShell; _projectDirectory = unconfiguredProject.GetProjectDirectory(); unconfiguredProject.ProjectRenamedOnWriter += ProjectRenamedOnWriter; unconfiguredProject.ProjectUnloading += ProjectUnloading; _fileWatcher = new MsBuildFileSystemWatcher(_projectDirectory, "*", 25, 1000, _coreShell.Services.FileSystem, new RMsBuildFileSystemFilter(), coreShell.Services.Log); _fileWatcher.Error += FileWatcherError; Project = new FileSystemMirroringProject(unconfiguredProject, projectLockService, _fileWatcher, _dependencyProvider, coreShell.Services.Log); }
public void RunBrowserTest(WebBrowserRole role, Guid guid, string title, IRToolsSettings externalSettings, IRToolsSettings internalSettings) { var shell = Substitute.For <ICoreShell>(); var ps = Substitute.For <IProcessServices>(); var vswbs = Substitute.For <IVsWebBrowsingService>(); shell.Process().Returns(ps); shell.GetService <IVsWebBrowsingService>(typeof(SVsWebBrowsingService)).Returns(vswbs); var wbs = new WebBrowserServices(shell); wbs.OpenBrowser(role, _url); shell.Process().Received().Start(_url); ps.ClearReceivedCalls(); wbs = new WebBrowserServices(shell); wbs.OpenBrowser(role, _url); UIThreadHelper.Instance.DoEvents(); shell.Process().DidNotReceive().Start(_url); IVsWebBrowser vswb; IVsWindowFrame frame; vswbs.Received().CreateWebBrowser(Arg.Any <uint>(), guid, title, _url, null, out vswb, out frame); }
public static void Initialize(IPackageIndex packageIndex, IRToolsSettings settings, IREditorSettings editorSettings, ITelemetryService service = null) { if (Current == null) { Current = new RtvsTelemetry(packageIndex, settings, editorSettings, service); } }
public RProjectLoadHooks(UnconfiguredProject unconfiguredProject , [ImportMany("Microsoft.VisualStudio.ProjectSystem.Microsoft.VisualStudio.Shell.Interop.IVsProject")] IEnumerable <Lazy <IVsProject> > cpsIVsProjects , IProjectLockService projectLockService , IRInteractiveWorkflowProvider workflowProvider , IInteractiveWindowComponentContainerFactory componentContainerFactory , IRToolsSettings toolsSettings , IFileSystem fileSystem , IThreadHandling threadHandling , ISurveyNewsService surveyNews) { _unconfiguredProject = unconfiguredProject; _cpsIVsProjects = cpsIVsProjects; _workflowProvider = workflowProvider; _componentContainerFactory = componentContainerFactory; _toolsSettings = toolsSettings; _fileSystem = fileSystem; _threadHandling = threadHandling; _surveyNews = surveyNews; _projectDirectory = unconfiguredProject.GetProjectDirectory(); unconfiguredProject.ProjectUnloading += ProjectUnloading; _fileWatcher = new MsBuildFileSystemWatcher(_projectDirectory, "*", 25, 1000, fileSystem, new RMsBuildFileSystemFilter()); _fileWatcher.Error += FileWatcherError; Project = new FileSystemMirroringProject(unconfiguredProject, projectLockService, _fileWatcher); }
public ToggleMultilineHistorySelectionCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflowVisual interactiveWorkflow) : base(textView, RGuidList.RCmdSetGuid, RPackageCommandId.icmdToggleMultilineSelection, false) { _history = historyProvider.GetAssociatedRHistory(textView); _settings = interactiveWorkflow.Shell.GetService <IRToolsSettings>(); _interactiveWorkflow = interactiveWorkflow; }
public RProjectLoadHooks(UnconfiguredProject unconfiguredProject , [ImportMany("Microsoft.VisualStudio.ProjectSystem.Microsoft.VisualStudio.Shell.Interop.IVsProject")] IEnumerable<Lazy<IVsProject>> cpsIVsProjects , IProjectLockService projectLockService , IRInteractiveWorkflowProvider workflowProvider , IInteractiveWindowComponentContainerFactory componentContainerFactory , IRToolsSettings toolsSettings , IThreadHandling threadHandling , ISurveyNewsService surveyNews , [Import(AllowDefault = true)] IProjectItemDependencyProvider dependencyProvider , ICoreShell coreShell) { _unconfiguredProject = unconfiguredProject; _cpsIVsProjects = cpsIVsProjects; _projectLockService = projectLockService; _workflowProvider = workflowProvider; _toolsSettings = toolsSettings; _threadHandling = threadHandling; _surveyNews = surveyNews; _dependencyProvider = dependencyProvider; _coreShell = coreShell; _projectDirectory = unconfiguredProject.GetProjectDirectory(); unconfiguredProject.ProjectRenamedOnWriter += ProjectRenamedOnWriter; unconfiguredProject.ProjectUnloading += ProjectUnloading; _fileWatcher = new MsBuildFileSystemWatcher(_projectDirectory, "*", 25, 1000, _coreShell.Services.FileSystem, new RMsBuildFileSystemFilter(), coreShell.Services.Log); _fileWatcher.Error += FileWatcherError; Project = new FileSystemMirroringProject(unconfiguredProject, projectLockService, _fileWatcher, _dependencyProvider, coreShell.Services.Log); }
public WebBrowserServices(ICoreShell coreShell) { _coreShell = coreShell; _wbs = _coreShell.GetService <IVsWebBrowsingService>(typeof(SVsWebBrowsingService)); _ps = _coreShell.Process(); _settings = _coreShell.GetService <IRToolsSettings>(); }
public SaveHistoryCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflowVisual interactiveWorkflow) : base(textView, RGuidList.RCmdSetGuid, RPackageCommandId.icmdSaveHistory, false) { _ui = interactiveWorkflow.Shell.UI(); _interactiveWorkflow = interactiveWorkflow; _settings = _interactiveWorkflow.Shell.GetService <IRToolsSettings>(); _history = historyProvider.GetAssociatedRHistory(textView); }
public SearchWebForCurrentCommand( IRInteractiveWorkflow workflow, IActiveWpfTextViewTracker textViewTracker, IActiveRInteractiveWindowTracker activeReplTracker) : base(RGuidList.RCmdSetGuid, RPackageCommandId.icmdSearchWebForCurrent, workflow, textViewTracker, activeReplTracker, Resources.SearchWebFor) { _settings = workflow.Shell.GetService <IRToolsSettings>(); }
public AD7Property(AD7StackFrame stackFrame, IREvaluationResultInfo result, bool isSynthetic = false, bool isFrameEnvironment = false) { StackFrame = stackFrame; EvaluationResult = result; IsSynthetic = isSynthetic; IsFrameEnvironment = isFrameEnvironment; _children = Lazy.Create(CreateChildren); _reprToString = Lazy.Create(GetReprToString); _settings = stackFrame.Engine.Shell.GetService <IRToolsSettings>(); }
public RProjectLoadHooks(UnconfiguredProject unconfiguredProject, IProjectLockService projectLockService, IRInteractiveWorkflowProvider workflowProvider, IInteractiveWindowComponentContainerFactory componentContainerFactory, IRToolsSettings toolsSettings, IFileSystem fileSystem, IThreadHandling threadHandling) { _unconfiguredProject = unconfiguredProject; _workflowProvider = workflowProvider; _componentContainerFactory = componentContainerFactory; _toolsSettings = toolsSettings; _fileSystem = fileSystem; _threadHandling = threadHandling; _projectDirectory = unconfiguredProject.GetProjectDirectory(); unconfiguredProject.ProjectUnloading += ProjectUnloading; _fileWatcher = new MsBuildFileSystemWatcher(_projectDirectory, "*", 25, fileSystem, new RMsBuildFileSystemFilter()); Project = new FileSystemMirroringProject(unconfiguredProject, projectLockService, _fileWatcher); }
public VariableView(IRToolsSettings settings) { _settings = settings; InitializeComponent(); SortDirection = ListSortDirection.Ascending; var variableProvider = VsAppShell.Current.ExportProvider.GetExportedValue<IVariableDataProvider>(); SetRootNode(EvaluationWrapper.Ellipsis); _globalEnvSubscription = variableProvider.Subscribe(0, VariableProvider.GlobalEnvironmentExpression, OnGlobalEnvironmentEvaluation); RootTreeGrid.Sorting += RootTreeGrid_Sorting; }
public VariableView(IRToolsSettings settings) { _settings = settings; InitializeComponent(); SortDirection = ListSortDirection.Ascending; var variableProvider = VsAppShell.Current.ExportProvider.GetExportedValue <IVariableDataProvider>(); SetRootNode(EvaluationWrapper.Ellipsis); _globalEnvSubscription = variableProvider.Subscribe(0, VariableProvider.GlobalEnvironmentExpression, OnGlobalEnvironmentEvaluation); RootTreeGrid.Sorting += RootTreeGrid_Sorting; }
public WorkingDirectoryCommand(IRInteractiveWorkflowVisual interactiveWorkflow) : base(new[] { new CommandId(RGuidList.RCmdSetGuid, RPackageCommandId.icmdGetDirectoryList), new CommandId(RGuidList.RCmdSetGuid, RPackageCommandId.icmdSetWorkingDirectory) }, false) { _interactiveWorkflow = interactiveWorkflow; _settings = _interactiveWorkflow.Shell.GetService <IRToolsSettings>(); _session = interactiveWorkflow.RSession; _session.Connected += OnSessionConnected; _session.DirectoryChanged += OnCurrentDirectoryChanged; if (InitializationTask == null && _session.IsHostRunning) { InitializationTask = UpdateRUserDirectoryAsync(); } }
public void RunBrowserTest(WebBrowserRole role, Guid guid, string title, IRToolsSettings externalSettings, IRToolsSettings internalSettings) { var vswbs = Substitute.For<IVsWebBrowsingService>(); var ps = Substitute.For<IProcessServices>(); var wbs = new WebBrowserServices(vswbs, ps, externalSettings); wbs.OpenBrowser(role, _url); ps.Received().Start(_url); ps.ClearReceivedCalls(); wbs = new WebBrowserServices(vswbs, ps, internalSettings); wbs.OpenBrowser(role, _url); UIThreadHelper.Instance.DoEvents(); ps.DidNotReceive().Start(_url); IVsWebBrowser vswb; IVsWindowFrame frame; vswbs.Received().CreateWebBrowser(Arg.Any<uint>(), guid, title, _url, null, out vswb, out frame); }
public void RunBrowserTest(WebBrowserRole role, Guid guid, string title, IRToolsSettings externalSettings, IRToolsSettings internalSettings) { var vswbs = Substitute.For <IVsWebBrowsingService>(); var ps = Substitute.For <IProcessServices>(); var wbs = new WebBrowserServices(vswbs, ps, externalSettings); wbs.OpenBrowser(role, _url); ps.Received().Start(_url); ps.ClearReceivedCalls(); wbs = new WebBrowserServices(vswbs, ps, internalSettings); wbs.OpenBrowser(role, _url); ps.DidNotReceive().Start(_url); IVsWebBrowser vswb; IVsWindowFrame frame; vswbs.Received().CreateWebBrowser(Arg.Any <uint>(), guid, title, _url, null, out vswb, out frame); }
public VariableView(IRToolsSettings settings) { _settings = settings; InitializeComponent(); SetRootNode(EvaluationWrapper.Ellipsis); EnvironmentComboBox.ItemsSource = _defaultEnvironments; EnvironmentComboBox.SelectedIndex = 0; SortDirection = ListSortDirection.Ascending; RootTreeGrid.Sorting += RootTreeGrid_Sorting; var sessionProvider = VsAppShell.Current.ExportProvider.GetExportedValue <IRSessionProvider>(); _rSession = sessionProvider.GetInteractiveWindowRSession(); _environmentProvider = new REnvironmentProvider(_rSession); _environmentProvider.EnvironmentChanged += EnvironmentProvider_EnvironmentChanged; }
public VariableView(IRToolsSettings settings) { _settings = settings; InitializeComponent(); _aggregator = VsAppShell.Current.ExportProvider.GetExportedValue <IObjectDetailsViewerAggregator>(); SetRootNode(VariableViewModel.Ellipsis); SortDirection = ListSortDirection.Ascending; RootTreeGrid.Sorting += RootTreeGrid_Sorting; var sessionProvider = VsAppShell.Current.ExportProvider.GetExportedValue <IRSessionProvider>(); _session = sessionProvider.GetInteractiveWindowRSession(); _environmentProvider = new REnvironmentProvider(_session); EnvironmentComboBox.DataContext = _environmentProvider; _environmentProvider.RefreshEnvironmentsAsync().DoNotWait(); }
public VariableView(IRToolsSettings settings, ICoreShell shell) { _settings = settings; _shell = shell; InitializeComponent(); _aggregator = _shell.ExportProvider.GetExportedValue <IObjectDetailsViewerAggregator>(); SetRootNode(VariableViewModel.Ellipsis); SortDirection = ListSortDirection.Ascending; RootTreeGrid.Sorting += RootTreeGrid_Sorting; var workflow = _shell.ExportProvider.GetExportedValue <IRInteractiveWorkflowProvider>().GetOrCreate(); _session = workflow.RSession; _environmentProvider = new REnvironmentProvider(_session); EnvironmentComboBox.DataContext = _environmentProvider; _environmentProvider.RefreshEnvironmentsAsync().DoNotWait(); }
public VariableView(IRToolsSettings settings, ICoreShell shell) { _settings = settings; _shell = shell; _shell.UIThemeChanged += OnUIThemeChanged; InitializeComponent(); SetImageBackground(); _aggregator = _shell.GlobalServices.GetService <IObjectDetailsViewerAggregator>(); SetRootNode(VariableViewModel.Ellipsis); SortDirection = ListSortDirection.Ascending; RootTreeGrid.Sorting += RootTreeGrid_Sorting; var workflow = VsAppShell.Current.GlobalServices.GetService <IRInteractiveWorkflowProvider>().GetOrCreate(); _session = workflow.RSession; _environmentProvider = new REnvironmentProvider(_session, shell.Services.MainThread); EnvironmentComboBox.DataContext = _environmentProvider; _environmentProvider.RefreshEnvironmentsAsync().DoNotWait(); }
public VariableView(IRToolsSettings settings, ICoreShell shell) { _settings = settings; _shell = shell; InitializeComponent(); _aggregator = _shell.ExportProvider.GetExportedValue<IObjectDetailsViewerAggregator>(); SetRootNode(VariableViewModel.Ellipsis); SortDirection = ListSortDirection.Ascending; RootTreeGrid.Sorting += RootTreeGrid_Sorting; var theme = shell.ExportProvider.GetExportedValue<IThemeUtilities>(); theme.SetImageBackgroundColor(RootTreeGrid, Brushes.ToolWindowBackgroundColorKey); theme.SetThemeScrollBars(RootTreeGrid); var workflow = VsAppShell.Current.ExportProvider.GetExportedValue<IRInteractiveWorkflowProvider>().GetOrCreate(); _session = workflow.RSession; _environmentProvider = new REnvironmentProvider(_session, shell.Services.MainThread); EnvironmentComboBox.DataContext = _environmentProvider; _environmentProvider.RefreshEnvironmentsAsync().DoNotWait(); }
public VariableNode(IRToolsSettings settings, VariableViewModel evaluation) { _settings = settings; _evaluation = evaluation; }
public VariableNode(IRToolsSettings settings, EvaluationWrapper evaluation) { _settings = settings; _evaluation = evaluation; }
public RToolbar(DTE2 dte2, IRToolsSettings settings) { _dte2 = dte2; _settings = settings; }
public FileEditor(ICoreShell coreShell, IRToolsSettings settings, IVsEditorAdaptersFactoryService adapterService) { _coreShell = coreShell; _settings = settings; _adapterService = adapterService; }
public SurveyNewsOptions(ICoreShell coreShell) { _settings = coreShell.GetService <IRToolsSettings>(); }
public WebBrowserServices(IVsWebBrowsingService wbs, IProcessServices ps, IRToolsSettings settings) { _wbs = wbs; _ps = ps; _settings = settings; }
public SwitchToRClientCommand(IConnectionManager connectionManager, ICoreShell shell, IRToolsSettings settings) : base(RGuidList.RCmdSetGuid, RPackageCommandId.icmdSwitchToRClient) { _connectionManager = connectionManager; _shell = shell; _settings = settings; }
public ToggleMultilineHistorySelectionCommand(ITextView textView, IRHistoryProvider historyProvider, IRInteractiveWorkflow interactiveWorkflow, IRToolsSettings settings) : base(textView, RGuidList.RCmdSetGuid, RPackageCommandId.icmdToggleMultilineSelection, false) { _history = historyProvider.GetAssociatedRHistory(textView); _settings = settings; _interactiveWorkflow = interactiveWorkflow; }
public ShowDotPrefixedVariablesCommand(IRToolsSettings settings) : base(RGuidList.RCmdSetGuid, RPackageCommandId.icmdShowDotPrefixedVariables) { _settings = settings; }