qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject svn commit: r800519 - in /qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views: NotificationsTabControl.java VHNotificationsTabControl.java
Date Mon, 03 Aug 2009 19:56:18 GMT
Author: robbie
Date: Mon Aug  3 19:56:18 2009
New Revision: 800519

URL: http://svn.apache.org/viewvc?rev=800519&view=rev
Log:
QPID-2014: prompt the user for confirmation before clearing all Notifications for the selected
vhost/mbean

Modified:
    qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NotificationsTabControl.java
    qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/VHNotificationsTabControl.java

Modified: qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NotificationsTabControl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NotificationsTabControl.java?rev=800519&r1=800518&r2=800519&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NotificationsTabControl.java
(original)
+++ qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NotificationsTabControl.java
Mon Aug  3 19:56:18 2009
@@ -186,10 +186,21 @@
                 IStructuredSelection ss = (IStructuredSelection)_tableViewer.getSelection();
                 if(!ss.isEmpty())
                 {
+                    //clear selected Notifications
                     serverRegistry.clearNotifications(_mbean, ss.toList());
                 }
                 else if(_notifications != null)
                 {
+                    //clear all the notifications, if there are any
+                    
+                    //check the user is certain of this clear-all operation
+                    int response = ViewUtility.popupOkCancelConfirmationMessage(
+                            "Clear Notifications", "Clear all Notifications for this MBean?");
+                    if(response != SWT.OK)
+                    {
+                        return;
+                    }
+                    
                     synchronized(this)
                     {
                         List<NotificationObject> newList = new ArrayList<NotificationObject>();

Modified: qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/VHNotificationsTabControl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/VHNotificationsTabControl.java?rev=800519&r1=800518&r2=800519&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/VHNotificationsTabControl.java
(original)
+++ qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/VHNotificationsTabControl.java
Mon Aug  3 19:56:18 2009
@@ -136,10 +136,21 @@
                 IStructuredSelection ss = (IStructuredSelection)_tableViewer.getSelection();
                 if(!ss.isEmpty())
                 {
+                    //clear selected Notifications
                     serverRegistry.clearNotifications(null, ss.toList());
                 }
                 else if(_notifications != null)
                 {
+                    //clear all the notifications, if there are any
+                    
+                    //check the user is certain of this clear-all operation
+                    int response = ViewUtility.popupOkCancelConfirmationMessage(
+                            "Clear Notifications", "Clear all Notifications for this VirtualHost?");
+                    if(response != SWT.OK)
+                    {
+                        return;
+                    }
+                    
                     synchronized(this)
                     {
                         serverRegistry.clearNotifications(null, _notifications);



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message