开发者

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

开发者 https://www.devze.com 2023-01-14 20:52 出处:网络
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?\");

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 f开发者_JAVA技巧or yes and nothing else for no.

How do I do this?


You need to get the value returned from calling openQuestion:

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

and then decide what to do based on that value.

0

精彩评论

暂无评论...
验证码 换一张
取 消