Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313573 - [design] separator as first menu item is not hidden
Summary: [design] separator as first menu item is not hidden
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: Workbench (show other bugs)
Version: 1.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.3 RC2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 262603
  Show dependency tree
 
Reported: 2010-05-19 12:43 EDT by Benjamin Muskalla CLA
Modified: 2010-05-21 03:56 EDT (History)
0 users

See Also:


Attachments
Fix (1.33 KB, patch)
2010-05-20 10:29 EDT, Holger Staudacher CLA
holger.staudacher: review?
rsternberg: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2010-05-19 12:43:03 EDT
If you use a Separator as first item in the Menu, the design still shows the separator. In RCP / RAP without IAD, it is hidden. A use-case for this are the MB_ADDITIONS which often occur as first item in the menu.

  protected void fillMenuBar( final IMenuManager menuBar ) {
    MenuManager fileMenu = new MenuManager( "File",
                                            IWorkbenchActionConstants.M_FILE );
    menuBar.add( fileMenu );
    fileMenu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
    fileMenu.add( importAction );
    fileMenu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
    fileMenu.add( exportAction );
    fileMenu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
    fileMenu.add( exitAction );
  }
Comment 1 Holger Staudacher CLA 2010-05-20 10:29:28 EDT
Created attachment 169351 [details]
Fix

Checks if the first menuitem is a separator. If it's a separator than it's not added to the menu.
Comment 2 Ralf Sternberg CLA 2010-05-20 16:14:27 EDT
Comment on attachment 169351 [details]
Fix

the patch looks good for me
Comment 3 Holger Staudacher CLA 2010-05-21 03:56:01 EDT
Changes are in CVS HEAD. Thanks for reviewing.