I am doing Eclipse plugin development. I am using the class MessageDialog
. The API can be found here.
I want to add a link like I did about with "here" in the message of the MessageDialog
.
Here is what I am doing:
String errorMessage = "You have received an error. Please visit " + URL_NEEDED_HERE
MessageDialog.openError(getShell(), "Get Existing Data Sources Error", errorMessage);
The URL keeps showing up as just a String. Is it possible for it to show as a link?
As @greg-449 said, the
MessageDialog
does not support links. If you don't mind the hackish approach, you can save some work and overridecreateMessageArea
like so:The code is copied form the
IconAndMessageDialog
and just replaces theLabel
with aLink
widget.Alternatively you can override
createCustomArea
like so:This is the designated way to add custom controls to a
MessageDialg
but leads to a slightly different layout: