Exemplo n.º 1
0
        void PendingChangesViewMenu.IMetaMenuOperations.OpenMeta()
        {
            List <string> selectedPaths = PendingChangesSelection
                                          .GetSelectedMetaPaths(mPendingChangesTreeView);

            FileSystemOperation.Open(selectedPaths);
        }
Exemplo n.º 2
0
        void IPendingChangesMenuOperations.Open()
        {
            List <string> selectedPaths = PendingChangesSelection
                                          .GetSelectedPathsWithoutMeta(mPendingChangesTreeView);

            FileSystemOperation.Open(selectedPaths);
        }
Exemplo n.º 3
0
        void IPendingChangesMenuOperations.UndoChanges()
        {
            List <ChangeInfo> changesToUndo = PendingChangesSelection
                                              .GetSelectedChanges(mPendingChangesTreeView);

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

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

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

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

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

            FileSystemOperation.OpenInExplorer(selectedPaths[0]);
        }
Exemplo n.º 6
0
        void IPendingChangesMenuOperations.Diff()
        {
            ChangeInfo selectedChange = PendingChangesSelection
                                        .GetSelectedChange(mPendingChangesTreeView);

            DiffOperation.DiffWorkspaceContent(
                mWkInfo,
                selectedChange,
                mPendingChanges.GetChangedForMoved(selectedChange),
                mProgressControls,
                null, null);
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 12
0
 SelectedChangesGroupInfo IPendingChangesMenuOperations.GetSelectedChangesGroupInfo()
 {
     return(PendingChangesSelection.GetSelectedChangesGroupInfo(
                mPendingChangesTreeView));
 }