Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EMF data binding
EMF data binding [message #623071] Sat, 24 July 2010 05:10 Go to next message
Eclipse UserFriend
Hi,
I am relatively new to Eclipse development. I am able to create an EMF model and use it in my simple RCP application,which displays my model in a treeview. What I am having trouble understanding is how to create a view that will display the selected model item from my treeview. I have tried some code I found on the net that injects a method similar to this

@Inject
void setSelection(@Optional @Named(IServiceConstants.ACTIVE_SELECTION) Contact contact) {...}

However, I get an error relating to the IServiceConstants.ACTIVE_SELECTION not being able to be resolved as a variable and the annotations seem to have some kind of error. Can any one point me in the direction of a simple demonstration of how this works.

Thanks

Pete
Re: EMF data binding [message #623072 is a reply to message #623071] Sat, 24 July 2010 12:07 Go to previous message
Eclipse UserFriend
Pete,

This question doesn't sound EMF specific. The generated editor provides
a complete example for displaying trees and for updating views based on
the selection.



Pete wrote:
> Hi,
> I am relatively new to Eclipse development. I am able to create an EMF
> model and use it in my simple RCP application,which displays my model
> in a treeview. What I am having trouble understanding is how to create
> a view that will display the selected model item from my treeview. I
> have tried some code I found on the net that injects a method similar
> to this
>
> @Inject
> void setSelection(@Optional
> @Named(IServiceConstants.ACTIVE_SELECTION) Contact contact) {...}
>
> However, I get an error relating to the
> IServiceConstants.ACTIVE_SELECTION not being able to be resolved as a
> variable and the annotations seem to have some kind of error. Can any
> one point me in the direction of a simple demonstration of how this
> works.
> Thanks
>
> Pete
Previous Topic:EMF data binding
Next Topic:ecorediag
Goto Forum:
  


Current Time: Sun Nov 09 02:58:07 EST 2025

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

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

Back to the top