Esempio n. 1
0
 public StatusTreeClass(GitSettingsJson gitSettings, GitManager gitManager, bool cullNonAssetPaths, UniGitPaths paths)
 {
     this.paths             = paths;
     this.gitManager        = gitManager;
     this.cullNonAssetPaths = cullNonAssetPaths;
     this.gitSettings       = gitSettings;
 }
Esempio n. 2
0
        private void Construct(GitManager gitManager,
                               GitReflectionHelper reflectionHelper,
                               UniGitData data,
                               ILogger logger,
                               GitSettingsJson gitSettings,
                               GitCallbacks gitCallbacks,
                               GitInitializer initializer,
                               GitSettingsManager settingsManager,
                               UniGitPaths paths,
                               IGitResourceManager resourceManager)
        {
            this.resourceManager = resourceManager;
            this.paths           = paths;
            this.settingsManager = settingsManager;
            this.logger          = logger;
            this.gitSettings     = gitSettings;
            this.initializer     = initializer;

            if (gitManager == null)
            {
                logger.Log(LogType.Error, "Git manager cannot be null.");
                return;
            }
            if (this.gitCallbacks != null)
            {
                Unsubscribe(this.gitCallbacks);
            }

            this.data       = data;
            this.gitManager = gitManager;
            this.gitManager.AddWatcher(this);
            this.reflectionHelper = reflectionHelper;
            Subscribe(gitCallbacks);
        }
Esempio n. 3
0
 public GitInitializer(
     UniGitPaths paths,
     ILogger logger,
     GitCallbacks callbacks)
 {
     this.paths     = paths;
     this.logger    = logger;
     this.callbacks = callbacks;
 }
Esempio n. 4
0
        public GitSettingsManager(UniGitPaths paths, GitSettingsJson settings, GitCallbacks gitCallbacks, ILogger logger, GitInitializer initializer)
        {
            this.paths        = paths;
            this.settings     = settings;
            this.gitCallbacks = gitCallbacks;
            this.logger       = logger;
            this.initializer  = initializer;

            gitCallbacks.EditorUpdate += OnEditorUpdate;
        }
Esempio n. 5
0
 public GitGeneralSettingsTab(GitManager gitManager,
                              GitSettingsWindow settingsWindow,
                              GitLfsManager lfsManager,
                              UniGitData data,
                              GitSettingsJson gitSettings,
                              GitCallbacks gitCallbacks,
                              GitInitializer initializer,
                              GitSettingsManager settingsManager,
                              UniGitPaths paths)
     : base(new GUIContent("General"), gitManager, settingsWindow, data, gitSettings, gitCallbacks, initializer)
 {
     this.paths           = paths;
     this.lfsManager      = lfsManager;
     this.settingsManager = settingsManager;
 }
Esempio n. 6
0
        public GitLog(UniGitPaths paths, UniGitData data, GitSettingsJson gitSettings, GitCallbacks gitCallbacks)
        {
            this.paths         = paths;
            this.data          = data;
            this.gitSettings   = gitSettings;
            this.gitCallbacks  = gitCallbacks;
            logTypeRegex       = new Regex(@"\[.*?\]", RegexOptions.Compiled);
            lineAndNumberRegex = new Regex(@"\(at((.*?):(.*?))\)", RegexOptions.Compiled);

            if (data.LogInitialized)
            {
                data.LogInitialized = true;
                data.LogEntries.Clear();
                LoadLines();
            }
        }
Esempio n. 7
0
        public GitCredentialsManager(GitManager gitManager,
                                     GitSettingsJson gitSettings,
                                     List <ICredentialsAdapter> adapters,
                                     GitCallbacks gitCallbacks,
                                     ILogger logger,
                                     UniGitPaths paths)
        {
            this.paths        = paths;
            this.gitSettings  = gitSettings;
            this.gitManager   = gitManager;
            this.adapters     = adapters.ToArray();
            this.gitCallbacks = gitCallbacks;
            this.logger       = logger;
            adapterNames      = adapters.Select(a => new GUIContent(GetAdapterName(a))).ToArray();
            adapterIds        = adapters.Select(GetAdapterId).ToArray();

            gitCallbacks.EditorUpdate += EditorUpdate;

            LoadGitCredentials();
        }
Esempio n. 8
0
        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();
        }
Esempio n. 9
0
        public GitFileWatcher(GitManager gitManager,
                              GitCallbacks gitCallbacks,
                              GitSettingsJson gitSettings,
                              UniGitPaths paths,
                              [UniGitInjectOptional] bool trackAssetsPath)
        {
            this.paths        = paths;
            this.gitManager   = gitManager;
            this.gitSettings  = gitSettings;
            this.gitCallbacks = gitCallbacks;
            fileWatchers      = new List <FileSystemWatcher>();

            string regexPattern = @".*.git$";

            if (!trackAssetsPath)
            {
                regexPattern += "|.*Assets$";
            }
            ignoreFoldersRegex = new Regex(regexPattern);

            gitCallbacks.OnSettingsChange += OnSettingsChange;
            gitCallbacks.OnRepositoryLoad += OnRepositoryLoad;
        }