Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EMF data binding(EMF data binding)
EMF data binding [message #549092] Sat, 24 July 2010 09:10 Go to next message
Pete is currently offline PeteFriend
Messages: 28
Registered: March 2010
Junior Member
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 #549111 is a reply to message #549092] Sat, 24 July 2010 16:07 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
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


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[EEF] Compilation with XMLTypePackage.eINSTANCE.getName() - Converter Utils don't expect a String O
Next Topic:EMF data binding
Goto Forum:
  


Current Time: Thu Apr 25 00:10:12 GMT 2024

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

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

Back to the top