예제 #1
0
        public ConnectionManager(IStatusBar statusBar, IRSettings settings, IRInteractiveWorkflow interactiveWorkflow) {
            _statusBar = statusBar;
            _sessionProvider = interactiveWorkflow.RSessions;
            _settings = settings;
            _interactiveWorkflow = interactiveWorkflow;
            _shell = interactiveWorkflow.Shell;
            _securityService = _shell.Services.Security;

            _statusBarViewModel = new ConnectionStatusBarViewModel(this, interactiveWorkflow.Shell);
            _hostLoadIndicatorViewModel = new HostLoadIndicatorViewModel(_sessionProvider, interactiveWorkflow.Shell);

            _disposableBag = DisposableBag.Create<ConnectionManager>()
                .Add(_statusBarViewModel)
                .Add(_hostLoadIndicatorViewModel)
                .Add(() => _sessionProvider.BrokerStateChanged -= BrokerStateChanged)
                .Add(() => _interactiveWorkflow.ActiveWindowChanged -= ActiveWindowChanged);

            _sessionProvider.BrokerStateChanged += BrokerStateChanged;
            _interactiveWorkflow.ActiveWindowChanged += ActiveWindowChanged;

            // Get initial values
            var connections = CreateConnectionList();
            _connections = new ConcurrentDictionary<string, IConnection>(connections);

            UpdateRecentConnections(save: false);
            CompleteInitializationAsync().DoNotWait();
        }
예제 #2
0
        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 ConnectionManagerControl(ICoreShell coreShell) {
            InitializeComponent();

            var theme = coreShell.ExportProvider.GetExportedValue<IThemeUtilities>();
            theme.SetImageBackgroundColor(this, Brushes.ToolWindowBackgroundColorKey);
            theme.SetThemeScrollBars(this);
        }
예제 #4
0
        public void LaunchRClientSetup(ICoreShell coreShell, IFileDownloader downloader = null) {
            coreShell.Services.Telemetry.ReportEvent(TelemetryArea.Configuration, RtvsTelemetry.ConfigurationEvents.RClientInstallYes);
            downloader = downloader ?? new FileDownloader();

            string downloadError = null;
            var rClientExe = Path.Combine(Path.GetTempPath(), "RClientSetup.exe");

            LongOperationNotification.ShowWaitingPopup(Resources.DownloadingRClientInstaller, new LongAction[] {
                new LongAction() {
                    Name = Resources.DownloadingRClientInstaller,
                    Action = (o, ct) => {
                        downloadError = downloader.Download("http://go.microsoft.com/fwlink/?LinkId=800048", rClientExe, ct);
                    },
                }, 
            }, coreShell.Services.Log);

            if (!string.IsNullOrEmpty(downloadError)) {
                var errorMessage = string.Format(CultureInfo.InvariantCulture, Resources.Error_UnableToDownloadRClient, downloadError);
                coreShell.ShowErrorMessage(errorMessage);
                coreShell.Services.Telemetry.ReportEvent(TelemetryArea.Configuration, RtvsTelemetry.ConfigurationEvents.RClientDownloadFailed, errorMessage);
                coreShell.Services.Log.WriteAsync(LogVerbosity.Minimal, MessageCategory.Error, "Microsoft R Client download error: " + errorMessage).DoNotWait();
            } else {
                // Suppress 'Operation canceled by the user' if user clicks 'No' to elevation dialog.
                try {
                    coreShell.ShowMessage(Resources.PleaseRestartVisualStudioAfterRClientSetup, MessageButtons.OK);
                    coreShell.Services.ProcessServices.Start(rClientExe);
                } catch (Win32Exception ex) {
                    if((uint)ex.NativeErrorCode == 0x800704C7) {
                        coreShell.Services.Telemetry.ReportEvent(TelemetryArea.Configuration, RtvsTelemetry.ConfigurationEvents.RClientInstallCancel);
                    }
                }
            }
        }
예제 #5
0
        public GotoBraceCommand(ITextView textView, ITextBuffer textBuffer, ICoreShell shell) :
            base(textView, _commands, false) {
            var importComposer = new ContentTypeImportComposer<IBraceMatcherProvider>(shell.CompositionService);
            _braceMatcherProvider = importComposer.GetImport(textBuffer.ContentType.TypeName);

            TextBuffer = textBuffer;
        }
