| Summary: | WTP Source Editing Source/Refactor menus are visible and empty | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Bryan Hunt <bhunt> | ||||||||||||||||
| Component: | UI | Assignee: | Paul Webster <pwebster> | ||||||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||||||
| Severity: | normal | ||||||||||||||||||
| Priority: | P3 | CC: | bokowski, emoffatt, Mike_Wilson, pwebster, remy.suen, thatnitind | ||||||||||||||||
| Version: | 1.0 | Flags: | Mike_Wilson:
pmc_approved+
remy.suen: review+ |
||||||||||||||||
| Target Milestone: | 4.1 RC4 | ||||||||||||||||||
| Hardware: | PC | ||||||||||||||||||
| OS: | All | ||||||||||||||||||
| Whiteboard: | |||||||||||||||||||
| Bug Depends on: | |||||||||||||||||||
| Bug Blocks: | 334303 | ||||||||||||||||||
| Attachments: |
|
||||||||||||||||||
Created attachment 197654 [details]
screenshot of installed software
I just discovered that the Package Explorer view must be active to get the duplicate menus. If you switch to another view such as the Outline view, the duplicate menus go away. I also forgot to mention that the duplicated menus are empty. In my case, they come from WTP Source Editing (they're different than the JDT menus). And without the correct parts up they're empty. In 3.x, they are there as well, but the system doesn't render empty MenuManagers. PW Created attachment 197809 [details]
Update the menu bar on workbench changes v01
This speeds up the disappearance of the extra, empty menus.
However, the menus are still shown until the user "arms" them (so they show up empty once).
PW
Created attachment 197813 [details]
Show main menu items v01
After our WorkbenchWindow create the main menu bar, send each top level item an SWT.Show.
This evaluates the visibility of all of the top level menus, and voila the extra menus disappear.
This will create widgets for all of the next-level entries even though the user has not shown them.
PW
Created attachment 197816 [details]
Update the Menu bar model children
This is probably less costly than firing an SWT.Show event. It evaluates the visibility of the model children of the main menu items.
That will set all of the model items (and hence the IContributionItems) to visible==false in the case of these menus, so that the next menu bar update(true) will clear out the empty menus.
PW
Considering for GA PW When I open an XSD file, I now see a 'Design' menu but the 'Refactor' menu seems to have disappeared. (In reply to comment #8) > When I open an XSD file, I now see a 'Design' menu but the 'Refactor' menu > seems to have disappeared. see bug 348818 Created attachment 197904 [details]
Update the Menu bar model children v02
The menu bar doesn't receive SWT.Show events, and so has no hooks to know when it needs to do visibility processing.
This uses the submenu children model processing to determine if there are any visible children. But just like always-visible tool items, it requests menu bar processing in the timerExec(*).
Quick measurements of the system indicate one timerExec takes between 20 and 24 ms, and our timerExec runs every 400 ms.
PW
Remy, could you review this one? PW Created attachment 197909 [details]
Update the Menu bar model children v03
Same as v02, but the WorkbenchWindow Runnable is executed in a SafeRunner so it won't kill the timerExec on catastrophic failure.
PW
(In reply to comment #12) > Created attachment 197909 [details] > Update the Menu bar model children v03 Confirmed that the empty menus go away. Please update the copyright headers for MenuManagerRendererFilter and ContextService. This is clearly a tactical fix to get things working for 4.1. We will need to revisit this after we ship. It's a brute force way to force the menu bar to be updated properly, but it will do for now. Released and scheduled a build I20110614-1045 PW |
Created attachment 197652 [details] screenshot of menubar I downloaded 4.1RC3 installed some features from Indigo p2 repo, and now I have duplicate Source and Refactor menus. The features I installed are: DataTools EMF SDK JavaScript Development Tools M2E Marketplace Client Mylyn Web Page Editor