Extending ECPReferenceService [message #1754206] |
Wed, 15 February 2017 10:13 |
Rahul Upadhyay Messages: 11 Registered: February 2017 |
Junior Member |
|
|
Hi ,
We want to change the objects that are being displayed in the reference dialog. We have extended ECPReferenceService and attached it to "org.eclipse.emf.ecp.view.context.viewServices" extension point. We have set priority lesser than zero , but the new class's addExistingModelElements method is not getting called.
We want to know as even after setting priority lesser than zero our custom class is not getting called. Do we have to register new class at some other places.
[Updated on: Fri, 17 February 2017 06:05] Report message to a moderator
|
|
|
|
|
|
Re: Extending ECPReferenceService [message #1754378 is a reply to message #1754304] |
Fri, 17 February 2017 06:07 |
Rahul Upadhyay Messages: 11 Registered: February 2017 |
Junior Member |
|
|
Hi Jonas ,
I have added one plugin for registration of our custom reference service in the makeithappen_e3 application example project. Please find the same in the attachment as "CustomMakeItHappen.zip" at the start of the question topic.
It would be great if in this sample project if we can have one working custom reference class which we can refer for our understanding.
Thanks in advance!
[Updated on: Fri, 17 February 2017 06:10] Report message to a moderator
|
|
|
|
|
|
|
|
Re: Extending ECPReferenceService [message #1755146 is a reply to message #1755134] |
Tue, 28 February 2017 12:11 |
Jonas Helming Messages: 111 Registered: September 2016 |
Senior Member |
|
|
Hi,
in the example that I attached, the viewmodelservice was still registered via extension point. This worked for me and it still does in the attached example. When looking at your product config, the view model service plugin is not in there. So please check this (see also my first comment in this thread).
The registration via ServiceFactory is preferred, thats why I added an example for that. You are right, to make that work, you need to register the factory as an OSGi service. In your attached example, you have renamed/moved the component.xml after it has been created. If you do that, you need to update its entry in the MANIFEST.MF
for your example it would be:
Service-Component: OSGI-INF/org.eclipse.emf.ecp.makeithappen.modelservice.ReferenceServiceFactory.xml
There was actually a message on the console telling this (that the component.xml can not be found). Additionally there is a warning on the build.properteis, that you should include the folder OSGI-INF.
When fixing these three things in your example (adding the bundle to the product, the entry in the MANFIFEST:MF and the build.properties) the registration of the reference service works using both mechnsim, the extension point and the factory.
Best regards
Jonas
--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
--
Jonas Helming
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
|
|
|
Powered by
FUDForum. Page generated in 0.03947 seconds