예제 #1
0
        void IRefreshableView.Refresh()
        {
            string query = GetBranchesQuery(mDateFilter);

            FillBranches(mWkInfo,
                         query,
                         BranchesSelection.GetSelectedRepObjectInfos(mBranchesListView));
        }
예제 #2
0
        void IBranchMenuOperations.DeleteBranch()
        {
            RepositorySpec        repSpec          = BranchesSelection.GetSelectedRepository(mBranchesListView);
            List <RepositorySpec> repositories     = BranchesSelection.GetSelectedRepositories(mBranchesListView);
            List <BranchInfo>     branchesToDelete = BranchesSelection.GetSelectedBranches(mBranchesListView);

            mBranchOperations.DeleteBranch(repositories, branchesToDelete);
        }
예제 #3
0
        void FillBranches(WorkspaceInfo wkInfo, string query, List <RepObjectInfo> branchesToSelect)
        {
            if (mIsRefreshing)
            {
                return;
            }

            mIsRefreshing = true;

            int defaultRow = TableViewOperations.
                             GetFirstSelectedRow(mBranchesListView);

            ((IProgressControls)mProgressControls).ShowProgress(
                PlasticLocalization.GetString(
                    PlasticLocalization.Name.LoadingBranches));

            ViewQueryResult queryResult = null;

            IThreadWaiter waiter = ThreadWaiter.GetWaiter();

            waiter.Execute(
                /*threadOperationDelegate*/ delegate
            {
                queryResult = new ViewQueryResult(
                    PlasticGui.Plastic.API.FindQuery(wkInfo, query));
            },
                /*afterOperationDelegate*/ delegate
            {
                try
                {
                    if (waiter.Exception != null)
                    {
                        ExceptionsHandler.DisplayException(waiter.Exception);
                        return;
                    }

                    UpdateBranchesList(
                        mBranchesListView,
                        queryResult);

                    int branchesCount = GetBranchesCount(queryResult);

                    if (branchesCount == 0)
                    {
                        return;
                    }

                    BranchesSelection.SelectBranches(
                        mBranchesListView, branchesToSelect, defaultRow);
                }
                finally
                {
                    ((IProgressControls)mProgressControls).HideProgress();
                    mIsRefreshing = false;
                }
            });
        }
예제 #4
0
        void IBranchMenuOperations.SwitchToBranch()
        {
            RepositorySpec repSpec    = BranchesSelection.GetSelectedRepository(mBranchesListView);
            BranchInfo     branchInfo = BranchesSelection.GetSelectedBranch(mBranchesListView);

            mBranchOperations.SwitchToBranch(
                repSpec,
                branchInfo,
                RefreshAsset.UnityAssetDatabase);
        }
예제 #5
0
        void IBranchMenuOperations.RenameBranch()
        {
            RepositorySpec repSpec    = BranchesSelection.GetSelectedRepository(mBranchesListView);
            BranchInfo     branchInfo = BranchesSelection.GetSelectedBranch(mBranchesListView);

            BranchRenameData branchRenameData = RenameBranchDialog.GetBranchRenameData(
                repSpec,
                branchInfo,
                mParentWindow);

            mBranchOperations.RenameBranch(branchRenameData);
        }
예제 #6
0
        void IBranchMenuOperations.CreateBranch()
        {
            RepositorySpec repSpec    = BranchesSelection.GetSelectedRepository(mBranchesListView);
            BranchInfo     branchInfo = BranchesSelection.GetSelectedBranch(mBranchesListView);

            BranchCreationData branchCreationData = CreateBranchDialog.CreateBranchFromLastParentBranchChangeset(
                mParentWindow,
                repSpec,
                branchInfo);

            mBranchOperations.CreateBranch(branchCreationData, RefreshAsset.UnityAssetDatabase);
        }
예제 #7
0
        void IBranchMenuOperations.DeleteBranch()
        {
            RepositorySpec        repSpec          = BranchesSelection.GetSelectedRepository(mBranchesListView);
            List <RepositorySpec> repositories     = BranchesSelection.GetSelectedRepositories(mBranchesListView);
            List <BranchInfo>     branchesToDelete = BranchesSelection.GetSelectedBranches(mBranchesListView);

            mBranchOperations.DeleteBranch(repositories, branchesToDelete, () =>
            {
                TrackFeatureUseEvent.For(
                    repSpec,
                    TrackFeatureUseEvent.Features.DeleteBranch);
            });
        }
예제 #8
0
        void IBranchMenuOperations.SwitchToBranch()
        {
            RepositorySpec repSpec    = BranchesSelection.GetSelectedRepository(mBranchesListView);
            BranchInfo     branchInfo = BranchesSelection.GetSelectedBranch(mBranchesListView);

            mBranchOperations.SwitchToBranch(
                repSpec,
                branchInfo,
                () =>
            {
                TrackFeatureUseEvent.For(
                    repSpec,
                    TrackFeatureUseEvent.Features.SwitchBranch);
                RefreshAsset.UnityAssetDatabase();
            });
        }
예제 #9
0
        void IBranchMenuOperations.RenameBranch()
        {
            RepositorySpec repSpec    = BranchesSelection.GetSelectedRepository(mBranchesListView);
            BranchInfo     branchInfo = BranchesSelection.GetSelectedBranch(mBranchesListView);

            BranchRenameData branchRenameData = RenameBranchDialog.GetBranchRenameData(
                repSpec,
                branchInfo,
                mParentWindow);

            mBranchOperations.RenameBranch(branchRenameData, () =>
            {
                TrackFeatureUseEvent.For(
                    repSpec,
                    TrackFeatureUseEvent.Features.RenameBranch);
            });
        }
예제 #10
0
        void IBranchMenuOperations.CreateBranch()
        {
            RepositorySpec repSpec    = BranchesSelection.GetSelectedRepository(mBranchesListView);
            BranchInfo     branchInfo = BranchesSelection.GetSelectedBranch(mBranchesListView);

            BranchCreationData branchCreationData = CreateBranchDialog.CreateBranchFromLastParentBranchChangeset(
                mParentWindow,
                repSpec,
                branchInfo);

            mBranchOperations.CreateBranch(branchCreationData, () =>
            {
                TrackFeatureUseEvent.For(
                    repSpec,
                    TrackFeatureUseEvent.Features.CreateBranch);
            });
        }
예제 #11
0
 int IBranchMenuOperations.GetSelectedBranchesCount()
 {
     return(BranchesSelection.GetSelectedBranchesCount(mBranchesListView));
 }