public void IssueOnPrefsChange(IGitPrefs prefs) { if (OnPrefsChange != null) { OnPrefsChange.Invoke(prefs); } }
public GitDiffWindowDiffElementRenderer(GitManager gitManager, GitOverlay gitOverlay, GitSettingsJson gitSettings, GitCallbacks gitCallbacks, IGitPrefs prefs) { this.gitManager = gitManager; this.gitOverlay = gitOverlay; this.gitSettings = gitSettings; this.gitCallbacks = gitCallbacks; OnPrefsChange(prefs); gitCallbacks.OnPrefsChange += OnPrefsChange; }
public GitManager(string repoPath, GitCallbacks callbacks, GitSettingsJson settings, IGitPrefs prefs, GitAsyncManager asyncManager) { this.repoPath = repoPath; this.callbacks = callbacks; this.prefs = prefs; this.asyncManager = asyncManager; gitSettings = settings; gitPath = UniGitPath.Combine(repoPath, ".git"); Initialize(); }
public GitDiffWindowToolbarRenderer(GitManager gitManager, GitDiffElementContextFactory contextFactory, UniGitData data, InjectionHelper injectionHelper, GitSettingsJson gitSettings, GitOverlay gitOverlay, IGitPrefs prefs) { this.gitManager = gitManager; this.contextFactory = contextFactory; this.data = data; this.injectionHelper = injectionHelper; this.gitSettings = gitSettings; this.gitOverlay = gitOverlay; this.prefs = prefs; searchField = new SearchField(); }
public GitManager( GitCallbacks callbacks, GitSettingsJson settings, IGitPrefs prefs, GitAsyncManager asyncManager, UniGitData gitData, ILogger logger, GitInitializer initializer, UniGitPaths paths) { this.paths = paths; this.gitData = gitData; this.callbacks = callbacks; this.prefs = prefs; this.asyncManager = asyncManager; this.logger = logger; this.initializer = initializer; gitSettings = settings; Initialize(); }
private void OnPrefsChange(IGitPrefs prefs) { smallElements = prefs.GetBool(SmallElementsKey, false); }
public GitProjectOverlay(GitManager gitManager, GitCallbacks gitCallbacks, GitSettingsJson gitSettings, GitAsyncManager asyncManager, GitReflectionHelper reflectionHelper, GitOverlay gitOverlay, IGitPrefs prefs, UniGitData data, ILogger logger, InjectionHelper injectionHelper, [UniGitInjectOptional] bool cullNonAssetPaths = true) { if (iconStyle == null) { iconStyle = new GUIStyle { imagePosition = ImagePosition.ImageOnly, alignment = TextAnchor.LowerLeft, padding = new RectOffset(2, 2, 2, 2) }; lineStyle = new GUIStyle(EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector).FindStyle("IN Title")) { padding = new RectOffset(), margin = new RectOffset(), contentOffset = Vector2.zero, fixedHeight = 0, fixedWidth = 0, border = { left = 0, right = 0 } }; } this.logger = logger; this.data = data; this.gitManager = gitManager; this.gitSettings = gitSettings; this.asyncManager = asyncManager; this.gitCallbacks = gitCallbacks; this.reflectionHelper = reflectionHelper; this.gitOverlay = gitOverlay; this.prefs = prefs; this.cullNonAssetPaths = cullNonAssetPaths; this.injectionHelper = injectionHelper; gitManager.AddWatcher(this); gitCallbacks.EditorUpdate += OnEditorUpdate; gitCallbacks.ProjectWindowItemOnGUI += CustomIcons; gitCallbacks.UpdateRepository += OnUpdateRepository; //project browsers only get created before delay call but not before constructor gitCallbacks.DelayCall += () => { projectWindows = new List <EditorWindow>(Resources.FindObjectsOfTypeAll(reflectionHelper.ProjectWindowType).Cast <EditorWindow>()); }; //shortcut to getting instance id without loading asset var method = typeof(AssetDatabase).GetMethod("GetMainAssetOrInProgressProxyInstanceID", BindingFlags.NonPublic | BindingFlags.Static); if (method != null) { GetMainAssetOrInProgressProxyInstanceID = (Func <string, int>)Delegate.CreateDelegate(typeof(Func <string, int>), method); } }