You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2009/02/27 00:47:26 UTC

svn commit: r748354 - /qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/MBeanView.java

Author: robbie
Date: Thu Feb 26 23:47:25 2009
New Revision: 748354

URL: http://svn.apache.org/viewvc?rev=748354&view=rev
Log:
QPID-1679: added a check for the number of available notifications to subscribe for, if this is null or 0, do not show the notifications tab

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

Modified: qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/MBeanView.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/MBeanView.java?rev=748354&r1=748353&r2=748354&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/MBeanView.java (original)
+++ qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/MBeanView.java Thu Feb 26 23:47:25 2009
@@ -30,6 +30,7 @@
 import org.apache.qpid.management.ui.exceptions.InfoRequiredException;
 import org.apache.qpid.management.ui.jmx.MBeanUtility;
 import org.apache.qpid.management.ui.model.AttributeData;
+import org.apache.qpid.management.ui.model.NotificationInfoModel;
 import org.apache.qpid.management.ui.model.OperationData;
 import org.apache.qpid.management.ui.model.OperationDataModel;
 import org.eclipse.jface.viewers.ISelection;
@@ -359,6 +360,13 @@
     
     private void createNotificationsTab(TabFolder tabFolder)
     {
+        NotificationInfoModel[] items = MBeanUtility.getNotificationInfo(_mbean);
+        if (items == null || items.length == 0)
+        {
+            //the mbean has no notifications to subscribe for, do not create the tab.
+            return;
+        }
+        
         NotificationsTabControl controller = new NotificationsTabControl(tabFolder);
         
         TabItem tab = new TabItem(tabFolder, SWT.NONE);



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