Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/projects/HideProjectAction.java

Issue 10066022: remove from editor no longer shows dialog http://code.google.com/p/dart/issues/detail?id=2522 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/projects/HideProjectAction.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/projects/HideProjectAction.java (revision 6469)
+++ editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/projects/HideProjectAction.java (working copy)
@@ -17,7 +17,6 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.window.IShellProvider;
import org.eclipse.ui.actions.CloseResourceAction;
@@ -26,23 +25,19 @@
*/
public class HideProjectAction extends CloseResourceAction {
- private final IShellProvider shellProvider;
-
/**
* Create the action.
*/
public HideProjectAction(IShellProvider shellProvider) {
super(shellProvider, ProjectMessages.HideProjectAction_text);
- //cached here since the field in super is package-private
- this.shellProvider = shellProvider;
setToolTipText(ProjectMessages.HideProjectAction_tooltip);
}
@Override
public void run() {
- if (confirmHide()) {
- super.run();
- }
+
+ super.run();
+
}
@Override
@@ -61,20 +56,9 @@
}
@Override
- protected void invokeOperation(IResource resource, IProgressMonitor monitor) throws CoreException {
+ protected void invokeOperation(IResource resource, IProgressMonitor monitor)
+ throws CoreException {
((IProject) resource).delete(false, true, monitor);
}
- /**
- * Prompt the user to confirm hiding.
- *
- * @return <code>true</code> if action should be performed, <code>false</code> otherwise
- */
- private boolean confirmHide() {
-
- return MessageDialog.openConfirm(shellProvider.getShell(),
- ProjectMessages.HideProjectAction_confirm_title,
- ProjectMessages.HideProjectAction_confirm_msg);
-
- }
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698