예제 #6
0
        public TreeValidator(IEditorTree editorTree, ICoreShell shell) {
#if DEBUG
            TraceValidation.Enabled = false;
#endif

            _editorTree = editorTree;

            _editorTree.NodesRemoved += OnNodesRemoved;
            _editorTree.UpdateCompleted += OnTreeUpdateCompleted;
            _editorTree.Closing += OnTreeClose;

            _shell = shell;

            _syntaxCheckEnabled = IsSyntaxCheckEnabled(_editorTree.TextBuffer);

            // Advise to settings changed *after* accessing the RSettings, 
            // since accessing the host application (VS) settings object may 
            // cause it fire Changed notification in some cases.
            REditorSettings.Changed += OnSettingsChanged;

            // We don't want to start validation right away since it may 
            // interfere with the editor perceived startup performance.

            StartValidationNextIdle();
            ValidationResults = new ConcurrentQueue<IValidationError>();

            ServiceManager.AddService<TreeValidator>(this, editorTree.TextBuffer, shell);
        }
예제 #7
0
        public RPlotHistoryViewModel(IRPlotManager plotManager, ICoreShell shell) {
            if (plotManager == null) {
                throw new ArgumentNullException(nameof(plotManager));
            }

            if (shell == null) {
                throw new ArgumentNullException(nameof(shell));
            }

            _plotManager = plotManager;
            _shell = shell;

            _disposableBag = DisposableBag.Create<RPlotHistoryViewModel>()
                .Add(() => _plotManager.DeviceAdded -= DeviceAdded)
                .Add(() => _plotManager.DeviceRemoved -= DeviceRemoved);

            _plotManager.DeviceAdded += DeviceAdded;
            _plotManager.DeviceRemoved += DeviceRemoved;

            foreach (var group in _plotManager.GetAllPlots().GroupBy(p => p.ParentDevice)) {
                SubscribeDeviceEvents(group.Key);
                foreach (var plot in group) {
                    Entries.Add(new RPlotHistoryEntryViewModel(_plotManager, _shell, plot, plot.Image));
                }
            }
        }
 public InternalFunctionPeekResultSource(string sourceFileName, Span sourceSpan, string functionName, InternalFunctionPeekItem peekItem, ICoreShell shell) {
     _peekItem = peekItem;
     _shell = shell;
     // Start asynchronous function fetching so by the time FindResults 
     // is called the task may be already completed or close to that.
     LookupTask = FindFunctionAsync(sourceFileName, sourceSpan, functionName);
 }
예제 #9
0
 public static CommandTargetProxy GetProxyTarget(ITextView textView, ICoreShell coreShell) {
     var proxy = ServiceManager.GetService<CommandTargetProxy>(textView);
     if (proxy == null) {
         proxy = new CommandTargetProxy(textView, coreShell);
     }
     return proxy;
 }
예제 #10
0
        public RPlotHistoryVisualComponent(IRPlotManager plotManager, ICommandTarget controller, IVisualComponentContainer<IRPlotHistoryVisualComponent> container, ICoreShell coreShell) {
            if (plotManager == null) {
                throw new ArgumentNullException(nameof(plotManager));
            }

            if (container == null) {
                throw new ArgumentNullException(nameof(container));
            }

            if (coreShell == null) {
                throw new ArgumentNullException(nameof(coreShell));
            }

            _plotManager = plotManager;
            _viewModel = new RPlotHistoryViewModel(plotManager, coreShell);
            _shell = coreShell;

            var control = new RPlotHistoryControl {
                DataContext = _viewModel
            };

            _disposableBag = DisposableBag.Create<RPlotDeviceVisualComponent>()
                .Add(() => control.ContextMenuRequested -= Control_ContextMenuRequested);

            control.ContextMenuRequested += Control_ContextMenuRequested;

            Control = control;
            Controller = controller;
            Container = container;
        }
예제 #11
0
        /// <summary>
        /// Create delayed idle time action
        /// </summary>
        /// <param name="action">Action to execute on idle</param>
        /// <param name="delay">Minimum number of milliseconds to wait before executing the action</param>
        /// <param name="tag">Object that uniquely identifies the action. Typically creator object.</param>
        /// <param name="shell"></param>
        public static void Create(Action action, int delay, object tag, ICoreShell shell) {
            IdleTimeAction existingAction;

            if (!_idleActions.TryGetValue(tag, out existingAction)) {
                existingAction = new IdleTimeAction(action, delay, tag, shell);
                _idleActions[tag] = existingAction;
            }
        }
