Calling swt shells one after another
Hi, i'm new to SWT and i need to do this:
-check condition1 and call shell1 if condition1 is true
-if shell1 is opened, check condition2 to decide whether to open shell2 or go directly to shell3. Close shell1
-if shell1 wasnt open (condition1=false), check condition2(same as above) to decide whether to open shell2 or go directly to shell3
-if shell2 was opened(either from shell1 or as the first shell), take some input from the user, close shell2 when he confirms it, open shell3 and give the input to shell3
-shell3 is the final shell
So to sum up, I only need one shell opened at the time; if I opened shell2, shell2 and shell3 need to communicate; the possible scenarios are: shell3; shell2->shell3; shell1->shell2->shell3.
This is a sketch of my solution:
I imagined shell2 and shell3 could communicate by setting some static properties...
Is my plan ok or is there a better way for this in SWT?