user244333
user244333

Reputation:

org.eclipse.jface.dialogs.MessageDialog.openQuestion How to interact?

I am working on an eclipse plugin. One of the files has this code

org.eclipse.jface.dialogs.MessageDialog.openQuestion(null, some function , "Do you agree?");

This part of the code pops up a dialog box with a message and has two options, yes or no.

I want to display a new dialog box for yes and nothing else for no.

How do I do this?

Upvotes: 1

Views: 598

Answers (1)

Richard Fearn
Richard Fearn

Reputation: 25491

You need to get the value returned from calling openQuestion:

boolean result = MessageDialog.openQuestion(...);

and then decide what to do based on that value.

Upvotes: 3

Related Questions