示例#1
0
        protected override void Initialize()
        {
            Current = this;

            VsAppShell.EnsureInitialized();
            if (IsCommandLineMode())
            {
                return;
            }

            VsWpfOverrides.Apply();
            CranMirrorList.Download();

            using (var p = Current.GetDialogPage(typeof(RToolsOptionsPage)) as RToolsOptionsPage) {
                p?.LoadSettings();
            }

            RtvsTelemetry.Initialize(_packageIndex, VsAppShell.Current.ExportProvider.GetExportedValue <IRSettings>());
            base.Initialize();

            ProjectIconProvider.LoadProjectImages();
            LogCleanup.DeleteLogsAsync(DiagnosticLogs.DaysToRetain);

            BuildFunctionIndex();
            AdviseExportedWindowFrameEvents <ActiveWpfTextViewTracker>();
            AdviseExportedWindowFrameEvents <VsActiveRInteractiveWindowTracker>();
            AdviseExportedDebuggerEvents <VsDebuggerModeTracker>();

            IdleTimeAction.Create(ExpansionsCache.Load, 200, typeof(ExpansionsCache), VsAppShell.Current);
            IdleTimeAction.Create(() => RtvsTelemetry.Current.ReportConfiguration(), 5000, typeof(RtvsTelemetry), VsAppShell.Current);
        }
示例#2
0
        protected override void Initialize()
        {
            Current = this;

            VsAppShell.EnsureInitialized();
            if (IsCommandLineMode())
            {
                return;
            }

            VsWpfOverrides.Apply();
            CranMirrorList.Download();

            base.Initialize();

            ProjectIconProvider.LoadProjectImages(VsAppShell.Current.Services);
            LogCleanup.DeleteLogsAsync(DiagnosticLogs.DaysToRetain);

            var settings       = VsAppShell.Current.GetService <IRToolsSettings>();
            var editorSettings = VsAppShell.Current.GetService <IREditorSettings>();

            RtvsTelemetry.Initialize(_packageIndex, settings, editorSettings);

            BuildFunctionIndex();
            AdviseExportedWindowFrameEvents <ActiveWpfTextViewTracker>();
            AdviseExportedWindowFrameEvents <VsActiveRInteractiveWindowTracker>();
            AdviseExportedDebuggerEvents <VsDebuggerModeTracker>();

            System.Threading.Tasks.Task.Run(() => RtvsTelemetry.Current.ReportConfiguration());
            IdleTimeAction.Create(ExpansionsCache.Load, 200, typeof(ExpansionsCache), VsAppShell.Current);
        }
示例#3
0
        private void Initialize()
        {
            VsWpfOverrides.Apply();

            ConfigurePackageServices();
            ConfigureIdleSource();
            CheckVsStarted();
        }
示例#4
0
        private void Initialize()
        {
            _vsShell = (IVsShell)VsPackage.GetGlobalService(typeof(SVsShell));
            VsWpfOverrides.Apply();

            var oleCm = (IOleComponentManager)VsPackage.GetGlobalService(typeof(SOleComponentManager));

            ConfigureIdleSource(oleCm);

            ConfigurePackageServices();
            CheckVsStarted();
        }
示例#5
0
        protected override void Initialize()
        {
            Current = this;

            // Force app shell creation before everything else
            var shell = VsAppShell.Current;

            if (IsCommandLineMode())
            {
                return;
            }

            VsWpfOverrides.Apply();
            CranMirrorList.Download();

            RtvsTelemetry.Initialize();

            using (var p = Current.GetDialogPage(typeof(RToolsOptionsPage)) as RToolsOptionsPage) {
                p.LoadSettings();
            }

            MicrosoftRClient.CheckInstall(VsAppShell.Current);
            base.Initialize();

            ProjectIconProvider.LoadProjectImages();
            LogCleanup.DeleteLogsAsync(DiagnosticLogs.DaysToRetain);

            _indexBuildingTask = FunctionIndex.BuildIndexAsync();

            AdviseExportedWindowFrameEvents <ActiveWpfTextViewTracker>();
            AdviseExportedWindowFrameEvents <VsActiveRInteractiveWindowTracker>();
            AdviseExportedDebuggerEvents <VsDebuggerModeTracker>();

            System.Threading.Tasks.Task.Run(() => RtvsTelemetry.Current.ReportConfiguration());

            IdleTimeAction.Create(ExpansionsCache.Load, 200, typeof(ExpansionsCache));
        }