Hi, all.
I have an RCP application developed in Helios, but now we have migrated to Luna. The application used to have a banner (Composite) with a label inside of it at the very top and bottom of the app.
I had this function inside my ApplicationWorkbenchWindowAdvisor class
public void createWindowContents(Shell shell)
{
GridLayout gl;
GridData gd;
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
shell.setLayout(new GridLayout(1, false));
String defaultBanner = String.valueOf(SystemDAO.getDefaultBannerClassification(SystemDAO.MAIN_ROW_ID));
//top banner
topBanner = new Composite(shell, 0);
topBanner.setBackground(Display.getDefault().getSystemColor(labelBackgroundColor));
gd=new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false);
gd.heightHint=12;
topBanner.setLayoutData(gd);
gl=new GridLayout();
gl.marginTop=0;
gl.marginWidth=0;
topBanner.setLayout(gl);
//top label
topLabel=new Label(topBanner,SWT.None);
topLabel.setBackground(Display.getDefault().getSystemColor(labelBackgroundColor));
topLabel.setText(defaultBanner);
topLabel.setLayoutData(new GridData(SWT.CENTER,SWT.BOTTOM,true,false));
//bottom banner
bottomBanner = new Composite(shell, 0);
bottomBanner.setBackground(Display.getDefault().getSystemColor(labelBackgroundColor));
gd=new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_END, true, false);
gd.heightHint=12;
bottomBanner.setLayoutData(gd);
gl=new GridLayout();gl.marginTop=-6;
bottomBanner.setLayout(gl);
//bottom label
bottomLabel=new Label(bottomBanner,SWT.None);
bottomLabel.setBackground(Display.getDefault().getSystemColor(labelBackgroundColor));
bottomLabel.setText(defaultBanner);
bottomLabel.setLayoutData(new GridData(SWT.CENTER,SWT.BOTTOM,true,false));
}
But this isn't working after the upgrade. I tried adding that code to my preWindowOpen and postWindowOpen but this didn't make any difference. Where am I supposed to add this code? Thank you.