Bug 1909 - [Contributions] Switching views updates images for all menus (1GC3CQH)
Summary: [Contributions] Switching views updates images for all menus (1GC3CQH)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Simon Arsenault CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:22 EDT by Nick Edgar CLA
Modified: 2002-09-03 16:29 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Edgar CLA 2001-10-10 22:22:03 EDT
- Load version 0.044 [ne] 01 of ImageDescriptor and URLImageDescriptor, which add trace statements.
- Repeatedly switch between two views (e.g. task list and properties).
- You see two print statements on the console each time:
createImage: URLImageDescriptor(eclipse:/plugin/com.ibm.jdt.ui/icons/full/ctool16/java_pers.gif)
createImage: URLImageDescriptor(eclipse:/plugin/com.ibm.jdt.ui/icons/full/ctool16/java_pers.gif)

This is the image for the Java perspectives.
WorkbenchWindow.updateActionBars() does and updateAll() on the menu manager,
which forces all menu items, even those not currently visible, to be updated,
which causes SwitchToPerspMenu to fill the menu, which loads the images each time (it doesn't cache).

Recommend:
	1. WorkbenchWindow.updateActionBars() should do an update(false), not an updateAll(false).
		- Is there any downside to this? The menus should update themselves when shown.
	2. SwitchToPerspMenu should cache its images (tricky given API on contribution items; see ActionContributionitem).

NOTES:

NE (04/12/01 6:39:18 PM)
	Released change 1 above as WorkbenchWindow 0.044 [ne] 01.

NE (5/2/01 10:24:51 PM)
	Had to back out of this change because accelerators were not getting hooked properly with lazily created menus.
Comment 1 DJ Houghton CLA 2001-10-24 06:49:41 EDT
PRODUCT VERSION:
0.044

Comment 2 Kevin Haaland CLA 2002-01-21 21:03:20 EST
Can this defect be closed?
Comment 3 Nick Edgar CLA 2002-01-22 21:45:42 EST
Need to reinvestigate as part of performance work.
They should not be getting recreated given the way action contribution items 
cache images now, but it's still possible if the menus are managing their own 
images.
Comment 4 Simon Arsenault CLA 2002-09-03 16:29:34 EDT
Code changes done.