public PackageIndex(IServiceContainer services, IIntellisenseRSession host, IFunctionIndex functionIndex) { _host = host; _functionIndex = functionIndex; _idleTime = services.GetService <IIdleTimeService>(); var interactiveWorkflowProvider = services.GetService <IRInteractiveWorkflowProvider>(); var workflow = interactiveWorkflowProvider.GetOrCreate(); var sessionProvider = workflow.RSessions; var interactiveSession = workflow.RSession; interactiveSession.Connected += OnSessionConnected; interactiveSession.PackagesInstalled += OnPackagesChanged; interactiveSession.PackagesRemoved += OnPackagesChanged; sessionProvider.BrokerStateChanged += OnBrokerStateChanged; if (interactiveSession.IsHostRunning) { BuildIndexAsync().DoNotWait(); } _disposableBag .Add(() => interactiveSession.PackagesInstalled -= OnPackagesChanged) .Add(() => interactiveSession.PackagesRemoved -= OnPackagesChanged) .Add(() => interactiveSession.Connected -= OnSessionConnected) .Add(() => sessionProvider.BrokerStateChanged -= OnBrokerStateChanged) .Add(_host); }
public PackageInfo(IIntellisenseRSession host, string name, string description, string version, IEnumerable <string> functionNames) : base(name, description, NamedItemType.Package) { _host = host; _version = version; _functions = new ConcurrentBag <INamedItemInfo>(functionNames.Select(fn => new FunctionInfo(fn))); }
public PackageInfo(IIntellisenseRSession host, string name, string description, string version, IEnumerable <IPersistentFunctionInfo> functions) : base(name, description, NamedItemType.Package) { _host = host; _fs = _host.Services.FileSystem(); _version = version; _functions = new ConcurrentBag <IFunctionInfo>(functions.Select(fn => new FunctionInfo(fn.Name, fn.IsInternal))); }
public PackageIndex(IRInteractiveWorkflowProvider interactiveWorkflowProvider, ICoreShell shell, IIntellisenseRSession host, IFunctionIndex functionIndex) { _shell = shell; _host = host; _functionIndex = functionIndex; _interactiveSession = interactiveWorkflowProvider.GetOrCreate().RSession; _interactiveSession.PackagesInstalled += OnPackagesChanged; _interactiveSession.PackagesRemoved += OnPackagesChanged; }
public PackageFunctionCompletionProvider(IServiceContainer serviceContainer) { _session = serviceContainer.GetService <IIntellisenseRSession>(); _snippetInformationSource = serviceContainer.GetService <ISnippetInformationSourceProvider>(); _packageIndex = serviceContainer.GetService <IPackageIndex>(); _functionIndex = serviceContainer.GetService <IFunctionIndex>(); var imageService = serviceContainer.GetService <IImageService>(); _functionGlyph = imageService.GetImage(ImageType.Method); _constantGlyph = imageService.GetImage(ImageType.Constant); }
public PackageFunctionCompletionProvider( IIntellisenseRSession session, [Import(AllowDefault = true)] ISnippetInformationSourceProvider snippetInformationSource, IPackageIndex packageIndex, IFunctionIndex functionIndex, IGlyphService glyphService) { _session = session; _snippetInformationSource = snippetInformationSource; _packageIndex = packageIndex; _functionIndex = functionIndex; _functionGlyph = glyphService.GetGlyphThreadSafe(StandardGlyphGroup.GlyphGroupMethod, StandardGlyphItem.GlyphItemPublic); _constantGlyph = glyphService.GetGlyphThreadSafe(StandardGlyphGroup.GlyphGroupConstant, StandardGlyphItem.GlyphItemPublic); }
public PackageFunctionCompletionProvider( IIntellisenseRSession session, [Import(AllowDefault = true)] ISnippetInformationSourceProvider snippetInformationSource, IPackageIndex packageIndex, IFunctionIndex functionIndex, ICoreShell coreShell) { _session = session; _snippetInformationSource = snippetInformationSource; _packageIndex = packageIndex; _functionIndex = functionIndex; var imageService = coreShell.GetService <IImageService>(); _functionGlyph = imageService.GetImage(ImageType.Method) as ImageSource; _constantGlyph = imageService.GetImage(ImageType.Constant) as ImageSource;; }
public PackageIndex(IRInteractiveWorkflowProvider interactiveWorkflowProvider, ICoreShell shell, IIntellisenseRSession host, IFunctionIndex functionIndex) { _shell = shell; _host = host; _functionIndex = functionIndex; _workflow = interactiveWorkflowProvider.GetOrCreate(); _interactiveSession = _workflow.RSession; _interactiveSession.Connected += OnSessionConnected; _interactiveSession.PackagesInstalled += OnPackagesChanged; _interactiveSession.PackagesRemoved += OnPackagesChanged; _workflow.RSessions.BrokerStateChanged += OnBrokerStateChanged; if (_workflow.RSession.IsHostRunning) { BuildIndexAsync().DoNotWait(); } }
public PackageIndex( IRInteractiveWorkflowProvider interactiveWorkflowProvider, ICoreShell shell, IIntellisenseRSession host, IFunctionIndex functionIndex) { _shell = shell; _host = host; _functionIndex = functionIndex; _workflow = interactiveWorkflowProvider.GetOrCreate(); _interactiveSession = _workflow.RSession; _interactiveSession.Connected += OnSessionConnected; _interactiveSession.PackagesRemoved += OnPackagesRemoved; _workflow.RSessions.BrokerStateChanged += OnBrokerStateChanged; if (_workflow.RSession.IsHostRunning) { BuildIndexAsync().DoNotWait(); } }
public PackageInfo(IIntellisenseRSession host, string name, string description, string version) : this(host, name, description, version, Enumerable.Empty <string>()) { }
public FunctionIndex(IServiceContainer services, IFunctionRdDataProvider rdDataProfider, IIntellisenseRSession host) { Services = services; _functionRdDataProvider = rdDataProfider; _host = host; }
public FunctionRdDataProvider(IIntellisenseRSession host) { _host = host; }
public FunctionIndex(ICoreShell coreShell, IFunctionRdDataProvider rdDataProfider, IIntellisenseRSession host) { _coreShell = coreShell; _functionRdDataProvider = rdDataProfider; _host = host; }
public FunctionRdDataProvider(IServiceContainer services) { _host = services.GetService <IIntellisenseRSession>(); }
public PackageIndex(ICoreShell shell, IIntellisenseRSession host, IFunctionIndex functionIndex) { _shell = shell; _host = host; _functionIndex = functionIndex; }
public PackageInfo(IIntellisenseRSession host, string name, string description, string version) : base(name, description, NamedItemType.Package) { _host = host; _version = version; }