Using MyItemProvider commands in my editors [message #508601] |
Tue, 19 January 2010 10:24 |
Eclipse User |
|
|
|
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 06:44  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.08049 seconds