Reputation: 5072
I have a FormEditor
with a FormPage
and I want to start some action when the page was brought to front (so that it is visible for the user).
The problem is that the editor is opened in a wizard and setActive()
is called before the page is visible.
I want to start a IRunnableWithProgress
when the page is visible via ModalContext.run()
and display some results on the page that are created in another thread. But currently this is done when the wizard is still visible.
Many thanks for help,
Michael
Upvotes: 0
Views: 190
Reputation: 16225
The first few options that comes to mind is to override setActivePage
or pageChange
on the FormEditor
, or use addPageChangedListener
. You can always have some kind of flag to control your task if you don't want it to run every time the page becomes visible.
Another option (based on your question it sounds like you want to run this task specifically after the wizard is done), you could use Display.getDefault().asyncExec
to start your task when the stack unwinds after the wizard is complete.
Upvotes: 2