Hi Melan, Display.getCurrent().getActiveShell() works as expected. Thanks for the suggestion.
Regards, On Mon, Apr 7, 2014 at 12:09 PM, Melan Nimesh <[email protected]> wrote: > Hi, > > > On Mon, Apr 7, 2014 at 11:33 AM, Gayan Yalpathwala <[email protected]>wrote: > >> Hi, >> >> I have embedded a JFace dialog for some datamapper related functionality. >> This is a basic dialog that extends org.eclipse.jface.dialogs.Dialog and it >> fails to show on top when default shell is passed as the parent [1]. This >> way, the dialog opens fine but hides behind the eclipse window. I have >> tried options [2] and [3] as well where option [2] does not work either and >> [3] works with a known bug [4]. Have anyone come up with a workaround for >> this? >> >> [1] >> Shell shell = new Shell(Display.getDefault()); >> DataMapperConfigurationDialog dataMapperConfigurationDialog = new >> DataMapperConfigurationDialog(shell); >> dataMapperConfigurationDialog.create(); >> > > try with active shell rather than creating a new shell > > eg. > > Display.getCurrent().getActiveShell() or > PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); > > > Thanks, > Melan > > >> >> [2] dataMapperConfigurationDialog.getShell().forceActive(); >> >> [3] >> public DataMapperConfigurationDialog(Shell parentShell) { >> super(parentShell); >> setShellStyle(SWT.ON_TOP | SWT.CLOSE | SWT.TITLE | SWT.BORDER | SWT.OK >> | SWT.APPLICATION_MODAL); >> } >> >> [4] https://bugs.eclipse.org/bugs/show_bug.cgi?id=410810 >> >> Thanks, >> >> >> -- >> *Gayan Kaushalya Yalpathwala* >> Software Engineer >> WSO2 Inc.; http://wso2.com >> lean.enterprise.middleware >> >> mobile: +94 71 8682704 <http://asia14.wso2con.com/> >> >> <http://asia14.wso2con.com/> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > *Melan Nimesh* > Software Engineer; > WSO2 Inc.; http://wso2.org > E-mail: melan AT wso2.com; > Mobile: +94 77 631 6759 > > -- *Gayan Kaushalya Yalpathwala* Software Engineer WSO2 Inc.; http://wso2.com lean.enterprise.middleware mobile: +94 71 8682704 <http://asia14.wso2con.com/> <http://asia14.wso2con.com/>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
