void IAssetMenuOperations.ShowDiff() { string selectedPath = AssetsSelection.GetSelectedPath( mAssetSelection.GetSelectedAssets()); DiffInfo diffInfo = null; IThreadWaiter waiter = ThreadWaiter.GetWaiter(10); waiter.Execute( /*threadOperationDelegate*/ delegate { string symbolicName = GetSymbolicName(selectedPath); string extension = Path.GetExtension(selectedPath); diffInfo = Plastic.API.BuildDiffInfoForDiffWithPrevious( selectedPath, symbolicName, selectedPath, extension, mWkInfo); }, /*afterOperationDelegate*/ delegate { if (waiter.Exception != null) { ExceptionsHandler.DisplayException(waiter.Exception); return; } DiffOperation.DiffWithPrevious( diffInfo, null, null); }); }
void IAssetMenuOperations.ShowHistory() { if (LaunchTool.ShowDownloadPlasticExeWindow( mWkInfo, mIsGluonMode, TrackFeatureUseEvent.Features.InstallPlasticCloudFromShowHistory, TrackFeatureUseEvent.Features.InstallPlasticEnterpriseFromShowHistory, TrackFeatureUseEvent.Features.CancelPlasticInstallationFromShowHistory)) { return; } AssetList assetList = mAssetSelection.GetSelectedAssets(); Asset selectedAsset = AssetsSelection.GetSelectedAsset( assetList); string selectedPath = AssetsSelection.GetSelectedPath( assetList); WorkspaceTreeNode node = PlasticGui.Plastic.API. GetWorkspaceTreeNode(selectedPath); mHistoryViewLauncher.ShowHistoryView( node.RepSpec, node.RevInfo.ItemId, selectedPath, selectedAsset.isFolder); }
static void UpdateFilterMenuItems() { SelectedPathsGroupInfo info = AssetsSelection.GetSelectedPathsGroupInfo( ((AssetOperations.IAssetSelection)sAssetSelection).GetSelectedAssets(), PlasticPlugin.AssetStatusCache); sFilterMenuBuilder.UpdateMenuItems(FilterMenuUpdater.GetMenuActions(info)); }
void IAssetMenuOperations.ShowHistory() { AssetList assetList = mAssetSelection.GetSelectedAssets(); Asset selectedAsset = AssetsSelection.GetSelectedAsset( assetList); string selectedPath = AssetsSelection.GetSelectedPath( assetList); WorkspaceTreeNode node = Plastic.API. GetWorkspaceTreeNode(selectedPath); mHistoryViewLauncher.ShowHistoryView( node.RepSpec, node.RevInfo.ItemId, selectedPath, selectedAsset.isFolder); }
void IAssetMenuOperations.ShowDiff() { if (LaunchTool.ShowDownloadPlasticExeWindow( mWkInfo, mIsGluonMode, TrackFeatureUseEvent.Features.InstallPlasticCloudFromShowDiff, TrackFeatureUseEvent.Features.InstallPlasticEnterpriseFromFromShowDiff, TrackFeatureUseEvent.Features.CancelPlasticInstallationFromFromShowDiff)) { return; } string selectedPath = AssetsSelection.GetSelectedPath( mAssetSelection.GetSelectedAssets()); DiffInfo diffInfo = null; IThreadWaiter waiter = ThreadWaiter.GetWaiter(10); waiter.Execute( /*threadOperationDelegate*/ delegate { string symbolicName = GetSymbolicName(selectedPath); string extension = Path.GetExtension(selectedPath); diffInfo = PlasticGui.Plastic.API.BuildDiffInfoForDiffWithPrevious( selectedPath, symbolicName, selectedPath, extension, mWkInfo); }, /*afterOperationDelegate*/ delegate { if (waiter.Exception != null) { ExceptionsHandler.DisplayException(waiter.Exception); return; } DiffOperation.DiffWithPrevious( diffInfo, null, null); }); }
void IAssetFilesFilterPatternsMenuOperations.AddFilesFilterPatterns( FilterTypes type, FilterActions action, FilterOperationType operation) { List <string> selectedPaths = AssetsSelection.GetSelectedPaths( mAssetSelection.GetSelectedAssets()); 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, mWorkspaceWindow, type, operation, filterRulesConfirmationData); }
internal static List <string> ForOperation( IAssetSelection assetSelection, IAssetStatusCache assetStatusCache, AssetMenuOperations operation) { List <string> selectedPaths = AssetsSelection.GetSelectedPaths( assetSelection.GetSelectedAssets()); List <string> result = new List <string>(selectedPaths); foreach (string path in selectedPaths) { if (MetaPath.IsMetaPath(path)) { continue; } string metaPath = MetaPath.GetMetaPath(path); if (!File.Exists(metaPath)) { continue; } if (result.Contains(metaPath)) { continue; } if (!IsApplicableForOperation( metaPath, false, operation, assetStatusCache)) { continue; } result.Add(metaPath); } return(result); }
void IAssetMenuOperations.ShowHistory() { if (LaunchTool.ShowDownloadPlasticExeWindow(mIsGluonMode)) { return; } AssetList assetList = mAssetSelection.GetSelectedAssets(); Asset selectedAsset = AssetsSelection.GetSelectedAsset( assetList); string selectedPath = AssetsSelection.GetSelectedPath( assetList); WorkspaceTreeNode node = Plastic.API. GetWorkspaceTreeNode(selectedPath); mHistoryViewLauncher.ShowHistoryView( node.RepSpec, node.RevInfo.ItemId, selectedPath, selectedAsset.isFolder); }