protected PerformanceAnalysisContextActionBase([NotNull] ICSharpContextActionDataProvider dataProvider)
     : base(dataProvider)
 {
     ExpensiveContextProvider   = dataProvider.Solution.GetComponent <ExpensiveInvocationContextProvider>().NotNull();
     PerformanceContextProvider = dataProvider.Solution.GetComponent <PerformanceCriticalContextProvider>().NotNull();
     SolutionAnalysisService    = dataProvider.Solution.GetComponent <SolutionAnalysisService>().NotNull();
 }
        public static bool HasHotIcon(this ICSharpDeclaration element, PerformanceCriticalContextProvider contextProvider,
                                      IContextBoundSettingsStore settingsStore, DaemonProcessKind kind)
        {
            var declaredElement = element.DeclaredElement;

            return(declaredElement.HasHotIcon(contextProvider, settingsStore, kind));
        }
 public AddExpensiveCommentContextAction(ICSharpContextActionDataProvider dataProvider)
 {
     myDataProvider = dataProvider;
     mySwa          = dataProvider.Solution.GetComponent <SolutionAnalysisService>();
     myPerformanceContextProvider = dataProvider.Solution.GetComponent <PerformanceCriticalContextProvider>();
     myExpensiveContextProvider   = dataProvider.Solution.GetComponent <ExpensiveInvocationContextProvider>();
 }
 public EventHandlerDetector(ISolution solution, IApplicationWideContextBoundSettingStore settingsStore,
                             UnityEventsElementContainer unityEventsElementContainer,
                             PerformanceCriticalContextProvider contextProvider)
     : base(solution, settingsStore, contextProvider)
 {
     UnityEventsElementContainer = unityEventsElementContainer;
 }
        public static bool HasHotIcon(this ICSharpDeclaration element, PerformanceCriticalContextProvider contextProvider,
                                      IContextBoundSettingsStore settingsStore, IReadOnlyCallGraphContext context)
        {
            var declaredElement = element.DeclaredElement;

            return(declaredElement.HasHotIcon(contextProvider, settingsStore, context));
        }
Esempio n. 6
0
 public FieldDetector(ISolution solution,
                      IApplicationWideContextBoundSettingStore settingsStore,
                      UnityApi unityApi,
                      PerformanceCriticalContextProvider contextProvider)
     : base(solution, settingsStore, contextProvider)
 {
     myUnityApi = unityApi;
 }
Esempio n. 7
0
 protected UnityDeclarationHighlightingProviderBase(ISolution solution,
                                                    IApplicationWideContextBoundSettingStore settingsStore,
                                                    PerformanceCriticalContextProvider contextProvider)
 {
     Solution        = solution;
     SettingsStore   = settingsStore;
     ContextProvider = contextProvider;
 }
 public UnityCommonIconProvider(ISolution solution, UnityApi unityApi,
                                IApplicationWideContextBoundSettingStore settingsStore,
                                PerformanceCriticalContextProvider contextProvider)
 {
     mySolution      = solution;
     UnityApi        = unityApi;
     SettingsStore   = settingsStore;
     ContextProvider = contextProvider;
 }
 public UnityCommonIconProvider(ISolution solution, UnityApi unityApi,
                                IApplicationWideContextBoundSettingStore settingsStore,
                                PerformanceCriticalContextProvider performanceContextProvider,
                                IEnumerable <IPerformanceAnalysisBulbItemsProvider> menuItemProviders)
 {
     mySolution                 = solution;
     myTextControlManager       = solution.GetComponent <ITextControlManager>();
     UnityApi                   = unityApi;
     SettingsStore              = settingsStore;
     PerformanceContextProvider = performanceContextProvider;
     myMenuItemProviders        = menuItemProviders;
 }
