Example #1
0
 public RiderEventHandlerDetector(ISolution solution,
                                  CallGraphSwaExtensionProvider callGraphSwaExtensionProvider,
                                  IApplicationWideContextBoundSettingStore settingsStore,
                                  AssetIndexingSupport assetIndexingSupport,
                                  PerformanceCriticalCodeCallGraphMarksProvider marksProvider,
                                  UnityEventsElementContainer unityEventsElementContainer,
                                  UnityCodeInsightProvider codeInsightProvider,
                                  UnityUsagesCodeVisionProvider usagesCodeVisionProvider,
                                  DeferredCacheController deferredCacheController,
                                  UnitySolutionTracker solutionTracker,
                                  BackendUnityHost backendUnityHost,
                                  IconHost iconHost, AssetSerializationMode assetSerializationMode,
                                  IElementIdProvider elementIdProvider)
     : base(solution, settingsStore, callGraphSwaExtensionProvider, unityEventsElementContainer, marksProvider,
            elementIdProvider)
 {
     myAssetIndexingSupport     = assetIndexingSupport;
     myCodeInsightProvider      = codeInsightProvider;
     myUsagesCodeVisionProvider = usagesCodeVisionProvider;
     myDeferredCacheController  = deferredCacheController;
     mySolutionTracker          = solutionTracker;
     myBackendUnityHost         = backendUnityHost;
     myIconHost = iconHost;
     myAssetSerializationMode = assetSerializationMode;
 }
Example #2
0
 public ReSharperUnityYamlDisableStrategy(Lifetime lifetime, ISolution solution, SolutionCaches solutionCaches, ISettingsStore settingsStore,
                                          AssetIndexingSupport assetIndexingSupport, UserNotifications notifications)
     : base(lifetime, solution, solutionCaches, settingsStore, assetIndexingSupport)
 {
     myLifetime      = lifetime;
     myNotifications = notifications;
 }
Example #3
0
        public RiderUnityYamlDisableStrategy(Lifetime lifetime, ISolution solution, SolutionCaches solutionCaches, ISettingsStore settingsStore,
                                             AssetIndexingSupport assetIndexingSupport, UnityHost unityHost)
            : base(lifetime, solution, solutionCaches, settingsStore, assetIndexingSupport)
        {
            myUnityHost = unityHost;

            myUnityHost.PerformModelAction(t =>
                                           t.EnableYamlParsing.Advise(lifetime, _ => assetIndexingSupport.IsEnabled.Value = true));
        }
Example #4
0
        public RiderUnityYamlDisableStrategy(Lifetime lifetime, ISolution solution, SolutionCaches solutionCaches,
                                             IApplicationWideContextBoundSettingStore settingsStore,
                                             AssetIndexingSupport assetIndexingSupport, FrontendBackendHost frontendBackendHost)
            : base(lifetime, solution, solutionCaches, settingsStore, assetIndexingSupport)
        {
            myFrontendBackendHost = frontendBackendHost;

            myFrontendBackendHost.Do(t =>
                                     t.EnableYamlParsing.Advise(lifetime, _ => assetIndexingSupport.IsEnabled.Value = true));
        }
