public void postWindowOpen() {

    if (UnwCorePlugin.useBatchMode) {
      window = getWindowConfigurer().getWindow();
      window.getShell().setMinimized(true);
    }

    actionBarConfigurer = getWindowConfigurer().getActionBarConfigurer();
    myMenuBar = actionBarConfigurer.getMenuManager();

    ViewUtils.setStatusLineManager(actionBarConfigurer.getStatusLineManager());

    imageSsght = UnwGUIPlugin.getImageDescriptor("icons/eye2_32.png").createImage();
    getWindowConfigurer().getWindow().getShell().setImage(imageSsght);

    // register into the CoreManager the reference to the status line
    saveStatusLine();

    // remove foreign menu items
    cleanMenuBar();

    // remove foreign buttons in the tool bar
    cleanToolBar();

    UnwInfrastructure.postWindowOpen();
  }
  private void cleanToolBar() {
    final ICoolBarManager coolBar = actionBarConfigurer.getCoolBarManager();
    String contribID = null;
    //
    //		toolbar = ((CoolBarManager2)coolBar).getControl();
    //		toolbar.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
    //
    //		toolbar.addPaintListener(new PaintListener() {
    //			public void paintControl(PaintEvent e) {
    //				Display display = e.display;
    //
    //				toolbar.setBackground(DesignUIPlugin.getColor(COLOR_SSGHT.YELLOW_LIGHT2));
    //
    //				if (!paintListenerAttached) {
    //					for (CoolItem it : toolbar.getItems()) {
    //						if (it != null) {
    //							it.getControl().setBackground(DesignUIPlugin.getColor(COLOR_SSGHT.YELLOW_LIGHT2));
    //							paintListenerAttached = true;
    //						}
    //					}
    //				}
    //			}
    //		});
    //		toolbar.redraw();

    for (IContributionItem contribItem : coolBar.getItems()) {
      contribID = contribItem.getId();
      if (contribID != null && contribID.startsWith("org.eclipse.")) {
        coolBar.remove(contribItem);
      }
    }
    coolBar.update(true); // refresh the display of the cool bar
  }
 public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
   super(configurer);
   window = configurer.getWindowConfigurer().getWindow();
 }