Bug 2656 - Can menu item Properties always be enabled for performance? (1GHSMJQ)
Summary: Can menu item Properties always be enabled for performance? (1GHSMJQ)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Randy Giffen CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2001-10-10 22:40 EDT by Simon Arsenault CLA
Modified: 2002-05-20 15:18 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 Simon Arsenault CLA 2001-10-10 22:40:47 EDT
Looking into why the first time the popup menu of the Navigator view is
	opened it takes so long. One area that takes about 1/3 of a second is to
	determine if the Properties menu item should be enabled/disabled.

	If we look at ResourceNavigator::fillContextMenu, it will call
	PropertyDialogAction::isApplicableForSelection, which will end up calling
	PropertyPageContributorManager::hasContributorsFor. This method calls
	loadContributors() which takes some time to execute the first time.

	If we assume most of the time, there will be contributors for the properties
	dialog, could we not leave the menu item enabled all the time? Only when
	the user selects the Properties menu item would we do this check. If no
	contributors, then display a message or the Properties dialog box with
	a message.

	It's kinda annoying to take this hit on each different object you popup the
	context menu on...especially is you are not even going to choose Properties
	from the popup menu.

NOTES:
JEL (02/08/2001 11:54:12 AM)
- I think there already is a dialog that pops up if no pages exist, we just never
see it because the action would be disabled if that were the case.
- If we do pop up a dialog, would it be more polite to display the properties dialog
with no pages available but display a dummy page that reads 'No properties
available' in the title; this may be better justification for ignoring the check
and always enabling the action.
- Don't all Navigator items have at least the Info page?  The only items that will
appear in the Nav are Projects, Folders, and Files which all have the Info page.
What items don't have property pages??
Comment 1 DJ Houghton CLA 2001-10-29 19:07:32 EST
PRODUCT VERSION:
	R 0.9

Comment 2 Nick Edgar CLA 2002-05-17 22:20:07 EDT
Should look at this again.  I think we're still checking, but at least in the 
case of the Navigator we could always enable the action.
Note that it's now a global action too.
Comment 3 Randy Giffen CLA 2002-05-20 13:49:43 EDT
Removed check if there are property pages. The action already has code in run 
to show an error diolog if there are no pages.
Comment 4 Nick Edgar CLA 2002-05-20 14:59:26 EDT
Note we cannot change the implementation in 
PropertyDialogAction.isApplicableForSelection, since this is contrary to spec.
Since this action is not specific to the Navigator, others may use this in 
places where they don't always have a property page, and may be relying on the 
spec'ed behaviour.
Should just change its enablement in the Navigator.


Comment 5 Randy Giffen CLA 2002-05-20 15:18:09 EDT
Right, removed change to PropertyDialogAction and changed MainActionGroup to 
use selection.size() == 1 instead of calling isApplicableForSelection.