It is possible to find an active page/editor in eclipse. How can we programmatically get hold of the instance of the open modal dialog in eclipse.
It is possible to find an active page/editor in eclipse. How can we programmatically
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are no corresponding interface in Eclipse to access any current model dialog. The best approximation is
Display.getActiveShell(), which will return the shell that hosts the active dialog if one exists.[Dialogs are implemented by having their own event loop, so it can be rather difficult to run your own code…]
EDIT: Based on your comment below, here is a small snippet I use constantly to test for the presence of specific preference pages. I guess this can be used used as the starting point for your own test… Note the use of
Display.timerExec(...).