Esempio n. 1
0
        public VariableGridHost() {
            InitializeComponent();

            _aggregator = VsAppShell.Current.ExportProvider.GetExportedValue<IObjectDetailsViewerAggregator>();
            _rSession = VsAppShell.Current.ExportProvider.GetExportedValue<IRInteractiveWorkflowProvider>().GetOrCreate().RSession;
            _rSession.Mutated += RSession_Mutated;
        }
Esempio n. 2
0
        public VariableGridHost()
        {
            InitializeComponent();

            _aggregator        = VsAppShell.Current.GlobalServices.GetService <IObjectDetailsViewerAggregator>();
            _rSession          = VsAppShell.Current.GlobalServices.GetService <IRInteractiveWorkflowProvider>().GetOrCreate().RSession;
            _rSession.Mutated += RSession_Mutated;
        }
Esempio n. 3
0
        public ViewersTest(BrokerFixture broker)
        {
            _sessionProvider = VsAppShell.Current.ExportProvider.GetExportedValue <IRSessionProvider>();
            _aggregator      = VsAppShell.Current.ExportProvider.GetExportedValue <IObjectDetailsViewerAggregator>();

            _workflow = VsAppShell.Current.ExportProvider.GetExportedValue <IRInteractiveWorkflowProvider>().GetOrCreate();
            _broker   = broker;
        }
Esempio n. 4
0
        public VariableGridHost()
        {
            InitializeComponent();

            _aggregator        = VsAppShell.Current.ExportProvider.GetExportedValue <IObjectDetailsViewerAggregator>();
            _rSession          = VsAppShell.Current.ExportProvider.GetExportedValue <IRSessionProvider>().GetInteractiveWindowRSession();
            _rSession.Mutated += RSession_Mutated;
        }
Esempio n. 5
0
        /// <summary>
        /// Create new instance of <see cref="VariableViewModel"/>
        /// </summary>
        /// <param name="evaluation">R session's evaluation result</param>
        /// <param name="truncateChildren">true to truncate children returned by GetChildrenAsync</param>
        public VariableViewModel(IREvaluationResultInfo evaluation, IObjectDetailsViewerAggregator aggregator, int index = -1, int? maxChildrenCount = null) :
            base(evaluation, maxChildrenCount) {
            _aggregator = aggregator;

            Index = index;
            var result = DebugEvaluation as IRValueInfo;
            if (result != null) {
                SetViewButtonStatus(result);
            }
        }
Esempio n. 6
0
        /// <summary>
        /// Create new instance of <see cref="VariableViewModel"/>
        /// </summary>
        /// <param name="evaluation">R session's evaluation result</param>
        /// <param name="truncateChildren">true to truncate children returned by GetChildrenAsync</param>
        public VariableViewModel(IREvaluationResultInfo evaluation, IServiceContainer services, int index = -1, int?maxChildrenCount = null) :
            base(evaluation, services, maxChildrenCount)
        {
            _aggregator = services.GetService <IObjectDetailsViewerAggregator>();
            Index       = index;
            var result = DebugEvaluation as IRValueInfo;

            if (result != null)
            {
                SetViewButtonStatus(result);
            }
        }
Esempio n. 7
0
        /// <summary>
        /// Create new instance of <see cref="VariableViewModel"/>
        /// </summary>
        /// <param name="evaluation">R session's evaluation result</param>
        /// <param name="truncateChildren">true to truncate children returned by GetChildrenAsync</param>
        public VariableViewModel(IREvaluationResultInfo evaluation, IObjectDetailsViewerAggregator aggregator, int index = -1, int?maxChildrenCount = null) :
            base(evaluation, maxChildrenCount)
        {
            _aggregator = aggregator;

            Index = index;
            var result = DebugEvaluation as IRValueInfo;

            if (result != null)
            {
                SetViewButtonStatus(result);
            }
        }
Esempio n. 8
0
        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();
        }
Esempio n. 9
0
        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();
        }
Esempio n. 10
0
        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();
        }
