public UnityEditorFindUsageResultCreator(Lifetime lifetime, ISolution solution, SearchDomainFactory searchDomainFactory, IShellLocks locks, UnitySceneDataLocalCache sceneDataCache, UnityHost unityHost, UnityExternalFilesModuleFactory externalFilesModuleFactory, [CanBeNull] RiderBackgroundTaskHost backgroundTaskHost = null) { myLifetime = lifetime; mySolution = solution; myLocks = locks; myUnitySceneDataLocalCache = sceneDataCache; myBackgroundTaskHost = backgroundTaskHost; myYamlSearchDomain = searchDomainFactory.CreateSearchDomain(externalFilesModuleFactory.PsiModule); myUnityHost = unityHost; mySolutionDirectoryPath = solution.SolutionDirectory; }
public UnityEditorProtocol(Lifetime lifetime, ILogger logger, UnityHost host, IScheduler dispatcher, IShellLocks locks, ISolution solution, ISettingsStore settingsStore, JetBrains.Application.ActivityTrackingNew.UsageStatistics usageStatistics, UnitySolutionTracker unitySolutionTracker, IThreading threading, UnityVersion unityVersion, NotificationsModel notificationsModel, IHostProductInfo hostProductInfo) { myPluginInstallations = new JetHashSet <FileSystemPath>(); myComponentLifetime = lifetime; myLogger = logger; myDispatcher = dispatcher; myLocks = locks; mySolution = solution; myUsageStatistics = usageStatistics; myThreading = threading; myUnityVersion = unityVersion; myNotificationsModel = notificationsModel; myHostProductInfo = hostProductInfo; myHost = host; myBoundSettingsStore = settingsStore.BindToContextLive(lifetime, ContextRange.Smart(solution.ToDataContext())); mySessionLifetimes = new SequentialLifetimes(lifetime); if (solution.GetData(ProjectModelExtensions.ProtocolSolutionKey) == null) { return; } unitySolutionTracker.IsUnityProject.View(lifetime, (lf, args) => { if (!args) { return; } var solFolder = mySolution.SolutionDirectory; AdviseModelData(lifetime); // todo: consider non-Unity Solution with Unity-generated projects var protocolInstancePath = solFolder.Combine("Library/ProtocolInstance.json"); protocolInstancePath.Directory.CreateDirectory(); var watcher = new FileSystemWatcher(); watcher.Path = protocolInstancePath.Directory.FullPath; watcher.NotifyFilter = NotifyFilters.LastWrite; //Watch for changes in LastWrite times watcher.Filter = protocolInstancePath.Name; // Add event handlers. watcher.Changed += OnChanged; watcher.Created += OnChanged; lf.Bracket(() => { }, () => { watcher.Dispose(); }); watcher.EnableRaisingEvents = true; // Begin watching. // connect on start of Rider CreateProtocols(protocolInstancePath); }); }
public UnityUsagesAsyncFinderCallback(LifetimeDefinition lifetimeDef, UnityUsagesFinderConsumer consumer, UnityHost unityHost, IShellLocks shellLocks, string displayName, FindUsageResultElement selected, bool focusUnity) { myLifetimeDef = lifetimeDef; myConsumer = consumer; myUnityHost = unityHost; myShellLocks = shellLocks; myDisplayName = displayName; mySelected = selected; myFocusUnity = focusUnity; }
public UnityEditorFindUsageResultCreator(ISolution solution, UnitySceneProcessor sceneProcessor, UnityHost unityHost) { mySolution = solution; mySceneProcessor = sceneProcessor; myUnityHost = unityHost; mySolutionDirectoryPath = solution.SolutionDirectory; }