Community
Participate
Working Groups
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??
PRODUCT VERSION: R 0.9
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.
Removed check if there are property pages. The action already has code in run to show an error diolog if there are no pages.
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.
Right, removed change to PropertyDialogAction and changed MainActionGroup to use selection.size() == 1 instead of calling isApplicableForSelection.