new MessageBox(shell, SWT.ICON_QUESTION | SWT.OK | SWT.CANCEL);
Display.getCurrent().getActiveShell();
@Inject
Shell theShell
Hi,
@Inject Shell shell;
Should work in application model elements.
Best regards, Lars
--
You received this message because you are subscribed to the Google Groups "vogella" group.
To view this discussion on the web visit https://groups.google.com/d/msg/vogella/-/GrxEWydGZY0J.
To post to this group, send email to vog...@googlegroups.com.
To unsubscribe from this group, send email to vogella+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/vogella?hl=en.
org.eclipse.e4.core.di.InjectionException: Unable to process "NewTodoHandler.shell": no actual value was found for the argument "Shell".
For a handler put the parameter into the @Execute method of the handler or use @Optional for fields.
At initialization Shell is not yet available
To view this discussion on the web visit https://groups.google.com/d/msg/vogella/-/sKM3hFrCw1sJ.
@Inject
@Optional
Shell currentShell;
MessageDialog.openInformation(currentShell, "Dialog opens!", "Dialog opens!!!");
You can't use @Inject on handlers at this time. Anything you want to use during @CanExecute or @Execute you must request as a parameter.
Paul Webster
Bug Number?
To view this discussion on the web visit https://groups.google.com/d/msg/vogella/-/_L8tpJfMTeMJ.