ApplicationActionBar in RCP product [message #444992] |
Sat, 25 February 2006 10:01  |
Eclipse User |
|
|
|
Hello,
does anybody know a link to a guide/tutorial/faq/etc. how to create and
populate the ApplicationActionBar in a RCP Application? A good Open
Source project could help aswell (I could study the sources..)
Thanks in advance,
Andreas
|
|
|
|
|
Re: ApplicationActionBar in RCP product [message #445008 is a reply to message #444997] |
Sat, 25 February 2006 17:14  |
Eclipse User |
|
|
|
Hi Andreas,
I'm not quite sure if I understand your problem in the correct way. Here is
what I understood:
You want to let some objects add some actions to the "CoolBar".
Every object has its own place in this bar and you want them to add their
actions at their allocated place.
Assuming that is what you want to do, then the following code will work for
you:
/* override the fillCoolBar method in your WorkbenchAdvisor like the
following*/
protected void fillCoolBar(ICoolBarManager coolBar) {
IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
coolBar.add(new ToolBarContributionItem(toolbar, "main"));
toolbar.appendToGroup("group name", myAction);
}
You can allocate a group name for each object and in this way your objects
can add IAction's to the bar.
Hope this helps,
Andreas
P.S.: I don't understand which ID's you don't know.
Andreas Dolk wrote:
> Andreas Heinecke schrieb:
>> Hi Andreas,
>>
>> did you try the rcp examples/templates? Especially in the Mail RCP
>> template you should be able to find an example.
>>
>> Kind regards,
>>
>> Andreas
>>
>
> Hi Andreas,
>
> my problem is, that some objects like TextEditor just add some actions
> to the bar and I have no idea how to make them appear at the "right"
> place... maybe I need to add some groupmarkers, but I don't know their
> ID's (I included MB_ADDITION and that helped a little...)
>
> bye,
> Andreas
|
|
|
Powered by
FUDForum. Page generated in 0.11843 seconds