Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341274 - New[client]eclipse.CommandService ._render function needs to render commad on left
Summary: New[client]eclipse.CommandService ._render function needs to render commad on...
Status: RESOLVED INVALID
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-29 14:43 EDT by libing wang CLA
Modified: 2011-08-30 10:21 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description libing wang CLA 2011-03-29 14:43:28 EDT
currently eclipse.CommandService ._render function always uses dojo.place(image, parent, "last");  to render a command  , which ends up rendering the command floating to the right end of the tool bar.
In compare editor case , there are two groups of comands
1. Commands for diff operations. e.g. "next diff" , "copy to left"
2. Commands for undo , redo and save on the left side .

I would like group 1 to be rendered on the right end and group 2 on the left end of the page action tool bar.
Comment 1 Susan McCourt CLA 2011-03-29 15:36:22 EDT
I think there's a better way to achieve this.
The "dom" scoped contributions are designed to let you put dom elements wherever you want commands to render.  So you can have multiple spans in your toolbar, aligned and placed as needed.  The contribute the command to the appropriate dom ID.

So all your commands get defined in the "dom" scope.

commandService.addCommand(nextDiffCommand, "dom");
etc...

You could have span for diff commands and a span for editor commands.
Contributions look like this:

commandService.registerCommandContribution("orion.nextdiff", 1, "diffSpanId");

The editor commands can be generated as normally (into a different span).
Comment 2 Simon Kaegi CLA 2011-06-20 22:38:57 EDT
I don't think is relevant anymore.