void IOpenMenuOperations.Open() { List <string> selectedPaths = PendingChangesSelection. GetSelectedPathsWithoutMeta(mPendingChangesTreeView); FileSystemOperation.Open(selectedPaths); }
void PendingChangesViewMenu.IMetaMenuOperations.DiffMeta() { if (LaunchTool.ShowDownloadPlasticExeWindow( mWkInfo, mIsGluonMode, TrackFeatureUseEvent.Features.InstallPlasticCloudFromDiffWorkspaceContent, TrackFeatureUseEvent.Features.InstallPlasticEnterpriseFromDiffWorkspaceContent, TrackFeatureUseEvent.Features.CancelPlasticInstallationFromDiffWorkspaceContent)) { return; } 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 IOpenMenuOperations.OpenWithCustom(string exePath, string args) { List <string> selectedPaths = PendingChangesSelection. GetSelectedPathsWithoutMeta(mPendingChangesTreeView); OpenOperation.OpenWith(exePath, selectedPaths); }
void PendingChangesViewMenu.IMetaMenuOperations.OpenMeta() { List <string> selectedPaths = PendingChangesSelection .GetSelectedMetaPaths(mPendingChangesTreeView); FileSystemOperation.Open(selectedPaths); }
void IPendingChangesMenuOperations.UndoChanges() { List <ChangeInfo> changesToUndo = PendingChangesSelection .GetSelectedChanges(mPendingChangesTreeView); List <ChangeInfo> dependenciesCandidates = mPendingChangesTreeView.GetDependenciesCandidates(changesToUndo, true); UndoChangesForMode(mIsGluonMode, changesToUndo, dependenciesCandidates); }
void IPendingChangesMenuOperations.History() { ChangeInfo selectedChange = PendingChangesSelection. GetSelectedChange(mPendingChangesTreeView); mHistoryViewLauncher.ShowHistoryView( selectedChange.RepositorySpec, selectedChange.RevInfo.ItemId, selectedChange.Path, selectedChange.IsDirectory); }
void IOpenMenuOperations.OpenInExplorer() { List <string> selectedPaths = PendingChangesSelection .GetSelectedPathsWithoutMeta(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), null, null, null); }
void PendingChangesViewMenu.IMetaMenuOperations.HistoryMeta() { ChangeInfo selectedChange = PendingChangesSelection .GetSelectedChange(mPendingChangesTreeView); ChangeInfo selectedChangeMeta = mPendingChangesTreeView.GetMetaChange( selectedChange); mHistoryViewLauncher.ShowHistoryView( selectedChangeMeta.RepositorySpec, selectedChangeMeta.RevInfo.ItemId, selectedChangeMeta.Path, selectedChangeMeta.IsDirectory); }
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 IPendingChangesMenuOperations.Diff() { if (LaunchTool.ShowDownloadPlasticExeWindow(mIsGluonMode)) { return; } ChangeInfo selectedChange = PendingChangesSelection .GetSelectedChange(mPendingChangesTreeView); DiffOperation.DiffWorkspaceContent( mWkInfo, selectedChange, mPendingChanges.GetChangedForMoved(selectedChange), null, 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 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; }
void IPendingChangesMenuOperations.Diff() { if (LaunchTool.ShowDownloadPlasticExeWindow( mWkInfo, mIsGluonMode, TrackFeatureUseEvent.Features.InstallPlasticCloudFromDiffWorkspaceContent, TrackFeatureUseEvent.Features.InstallPlasticEnterpriseFromDiffWorkspaceContent, TrackFeatureUseEvent.Features.CancelPlasticInstallationFromDiffWorkspaceContent)) { return; } ChangeInfo selectedChange = PendingChangesSelection .GetSelectedChange(mPendingChangesTreeView); DiffOperation.DiffWorkspaceContent( mWkInfo, selectedChange, mPendingChanges.GetChangedForMoved(selectedChange), null, null, null); }
void PendingChangesViewMenu.IMetaMenuOperations.DiffMeta() { if (LaunchTool.ShowDownloadPlasticExeWindow(mIsGluonMode)) { return; } 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 FillPendingChanges(INewChangesInWk newChangesInWk) { if (mIsRefreshing) { return; } mIsRefreshing = true; List <ChangeInfo> changesToSelect = PendingChangesSelection.GetChangesToFocus(mPendingChangesTreeView); ((IProgressControls)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 = PlasticGui.Plastic.API.GetPendingMergeLinks(mWkInfo); }, /*afterOperationDelegate*/ delegate { mPendingMergeLinks = mergeLinks; try { if (waiter.Exception != null) { ExceptionsHandler.DisplayException(waiter.Exception); return; } UpdateChangesTree(); UpdateMergeLinksList(); PendingChangesSelection.SelectChanges( mPendingChangesTreeView, changesToSelect); } finally { ((IProgressControls)mProgressControls).HideProgress(); //UpdateIsCommentWarningNeeded(CommentText); UpdateNotificationPanel(); mIsRefreshing = false; } }); }
SelectedChangesGroupInfo IPendingChangesMenuOperations.GetSelectedChangesGroupInfo() { return(PendingChangesSelection.GetSelectedChangesGroupInfo( mPendingChangesTreeView)); }