Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » interaction with editor
interaction with editor [message #471204] Fri, 29 June 2007 13:37 Go to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

hi,

could someone tell me where I can edit/ extend the menus of the editors?
for example, i want to add a menu item when I right click a component port
and (when it is working in component diagram) component prov/required
interface.

thx
nick
Re: interaction with editor [message #471206 is a reply to message #471204] Fri, 29 June 2007 16:33 Go to previous messageGo to next message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 530
Registered: July 2009
Senior Member
Hi Nick,

We implemented several custom actions for Class Diagram editor. You could
have a look at their implementation, it is quite clear. Implementation is
located in org.eclipse.uml2.diagram.clazz.action package, and extension
point
org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders
is registered in plugin.xml.

Good luck,
Tatiana.

"nic" <nickkirtley@gmail.com> wrote in message
news:0183fdd946119983db708fd19846249f$1@www.eclipse.org...
> hi,
>
> could someone tell me where I can edit/ extend the menus of the editors?
> for example, i want to add a menu item when I right click a component port
> and (when it is working in component diagram) component prov/required
> interface.
>
> thx nick
>
Re: interaction with editor [message #471221 is a reply to message #471206] Wed, 04 July 2007 13:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

Hi Nick,

We implemented several custom actions for Class Diagram editor. You could
have a look at their implementation, it is quite clear. Implementation is
located in org.eclipse.uml2.diagram.clazz.action package, and extension
point
org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders
is registered in plugin.xml.

Good luck,
Tatiana.

Hi Tatiana ,

I pretty much understand the changes made in the class diagram editor to
allow for menu's with extra options based on which object is selected.
However, I still don't understand how eclipse knows when to show which
menu (and thus class). For example, if I right click on an association I
get the association options. How does eclipse know that it should then go
to Assocationxxxx.java. I can see that it is defined in extension of
plugin.xml.

I'd like to know because I'd also like to select port for example and have
a specific menu.

thx
Nick
Re: interaction with editor [message #471222 is a reply to message #471221] Wed, 04 July 2007 14:40 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 530
Registered: July 2009
Senior Member
Hello Nick,

I think you answered your own question =) It is defined in plugin.xml.

'popupStructuredContributionCriteria' attribute is used to specify the elements
MenuProvider is applicable to. In your case it will look like:

<extension point=" org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders ">
<?gmfgen generated="false"?>
<contributionItemProvider
checkPluginLoaded="true"...>
...
<popupStructuredContributionCriteria
objectClass="org.eclipse.uml2.diagram.component.edit.parts.PortEditPart "
objectCount="1">
</popupStructuredContributionCriteria>
....
</contributionItemProvider>
</extension>

Good luck,
Tatiana.


> Hi Tatiana ,
>
> I pretty much understand the changes made in the class diagram editor
> to allow for menu's with extra options based on which object is
> selected. However, I still don't understand how eclipse knows when to
> show which menu (and thus class). For example, if I right click on an
> association I get the association options. How does eclipse know that
> it should then go to Assocationxxxx.java. I can see that it is defined
> in extension of plugin.xml.
>
> I'd like to know because I'd also like to select port for example and
> have a specific menu.
>
> thx Nick
>
Re: interaction with editor [message #600640 is a reply to message #471204] Fri, 29 June 2007 16:33 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 530
Registered: July 2009
Senior Member
Hi Nick,

We implemented several custom actions for Class Diagram editor. You could
have a look at their implementation, it is quite clear. Implementation is
located in org.eclipse.uml2.diagram.clazz.action package, and extension
point
org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders
is registered in plugin.xml.

Good luck,
Tatiana.

"nic" <nickkirtley@gmail.com> wrote in message
news:0183fdd946119983db708fd19846249f$1@www.eclipse.org...
> hi,
>
> could someone tell me where I can edit/ extend the menus of the editors?
> for example, i want to add a menu item when I right click a component port
> and (when it is working in component diagram) component prov/required
> interface.
>
> thx nick
>
Re: interaction with editor [message #602154 is a reply to message #471206] Wed, 04 July 2007 13:29 Go to previous message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

Hi Nick,

We implemented several custom actions for Class Diagram editor. You could
have a look at their implementation, it is quite clear. Implementation is
located in org.eclipse.uml2.diagram.clazz.action package, and extension
point
org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders
is registered in plugin.xml.

Good luck,
Tatiana.

Hi Tatiana ,

I pretty much understand the changes made in the class diagram editor to
allow for menu's with extra options based on which object is selected.
However, I still don't understand how eclipse knows when to show which
menu (and thus class). For example, if I right click on an association I
get the association options. How does eclipse know that it should then go
to Assocationxxxx.java. I can see that it is defined in extension of
plugin.xml.

I'd like to know because I'd also like to select port for example and have
a specific menu.

thx
Nick
Re: interaction with editor [message #602163 is a reply to message #471221] Wed, 04 July 2007 14:40 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 530
Registered: July 2009
Senior Member
Hello Nick,

I think you answered your own question =) It is defined in plugin.xml.

'popupStructuredContributionCriteria' attribute is used to specify the elements
MenuProvider is applicable to. In your case it will look like:

<extension point=" org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders ">
<?gmfgen generated="false"?>
<contributionItemProvider
checkPluginLoaded="true"...>
...
<popupStructuredContributionCriteria
objectClass="org.eclipse.uml2.diagram.component.edit.parts.PortEditPart "
objectCount="1">
</popupStructuredContributionCriteria>
....
</contributionItemProvider>
</extension>

Good luck,
Tatiana.


> Hi Tatiana ,
>
> I pretty much understand the changes made in the class diagram editor
> to allow for menu's with extra options based on which object is
> selected. However, I still don't understand how eclipse knows when to
> show which menu (and thus class). For example, if I right click on an
> association I get the association options. How does eclipse know that
> it should then go to Assocationxxxx.java. I can see that it is defined
> in extension of plugin.xml.
>
> I'd like to know because I'd also like to select port for example and
> have a specific menu.
>
> thx Nick
>
Previous Topic:[Announce] MDT UML2TOOLS 0.7.0b is available
Next Topic:Association Owner Package
Goto Forum:
  


Current Time: Thu Apr 25 17:55:23 GMT 2024

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

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

Back to the top