예제 #12
0
        private IdleTimeAction(Action action, int delay, object tag, ICoreShell shell) {
            _action = action;
            _delay = delay;
            _tag = tag;
            _shell = shell;

            ConnectToIdle();
        }
예제 #13
0
        public HostLoadIndicatorViewModel(IRSessionProvider sessionProvider, ICoreShell shell) {
            _sessionProvider = sessionProvider;
            _shell = shell;
            _disposableBag = DisposableBag.Create<HostLoadIndicatorViewModel>()
                .Add(() => _sessionProvider.HostLoadChanged -= OnHostLoadChanged);

            _sessionProvider.HostLoadChanged += OnHostLoadChanged;
        }
예제 #14
0
        public static EditorTree MakeTree(ICoreShell coreShell, string expression) {
            TextBufferMock textBuffer = new TextBufferMock(expression, RContentTypeDefinition.ContentType);

            var tree = new EditorTree(textBuffer, coreShell);
            tree.Build();

            return tree;
        }
예제 #15
0
 public RSuggestedActionSource(ITextView textView, ITextBuffer textBuffer, IEnumerable<IRSuggestedActionProvider> suggestedActionProviders, ICoreShell shell) {
     _textBuffer = textBuffer;
     _textView = textView;
     _textView.Caret.PositionChanged += OnCaretPositionChanged;
     _suggestedActionProviders = suggestedActionProviders;
     _document = REditorDocument.TryFromTextBuffer(_textBuffer);
     ServiceManager.AddService(this, _textView, shell);
 }
예제 #16
0
        public SProcGeneratorTest(PackageTestFilesFixture files) {
            _files = files;
            _coreShell = Substitute.For<ICoreShell>();
            _pss = Substitute.For<IProjectSystemServices>();

            _project = Substitute.For<EnvDTE.Project>();
            _project.FullName.Returns(Path.Combine(_files.DestinationPath, sqlProjectName));
        }
 public VsRInteractiveWindowComponentContainerFactory(
     Lazy<IVsInteractiveWindowFactory> vsInteractiveWindowFactory,
     IContentTypeRegistryService contentTypeRegistryService,
     ICoreShell shell) {
     _vsInteractiveWindowFactoryLazy = vsInteractiveWindowFactory;
     _contentTypeRegistryService = contentTypeRegistryService;
     _shell = shell;
 }
예제 #18
0
        public static MdMainController Attach(ITextView textView, ITextBuffer textBuffer, ICoreShell coreShell) {
            MdMainController controller = FromTextView(textView);
            if (controller == null) {
                controller = new MdMainController(textView, textBuffer, coreShell);
            }

            return controller;
        }
예제 #19
0
 public TreeUpdateTask(EditorTree editorTree, ICoreShell shell) {
     _editorTree = editorTree;
     _shell = shell;
     if (_shell != null) {
         _shell.Idle += OnIdle;
     }
     
 }
예제 #20
0
 public static ISuggestedActionsSource FromViewAndBuffer(ITextView textView, ITextBuffer textBuffer, ICoreShell shell) {
     var suggestedActionsSource = ServiceManager.GetService<RSuggestedActionSource>(textView);
     if (suggestedActionsSource == null) {
         IEnumerable<IRSuggestedActionProvider> suggestedActionProviders = ComponentLocator<IRSuggestedActionProvider>.ImportMany(shell.CompositionService).Select(p => p.Value);
         suggestedActionsSource = new RSuggestedActionSource(textView, textBuffer, suggestedActionProviders, shell);
     }
     return suggestedActionsSource;
 }
예제 #21
0
        public void Initialize(ITextView view, IEditorOperations editorOperations, ITextBufferUndoManager undoManager, ICoreShell coreShell) {
            Debug.Assert(view != null, "view must not be null");
            Debug.Assert(editorOperations != null, "editor operations must not be null");

            _view = view;
            _editorOperations = editorOperations;
            _undoManager = undoManager;
            _braceCompletionTarget = new BraceCompletionCommandTarget(view, coreShell);
        }
