diff options
author | james | 2002-01-24 16:19:27 +0000 |
---|---|---|
committer | james | 2002-01-24 16:19:27 +0000 |
commit | 3847ce6bb47faf30f8c4f15b98e3b85c9e33a671 (patch) | |
tree | c101b5ccca208198b8e25bc03cd8c1b9a1a810ef | |
parent | 91505dccdbe2b966c690e8d42ba1f113a4eff43d (diff) | |
download | eclipse.platform.team-3847ce6bb47faf30f8c4f15b98e3b85c9e33a671.tar.gz eclipse.platform.team-3847ce6bb47faf30f8c4f15b98e3b85c9e33a671.tar.xz eclipse.platform.team-3847ce6bb47faf30f8c4f15b98e3b85c9e33a671.zip |
8235: Checkout from repo view does not prompt for overwrite
3 files changed, 14 insertions, 3 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddToWorkspaceAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddToWorkspaceAction.java index c455746d2..07004d845 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddToWorkspaceAction.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddToWorkspaceAction.java @@ -14,6 +14,7 @@ import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.action.IAction; +import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.team.ccvs.core.CVSProviderPlugin; import org.eclipse.team.ccvs.core.ICVSRemoteFolder; @@ -72,6 +73,13 @@ public class AddToWorkspaceAction extends TeamAction { IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name); if (project.exists()) { // Make sure the user understands they will overwrite the project. + final boolean[] confirm = new boolean[] { false }; + shell.getDisplay().syncExec(new Runnable() { + public void run() { + confirm[0] = MessageDialog.openConfirm(shell, Policy.bind("confirmOverwriteTitle"), Policy.bind("confirmOverwrite")); + } + }); + if (!confirm[0]) return; } projects[i] = project; } diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAsAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAsAction.java index 732d22774..8d0e2c99f 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAsAction.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAsAction.java @@ -73,7 +73,7 @@ public class CheckoutAsAction extends TeamAction { String name = folders[0].getName(); // Prompt for name final int[] result = new int[] { InputDialog.OK }; - final InputDialog dialog = new InputDialog(shell, "Enter Project Name", "Enter the name of the project to checkout as:", name, null); + final InputDialog dialog = new InputDialog(shell, Policy.bind("CheckoutAsAction.enterProjectTitle"), Policy.bind("CheckoutAsAction.enterProject"), name, null); shell.getDisplay().syncExec(new Runnable() { public void run() { result[0] = dialog.open(); @@ -89,7 +89,7 @@ public class CheckoutAsAction extends TeamAction { final boolean[] confirm = new boolean[] { false }; shell.getDisplay().syncExec(new Runnable() { public void run() { - confirm[0] = MessageDialog.openConfirm(shell, "Confirm Overwrite Project", "The project already exists in the workspace. Its contents will be overwritten."); + confirm[0] = MessageDialog.openConfirm(shell, Policy.bind("confirmOverwriteTitle"), Policy.bind("confirmOverwrite")); } }); if (!confirm[0]) return; 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 4c505a325..b57d94e06 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 @@ -5,7 +5,8 @@ yes=Yes no=No information=Server Information exception=Server Exception - +confirmOverwriteTitle=Confirm Overwrite Project +confirmOverwrite=The project already exists in the workspace. Its contents will be overwritten. AddAction.add=Add AddAction.adding=Adding... @@ -98,6 +99,8 @@ CVSPreferencePage.somewhatquiet=Somewhat quiet CVSPreferencePage.reallyquiet=Really quiet CheckoutAsAction.checkout=Checkout +CheckoutAsAction.enterProjectTitle=Enter Project Name +CheckoutAsAction.enterProject=Enter the name of the project to checkout as: CommitAction.commit=Commit CommitAction.committing=Committing... |