Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Using MyItemProvider commands in my editors
Using MyItemProvider commands in my editors [message #508601] Tue, 19 January 2010 15:24
Pierre Francis Roy is currently offline Pierre Francis RoyFriend
Messages: 12
Registered: July 2009
Junior Member
Hi,

Here's another question about the ItemProvider that come generated for free with my model.

I know that the ItemProvider generated for my domain objects provides me a way to customize the display of my domain object. I also know that those ItemProvider provides commands for adding, deleting, modifying my domain. I can also override the commands creation defined in the ItemProviderAdapter parent.

My problem is that outside of the generated editor I really don't know how I can't use those commands by binding them to my owns menus items and buttons.

My goal is still to manipulate my domain objects in a centralized way using the same reusable EMF edit commands.

Can you give me some examples on how I can connect ItemProvider built-in commands in my own code (from a button click as an example)?

Regards
Pierre
Re: Using MyItemProvider commands in my editors [message #508631 is a reply to message #508601] Tue, 19 January 2010 11:44 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33147
Registered: July 2009
Senior Member
Pierre,

Have a look at the actions in org.eclipse.emf.edit.ui's action package
and look at how they're used in other parts of the EMF SDK.


Pierre Francis Roy wrote:
> Hi,
>
> Here's another question about the ItemProvider that come generated for
> free with my model.
>
> I know that the ItemProvider generated for my domain objects provides
> me a way to customize the display of my domain object. I also know
> that those ItemProvider provides commands for adding, deleting,
> modifying my domain. I can also override the commands creation defined
> in the ItemProviderAdapter parent.
>
> My problem is that outside of the generated editor I really don't know
> how I can't use those commands by binding them to my owns menus items
> and buttons.
>
> My goal is still to manipulate my domain objects in a centralized way
> using the same reusable EMF edit commands.
>
> Can you give me some examples on how I can connect ItemProvider
> built-in commands in my own code (from a button click as an example)?
>
> Regards
> Pierre


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Delete Model from an resource
Next Topic:Problems regarding the mapping of key bindings with the EMF Model
Goto Forum:
  


Current Time: Mon May 13 17:30:51 GMT 2024

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

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

Back to the top