예제 #1
0
        void PendingChangesViewMenu.IMetaMenuOperations.OpenMeta()
        {
            List <string> selectedPaths = PendingChangesSelection
                                          .GetSelectedMetaPaths(mPendingChangesTreeView);

            FileSystemOperation.Open(selectedPaths);
        }
예제 #2
0
        void IPendingChangesMenuOperations.Open()
        {
            List <string> selectedPaths = PendingChangesSelection
                                          .GetSelectedPathsWithoutMeta(mPendingChangesTreeView);

            FileSystemOperation.Open(selectedPaths);
        }
예제 #3
0
        void IPendingChangesMenuOperations.UndoChanges()
        {
            List <ChangeInfo> changesToUndo = PendingChangesSelection
                                              .GetSelectedChanges(mPendingChangesTreeView);

            List <ChangeInfo> dependenciesCandidates =
                mPendingChangesTreeView.GetDependenciesCandidates(changesToUndo, true);

            LaunchOperation.UndoChangesForMode(
                mIsGluonMode, mPlasticClient, changesToUndo, dependenciesCandidates);
        }
예제 #4
0
        void IPendingChangesMenuOperations.OpenInExplorer()
        {
            List <string> selectedPaths = PendingChangesSelection
                                          .GetSelectedPathsWithoutMeta(mPendingChangesTreeView);

            if (selectedPaths.Count < 1)
            {
                return;
            }

            FileSystemOperation.OpenInExplorer(selectedPaths[0]);
        }
예제 #5
0
        void PendingChangesViewMenu.IMetaMenuOperations.OpenMetaInExplorer()
        {
            List <string> selectedPaths = PendingChangesSelection
                                          .GetSelectedMetaPaths(mPendingChangesTreeView);

            if (selectedPaths.Count < 1)
            {
                return;
            }

            FileSystemOperation.OpenInExplorer(selectedPaths[0]);
        }
예제 #6
0
        void IPendingChangesMenuOperations.Diff()
        {
            ChangeInfo selectedChange = PendingChangesSelection
                                        .GetSelectedChange(mPendingChangesTreeView);

            DiffOperation.DiffWorkspaceContent(
                mWkInfo,
                selectedChange,
                mPendingChanges.GetChangedForMoved(selectedChange),
                mProgressControls,
                null, null);
        }
예제 #7
0
        void IPendingChangesMenuOperations.ApplyLocalChanges()
        {
            List <ChangeInfo> selectedChanges = PendingChangesSelection
                                                .GetSelectedChanges(mPendingChangesTreeView);

            if (selectedChanges.Count == 0)
            {
                return;
            }

            ApplyLocalChangesOperation operation = new ApplyLocalChangesOperation(
                mWkInfo, mPlasticClient, mPlasticClient,
                mProgressControls, mDeveloperNewIncomingChangesUpdater);

            operation.ApplyLocalChanges(
                selectedChanges,
                PendingChangesSelection.GetAllChanges(mPendingChangesTreeView));
        }
예제 #8
0
        void IPendingChangesMenuOperations.SearchMatches()
        {
            ChangeInfo selectedChange = PendingChangesSelection
                                        .GetSelectedChange(mPendingChangesTreeView);

            if (selectedChange == null)
            {
                return;
            }

            SearchMatchesOperation operation = new SearchMatchesOperation(
                mWkInfo, mPlasticClient, mPlasticClient,
                mProgressControls, mDeveloperNewIncomingChangesUpdater);

            operation.SearchMatches(
                selectedChange,
                PendingChangesSelection.GetAllChanges(mPendingChangesTreeView));
        }
예제 #9
0
        void PendingChangesViewMenu.IMetaMenuOperations.DiffMeta()
        {
            ChangeInfo selectedChange = PendingChangesSelection
                                        .GetSelectedChange(mPendingChangesTreeView);
            ChangeInfo selectedChangeMeta = mPendingChangesTreeView.GetMetaChange(
                selectedChange);

            ChangeInfo changedForMoved     = mPendingChanges.GetChangedForMoved(selectedChange);
            ChangeInfo changedForMovedMeta = (changedForMoved == null) ?
                                             null : mPendingChangesTreeView.GetMetaChange(changedForMoved);

            DiffOperation.DiffWorkspaceContent(
                mWkInfo,
                selectedChangeMeta,
                changedForMovedMeta,
                mProgressControls,
                null, null);
        }
예제 #10
0
        void IFilesFilterPatternsMenuOperations.AddFilesFilterPatterns(
            FilterTypes type, FilterActions action, FilterOperationType operation)
        {
            List <string> selectedPaths = PendingChangesSelection.GetSelectedPaths(
                mPendingChangesTreeView);

            string[] rules = FilterRulesGenerator.GenerateRules(
                selectedPaths, mWkInfo.ClientPath, action, operation);

            bool isApplicableToAllWorkspaces = !mIsGluonMode;
            bool isAddOperation = operation == FilterOperationType.Add;

            FilterRulesConfirmationData filterRulesConfirmationData =
                FilterRulesConfirmationDialog.AskForConfirmation(
                    rules, isAddOperation, isApplicableToAllWorkspaces, mParentWindow);

            AddFilesFilterPatternsOperation.Run(
                mWkInfo, mPlasticClient, type, operation, filterRulesConfirmationData);
        }
예제 #11
0
        internal static List <string> GetSelectedMetaPaths(
            PendingChangesTreeView treeView)
        {
            List <ChangeInfo> selectedChanges = PendingChangesSelection
                                                .GetSelectedChanges(treeView);

            List <string> result = new List <string>();

            foreach (ChangeInfo change in selectedChanges)
            {
                string path = change.GetFullPath();

                if (!MetaPath.IsMetaPath(path))
                {
                    continue;
                }

                result.Add(path);
            }

            return(result);
        }
예제 #12
0
 SelectedChangesGroupInfo IPendingChangesMenuOperations.GetSelectedChangesGroupInfo()
 {
     return(PendingChangesSelection.GetSelectedChangesGroupInfo(
                mPendingChangesTreeView));
 }