Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Form] Implementing Reference Service - Need Help ??
[EMF Form] Implementing Reference Service - Need Help ?? [message #1387127] Tue, 24 June 2014 10:12 Go to next message
Annamalai Mising name is currently offline Annamalai Mising nameFriend
Messages: 126
Registered: July 2009
Senior Member
Hi There

I am trying to implement Reference Service as mentioned in the tutorial
Customise EMF Forms.

For now the context is set to the Project level by default as explained.
Agreed so it loads all the possible references. But i would want to
change the context.

Therefore i used the extension point
org.eclipse.emf.ecp.view.context.viewServices
Added org.eclipse.emf.ecp.edit plugin to dependancies
Created a new Class that implements ReferenceServices Interface.

But this class is never initialised, non of the breakpoints under it are
being invoked.

Any help in this line would be appreciated.

Regards
Malai
Re: [EMF Form] Implementing Reference Service - Need Help ?? [message #1387137 is a reply to message #1387127] Tue, 24 June 2014 11:27 Go to previous messageGo to next message
Annamalai Mising name is currently offline Annamalai Mising nameFriend
Messages: 126
Registered: July 2009
Senior Member
I realised that the constructor alone is called whenever i open a EMF
Form. But getExistingElementsFor is never called after that. I even
tried to extend the current ECPReferenceServiceImpl and implement it.

I am using the Default Form Editor, i have FormViewModel of just 1 of
the Object types and the others are just using the default editor.

Regards
Malai

On 6/24/2014 3:42 PM, Annamalai wrote:
> Hi There
>
> I am trying to implement Reference Service as mentioned in the tutorial
> Customise EMF Forms.
>
> For now the context is set to the Project level by default as explained.
> Agreed so it loads all the possible references. But i would want to
> change the context.
>
> Therefore i used the extension point
> org.eclipse.emf.ecp.view.context.viewServices
> Added org.eclipse.emf.ecp.edit plugin to dependancies
> Created a new Class that implements ReferenceServices Interface.
>
> But this class is never initialised, non of the breakpoints under it are
> being invoked.
>
> Any help in this line would be appreciated.
>
> Regards
> Malai
Re: [EMF Form] Implementing Reference Service - Need Help ?? [message #1387516 is a reply to message #1387137] Wed, 25 June 2014 07:38 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
How do you open elements? From the model explorer?


Am 24.06.2014 13:27, schrieb Annamalai:
> I realised that the constructor alone is called whenever i open a EMF
> Form. But getExistingElementsFor is never called after that. I even
> tried to extend the current ECPReferenceServiceImpl and implement it.
>
> I am using the Default Form Editor, i have FormViewModel of just 1 of
> the Object types and the others are just using the default editor.
>
> Regards
> Malai
>
> On 6/24/2014 3:42 PM, Annamalai wrote:
>> Hi There
>>
>> I am trying to implement Reference Service as mentioned in the tutorial
>> Customise EMF Forms.
>>
>> For now the context is set to the Project level by default as explained.
>> Agreed so it loads all the possible references. But i would want to
>> change the context.
>>
>> Therefore i used the extension point
>> org.eclipse.emf.ecp.view.context.viewServices
>> Added org.eclipse.emf.ecp.edit plugin to dependancies
>> Created a new Class that implements ReferenceServices Interface.
>>
>> But this class is never initialised, non of the breakpoints under it are
>> being invoked.
>>
>> Any help in this line would be appreciated.
>>
>> Regards
>> Malai
>
Re: [EMF Form] Implementing Reference Service - Need Help ?? [message #1387543 is a reply to message #1387516] Wed, 25 June 2014 08:25 Go to previous messageGo to next message
Annamalai Mising name is currently offline Annamalai Mising nameFriend
Messages: 126
Registered: July 2009
Senior Member
Yes ! I open the elements from Model Explorer.

On 6/25/2014 1:08 PM, Jonas Helming wrote:
> How do you open elements? From the model explorer?
>
>
> Am 24.06.2014 13:27, schrieb Annamalai:
>> I realised that the constructor alone is called whenever i open a EMF
>> Form. But getExistingElementsFor is never called after that. I even
>> tried to extend the current ECPReferenceServiceImpl and implement it.
>>
>> I am using the Default Form Editor, i have FormViewModel of just 1 of
>> the Object types and the others are just using the default editor.
>>
>> Regards
>> Malai
>>
>> On 6/24/2014 3:42 PM, Annamalai wrote:
>>> Hi There
>>>
>>> I am trying to implement Reference Service as mentioned in the tutorial
>>> Customise EMF Forms.
>>>
>>> For now the context is set to the Project level by default as explained.
>>> Agreed so it loads all the possible references. But i would want to
>>> change the context.
>>>
>>> Therefore i used the extension point
>>> org.eclipse.emf.ecp.view.context.viewServices
>>> Added org.eclipse.emf.ecp.edit plugin to dependancies
>>> Created a new Class that implements ReferenceServices Interface.
>>>
>>> But this class is never initialised, non of the breakpoints under it are
>>> being invoked.
>>>
>>> Any help in this line would be appreciated.
>>>
>>> Regards
>>> Malai
>>
>
Re: [EMF Form] Implementing Reference Service - Need Help ?? [message #1388196 is a reply to message #1387543] Thu, 26 June 2014 05:35 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Have you checked the model element opener in the explorer editor bridge?
It might pass the default reference service programatically into EMF
Forms...

Am 25.06.2014 10:25, schrieb Annamalai:
> Yes ! I open the elements from Model Explorer.
>
> On 6/25/2014 1:08 PM, Jonas Helming wrote:
>> How do you open elements? From the model explorer?
>>
>>
>> Am 24.06.2014 13:27, schrieb Annamalai:
>>> I realised that the constructor alone is called whenever i open a EMF
>>> Form. But getExistingElementsFor is never called after that. I even
>>> tried to extend the current ECPReferenceServiceImpl and implement it.
>>>
>>> I am using the Default Form Editor, i have FormViewModel of just 1 of
>>> the Object types and the others are just using the default editor.
>>>
>>> Regards
>>> Malai
>>>
>>> On 6/24/2014 3:42 PM, Annamalai wrote:
>>>> Hi There
>>>>
>>>> I am trying to implement Reference Service as mentioned in the tutorial
>>>> Customise EMF Forms.
>>>>
>>>> For now the context is set to the Project level by default as
>>>> explained.
>>>> Agreed so it loads all the possible references. But i would want to
>>>> change the context.
>>>>
>>>> Therefore i used the extension point
>>>> org.eclipse.emf.ecp.view.context.viewServices
>>>> Added org.eclipse.emf.ecp.edit plugin to dependancies
>>>> Created a new Class that implements ReferenceServices Interface.
>>>>
>>>> But this class is never initialised, non of the breakpoints under it
>>>> are
>>>> being invoked.
>>>>
>>>> Any help in this line would be appreciated.
>>>>
>>>> Regards
>>>> Malai
>>>
>>
>
Re: [EMF Form] Implementing Reference Service - Need Help ?? [message #1391023 is a reply to message #1388196] Mon, 30 June 2014 10:30 Go to previous messageGo to next message
Annamalai Mising name is currently offline Annamalai Mising nameFriend
Messages: 126
Registered: July 2009
Senior Member
HI There

I am on ECP 1.3 and even after installing the SDK i dnt see the Source
in my plugins. Therefore unable to look into the code. I would
appreciate if you can let me know how to change the default reference
service to let it accept my service tthat i hav configured in my plugin.xml

Also let me know if i have to contact a different updatesite to download
the source for further debugging.

Regards
Malai
On 6/26/2014 11:05 AM, Jonas Helming wrote:
> Have you checked the model element opener in the explorer editor bridge?
> It might pass the default reference service programatically into EMF
> Forms...
>
> Am 25.06.2014 10:25, schrieb Annamalai:
>> Yes ! I open the elements from Model Explorer.
>>
>> On 6/25/2014 1:08 PM, Jonas Helming wrote:
>>> How do you open elements? From the model explorer?
>>>
>>>
>>> Am 24.06.2014 13:27, schrieb Annamalai:
>>>> I realised that the constructor alone is called whenever i open a EMF
>>>> Form. But getExistingElementsFor is never called after that. I even
>>>> tried to extend the current ECPReferenceServiceImpl and implement it.
>>>>
>>>> I am using the Default Form Editor, i have FormViewModel of just 1 of
>>>> the Object types and the others are just using the default editor.
>>>>
>>>> Regards
>>>> Malai
>>>>
>>>> On 6/24/2014 3:42 PM, Annamalai wrote:
>>>>> Hi There
>>>>>
>>>>> I am trying to implement Reference Service as mentioned in the tutorial
>>>>> Customise EMF Forms.
>>>>>
>>>>> For now the context is set to the Project level by default as
>>>>> explained.
>>>>> Agreed so it loads all the possible references. But i would want to
>>>>> change the context.
>>>>>
>>>>> Therefore i used the extension point
>>>>> org.eclipse.emf.ecp.view.context.viewServices
>>>>> Added org.eclipse.emf.ecp.edit plugin to dependancies
>>>>> Created a new Class that implements ReferenceServices Interface.
>>>>>
>>>>> But this class is never initialised, non of the breakpoints under it
>>>>> are
>>>>> being invoked.
>>>>>
>>>>> Any help in this line would be appreciated.
>>>>>
>>>>> Regards
>>>>> Malai
>>>>
>>>
>>
>
Re: [EMF Form] Implementing Reference Service - Need Help ?? [message #1391088 is a reply to message #1391023] Mon, 30 June 2014 12:28 Go to previous messageGo to next message
Annamalai Mising name is currently offline Annamalai Mising nameFriend
Messages: 126
Registered: July 2009
Senior Member
Hello Jonas

I finally managed to download the zip of 1.3.0 and attach the source.
And in e3.MEEditorPage and found this code

final ViewModelContext vmc =
ViewModelContextFactory.INSTANCE.createViewModelContext(view, domainObject,
new ECPReferenceServiceImpl());
try {
ecpView = ECPSWTViewRenderer.INSTANCE.render(body, vmc);
} catch (final ECPRendererException ex) {
MessageDialog.openError(form.getShell(), ex.getClass().getName(),
ex.getMessage());
Activator.logException(ex);
}

And it seems to be not taking into consideration the Extension Point
based ReferenceServiceImpl but just hardcoding the
ECPReferenceServiceImpl by default.

Is this the 1, which is not letting our configuration from plugin.xml be
included to execute the ReferenceService example.

Any pointer in this line would be helpful and do let me know if this is
a bug.

Regards
Malai


On 6/30/2014 4:00 PM, Annamalai wrote:
> HI There
>
> I am on ECP 1.3 and even after installing the SDK i dnt see the Source
> in my plugins. Therefore unable to look into the code. I would
> appreciate if you can let me know how to change the default reference
> service to let it accept my service tthat i hav configured in my plugin.xml
>
> Also let me know if i have to contact a different updatesite to download
> the source for further debugging.
>
> Regards
> Malai
> On 6/26/2014 11:05 AM, Jonas Helming wrote:
>> Have you checked the model element opener in the explorer editor bridge?
>> It might pass the default reference service programatically into EMF
>> Forms...
>>
>> Am 25.06.2014 10:25, schrieb Annamalai:
>>> Yes ! I open the elements from Model Explorer.
>>>
>>> On 6/25/2014 1:08 PM, Jonas Helming wrote:
>>>> How do you open elements? From the model explorer?
>>>>
>>>>
>>>> Am 24.06.2014 13:27, schrieb Annamalai:
>>>>> I realised that the constructor alone is called whenever i open a EMF
>>>>> Form. But getExistingElementsFor is never called after that. I even
>>>>> tried to extend the current ECPReferenceServiceImpl and implement it.
>>>>>
>>>>> I am using the Default Form Editor, i have FormViewModel of just 1 of
>>>>> the Object types and the others are just using the default editor.
>>>>>
>>>>> Regards
>>>>> Malai
>>>>>
>>>>> On 6/24/2014 3:42 PM, Annamalai wrote:
>>>>>> Hi There
>>>>>>
>>>>>> I am trying to implement Reference Service as mentioned in the
>>>>>> tutorial
>>>>>> Customise EMF Forms.
>>>>>>
>>>>>> For now the context is set to the Project level by default as
>>>>>> explained.
>>>>>> Agreed so it loads all the possible references. But i would want to
>>>>>> change the context.
>>>>>>
>>>>>> Therefore i used the extension point
>>>>>> org.eclipse.emf.ecp.view.context.viewServices
>>>>>> Added org.eclipse.emf.ecp.edit plugin to dependancies
>>>>>> Created a new Class that implements ReferenceServices Interface.
>>>>>>
>>>>>> But this class is never initialised, non of the breakpoints under it
>>>>>> are
>>>>>> being invoked.
>>>>>>
>>>>>> Any help in this line would be appreciated.
>>>>>>
>>>>>> Regards
>>>>>> Malai
>>>>>
>>>>
>>>
>>
>
Re: [EMF Form] Implementing Reference Service - Need Help ?? [message #1391915 is a reply to message #1391088] Tue, 01 July 2014 15:45 Go to previous message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 63
Registered: March 2012
Member
Hi Malai,
the ViewModelContext accepts ViewModelServices using two ways, using extension points or programatically.
In the ModelEditorPage we add the ReferenceService by hand as we see the ModelEditorPage as an example only. Furthermore the provided ECPReferenceService is a very specific ECP implementation.

Nonetheless you can replace the ReferenceService by providing it via an extension point. In your ReferenceService you have to set the priority to a number less then 0. This way your service will be found before the default one and thus will be used by the reference controls.

Cheers,
Eugen
Previous Topic:[EMFStore] Export project to xmi file on server
Next Topic:TEXO and Ecore tools 2.0 Eclipse LUNA
Goto Forum:
  


Current Time: Thu Apr 25 22:41:58 GMT 2024

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

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

Back to the top