use of org.eclipse.ui.forms.IMessage in project bndtools by bndtools.
the class MessageHyperlinkAdapter method showPopup.
private void showPopup(final HyperlinkEvent e) {
Hyperlink link = (Hyperlink) e.getSource();
link.setToolTipText(null);
if (popupDialog != null)
popupDialog.close();
IMessage[] messages = (IMessage[]) e.data;
if (messages == null) {
messages = new IMessage[0];
} else {
messages = Stream.of(messages).filter(Objects::nonNull).toArray(IMessage[]::new);
}
if (messages.length == 0) {
MessageDialog.openInformation(part.getSite().getShell(), part.getTitle(), "No further information available.");
} else {
popupDialog = new MessagesPopupDialog(link, (IMessage[]) e.data, part);
popupDialog.open();
}
}