Esempio n. 11
0
        public VariableView(IServiceContainer services)
        {
            _settings           = services.GetService <IRSettings>();
            _services           = services;
            _ui                 = _services.UI();
            _ui.UIThemeChanged += OnUIThemeChanged;

            InitializeComponent();
            SetImageBackground();

            _aggregator = _services.GetService <IObjectDetailsViewerAggregator>();
            SetRootNode(VariableViewModel.Ellipsis);

            SortDirection         = ListSortDirection.Ascending;
            RootTreeGrid.Sorting += RootTreeGrid_Sorting;

            var workflow = _services.GetService <IRInteractiveWorkflowProvider>().GetOrCreate();

            _session = workflow.RSession;

            _environmentProvider            = new REnvironmentProvider(_session, _services.MainThread());
            EnvironmentComboBox.DataContext = _environmentProvider;
            _environmentProvider.RefreshEnvironmentsAsync().DoNotWait();
        }
Esempio n. 12
0
        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 ObjectDetailsViewerProvider(IObjectDetailsViewerAggregator aggregator, ICoreShell coreShell)
 {
     _aggregator = aggregator;
     _coreShell  = coreShell;
 }
Esempio n. 14
0
 public ViewersTest()
 {
     _sessionProvider = VsAppShell.Current.ExportProvider.GetExportedValue <IRSessionProvider>();
     _session         = _sessionProvider.GetOrCreate(Guid.NewGuid());
     _aggregator      = VsAppShell.Current.ExportProvider.GetExportedValue <IObjectDetailsViewerAggregator>();
 }
Esempio n. 15
0
 public VectorViewer(IObjectDetailsViewerAggregator aggregator, IDataObjectEvaluator evaluator) :
     base(aggregator, evaluator) { }
Esempio n. 16
0
 public GridViewerBase(IObjectDetailsViewerAggregator aggregator, IDataObjectEvaluator evaluator) :
     base(evaluator)
 {
     _aggregator = aggregator;
 }
Esempio n. 17
0
        public ViewersTest() {
            _aggregator = VsAppShell.Current.ExportProvider.GetExportedValue<IObjectDetailsViewerAggregator>();

            _workflow = VsAppShell.Current.ExportProvider.GetExportedValue<IRInteractiveWorkflowProvider>().GetOrCreate();
            _sessionProvider = _workflow.RSessions;
        }
Esempio n. 18
0
 public DebugGridViewProvider(IObjectDetailsViewerAggregator aggregator)
 {
     _aggregator = aggregator;
 }
        public static async Task <IObjectDetailsViewer> GetViewer(this IObjectDetailsViewerAggregator aggregator, IRSession session, string environmentExpression, string expression, CancellationToken cancellationToken = default(CancellationToken))
        {
            var preliminary = await session.TryEvaluateAndDescribeAsync(expression, TypeNameProperty | ClassesProperty | DimProperty | LengthProperty | FlagsProperty, null, cancellationToken) as IRValueInfo;

            return(preliminary != null?aggregator.GetViewer(preliminary) : null);
        }
 public ObjectDetailsViewerProvider(IObjectDetailsViewerAggregator aggregator, ICoreShell coreShell) {
     _aggregator = aggregator;
     _coreShell = coreShell;
 }
Esempio n. 21
0
 public VectorViewer(IObjectDetailsViewerAggregator aggregator, IDataObjectEvaluator evaluator) :
     base(aggregator, evaluator)
 {
 }
Esempio n. 22
0
 public DebugGridViewProvider(IObjectDetailsViewerAggregator aggregator) {
     _aggregator = aggregator;
 }
Esempio n. 23
0
 public ViewersTest(TestMethodFixture testMethod, IServiceContainer services) : base(services, true)
 {
     _testMethod = testMethod;
     _aggregator = Services.GetService <IObjectDetailsViewerAggregator>();
 }
Esempio n. 24
0
 public ObjectDetailsViewerProvider(IObjectDetailsViewerAggregator aggregator)
 {
     _aggregator = aggregator;
 }
Esempio n. 25
0
 public GridViewerBase(IObjectDetailsViewerAggregator aggregator, IDataObjectEvaluator evaluator) :
     base(evaluator) {
     _aggregator = aggregator;
 }