void PendingChangesViewMenu.IMetaMenuOperations.OpenMeta() { List <string> selectedPaths = PendingChangesSelection .GetSelectedMetaPaths(mPendingChangesTreeView); FileSystemOperation.Open(selectedPaths); }
void IPendingChangesMenuOperations.Open() { List <string> selectedPaths = PendingChangesSelection .GetSelectedPathsWithoutMeta(mPendingChangesTreeView); FileSystemOperation.Open(selectedPaths); }
void IPendingChangesMenuOperations.UndoChanges() { List <ChangeInfo> changesToUndo = PendingChangesSelection .GetSelectedChanges(mPendingChangesTreeView); List <ChangeInfo> dependenciesCandidates = mPendingChangesTreeView.GetDependenciesCandidates(changesToUndo, true); LaunchOperation.UndoChangesForMode( mIsGluonMode, mPlasticClient, changesToUndo, dependenciesCandidates); }
void IPendingChangesMenuOperations.OpenInExplorer() { List <string> selectedPaths = PendingChangesSelection .GetSelectedPathsWithoutMeta(mPendingChangesTreeView); if (selectedPaths.Count < 1) { return; } FileSystemOperation.OpenInExplorer(selectedPaths[0]); }
void PendingChangesViewMenu.IMetaMenuOperations.OpenMetaInExplorer() { List <string> selectedPaths = PendingChangesSelection .GetSelectedMetaPaths(mPendingChangesTreeView); if (selectedPaths.Count < 1) { return; } FileSystemOperation.OpenInExplorer(selectedPaths[0]); }
void IPendingChangesMenuOperations.Diff() { ChangeInfo selectedChange = PendingChangesSelection .GetSelectedChange(mPendingChangesTreeView); DiffOperation.DiffWorkspaceContent( mWkInfo, selectedChange, mPendingChanges.GetChangedForMoved(selectedChange), mProgressControls, null, null); }
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)); }
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)); }
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); }
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); }
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); }
SelectedChangesGroupInfo IPendingChangesMenuOperations.GetSelectedChangesGroupInfo() { return(PendingChangesSelection.GetSelectedChangesGroupInfo( mPendingChangesTreeView)); }