@Execute public void execute(IEclipseContext context) { LoginDialog loginDlg = ContextInjectionFactory.make(LoginDialog.class, context); loginDlg.create(); // Make it modal loginDlg.setBlockOnOpen(true); loginDlg.open(); }
@Inject public LoginDialog(@Named(IServiceConstants.ACTIVE_SHELL) Shell parentShell) { super(parentShell); setShellStyle(SWT.BORDER | SWT.CLOSE | SWT.RESIZE | SWT.APPLICATION_MODAL); } @Override protected Control createContents(Composite parent) { Control cntrl = super.createContents(parent); setTitle("My title"); // init controls return cntrl; }