Esempio n. 10
0
 public RiderInitialiseOnLoadCctorDetector(ISolution solution,
                                           IApplicationWideContextBoundSettingStore settingsStore,
                                           UnityCodeInsightFieldUsageProvider fieldUsageProvider,
                                           UnitySolutionTracker solutionTracker,
                                           BackendUnityHost backendUnityHost,
                                           IconHost iconHost, PerformanceCriticalContextProvider contextProvider)
     : base(solution, settingsStore, contextProvider)
 {
     myFieldUsageProvider = fieldUsageProvider;
     mySolutionTracker    = solutionTracker;
     myBackendUnityHost   = backendUnityHost;
     myIconHost           = iconHost;
 }
        public static bool HasHotIcon(this IDeclaredElement element, PerformanceCriticalContextProvider contextProvider,
                                      IContextBoundSettingsStore settingsStore, IReadOnlyCallGraphContext context)
        {
            if (element == null)
            {
                return(false);
            }

            if (!settingsStore.GetValue((UnitySettings key) => key.EnableIconsForPerformanceCriticalCode))
            {
                return(false);
            }

            return(contextProvider.IsMarkedStage(element, context));
        }
        public static bool HasHotIcon(this IDeclaredElement element, PerformanceCriticalContextProvider contextProvider,
                                      IContextBoundSettingsStore settingsStore, DaemonProcessKind kind)
        {
            if (element == null)
            {
                return(false);
            }

            if (!settingsStore.GetValue((UnitySettings key) => key.EnableIconsForPerformanceCriticalCode))
            {
                return(false);
            }

            return(contextProvider.IsMarked(element, kind));
        }
 public RiderUnityCommonIconProvider(ISolution solution,
                                     IApplicationWideContextBoundSettingStore settingsStore,
                                     UnityApi api,
                                     UnityCodeInsightProvider codeInsightProvider,
                                     UnitySolutionTracker solutionTracker,
                                     BackendUnityHost backendUnityHost,
                                     IconHost iconHost, PerformanceCriticalContextProvider contextProvider,
                                     IEnumerable <IPerformanceAnalysisBulbItemsProvider> menuItemProviders)
     : base(solution, api, settingsStore, contextProvider, menuItemProviders)
 {
     myCodeInsightProvider = codeInsightProvider;
     mySolutionTracker     = solutionTracker;
     myBackendUnityHost    = backendUnityHost;
     myIconHost            = iconHost;
 }
 public RiderUnityCommonIconProvider(ISolution solution,
                                     IApplicationWideContextBoundSettingStore settingsStore,
                                     UnityApi api,
                                     UnityCodeInsightProvider codeInsightProvider,
                                     UnitySolutionTracker solutionTracker,
                                     BackendUnityHost backendUnityHost,
                                     IconHost iconHost, PerformanceCriticalContextProvider contextProvider)
     : base(solution, api, settingsStore, contextProvider)
 {
     mySolution            = solution;
     myTextControlManager  = mySolution.GetComponent <ITextControlManager>();
     myCodeInsightProvider = codeInsightProvider;
     mySolutionTracker     = solutionTracker;
     myBackendUnityHost    = backendUnityHost;
     myIconHost            = iconHost;
 }
 public RiderFieldDetector(ISolution solution,
                           IApplicationWideContextBoundSettingStore settingsStore,
                           UnityApi unityApi,
                           UnityCodeInsightFieldUsageProvider fieldUsageProvider,
                           DeferredCacheController deferredCacheController,
                           UnitySolutionTracker solutionTracker,
                           BackendUnityHost backendUnityHost,
                           IconHost iconHost, AssetSerializationMode assetSerializationMode,
                           PerformanceCriticalContextProvider contextProvider)
     : base(solution, settingsStore, unityApi, contextProvider)
 {
     myFieldUsageProvider      = fieldUsageProvider;
     myDeferredCacheController = deferredCacheController;
     mySolutionTracker         = solutionTracker;
     myBackendUnityHost        = backendUnityHost;
     myIconHost = iconHost;
     myAssetSerializationMode = assetSerializationMode;
 }
        public static void AddHotHighlighting(this IHighlightingConsumer consumer,
                                              PerformanceCriticalContextProvider contextProvider,
                                              ICSharpDeclaration element,
                                              IContextBoundSettingsStore settings, string text,
                                              string tooltip, DaemonProcessKind kind, IEnumerable <BulbMenuItem> items,
                                              bool onlyHot = false)
        {
            var isIconHot = element.HasHotIcon(contextProvider, settings, kind);

            if (onlyHot && !isIconHot)
            {
                return;
            }

            var highlighting = isIconHot
                ? new UnityHotGutterMarkInfo(items, element, tooltip)
                : (IHighlighting) new UnityGutterMarkInfo(items, element, tooltip);

            consumer.AddHighlighting(highlighting);
        }