Example #5
0
 public RiderTypeDetector(ISolution solution, CallGraphSwaExtensionProvider callGraphSwaExtensionProvider,
                          SettingsStore settingsStore, PerformanceCriticalCodeCallGraphMarksProvider marksProvider, UnityApi unityApi,
                          AssetIndexingSupport assetIndexingSupport, UnityUsagesCodeVisionProvider usagesCodeVisionProvider, UnityCodeInsightProvider codeInsightProvider, AssetUsagesElementContainer assetUsagesElementContainer,
                          DeferredCacheController deferredCacheController, UnitySolutionTracker solutionTracker, ConnectionTracker connectionTracker,
                          IconHost iconHost, AssetSerializationMode assetSerializationMode, IElementIdProvider provider)
     : base(solution, callGraphSwaExtensionProvider, settingsStore, unityApi, marksProvider, provider)
 {
     myAssetIndexingSupport        = assetIndexingSupport;
     myUsagesCodeVisionProvider    = usagesCodeVisionProvider;
     myCodeInsightProvider         = codeInsightProvider;
     myAssetUsagesElementContainer = assetUsagesElementContainer;
     myDeferredCacheController     = deferredCacheController;
     mySolutionTracker             = solutionTracker;
     myConnectionTracker           = connectionTracker;
     myIconHost = iconHost;
     myAssetSerializationMode = assetSerializationMode;
 }
 public RiderTypeDetector(ISolution solution,
                          IApplicationWideContextBoundSettingStore settingsStore,
                          UnityApi unityApi,
                          AssetIndexingSupport assetIndexingSupport,
                          UnityUsagesCodeVisionProvider usagesCodeVisionProvider,
                          UnityCodeInsightProvider codeInsightProvider,
                          AssetScriptUsagesElementContainer assetScriptUsagesElementContainer,
                          DeferredCacheController deferredCacheController, UnitySolutionTracker solutionTracker,
                          BackendUnityHost backendUnityHost,
                          IconHost iconHost, AssetSerializationMode assetSerializationMode,
                          PerformanceCriticalContextProvider contextProvider)
     : base(solution, settingsStore, unityApi, contextProvider)
 {
     myAssetIndexingSupport              = assetIndexingSupport;
     myUsagesCodeVisionProvider          = usagesCodeVisionProvider;
     myCodeInsightProvider               = codeInsightProvider;
     myAssetScriptUsagesElementContainer = assetScriptUsagesElementContainer;
     myDeferredCacheController           = deferredCacheController;
     mySolutionTracker        = solutionTracker;
     myBackendUnityHost       = backendUnityHost;
     myIconHost               = iconHost;
     myAssetSerializationMode = assetSerializationMode;
 }
Example #7
0
 public UnityYamlFileSizeLogContributor(UnitySolutionTracker unitySolutionTracker, AssetIndexingSupport assetIndexingSupport, UnityExternalFilesModuleProcessor moduleProcessor)
 {
     myUnitySolutionTracker = unitySolutionTracker;
     myAssetIndexingSupport = assetIndexingSupport;
     myModuleProcessor      = moduleProcessor;
 }
Example #8
0
        public UnityCacheUpdater(Lifetime lifetime, ISolution solution, DeferredCacheController deferredCacheController, AssetIndexingSupport assetIndexingSupport, IShellLocks locks, ChangeManager changeManager, UnityExternalFilesModuleFactory factory)
        {
            var module = factory.PsiModule;

            if (module != null)
            {
                assetIndexingSupport.IsEnabled.Change.Advise_NoAcknowledgement(lifetime, (handler) =>
                {
                    if (handler.HasNew && handler.HasOld && handler.New == handler.Old)
                    {
                        return;
                    }

                    locks.ExecuteOrQueueReadLockEx(lifetime, "YamlParsingStateChange", () =>
                    {
                        var psiSourceFiles = module.SourceFiles.ToList();
                        if (psiSourceFiles.Any())
                        {
                            locks.ExecuteWithWriteLock(() =>
                            {
                                deferredCacheController.Invalidate <UnityAssetCache>();
                                changeManager.ExecuteAfterChange(() =>
                                {
                                    var changeBuilder = new PsiModuleChangeBuilder();
                                    foreach (var sourceFile in psiSourceFiles)
                                    {
                                        if (sourceFile.IsValid())
                                        {
                                            changeBuilder.AddFileChange(sourceFile, PsiModuleChange.ChangeType.Modified);
                                        }
                                    }

                                    changeManager.OnProviderChanged(solution, changeBuilder.Result,
                                                                    SimpleTaskExecutor.Instance);
                                });
                            });
                        }
                    });
                });
            }
        }