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

Bug 368699

Summary: Object command is rendered in a wrong place?
Product: [ECD] Orion Reporter: Szymon Brandys <Szymon.Brandys>
Component: ClientAssignee: Susan McCourt <susan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: malgorzata.tomczyk
Version: 0.3   
Target Milestone: 0.4 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 359621    

Description Szymon Brandys CLA 2012-01-16 06:36:24 EST
I have a command added to "dom" and "object", see gitCommands.js line 440:

commandService.addCommand(addRemoteCommand, "object");
commandService.addCommand(addRemoteCommand, "dom");

On the new repo page the command is registered and rendered, see gitRepositoryExplorer.js line 853:

[1] registerCommandContribution("eclipse.addRemote", 2000, "remoteSectionActionsArea");
renderCommands(dojo.byId("remoteSectionActionsArea"), "dom", repository, this, "tool", false);

I would expect to see the command only in the "remoteSectionActionsArea" element, but it seems that renderCommands(..., "object", ...) also renders it per each matching object. I thought that [1] registers the command as "dom" command only and to register it as "object" command I have to make an extra call:

registerCommandContribution("eclipse.addRemote", 2000);

It looks like a bug for me. However if it is expected, my question is how to remove the command so it is displayed only for doms, not for objects on this particular page.
Comment 1 Susan McCourt CLA 2012-01-16 12:05:27 EST
this is a bug.  It's been hidden in the navigator because we tend to contribute to different parent paths in the navigator for dom and object contributions, and the bug manifests when the "dom" contribution is not grouped in any way.
Comment 2 Szymon Brandys CLA 2012-01-25 07:34:41 EST
*** Bug 369638 has been marked as a duplicate of this bug. ***
Comment 3 Szymon Brandys CLA 2012-01-26 06:15:05 EST
Susan, do you think it is still .4M2?
Comment 4 Susan McCourt CLA 2012-01-26 11:37:33 EST
yes, I am trying.  I am going to have the very same issue implementing "related commands" and I'm trying to figure out how much gutting of some of the underlying command representation I need to do to support that feature.
Comment 5 Susan McCourt CLA 2012-01-27 20:15:27 EST
fixed.  Still need to push it but I need to merge another branch first.
Comment 6 Susan McCourt CLA 2012-02-03 02:15:14 EST
pushed the fix.