diff options
author | Michael Valenta | 2002-04-08 13:01:56 +0000 |
---|---|---|
committer | Michael Valenta | 2002-04-08 13:01:56 +0000 |
commit | 1db8231d63e244b075363ff7c8985ea926008f07 (patch) | |
tree | fb61e12352ada01200956ff0b6441e2ca61b35a6 | |
parent | 5604a33c069eab628cf605314103586600e74796 (diff) | |
download | eclipse.platform.team-1db8231d63e244b075363ff7c8985ea926008f07.tar.gz eclipse.platform.team-1db8231d63e244b075363ff7c8985ea926008f07.tar.xz eclipse.platform.team-1db8231d63e244b075363ff7c8985ea926008f07.zip |
Signal fail for folders that are not deleted
2 files changed, 7 insertions, 21 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSMoveDeleteHook.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSMoveDeleteHook.java index 2643f0b24..e8a119c6b 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSMoveDeleteHook.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSMoveDeleteHook.java @@ -21,6 +21,7 @@ import org.eclipse.core.resources.team.IMoveDeleteHook; import org.eclipse.core.resources.team.IResourceTree; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.MessageDialog; @@ -35,6 +36,7 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.team.ccvs.core.CVSProviderPlugin; +import org.eclipse.team.ccvs.core.CVSStatus; import org.eclipse.team.ccvs.core.ICVSFile; import org.eclipse.team.ccvs.core.ICVSFolder; import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot; @@ -125,6 +127,7 @@ public class CVSMoveDeleteHook implements IMoveDeleteHook { IFolder destFolder = destination.getFolder(resource.getFullPath().removeFirstSegments(source.getFullPath().segmentCount())); destFolder.create(false, true, monitor); } + tree.failed(new CVSStatus(IStatus.ERROR, 0, Policy.bind("CVSMoveDeleteHook.folderDeletionFailure", resource.getFullPath().toString()))); //$NON-NLS-1$ } else if (resource.getType() == IResource.FILE) { fileFound[0] = true; IFile destFile = null; @@ -255,25 +258,7 @@ public class CVSMoveDeleteHook implements IMoveDeleteHook { // The CVS core delta listener will mark each file as an outgoing deletion // so we just need to delete each file and let the delta listener do its thing try { - if ( ! makeFolderOutgoingDeletion(tree, source, destination, updateFlags, monitor) && ! dialogShown && destination == null) { - showDialog(new IRunnableWithShell() { - public void run(Shell shell) { - MoveDeleteMessageDialog dialog = new MoveDeleteMessageDialog( - shell, - title, - null, // accept the default window icon - message, - MessageDialog.QUESTION, - new String[] {IDialogConstants.OK_LABEL}, - 0, false); // yes is the default - performDelete[0] = dialog.open() == 0; - if (performDelete[0]) { - CVSProviderPlugin.getPlugin().setPromptOnFolderDelete( ! dialog.isDontShowAgain()); - CVSUIPlugin.getPlugin().getPreferenceStore().setValue(ICVSUIConstants.PREF_PROMPT_ON_FOLDER_DELETE, CVSProviderPlugin.getPlugin().getPromptOnFolderDelete()); - } - } - }); - } + makeFolderOutgoingDeletion(tree, source, destination, updateFlags, monitor); } catch (final CoreException e) { showDialog(new IRunnableWithShell() { public void run(Shell shell) { diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties index aa861546d..c4486579b 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties @@ -112,6 +112,9 @@ CVSMoveDeleteHook.deleteFolderMessage=Folder ''{0}'' is under CVS control. In or CVSMoveDeleteHook.moveFolderTitle=Move of CVS Controlled Folder CVSMoveDeleteHook.moveFolderMessage=Folder ''{0}'' is under CVS control. A move results in the deletion of the folder from its old location. In order to properly communicate this deletion to CVS, the old folder and any subfolders will remain and files contained in this folder will be marked as outgoing deletions. Any empty folders will be pruned when the deletions are committed. CVSMoveDeleteHook.dontShowAgain=Don't show this again +CVSMoveDeleteHook.Team_Private_Resource_1=Team Private Resource +CVSMoveDeleteHook.Deletion_of_team_private_resources_is_not_permitted_2=Deletion of team private resource ''{0}'' is not permitted +CVSMoveDeleteHook.folderDeletionFailure=Folder ''{0}'' was not deleted in order to properly communicate file deletions to CVS CVSOperationCancelledException.operationCancelled=Operation Cancelled @@ -583,8 +586,6 @@ CVSRemoveResolutionGenerator.Commit_Deletion_to_CVS_1=Commit Deletion to CVS CVSRemoveResolutionGenerator.Undo_Deletion_from_Local_History_2=Undo Deletion from Local History CVSRemoveResolutionGenerator.No_local_history_available._Try_undoing_from_the_server_3=No local history available. Try undoing from the server CVSRemoveResolutionGenerator.Undo_Deletion_from_CVS_Server_4=Undo Deletion from CVS Server -CVSMoveDeleteHook.Team_Private_Resource_1=Team Private Resource -CVSMoveDeleteHook.Deletion_of_team_private_resources_is_not_permitted_2=Deletion of team private resource ''{0}'' is not permitted CVSRemoveResloutionGenerator.Commit_Deletion_to_CVS_1=Commit Deletion to CVS CVSRemoveResloutionGenerator.Undo_Deletion_from_Local_History_2=Undo Deletion from Local History CVSRemoveResloutionGenerator.No_local_history_available._Try_undoing_from_the_server_3=No local history available. Try undoing from the server |