|
From: <caw...@us...> - 2007-05-11 18:57:02
|
Revision: 2469
http://svn.sourceforge.net/rubyeclipse/?rev=2469&view=rev
Author: cawilliams
Date: 2007-05-11 11:56:59 -0700 (Fri, 11 May 2007)
Log Message:
-----------
ask user if they're sure when removing gems. Also move message out to translation properties file
Modified Paths:
--------------
trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/RemoveGemActionDelegate.java
trunk/com.aptana.rdt/src/com/aptana/rdt/ui/gems/GemsMessages.java
trunk/com.aptana.rdt/src/com/aptana/rdt/ui/gems/GemsMessages.properties
Modified: trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/RemoveGemActionDelegate.java
===================================================================
--- trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/RemoveGemActionDelegate.java 2007-05-11 18:26:48 UTC (rev 2468)
+++ trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/RemoveGemActionDelegate.java 2007-05-11 18:56:59 UTC (rev 2469)
@@ -9,6 +9,7 @@
package com.aptana.rdt.internal.ui.actions;
import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Display;
@@ -19,6 +20,7 @@
import com.aptana.rdt.internal.gems.Gem;
import com.aptana.rdt.internal.gems.GemManager;
+import com.aptana.rdt.ui.gems.GemsMessages;
import com.aptana.rdt.ui.gems.GemsView;
/**
@@ -43,6 +45,9 @@
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
public void run(IAction action) {
+ boolean okay = MessageDialog.openConfirm(view.getViewSite()
+ .getShell(), null, GemsMessages.bind(GemsMessages.RemoveGemDialog_msg, selectedGem.getName()));
+ if (!okay) return;
Display.getDefault().asyncExec(new Runnable() {
public void run() {
Modified: trunk/com.aptana.rdt/src/com/aptana/rdt/ui/gems/GemsMessages.java
===================================================================
--- trunk/com.aptana.rdt/src/com/aptana/rdt/ui/gems/GemsMessages.java 2007-05-11 18:26:48 UTC (rev 2468)
+++ trunk/com.aptana.rdt/src/com/aptana/rdt/ui/gems/GemsMessages.java 2007-05-11 18:56:59 UTC (rev 2469)
@@ -14,6 +14,7 @@
public static String InstallGemDialog_name_label;
public static String GemManager_loading_local_gems;
public static String GemManager_loading_remote_gems;
+ public static String RemoveGemDialog_msg;
static {
NLS.initializeMessages(BUNDLE_NAME, GemsMessages.class);
Modified: trunk/com.aptana.rdt/src/com/aptana/rdt/ui/gems/GemsMessages.properties
===================================================================
--- trunk/com.aptana.rdt/src/com/aptana/rdt/ui/gems/GemsMessages.properties 2007-05-11 18:26:48 UTC (rev 2468)
+++ trunk/com.aptana.rdt/src/com/aptana/rdt/ui/gems/GemsMessages.properties 2007-05-11 18:56:59 UTC (rev 2469)
@@ -7,4 +7,6 @@
InstallGemDialog_name_label=Gem Name:
GemManager_loading_local_gems=Loading local gem information
-GemManager_loading_remote_gems=Loading remote gem information
\ No newline at end of file
+GemManager_loading_remote_gems=Loading remote gem information
+
+RemoveGemDialog_msg=Are you sure you want to remove the gem {0}?
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|