Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » where in the code do you specify which elements can be created when hovering over the document?
where in the code do you specify which elements can be created when hovering over the document? [message #59784] Thu, 05 October 2006 15:24 Go to next message
Eclipse UserFriend
Originally posted by: liam.morley.baesystems.com

Using the help guide, I've been able to figure out how to add tools to the
palette. I haven't been able to figure out, however, how to change the
behavior for when you hover over the document. Right now, one of my model
objects shows up twice in the menu- I see "Add Node", "Add Link", and then
"Add Node" again. I don't want to see "Add Link" at all (it's a connection),
and I only want to see "Add Node" once. I started with the gmfgen file, but
I need to work with and make changes directly to the generated code, so I'm
trying to figure out how to modify the code/plugin.xml directly.

Thanks!
Liam Morley
Re: where in the code do you specify which elements can be created when hovering over the document? [message #59836 is a reply to message #59784] Thu, 05 October 2006 16:10 Go to previous messageGo to next message
Eclipse UserFriend
Check subclasses of ModelingAssistantProvider

Artem

"Liam Morley" <liam.morley@baesystems.com> wrote in message
news:eg3m5e$olm$1@utils.eclipse.org...
> Using the help guide, I've been able to figure out how to add tools to the
> palette. I haven't been able to figure out, however, how to change the
> behavior for when you hover over the document. Right now, one of my model
> objects shows up twice in the menu- I see "Add Node", "Add Link", and then
> "Add Node" again. I don't want to see "Add Link" at all (it's a
> connection), and I only want to see "Add Node" once. I started with the
> gmfgen file, but I need to work with and make changes directly to the
> generated code, so I'm trying to figure out how to modify the
> code/plugin.xml directly.
>
> Thanks!
> Liam Morley
>
Re: where in the code do you specify which elements can be created when hovering over the document? [message #60031 is a reply to message #59836] Fri, 06 October 2006 07:42 Go to previous messageGo to next message
Eclipse UserFriend
Liam,

The default behavior of the PopupBarEditPolicy installed on the diagram
will get the popupbar items based on the items on the last active drawer
in the palette. Put a breakpoint in
DiagramPopupBarEditPolicy.fillPopupBarDescriptors() to understand what
is going on.

The default behavior of the PopupBarEditPolicy installed on other
editparts, is to get the list of types for the popupbar from the
Modeling Assistant Service. Check out the method getTypesForPopupBar().

- Cherie

Artem Tikhomirov wrote:
> Check subclasses of ModelingAssistantProvider
>
> Artem
>
> "Liam Morley" <liam.morley@baesystems.com> wrote in message
> news:eg3m5e$olm$1@utils.eclipse.org...
>> Using the help guide, I've been able to figure out how to add tools to the
>> palette. I haven't been able to figure out, however, how to change the
>> behavior for when you hover over the document. Right now, one of my model
>> objects shows up twice in the menu- I see "Add Node", "Add Link", and then
>> "Add Node" again. I don't want to see "Add Link" at all (it's a
>> connection), and I only want to see "Add Node" once. I started with the
>> gmfgen file, but I need to work with and make changes directly to the
>> generated code, so I'm trying to figure out how to modify the
>> code/plugin.xml directly.
>>
>> Thanks!
>> Liam Morley
>>
>
>
Re: where in the code do you specify which elements can be created when hovering over the document? [message #60387 is a reply to message #60031] Fri, 06 October 2006 14:50 Go to previous message
Eclipse UserFriend
Originally posted by: liam.morley.baesystems.com

Thanks to the both of you, that's a big help!

Liam


"Cherie Revells" <crevells@ca.ibm.com> wrote in message
news:eg5fl0$i4i$1@utils.eclipse.org...
> Liam,
>
> The default behavior of the PopupBarEditPolicy installed on the diagram
> will get the popupbar items based on the items on the last active drawer
> in the palette. Put a breakpoint in
> DiagramPopupBarEditPolicy.fillPopupBarDescriptors() to understand what is
> going on.
>
> The default behavior of the PopupBarEditPolicy installed on other
> editparts, is to get the list of types for the popupbar from the Modeling
> Assistant Service. Check out the method getTypesForPopupBar().
>
> - Cherie
>
> Artem Tikhomirov wrote:
>> Check subclasses of ModelingAssistantProvider
>>
>> Artem
>>
>> "Liam Morley" <liam.morley@baesystems.com> wrote in message
>> news:eg3m5e$olm$1@utils.eclipse.org...
>>> Using the help guide, I've been able to figure out how to add tools to
>>> the palette. I haven't been able to figure out, however, how to change
>>> the behavior for when you hover over the document. Right now, one of my
>>> model objects shows up twice in the menu- I see "Add Node", "Add Link",
>>> and then "Add Node" again. I don't want to see "Add Link" at all (it's a
>>> connection), and I only want to see "Add Node" once. I started with the
>>> gmfgen file, but I need to work with and make changes directly to the
>>> generated code, so I'm trying to figure out how to modify the
>>> code/plugin.xml directly.
>>>
>>> Thanks!
>>> Liam Morley
>>>
>>
Previous Topic:does the notation model extend the ecore model?
Next Topic:Diagram Editor Layout
Goto Forum:
  


Current Time: Wed Jul 02 20:27:22 EDT 2025

Powered by FUDForum. Page generated in 0.04837 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top