private static void RunStatusUpdateOnMainThread(GitStatus update) { new ActionTask(EntryPoint.ApplicationManager.TaskManager.Token, _ => OnStatusUpdate(update)) { Affinity = TaskAffinity.UI }.Start(); }
private void RepositoryManagerOnGitStatusUpdated(GitStatus gitStatus) { taskManager.RunInUI(() => { cacheContainer.GitStatusEntriesCache.Entries = gitStatus.Entries; cacheContainer.GitTrackingStatusCache.Ahead = gitStatus.Ahead; cacheContainer.GitTrackingStatusCache.Behind = gitStatus.Behind; }); }
private void Prepare() { if (gitStatus.Entries == null) { gitStatus = new GitStatus { Entries = new List <GitStatusEntry>() }; } }
public bool Equals(GitStatus other) { return (String.Equals(LocalBranch, other.LocalBranch) && String.Equals(RemoteBranch, other.RemoteBranch) && Ahead == other.Ahead && Behind == other.Behind && object.Equals(Entries, other.Entries) ); }
private void ReturnStatus() { if (gitStatus.Entries == null) { return; } RaiseOnEntry(gitStatus); gitStatus = new GitStatus(); }
private void RepositoryManagerOnGitStatusUpdated(GitStatus gitStatus) { new ActionTask(CancellationToken.None, () => { CurrentChanges = gitStatus.Entries; CurrentAhead = gitStatus.Ahead; CurrentBehind = gitStatus.Behind; }) { Affinity = TaskAffinity.UI }.Start(); }
private void OnStatusUpdate(GitStatus update) { if (update.Entries == null) { //Refresh(); return; } // Set branch state currentBranch = update.LocalBranch; // (Re)build tree tree.UpdateEntries(update.Entries.Where(x => x.Status != GitFileStatus.Ignored).ToList()); busy = false; }
private static void OnStatusUpdate(GitStatus update) { if (update.Entries == null) { return; } entries.Clear(); entries.AddRange(update.Entries); guids.Clear(); for (var index = 0; index < entries.Count; ++index) { var gitStatusEntry = entries[index]; var path = gitStatusEntry.ProjectPath; if (gitStatusEntry.Status == GitFileStatus.Ignored) { continue; } if (!path.StartsWith("Assets", StringComparison.CurrentCultureIgnoreCase)) { continue; } if (path.EndsWith(".meta", StringComparison.CurrentCultureIgnoreCase)) { continue; } var guid = AssetDatabase.AssetPathToGUID(path); guids.Add(guid); } EditorApplication.RepaintProjectWindow(); }
private void UpdateStatus(GitStatus status) { currentRemote = Repository.CurrentRemote.HasValue ? Repository.CurrentRemote.Value.Name : null; statusAhead = status.Ahead; statusBehind = status.Behind; }
private void UpdateStatusOnMainThread(GitStatus status) { new ActionTask(TaskManager.Token, _ => UpdateStatus(status)) .ScheduleUI(TaskManager); }
private void RepositoryManager_OnStatusUpdated(GitStatus status) { CurrentStatus = status; OnStatusUpdated?.Invoke(CurrentStatus); }
private void RunStatusUpdateOnMainThread(GitStatus status) { new ActionTask(TaskManager.Token, _ => OnStatusUpdate(status)) .ScheduleUI(TaskManager); }
private void UpdateStatus(GitStatus status) { statusAhead = status.Ahead; statusBehind = status.Behind; }
private void InternalInvoke(GitStatus status) { statusUpdated.SafeInvoke(status); }
private void RepositoryManager_OnRepositoryChanged(GitStatus status) { CurrentStatus = status; //Logger.Debug("Got STATUS 2 {0} {1}", OnRepositoryChanged, status); OnRepositoryChanged?.Invoke(CurrentStatus); }
public static IEnumerable <GitStatusEntry> GetEntriesExcludingIgnoredAndUntracked(this GitStatus gitStatus) { return(gitStatus.Entries.Where(entry => entry.Status != GitFileStatus.Ignored && !entry.Staged)); }
private static void RunStatusUpdateOnMainThread(GitStatus update) { EntryPoint.ApplicationManager.TaskManager.ScheduleUI(new ActionTask(EntryPoint.ApplicationManager.TaskManager.Token, _ => OnStatusUpdate(update))); }