How do I get the workbench window to open a modal dialog in an Eclipse based project?
问题 In order to open a modal dialog, you need to pass a parent window, and pass the necessary flags for the dialog to be modal of course. Depending on where you are in the eclipse infrastructure, finding this parent window is not always easy. How can the parent window be accessed? 回答1: The piece of code from the previous answer will work. However, keep in mind you can only open your dialog from the UI thread. If you are opening the dialog from a different thread, e.g. a background process, you