summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorJens Baumgart2010-07-16 07:28:56 (EDT)
committer Jens Baumgart2010-07-16 07:28:56 (EDT)
commite9cdf7a1e90aa2be4dd833f005181c862ff22b70 (patch)
tree59d4e701b04ab7266d4d11d5cc5314ed244daa0d
parent2a55b6f9b6efe82487cf13ac2295c2a8672ce68d (diff)
downloadegit-e9cdf7a1e90aa2be4dd833f005181c862ff22b70.zip
egit-e9cdf7a1e90aa2be4dd833f005181c862ff22b70.tar.gz
egit-e9cdf7a1e90aa2be4dd833f005181c862ff22b70.tar.bz2
Add missing confirmation dialog for hard resetrefs/changes/33/1133/2
Added the missing confirmation dialog for Reset->Hard action in History view. Bug: 319947 Change-Id: I1fab712e20a0087ce6f91903968416c24e3d902a Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/HardResetToRevisionAction.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/HardResetToRevisionAction.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/HardResetToRevisionAction.java
index 94c897b..0299a5b 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/HardResetToRevisionAction.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/HardResetToRevisionAction.java
@@ -13,6 +13,8 @@ import java.util.List;
import org.eclipse.egit.core.op.IEGitOperation;
import org.eclipse.egit.core.op.ResetOperation;
import org.eclipse.egit.ui.UIText;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jgit.revwalk.RevCommit;
/**
@@ -31,4 +33,14 @@ public class HardResetToRevisionAction extends AbstractRevCommitOperationAction
protected String getJobName() {
return UIText.HardResetToRevisionAction_hardReset;
}
+
+ @Override
+ public void run(IAction act) {
+ if (!MessageDialog.openQuestion(wp.getSite().getShell(),
+ UIText.ResetTargetSelectionDialog_ResetQuestion,
+ UIText.ResetTargetSelectionDialog_ResetConfirmQuestion))
+ return;
+ super.run(act);
+ }
+
}