예제 #22
0
        /// <summary>
        /// Creates contained language host with default settings.
        /// </summary>
        /// <param name="document">Markdown editor document</param>
        /// <param name="textBuffer">Contained language text buffer</param>
        /// <param name="coreShell"></param>
        public MdContainedLanguageHost(IEditorDocument document, ITextBuffer textBuffer, ICoreShell coreShell) {
            _textBuffer = textBuffer;
            _coreShell = coreShell;

            _document = document;
            _document.DocumentClosing += OnDocumentClosing;

            ServiceManager.AddService<IContainedLanguageHost>(this, textBuffer, coreShell);
        }
 public RInteractiveEvaluator(IRSession session, IRHistory history, ICoreShell coreShell, IRSettings settings) {
     History = history;
     Session = session;
     Session.Output += SessionOnOutput;
     Session.Disconnected += SessionOnDisconnected;
     Session.BeforeRequest += SessionOnBeforeRequest;
     _coreShell = coreShell;
     _settings = settings;
 }
예제 #24
0
        public SettingsPageViewModel(IConfigurationSettingCollection settings, ICoreShell coreShell, IFileSystem fileSystem) {
            Check.ArgumentNull(nameof(settings), settings);
            Check.ArgumentNull(nameof(coreShell), coreShell);
            Check.ArgumentNull(nameof(fileSystem), fileSystem);

            _settings = settings;
            _coreShell = coreShell;
            _fileSystem = fileSystem;
        }
 public ConnectionManagerVisualComponent(IConnectionManager connectionManager, IVisualComponentContainer<IConnectionManagerVisualComponent> container, ICoreShell coreShell) {
     _viewModel = new ConnectionManagerViewModel(connectionManager, coreShell);
     Container = container;
     Controller = null;
     var control = new ConnectionManagerControl(coreShell) {
         DataContext = _viewModel
     };
     Control = control;
 }
예제 #26
0
        public MdEditorDocument(ITextBuffer textBuffer, IProjectionBufferFactoryService projectionBufferFactoryService, IContentTypeRegistryService contentTypeRegistryService, ICoreShell coreShell) {

            this.TextBuffer = textBuffer;
            ServiceManager.AddService(this, TextBuffer, coreShell);

            _projectionBufferManager = new ProjectionBufferManager(textBuffer, 
                        projectionBufferFactoryService, contentTypeRegistryService,
                        coreShell, MdProjectionContentTypeDefinition.ContentType, RContentTypeDefinition.ContentType);
            ContainedLanguageHandler = _rLanguageHandler = new RLanguageHandler(textBuffer, _projectionBufferManager, coreShell);
        }
예제 #27
0
        public RSessionCallback(IInteractiveWindow interactiveWindow, IRSession session, IRSettings settings, ICoreShell coreShell, IFileSystem fileSystem) {
            _interactiveWindow = interactiveWindow;
            _session = session;
            _settings = settings;
            _coreShell = coreShell;
            _fileSystem = fileSystem;

            var workflowProvider = _coreShell.ExportProvider.GetExportedValue<IRInteractiveWorkflowProvider>();
            _workflow = workflowProvider.GetOrCreate();
        }
예제 #28
0
        public ConnectionStatusBarViewModel(IConnectionManager connectionManager, ICoreShell shell) {
            _connectionManager = connectionManager;
            _shell = shell;
            _disposableBag = DisposableBag.Create<ConnectionStatusBarViewModel>()
                .Add(() => connectionManager.ConnectionStateChanged -= ConnectionStateChanged);

            connectionManager.ConnectionStateChanged += ConnectionStateChanged;
            IsConnected = connectionManager.IsConnected;
            SelectedConnection = connectionManager.ActiveConnection?.Name;
        }
예제 #29
0
        public QuickInfoController(ITextView textView, IList<ITextBuffer> subjectBuffers, IQuickInfoBroker quickInfoBroker, ICoreShell shell) {
            _quickInfoBroker = quickInfoBroker;
            _textView = textView;
            _subjectBuffers = subjectBuffers;
            _shell = shell;

            _textView.MouseHover += OnViewMouseHover;
            _textView.TextBuffer.Changing += OnTextBufferChanging;

            ServiceManager.AddService(this, textView, shell);
        }
예제 #30
0
        private RCompletionController(
            ITextView textView,
            IList<ITextBuffer> subjectBuffers,
            ICompletionBroker completionBroker,
            IQuickInfoBroker quickInfoBroker,
            ISignatureHelpBroker signatureBroker,
            ICoreShell shell)
            : base(textView, subjectBuffers, completionBroker, quickInfoBroker, signatureBroker, shell) {
            _textBuffer = subjectBuffers[0];

            ServiceManager.AddService<RCompletionController>(this, TextView, shell);
        }
예제 #31
0
 public VsRTextViewConnectionListener(ICoreShell coreShell) : base(coreShell.Services)
 {
     _adapterService = coreShell.GetService <IVsEditorAdaptersFactoryService>();
 }
