Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 420304

Summary: Related Links missing in some cases
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: simon_kaegi
Version: 3.0Flags: simon_kaegi: review+
Target Milestone: 4.0 RC3   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2013-10-24 12:44:38 EDT
Problem with the fix for bug 411741.

The code that processes each related link contribution (globalCommands.generateRelatedLinks()) is supposed to work like this:

1. Check if the related link provides 'name' and 'uriTemplate'. If so, resolve to a CommandOptions.
2. Otherwise, check if a command already exists in the CommandRegistry for this related link. If so, resolve to the existing Command.
3. Otherwise, create a new CommandOptions for the related link. Resolve to the new CommandOptions.

There is a bug in step 2 and 3. When the Command does not exist in the registry, the code resolves to an undefined value, when it should instead proceeed to step 3.

This causes certain related links to be missing.
Comment 1 Mark Macdonald CLA 2013-10-24 13:09:41 EDT
When the bug in step 2 occurs, it causes an exception that prevents *all* Related Links from being shown. 

For example, go to the Git Log page on a repo. Once the page has loaded, click the hamburger. You don't see any related links, because they've been clobbered.

This bug doesn't happen on the Editor page, because (I think) the file explorer pre-processes extension commands such that every related link has a Command registered for it before the Related Links are processed. Therefore, the failure to reach Step 3 does not matter, because Step 3 is never expected to run on the Editor page.
Comment 2 Simon Kaegi CLA 2013-10-24 13:20:38 EDT
Fine. Makes sense. +1