| Change Labels of PopupBar [message #11409] |
Wed, 22 April 2009 04:06  |
Verena Messages: 17 Registered: July 2009 |
Junior Member |
|
|
Hi,
I'm trying to change the labels of the popupbar - I'm not sure wether this
is the correct name. I mean the kind-of-contextmenu-thing that appears
after dragging a connection. I need to change the labels of the entries
there - is there any chance to do that?
In the same context I need to change the ToolTips of the other "Tool" that
provides the graphical views of the available elementtypes (I also do not
know a name for that) and appears on CTRL+Space.
Thanks for help,
--Verena
|
|
|
| Re: Change Labels of PopupBar [message #11446 is a reply to message #11409] |
Wed, 22 April 2009 06:53   |
|
Originally posted by: atoulme.intalio.com
Verena wrote:
> Hi,
>
> I'm trying to change the labels of the popupbar - I'm not sure wether
> this is the correct name. I mean the kind-of-contextmenu-thing that
> appears after dragging a connection. I need to change the labels of the
> entries there - is there any chance to do that?
It's a PopupMenuCommand showing a list of IElementType for you to pick one.
You need to hack the ConnectionAndEndLabelProviderEx in the
PromptForConnectionAndEndCommandEx class that is used in the
PromptForConnectionAndEndCommandEx edit policy.
Best to extend ContainerNodeEditPolicyEx, override
getPromptForConnectionAndEndCommand and return there your own command
with your hacked label provider.
>
> In the same context I need to change the ToolTips of the other "Tool"
> that provides the graphical views of the available elementtypes (I also
> do not know a name for that) and appears on CTRL+Space.
>
That's named the popup bar. You need to override PopupBarEditPolicyEx
and look at the populatePopupBars method.
Thanks,
Antoine
|
|
|
|
| Re: Change Labels of PopupBar [message #11520 is a reply to message #11483] |
Wed, 22 April 2009 17:32   |
|
Originally posted by: atoulme.intalio.com
Do a Ctrl+Shift+G on ContainerNodeEditPolicyEx to see where it is used:
in the edit parts when they create their edit policies. Same for
PopupBarEditPolicyEx.
That's where you hook them up.
Thanks,
Antoine
Verena wrote:
> Antoine Toulme wrote:
>
>> Verena wrote:
>>> Hi,
>>>
>>> I'm trying to change the labels of the popupbar - I'm not sure wether
>>> this is the correct name. I mean the kind-of-contextmenu-thing that
>>> appears after dragging a connection. I need to change the labels of the
>>> entries there - is there any chance to do that?
>> It's a PopupMenuCommand showing a list of IElementType for you to pick
>> one.
>
>> You need to hack the ConnectionAndEndLabelProviderEx in the
>> PromptForConnectionAndEndCommandEx class that is used in the
>> PromptForConnectionAndEndCommandEx edit policy.
>
>> Best to extend ContainerNodeEditPolicyEx, override
>> getPromptForConnectionAndEndCommand and return there your own command
>
> I tried that, but it is never called. Do I need to 'register' that
> somewhere?
>
>> with your hacked label provider.
>>>
>>> In the same context I need to change the ToolTips of the other "Tool"
>>> that provides the graphical views of the available elementtypes (I also
>>> do not know a name for that) and appears on CTRL+Space.
>>>
>> That's named the popup bar. You need to override PopupBarEditPolicyEx
>> and look at the populatePopupBars method.
>
> This one goes the same - never called. I'd probably have to do something
> to tell the 'Framework' that this one should be used, but I have no idea
> where.
>
> Thanks gaain for your help.
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.08143 seconds