Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Multiple dialogs in eclipse v4.1

On 10-Jun-2011, at 3:04 PM, Deidre Stankard wrote:
> I am trying to create multiple dialogs in eclipse 4.1. A user, for example presses a button, and this displays a new dialog. Any examples I look up in swt shows shells to create the new dialog. But in my eclipse application it seems to use a 'Composite parent' for the shell. 
> Would anybody have any snippet of code or tutorials to do this in eclipse 4.1?

Assuming your button callback was defined within a MPart, you can obtain the part's parent Composite using injection.

public class APart {
	@Inject
	protected Composite parent;

	public void openDialog() {
		DialogClass dialog = DialogClass.open(parent, ...);
	}
}

Brian.


--
Rescue your task list with Kizby!  Free 30 day trial with no obligations.
Visit kizby.com for details.



Back to the top