예제 #32
0
 public RSuggestedActionSource(ITextView textView, ITextBuffer textBuffer, IEnumerable <IRSuggestedActionProvider> suggestedActionProviders, ICoreShell shell)
 {
     _textBuffer = textBuffer;
     _textView   = textView;
     _textView.Caret.PositionChanged += OnCaretPositionChanged;
     _suggestedActionProviders        = suggestedActionProviders;
     _document = REditorDocument.TryFromTextBuffer(_textBuffer);
     ServiceManager.AddService(this, _textView, shell);
 }
예제 #33
0
        public static MdMainController Attach(ITextView textView, ITextBuffer textBuffer, ICoreShell coreShell)
        {
            MdMainController controller = FromTextView(textView);

            if (controller == null)
            {
                controller = new MdMainController(textView, textBuffer, coreShell);
            }

            return(controller);
        }
예제 #34
0
        public static async Task ShowErrorMessageAsync(this ICoreShell coreShell, string message, CancellationToken cancellationToken = default(CancellationToken))
        {
            await coreShell.SwitchToMainThreadAsync(cancellationToken);

            coreShell.ShowErrorMessage(message);
        }
예제 #35
0
 public SettingPropertyDescriptor(ICoreShell coreShell, IConfigurationSetting setting) :
     base(setting.Name, null)
 {
     _coreShell = coreShell;
     Setting    = setting;
 }
예제 #36
0
 public DacPackageServicesProvider(ICoreShell coreShell, IFileExtensionRegistryService fers, IContentTypeRegistryService ctrs)
 {
     _coreShell = coreShell;
     _fers      = fers;
     _ctrs      = ctrs;
 }
예제 #37
0
 public RLanguageHandler(ITextBuffer textBuffer, IProjectionBufferManager projectionBufferManager, ICoreShell coreShell) :
     base(textBuffer, coreShell)
 {
     _projectionBufferManager = projectionBufferManager;
     _coreShell = coreShell;
     UpdateProjections();
 }
예제 #38
0
 public ParameterNameCompletionProvider(ICoreShell shell)
 {
     _shell = shell;
 }
예제 #39
0
 public CommonControllerFactory(ICoreShell shell)
 {
     _shell = shell;
 }
예제 #40
0
 public InteractiveWindowConsole(ICoreShell coreShell, Lazy <IRInteractiveWorkflow> workflowLazy)
 {
     _coreShell    = coreShell;
     _workflowLazy = workflowLazy;
 }
 public InteractiveWindowComponentContainerFactoryMock(ICoreShell shell)
 {
     _shell = shell;
 }
예제 #42
0
 public ManageDsnCommand(ICoreShell shell, IRInteractiveWorkflow workflow) :
     base(RPackageCommandId.icmdManageDsn, workflow)
 {
     _shell = shell;
 }
예제 #43
0
 public SwitchToConnectionCommand(IRInteractiveWorkflow workflow, IRSettings settings)
 {
     _settings          = settings;
     _connectionManager = workflow.Connections;
     _shell             = workflow.Shell;
 }
예제 #44
0
 public VsRHistoryTextViewConnectionListener(ICoreShell coreShell) : base(coreShell.Services)
 {
 }
예제 #45
0
 public ContentTypeServiceLocator(ICoreShell coreShell)
 {
     _compositionService = coreShell.GetService <ICompositionService>();
     _ctrs = coreShell.GetService <IContentTypeRegistryService>();
 }
예제 #46
0
        public RInteractiveEvaluator(IRSessionProvider sessionProvider, IRSession session, IRHistory history, IConnectionManager connections, ICoreShell coreShell, IRSettings settings, IConsole console)
        {
            History = history;
            Session = session;

            _sessionProvider  = sessionProvider;
            _connections      = connections;
            _coreShell        = coreShell;
            _settings         = settings;
            _console          = console;
            _evaluatorRequest = new CountdownDisposable();
            _fs = _coreShell.FileSystem();

            _disposableBag
            .Add(() => Session.Output                 -= SessionOnOutput)
            .Add(() => Session.Connected              -= SessionOnConnected)
            .Add(() => Session.Disconnected           -= SessionOnDisconnected)
            .Add(() => Session.BeforeRequest          -= SessionOnBeforeRequest)
            .Add(() => Session.AfterRequest           -= SessionOnAfterRequest)
            .Add(() => _sessionProvider.BrokerChanged -= OnBrokerChanging);

            _sessionProvider.BrokerChanging += OnBrokerChanging;

            Session.Output        += SessionOnOutput;
            Session.Connected     += SessionOnConnected;
            Session.Disconnected  += SessionOnDisconnected;
            Session.BeforeRequest += SessionOnBeforeRequest;
            Session.AfterRequest  += SessionOnAfterRequest;
        }
 public TestRInteractiveWindowComponentContainerFactory(IInteractiveWindowFactoryService interactiveWindowFactory, IContentTypeRegistryService contentTypeRegistryService, ICoreShell shell)
 {
     _contentTypeRegistryService = contentTypeRegistryService;
     _shell = shell;
     InteractiveWindowFactory = interactiveWindowFactory;
 }
