Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Adding a menu entry to the UML Editor Menu
Adding a menu entry to the UML Editor Menu [message #477088] Thu, 13 March 2008 01:51 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
Hey,

When I open an uml file with the UML tree editor, the main menu bar is
populated with a menu "UML Editor". For a few hours now (yeah I bite..)
I try to extend that menu from inside my plugin. I try to do so via the
org.eclipse.ui.menu extension point like this:

<menuContribution
locationURI=" menu:org.eclipse.uml2.umlMenuID?after=org.eclipse.uml2.uml.e ditor.ElementMenuID ">
<menu
label="hahhahaha">
<command
commandId="allure.commands.generate"
label="huhuhu"
style="push">
</command>
</menu>
</menuContribution>


I also tried ..?after=additions, but that didn't work either. Is this
even possible?


Felix
Re: Adding a menu entry to the UML Editor Menu [message #477093 is a reply to message #477088] Thu, 13 March 2008 14:13 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Felix,

Have a look at the source code in org.eclipse.uml2.examples.uml.ui.
Inspect the plugin.xml.

You will see some menu items being contributed like the following ...
<action
label="%_UI_EcoreModelAction_label"

class=" org.eclipse.uml2.examples.uml.ui.actions.ConvertToEcoreModel Action "

menubarPath=" org.eclipse.uml2.umlMenuID/org.eclipse.uml2.examples.uml.ui. ConvertToMenuID/additions "

enablesFor="1"

id=" org.eclipse.uml2.examples.uml.ui.ConvertToEcoreModelActionID ">

<enablement>

<objectClass

name="org.eclipse.uml2.uml.Package">

</objectClass>

</enablement>

</action>


That xml file should indicate how to add to the menus.
I've attached it to this response.

Good luck ... and don't feel bad... I also have issues with menus :)

Cheers,
- James.


"Felix Dorner" <felix_do@web.de> wrote in message
news:fra1ai$not$1@build.eclipse.org...
> Hey,
>
> When I open an uml file with the UML tree editor, the main menu bar is
> populated with a menu "UML Editor". For a few hours now (yeah I bite..)
> I try to extend that menu from inside my plugin. I try to do so via the
> org.eclipse.ui.menu extension point like this:
>
> <menuContribution
> locationURI=" menu:org.eclipse.uml2.umlMenuID?after=org.eclipse.uml2.uml.e ditor.ElementMenuID ">
> <menu
> label="hahhahaha">
> <command
> commandId="allure.commands.generate"
> label="huhuhu"
> style="push">
> </command>
> </menu>
> </menuContribution>
>
>
> I also tried ..?after=additions, but that didn't work either. Is this
> even possible?
>
>
> Felix


  • Attachment: plugin.xml
    (Size: 9.16KB, Downloaded 239 times)
Re: Adding a menu entry to the UML Editor Menu [message #477094 is a reply to message #477093] Thu, 13 March 2008 15:23 Go to previous message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
James, thanks a lot. I had the examples plugin in my workspace all the
time... I am just confused about all those extension points, but I guess
its normal in the beginning...

Felix

James Bruck wrote:
> Hi Felix,
>
> Have a look at the source code in org.eclipse.uml2.examples.uml.ui.
> Inspect the plugin.xml.
>
Re: Adding a menu entry to the UML Editor Menu [message #626222 is a reply to message #477088] Thu, 13 March 2008 14:13 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Felix,

Have a look at the source code in org.eclipse.uml2.examples.uml.ui.
Inspect the plugin.xml.

You will see some menu items being contributed like the following ...
<action
label="%_UI_EcoreModelAction_label"

class=" org.eclipse.uml2.examples.uml.ui.actions.ConvertToEcoreModel Action "

menubarPath=" org.eclipse.uml2.umlMenuID/org.eclipse.uml2.examples.uml.ui. ConvertToMenuID/additions "

enablesFor="1"

id=" org.eclipse.uml2.examples.uml.ui.ConvertToEcoreModelActionID ">

<enablement>

<objectClass

name="org.eclipse.uml2.uml.Package">

</objectClass>

</enablement>

</action>


That xml file should indicate how to add to the menus.
I've attached it to this response.

Good luck ... and don't feel bad... I also have issues with menus :)

Cheers,
- James.


"Felix Dorner" <felix_do@web.de> wrote in message
news:fra1ai$not$1@build.eclipse.org...
> Hey,
>
> When I open an uml file with the UML tree editor, the main menu bar is
> populated with a menu "UML Editor". For a few hours now (yeah I bite..)
> I try to extend that menu from inside my plugin. I try to do so via the
> org.eclipse.ui.menu extension point like this:
>
> <menuContribution
> locationURI=" menu:org.eclipse.uml2.umlMenuID?after=org.eclipse.uml2.uml.e ditor.ElementMenuID ">
> <menu
> label="hahhahaha">
> <command
> commandId="allure.commands.generate"
> label="huhuhu"
> style="push">
> </command>
> </menu>
> </menuContribution>
>
>
> I also tried ..?after=additions, but that didn't work either. Is this
> even possible?
>
>
> Felix


  • Attachment: plugin.xml
    (Size: 9.16KB, Downloaded 270 times)
Re: Adding a menu entry to the UML Editor Menu [message #626223 is a reply to message #477093] Thu, 13 March 2008 15:23 Go to previous message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
James, thanks a lot. I had the examples plugin in my workspace all the
time... I am just confused about all those extension points, but I guess
its normal in the beginning...

Felix

James Bruck wrote:
> Hi Felix,
>
> Have a look at the source code in org.eclipse.uml2.examples.uml.ui.
> Inspect the plugin.xml.
>
Previous Topic:Re: Convert a UML file to Ecore file
Next Topic:set feature of stereotype
Goto Forum:
  


Current Time: Thu Apr 25 17:41:14 GMT 2024

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

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

Back to the top