I noticed some strange things going on with the Whiteboard plugin's GUI components, including this error: "Plugin Component type is not supported. Should provide a plugin in AWT, SWT or Swing." The other issues I thought I saw went away when I corrected this problem.
The whiteboard plugin adds a submenu to ContactRightButtonMenu, with a JMenuItem for each subcontact within the selected contact. If that subcontact does not support the whiteboard, it is greyed out. If none of the subcontacts supports whiteboarding, then the menu is not displayed at all.
After a couple of wrong turns and some help from Sébastien Mazy, we determined that the error is triggered when none of the subcontacts supports whiteboarding. In this case WhiteboardMenuItem returns a null Object so that a useless submenu will not be placed in the menu.
It would be preferable to either eliminate the error message by changing UIServiceImpl's plugin handling, or to make sure than a GUI element is always returned.
I think it would be more user friendly and more idiot proof if we place a greyed out "Whiteboard" JMenuItem on the menu in cases where a contact does not support whiteboarding on any account. This makes a number of things much clearer: 1) that the Whiteboarding plugin is installed and functioning properly, 2) that the user was looking for the option in the correct place and 3) That the contact does not support whiteboarding.
This patch changes WhiteboardMenuItem to fit this logic. If there are no contacts that support the Whiteboard it will return a disabled "Whiteboard" JMenuItem, instead of returning null or returning a "Whiteboard" JMenu with a useless list of disabled JMenuItems. This way we don't add a useless menu, but the user is still informed that whiteboarding is unsupported for that contact.
whiteboard-menu-item-4.patch (1.58 KB)