Beispiel #1
0
        internal void GetPendingChanges(INewChangesInWk newChangesInWk)
        {
            if (mDeveloperNewIncomingChangesUpdater != null)
            {
                mDeveloperNewIncomingChangesUpdater.Update();
            }

            if (mGluonNewIncomingChangesUpdater != null)
            {
                mGluonNewIncomingChangesUpdater.Update(DateTime.Now);
            }

            FillPendingChanges(newChangesInWk);
        }
Beispiel #2
0
        void FillPendingChanges(INewChangesInWk newChangesInWk)
        {
            if (mIsRefreshing)
            {
                return;
            }

            mIsRefreshing = true;

            List <ChangeInfo> changesToSelect =
                PendingChangesSelection.GetChangesToFocus(mChangesTreeView);

            mProgressControls.ShowProgress(PlasticLocalization.GetString(
                                               PlasticLocalization.Name.LoadingPendingChanges));

            IDictionary <MountPoint, IList <PendingMergeLink> > mergeLinks = null;

            IThreadWaiter waiter = ThreadWaiter.GetWaiter();

            waiter.Execute(
                /*threadOperationDelegate*/ delegate
            {
                FilterManager.Get().Reload();

                WorkspaceStatusOptions options = WorkspaceStatusOptions.None;
                options |= WorkspaceStatusOptions.FindAdded;
                options |= WorkspaceStatusOptions.FindDeleted;
                options |= WorkspaceStatusOptions.FindMoved;
                options |= WorkspaceStatusOptions.SplitModifiedMoved;
                options |= PendingChangesOptions.GetWorkspaceStatusOptions();

                if (newChangesInWk != null)
                {
                    newChangesInWk.Detected();
                }

                mPendingChanges.Calculate(
                    options, PendingChangesOptions.GetMovedMatchingOptions());

                mergeLinks = Plastic.API.GetPendingMergeLinks(mWkInfo);
            },
                /*afterOperationDelegate*/ delegate
            {
                mPendingMergeLinks = mergeLinks;

                try
                {
                    if (waiter.Exception != null)
                    {
                        ExceptionsHandler.DisplayException(waiter.Exception);
                        return;
                    }

                    UpdateChangesTree();

                    UpdateMergeLinksList();

                    PendingChangesSelection.SelectChanges(
                        mChangesTreeView, changesToSelect);
                }
                finally
                {
                    mProgressControls.HideProgress();

                    UpdateIsCommentWarningNeeded(CommentText);

                    UpdateNotificationPanel();

                    mIsRefreshing = false;
                }
            });
        }