Esempio n. 17
0
 public RiderEventHandlerDetector(ISolution solution,
                                  IApplicationWideContextBoundSettingStore settingsStore,
                                  AssetIndexingSupport assetIndexingSupport,
                                  UnityEventsElementContainer unityEventsElementContainer,
                                  UnityCodeInsightProvider codeInsightProvider,
                                  UnityUsagesCodeVisionProvider usagesCodeVisionProvider,
                                  DeferredCacheController deferredCacheController,
                                  UnitySolutionTracker solutionTracker,
                                  BackendUnityHost backendUnityHost,
                                  IconHost iconHost, AssetSerializationMode assetSerializationMode,
                                  PerformanceCriticalContextProvider contextProvider)
     : base(solution, settingsStore, unityEventsElementContainer, contextProvider)
 {
     myAssetIndexingSupport     = assetIndexingSupport;
     myCodeInsightProvider      = codeInsightProvider;
     myUsagesCodeVisionProvider = usagesCodeVisionProvider;
     myDeferredCacheController  = deferredCacheController;
     mySolutionTracker          = solutionTracker;
     myBackendUnityHost         = backendUnityHost;
     myIconHost = iconHost;
     myAssetSerializationMode = assetSerializationMode;
 }
 public RiderTypeDetector(ISolution solution,
                          IApplicationWideContextBoundSettingStore settingsStore,
                          UnityApi unityApi,
                          AssetIndexingSupport assetIndexingSupport,
                          UnityUsagesCodeVisionProvider usagesCodeVisionProvider,
                          UnityCodeInsightProvider codeInsightProvider,
                          [NotNull, ItemNotNull] IEnumerable <IScriptUsagesElementContainer> scriptsUsagesElementContainers,
                          DeferredCacheController deferredCacheController, UnitySolutionTracker solutionTracker,
                          BackendUnityHost backendUnityHost,
                          IconHost iconHost, AssetSerializationMode assetSerializationMode,
                          PerformanceCriticalContextProvider contextProvider)
     : base(solution, settingsStore, unityApi, contextProvider)
 {
     myAssetIndexingSupport           = assetIndexingSupport;
     myUsagesCodeVisionProvider       = usagesCodeVisionProvider;
     myCodeInsightProvider            = codeInsightProvider;
     myScriptsUsagesElementContainers = scriptsUsagesElementContainers;
     myDeferredCacheController        = deferredCacheController;
     mySolutionTracker        = solutionTracker;
     myBackendUnityHost       = backendUnityHost;
     myIconHost               = iconHost;
     myAssetSerializationMode = assetSerializationMode;
 }
Esempio n. 19
0
 protected PerformanceCriticalBulbItemsProvider(ISolution solution)
     : base(solution)
 {
     myPerformanceCriticalContextProvider = solution.GetComponent <PerformanceCriticalContextProvider>();
 }
 public InitialiseOnLoadCctorDetector(ISolution solution,
                                      IApplicationWideContextBoundSettingStore settingsStore,
                                      PerformanceCriticalContextProvider contextProvider)
     : base(solution, settingsStore, contextProvider)
 {
 }