예제 #48
0
 public SwitchToConnectionCommand(IRInteractiveWorkflow workflow)
 {
     _connnectionManager = workflow.Connections;
     _shell = workflow.Shell;
 }
 public RSuggestedActionsSourceProvider(ICoreShell shell)
 {
     _shell = shell;
 }
예제 #50
0
 public static MainThreadAwaitable SwitchToMainThreadAsync(this ICoreShell coreShell, CancellationToken cancellationToken = default(CancellationToken))
 => ((IMainThread)coreShell).SwitchToAsync(cancellationToken);
예제 #51
0
 public RCompletionSourceProvider(ICoreShell shell)
 {
     _shell = shell;
 }
예제 #52
0
 public RSessionCallback(IInteractiveWindow interactiveWindow, IRSession session, IRSettings settings, ICoreShell coreShell, IFileSystem fileSystem)
 {
     _interactiveWindow = interactiveWindow;
     _session           = session;
     _settings          = settings;
     _coreShell         = coreShell;
     _fileSystem        = fileSystem;
 }
예제 #53
0
        public PlotManagerWindowPane(IRPlotManager plotManager, IRSession session, IRSettings settings, ICoreShell coreShell)
        {
            _plotManager = plotManager;
            _session     = session;
            _settings    = settings;
            _coreShell   = coreShell;

            // this value matches with icmdShowPlotWindow's Icon in VSCT file
            BitmapImageMoniker = KnownMonikers.LineChart;
            Caption            = Resources.PlotWindowCaption;
            ToolBar            = new CommandID(RGuidList.RCmdSetGuid, RPackageCommandId.plotWindowToolBarId);
        }
예제 #54
0
        public static async Task <MessageButtons> ShowMessageAsync(this ICoreShell coreShell, string message, MessageButtons buttons, CancellationToken cancellationToken = default(CancellationToken))
        {
            await coreShell.SwitchToMainThreadAsync(cancellationToken);

            return(coreShell.ShowMessage(message, buttons));
        }
예제 #55
0
 public TestMdTextViewConnectionListener(ICoreShell coreShell) : base(coreShell.Services)
 {
 }
예제 #56
0
 public TestRPackageManagerVisualComponentContainerFactory(ISearchControlProvider searchControlProvider, IRSettings settings, ICoreShell coreShell)
 {
     _searchControlProvider = searchControlProvider;
     _settings  = settings;
     _coreShell = coreShell;
 }
예제 #57
0
 public RdBraceHighlightProvider(ICoreShell shell) : base(shell)
 {
 }
예제 #58
0
 public DocumentationTest(IServiceContainer services, EditorHostMethodFixture editorHost)
 {
     _coreShell  = services.GetService <ICoreShell>();
     _editorHost = editorHost;
 }
예제 #59
0
 public TreeChangeTypeTest(IExportProvider exportProvider, EditorTestFilesFixture testFiles)
 {
     _exportProvider = exportProvider;
     _coreShell      = _exportProvider.GetExportedValue <ICoreShell>();
 }
예제 #60
0
        public static ISuggestedActionsSource FromViewAndBuffer(ITextView textView, ITextBuffer textBuffer, ICoreShell shell)
        {
            var suggestedActionsSource = ServiceManager.GetService <RSuggestedActionSource>(textView);

            if (suggestedActionsSource == null)
            {
                IEnumerable <IRSuggestedActionProvider> suggestedActionProviders = ComponentLocator <IRSuggestedActionProvider> .ImportMany(shell.CompositionService).Select(p => p.Value);

                suggestedActionsSource = new RSuggestedActionSource(textView, textBuffer, suggestedActionProviders, shell);
            }
            return(suggestedActionsSource);
        }