Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EEF] Using Ecore consisting of subpackages fails
[EEF] Using Ecore consisting of subpackages fails [message #543706] Wed, 30 June 2010 10:30 Go to next message
Ramon is currently offline RamonFriend
Messages: 10
Registered: July 2009
Junior Member
Hi,

I'm trying to use EEF. The Ecore file with the language definition contains
a package cif, which contains the subpackages annotations, types and
expressions. Generating EEF architecture results in, amongst others, the
files X_properties.plugin.xml for X in {annotations, types, expressions,
cif}. I've merged these files (omitting the 'double' parts) into the
plugin.xml and adapted the CifEditor.java according to the EEF tutorial.
For (instances of) classes from the cif package, the 'EEF property views'
are shown 1) in the property pane, and 2) after doubleclick on such an
instance. However, for (instances of) classes from the subpackages the
property pane shows 'Properties are not available', while after doubleclick
on such a class, the 'EEF property view' is shown in a window. Closing this
window results in a NullPointerException:

(Caused by: java.lang.NullPointerException
at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge.refresh(
TabbedPropertySheetPage.java:749)
at
nl.tue.cif.v2x1x1.metamodel.cif.presentation.CifEditor$4$1.r un(CifEditor.java:732)

This behavior does not change when also the XEditor.java for X in
{annotations, types, expressions} are adapted as described in the EEF
tutorial.

My questions:
1) Should I adapt the XEditor.java files for the subpackages?
2) How to get it work ;)

Thanks in advance,

Ramon
Re: [EEF] Using Ecore consisting of subpackages fails [message #543758 is a reply to message #543706] Wed, 30 June 2010 13:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33216
Registered: July 2009
Senior Member
Ramon,

I've often suggested that subpackages are really just syntactic sugar,
and because they're often overlooked during testing they cause
unpleasant problems you'd not get if you just kept your packages
separate. It sounds like you'll need to open a bugzilla so the issue
can be addressed in EEF itself.


Ramon wrote:
> Hi,
>
> I'm trying to use EEF. The Ecore file with the language definition contains
> a package cif, which contains the subpackages annotations, types and
> expressions. Generating EEF architecture results in, amongst others, the
> files X_properties.plugin.xml for X in {annotations, types, expressions,
> cif}. I've merged these files (omitting the 'double' parts) into the
> plugin.xml and adapted the CifEditor.java according to the EEF tutorial.
> For (instances of) classes from the cif package, the 'EEF property views'
> are shown 1) in the property pane, and 2) after doubleclick on such an
> instance. However, for (instances of) classes from the subpackages the
> property pane shows 'Properties are not available', while after doubleclick
> on such a class, the 'EEF property view' is shown in a window. Closing this
> window results in a NullPointerException:
>
> (Caused by: java.lang.NullPointerException
> at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge.refresh(
> TabbedPropertySheetPage.java:749)
> at
> nl.tue.cif.v2x1x1.metamodel.cif.presentation.CifEditor$4$1.r un(CifEditor.java:732)
>
> This behavior does not change when also the XEditor.java for X in
> {annotations, types, expressions} are adapted as described in the EEF
> tutorial.
>
> My questions:
> 1) Should I adapt the XEditor.java files for the subpackages?
> 2) How to get it work ;)
>
> Thanks in advance,
>
> Ramon
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EEF] Using Ecore consisting of subpackages fails [message #543953 is a reply to message #543706] Thu, 01 July 2010 07:26 Go to previous messageGo to next message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
Hi ramon,

could you please send me your actual plugin.xml with all the EEF stuff
on it ?

I suspect that the contibutorId is not the same everywhere on it.

In order to make it work, must must use the same identical contributorID
that is defined in the Editor class, in all place in the plugin.xml



Le 30/06/2010 12:30, Ramon a écrit :
> Hi,
>
> I'm trying to use EEF. The Ecore file with the language definition contains
> a package cif, which contains the subpackages annotations, types and
> expressions. Generating EEF architecture results in, amongst others, the
> files X_properties.plugin.xml for X in {annotations, types, expressions,
> cif}. I've merged these files (omitting the 'double' parts) into the
> plugin.xml and adapted the CifEditor.java according to the EEF tutorial.
> For (instances of) classes from the cif package, the 'EEF property views'
> are shown 1) in the property pane, and 2) after doubleclick on such an
> instance. However, for (instances of) classes from the subpackages the
> property pane shows 'Properties are not available', while after doubleclick
> on such a class, the 'EEF property view' is shown in a window. Closing this
> window results in a NullPointerException:
>
> (Caused by: java.lang.NullPointerException
> at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge.refresh(
> TabbedPropertySheetPage.java:749)
> at
> nl.tue.cif.v2x1x1.metamodel.cif.presentation.CifEditor$4$1.r un(CifEditor.java:732)
>
> This behavior does not change when also the XEditor.java for X in
> {annotations, types, expressions} are adapted as described in the EEF
> tutorial.
>
> My questions:
> 1) Should I adapt the XEditor.java files for the subpackages?
> 2) How to get it work ;)
>
> Thanks in advance,
>
> Ramon
>


--
Cheers,

Stéphane Bouchet, OBEO
Re: [EEF] Using Ecore consisting of subpackages fails [message #543962 is a reply to message #543953] Thu, 01 July 2010 08:20 Go to previous messageGo to next message
Ramon is currently offline RamonFriend
Messages: 10
Registered: July 2009
Junior Member
Hi Stéphane,

Thank you for pointing me in the right direction. The
X_properties.plugin.xml files, where X denotes the name of a subpackage in
the Ecore, contains contributorId's that include the name of the
subpackage. When I use the contributorId of the package instead, the EEF
properties are shown as one would expect.

Even, without adaptation of the XEditor.java files for the subpackages, the
editor works fine. So, should these files be modified or not?

Best regards,

Ramon

Stéphane Bouchet wrote:

> Hi ramon,
>
> could you please send me your actual plugin.xml with all the EEF stuff
> on it ?
>
> I suspect that the contibutorId is not the same everywhere on it.
>
> In order to make it work, must must use the same identical contributorID
> that is defined in the Editor class, in all place in the plugin.xml
>
>
>
> Le 30/06/2010 12:30, Ramon a écrit :
>> Hi,
>>
>> I'm trying to use EEF. The Ecore file with the language definition
>> contains a package cif, which contains the subpackages annotations, types
>> and expressions. Generating EEF architecture results in, amongst others,
>> the files X_properties.plugin.xml for X in {annotations, types,
>> expressions, cif}. I've merged these files (omitting the 'double' parts)
>> into the plugin.xml and adapted the CifEditor.java according to the EEF
>> tutorial. For (instances of) classes from the cif package, the 'EEF
>> property views' are shown 1) in the property pane, and 2) after
>> doubleclick on such an instance. However, for (instances of) classes from
>> the subpackages the property pane shows 'Properties are not available',
>> while after doubleclick on such a class, the 'EEF property view' is shown
>> in a window. Closing this window results in a NullPointerException:
>>
>> (Caused by: java.lang.NullPointerException
>> at
>>
org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge.refresh(
>> TabbedPropertySheetPage.java:749)
>> at
>>
nl.tue.cif.v2x1x1.metamodel.cif.presentation.CifEditor$4$1.r un(CifEditor.java:732)
>>
>> This behavior does not change when also the XEditor.java for X in
>> {annotations, types, expressions} are adapted as described in the EEF
>> tutorial.
>>
>> My questions:
>> 1) Should I adapt the XEditor.java files for the subpackages?
>> 2) How to get it work ;)
>>
>> Thanks in advance,
>>
>> Ramon
>>
>
>
Re: [EEF] Using Ecore consisting of subpackages fails [message #543994 is a reply to message #543962] Thu, 01 July 2010 09:51 Go to previous messageGo to next message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
Ramon,

see comments below :

Le 01/07/2010 10:20, Ramon a écrit :
> Hi Stéphane,
>
> Thank you for pointing me in the right direction. The
> X_properties.plugin.xml files, where X denotes the name of a subpackage in
> the Ecore, contains contributorId's that include the name of the
> subpackage. When I use the contributorId of the package instead, the EEF
> properties are shown as one would expect.

we defenitely need a FAQ for that.

>
> Even, without adaptation of the XEditor.java files for the subpackages, the
> editor works fine. So, should these files be modified or not?

What files do you talk about ? the ditor needs to be modified to shows
the EEF widgets, but it can have only one contributorId defined. so the
multiples extension points must use the same contributorId.


>
> Best regards,
>
> Ramon
>
> Stéphane Bouchet wrote:
>
>> Hi ramon,
>>
>> could you please send me your actual plugin.xml with all the EEF stuff
>> on it ?
>>
>> I suspect that the contibutorId is not the same everywhere on it.
>>
>> In order to make it work, must must use the same identical contributorID
>> that is defined in the Editor class, in all place in the plugin.xml
>>
>>
>>
>> Le 30/06/2010 12:30, Ramon a écrit :
>>> Hi,
>>>
>>> I'm trying to use EEF. The Ecore file with the language definition
>>> contains a package cif, which contains the subpackages annotations, types
>>> and expressions. Generating EEF architecture results in, amongst others,
>>> the files X_properties.plugin.xml for X in {annotations, types,
>>> expressions, cif}. I've merged these files (omitting the 'double' parts)
>>> into the plugin.xml and adapted the CifEditor.java according to the EEF
>>> tutorial. For (instances of) classes from the cif package, the 'EEF
>>> property views' are shown 1) in the property pane, and 2) after
>>> doubleclick on such an instance. However, for (instances of) classes from
>>> the subpackages the property pane shows 'Properties are not available',
>>> while after doubleclick on such a class, the 'EEF property view' is shown
>>> in a window. Closing this window results in a NullPointerException:
>>>
>>> (Caused by: java.lang.NullPointerException
>>> at
>>>
> org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge.refresh(
>>> TabbedPropertySheetPage.java:749)
>>> at
>>>
> nl.tue.cif.v2x1x1.metamodel.cif.presentation.CifEditor$4$1.r un(CifEditor.java:732)
>>>
>>> This behavior does not change when also the XEditor.java for X in
>>> {annotations, types, expressions} are adapted as described in the EEF
>>> tutorial.
>>>
>>> My questions:
>>> 1) Should I adapt the XEditor.java files for the subpackages?
>>> 2) How to get it work ;)
>>>
>>> Thanks in advance,
>>>
>>> Ramon
>>>
>>
>>
>


--
Cheers,

Stéphane Bouchet, OBEO
Re: [EEF] Using Ecore consisting of subpackages fails [message #544040 is a reply to message #543994] Thu, 01 July 2010 12:42 Go to previous messageGo to next message
Ramon is currently offline RamonFriend
Messages: 10
Registered: July 2009
Junior Member
Hi Stéphane,

See below.

Stéphane Bouchet wrote:

> Ramon,
>
> see comments below :
>
> Le 01/07/2010 10:20, Ramon a écrit :
>> Hi Stéphane,
>>
>> Thank you for pointing me in the right direction. The
>> X_properties.plugin.xml files, where X denotes the name of a subpackage
>> in the Ecore, contains contributorId's that include the name of the
>> subpackage. When I use the contributorId of the package instead, the EEF
>> properties are shown as one would expect.

> we defenitely need a FAQ for that.
Or should the code generator of the X_properties.plugin.xml files 'omit' the
subpackage name in its contributorId generation?

>> Even, without adaptation of the XEditor.java files for the subpackages,
>> the editor works fine. So, should these files be modified or not?
>
> What files do you talk about ? the ditor needs to be modified to shows
> the EEF widgets, but it can have only one contributorId defined. so the
> multiples extension points must use the same contributorId.

For each package X and subpackage X one gets a XEditor.java, thus not only
for the package itself. So, there are multiple Editor.java files. Adapting
the editor for the package only results in correct behavior, so my question
is whether the subpackage XEditor.java files should be adapted also...

>
>>
>> Best regards,
>>
>> Ramon
>>
>> Stéphane Bouchet wrote:
>>
>>> Hi ramon,
>>>
>>> could you please send me your actual plugin.xml with all the EEF stuff
>>> on it ?
>>>
>>> I suspect that the contibutorId is not the same everywhere on it.
>>>
>>> In order to make it work, must must use the same identical contributorID
>>> that is defined in the Editor class, in all place in the plugin.xml
>>>
>>>
>>>
>>> Le 30/06/2010 12:30, Ramon a écrit :
>>>> Hi,
>>>>
>>>> I'm trying to use EEF. The Ecore file with the language definition
>>>> contains a package cif, which contains the subpackages annotations,
>>>> types and expressions. Generating EEF architecture results in, amongst
>>>> others, the files X_properties.plugin.xml for X in {annotations, types,
>>>> expressions, cif}. I've merged these files (omitting the 'double'
>>>> parts) into the plugin.xml and adapted the CifEditor.java according to
>>>> the EEF tutorial. For (instances of) classes from the cif package, the
>>>> 'EEF property views' are shown 1) in the property pane, and 2) after
>>>> doubleclick on such an instance. However, for (instances of) classes
>>>> from the subpackages the property pane shows 'Properties are not
>>>> available', while after doubleclick on such a class, the 'EEF property
>>>> view' is shown in a window. Closing this window results in a
>>>> NullPointerException:
>>>>
>>>> (Caused by: java.lang.NullPointerException
>>>> at
>>>>
>> org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge.refresh(
>>>> TabbedPropertySheetPage.java:749)
>>>> at
>>>>
>>
nl.tue.cif.v2x1x1.metamodel.cif.presentation.CifEditor$4$1.r un(CifEditor.java:732)
>>>>
>>>> This behavior does not change when also the XEditor.java for X in
>>>> {annotations, types, expressions} are adapted as described in the EEF
>>>> tutorial.
>>>>
>>>> My questions:
>>>> 1) Should I adapt the XEditor.java files for the subpackages?
>>>> 2) How to get it work ;)
>>>>
>>>> Thanks in advance,
>>>>
>>>> Ramon
>>>>
>>>
>>>
>>
>
>
Re: [EEF] Using Ecore consisting of subpackages fails [message #545346 is a reply to message #544040] Wed, 07 July 2010 13:20 Go to previous message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
hi ramon,

see my comments below :

Le 01/07/2010 14:42, Ramon a écrit :
> Hi Stéphane,
>
> See below.
>
> Stéphane Bouchet wrote:
>
>> Ramon,
>>
>> see comments below :
>>
>> Le 01/07/2010 10:20, Ramon a écrit :
>>> Hi Stéphane,
>>>
>>> Thank you for pointing me in the right direction. The
>>> X_properties.plugin.xml files, where X denotes the name of a subpackage
>>> in the Ecore, contains contributorId's that include the name of the
>>> subpackage. When I use the contributorId of the package instead, the EEF
>>> properties are shown as one would expect.
>
>> we defenitely need a FAQ for that.
> Or should the code generator of the X_properties.plugin.xml files 'omit' the
> subpackage name in its contributorId generation?
>

No, because you can have multiple EMF editors ( one for each package )
so you have to have differents IDs.

>>> Even, without adaptation of the XEditor.java files for the subpackages,
>>> the editor works fine. So, should these files be modified or not?
>>
>> What files do you talk about ? the ditor needs to be modified to shows
>> the EEF widgets, but it can have only one contributorId defined. so the
>> multiples extension points must use the same contributorId.
>
> For each package X and subpackage X one gets a XEditor.java, thus not only
> for the package itself. So, there are multiple Editor.java files. Adapting
> the editor for the package only results in correct behavior, so my question
> is whether the subpackage XEditor.java files should be adapted also...
>

This is what i explained upper :)

the "root" package can acces all your Eclass, but the subpackages, not.
so modifying the "root" editor for EEF like you did is the correct way.

if you don't use the subpacges editor, no need to modify them.


>>
>>>
>>> Best regards,
>>>
>>> Ramon
>>>
>>> Stéphane Bouchet wrote:
>>>
>>>> Hi ramon,
>>>>
>>>> could you please send me your actual plugin.xml with all the EEF stuff
>>>> on it ?
>>>>
>>>> I suspect that the contibutorId is not the same everywhere on it.
>>>>
>>>> In order to make it work, must must use the same identical contributorID
>>>> that is defined in the Editor class, in all place in the plugin.xml
>>>>
>>>>
>>>>
>>>> Le 30/06/2010 12:30, Ramon a écrit :
>>>>> Hi,
>>>>>
>>>>> I'm trying to use EEF. The Ecore file with the language definition
>>>>> contains a package cif, which contains the subpackages annotations,
>>>>> types and expressions. Generating EEF architecture results in, amongst
>>>>> others, the files X_properties.plugin.xml for X in {annotations, types,
>>>>> expressions, cif}. I've merged these files (omitting the 'double'
>>>>> parts) into the plugin.xml and adapted the CifEditor.java according to
>>>>> the EEF tutorial. For (instances of) classes from the cif package, the
>>>>> 'EEF property views' are shown 1) in the property pane, and 2) after
>>>>> doubleclick on such an instance. However, for (instances of) classes
>>>>> from the subpackages the property pane shows 'Properties are not
>>>>> available', while after doubleclick on such a class, the 'EEF property
>>>>> view' is shown in a window. Closing this window results in a
>>>>> NullPointerException:
>>>>>
>>>>> (Caused by: java.lang.NullPointerException
>>>>> at
>>>>>
>>> org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge.refresh(
>>>>> TabbedPropertySheetPage.java:749)
>>>>> at
>>>>>
>>>
> nl.tue.cif.v2x1x1.metamodel.cif.presentation.CifEditor$4$1.r un(CifEditor.java:732)
>>>>>
>>>>> This behavior does not change when also the XEditor.java for X in
>>>>> {annotations, types, expressions} are adapted as described in the EEF
>>>>> tutorial.
>>>>>
>>>>> My questions:
>>>>> 1) Should I adapt the XEditor.java files for the subpackages?
>>>>> 2) How to get it work ;)
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> Ramon
>>>>>
>>>>
>>>>
>>>
>>
>>
>


--
Cheers,

Stéphane Bouchet, OBEO
Re: [EEF] Using Ecore consisting of subpackages fails [message #623024 is a reply to message #543706] Wed, 30 June 2010 13:11 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33216
Registered: July 2009
Senior Member
Ramon,

I've often suggested that subpackages are really just syntactic sugar,
and because they're often overlooked during testing they cause
unpleasant problems you'd not get if you just kept your packages
separate. It sounds like you'll need to open a bugzilla so the issue
can be addressed in EEF itself.


Ramon wrote:
> Hi,
>
> I'm trying to use EEF. The Ecore file with the language definition contains
> a package cif, which contains the subpackages annotations, types and
> expressions. Generating EEF architecture results in, amongst others, the
> files X_properties.plugin.xml for X in {annotations, types, expressions,
> cif}. I've merged these files (omitting the 'double' parts) into the
> plugin.xml and adapted the CifEditor.java according to the EEF tutorial.
> For (instances of) classes from the cif package, the 'EEF property views'
> are shown 1) in the property pane, and 2) after doubleclick on such an
> instance. However, for (instances of) classes from the subpackages the
> property pane shows 'Properties are not available', while after doubleclick
> on such a class, the 'EEF property view' is shown in a window. Closing this
> window results in a NullPointerException:
>
> (Caused by: java.lang.NullPointerException
> at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge.refresh(
> TabbedPropertySheetPage.java:749)
> at
> nl.tue.cif.v2x1x1.metamodel.cif.presentation.CifEditor$4$1.r un(CifEditor.java:732)
>
> This behavior does not change when also the XEditor.java for X in
> {annotations, types, expressions} are adapted as described in the EEF
> tutorial.
>
> My questions:
> 1) Should I adapt the XEditor.java files for the subpackages?
> 2) How to get it work ;)
>
> Thanks in advance,
>
> Ramon
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EEF] Using Ecore consisting of subpackages fails [message #623025 is a reply to message #543706] Thu, 01 July 2010 07:26 Go to previous message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
Hi ramon,

could you please send me your actual plugin.xml with all the EEF stuff
on it ?

I suspect that the contibutorId is not the same everywhere on it.

In order to make it work, must must use the same identical contributorID
that is defined in the Editor class, in all place in the plugin.xml



Le 30/06/2010 12:30, Ramon a écrit :
> Hi,
>
> I'm trying to use EEF. The Ecore file with the language definition contains
> a package cif, which contains the subpackages annotations, types and
> expressions. Generating EEF architecture results in, amongst others, the
> files X_properties.plugin.xml for X in {annotations, types, expressions,
> cif}. I've merged these files (omitting the 'double' parts) into the
> plugin.xml and adapted the CifEditor.java according to the EEF tutorial.
> For (instances of) classes from the cif package, the 'EEF property views'
> are shown 1) in the property pane, and 2) after doubleclick on such an
> instance. However, for (instances of) classes from the subpackages the
> property pane shows 'Properties are not available', while after doubleclick
> on such a class, the 'EEF property view' is shown in a window. Closing this
> window results in a NullPointerException:
>
> (Caused by: java.lang.NullPointerException
> at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge.refresh(
> TabbedPropertySheetPage.java:749)
> at
> nl.tue.cif.v2x1x1.metamodel.cif.presentation.CifEditor$4$1.r un(CifEditor.java:732)
>
> This behavior does not change when also the XEditor.java for X in
> {annotations, types, expressions} are adapted as described in the EEF
> tutorial.
>
> My questions:
> 1) Should I adapt the XEditor.java files for the subpackages?
> 2) How to get it work ;)
>
> Thanks in advance,
>
> Ramon
>


--
Cheers,

Stéphane Bouchet, OBEO
Re: [EEF] Using Ecore consisting of subpackages fails [message #623026 is a reply to message #543953] Thu, 01 July 2010 08:20 Go to previous message
Ramon is currently offline RamonFriend
Messages: 10
Registered: July 2009
Junior Member
Hi Stéphane,

Thank you for pointing me in the right direction. The
X_properties.plugin.xml files, where X denotes the name of a subpackage in
the Ecore, contains contributorId's that include the name of the
subpackage. When I use the contributorId of the package instead, the EEF
properties are shown as one would expect.

Even, without adaptation of the XEditor.java files for the subpackages, the
editor works fine. So, should these files be modified or not?

Best regards,

Ramon

Stéphane Bouchet wrote:

> Hi ramon,
>
> could you please send me your actual plugin.xml with all the EEF stuff
> on it ?
>
> I suspect that the contibutorId is not the same everywhere on it.
>
> In order to make it work, must must use the same identical contributorID
> that is defined in the Editor class, in all place in the plugin.xml
>
>
>
> Le 30/06/2010 12:30, Ramon a écrit :
>> Hi,
>>
>> I'm trying to use EEF. The Ecore file with the language definition
>> contains a package cif, which contains the subpackages annotations, types
>> and expressions. Generating EEF architecture results in, amongst others,
>> the files X_properties.plugin.xml for X in {annotations, types,
>> expressions, cif}. I've merged these files (omitting the 'double' parts)
>> into the plugin.xml and adapted the CifEditor.java according to the EEF
>> tutorial. For (instances of) classes from the cif package, the 'EEF
>> property views' are shown 1) in the property pane, and 2) after
>> doubleclick on such an instance. However, for (instances of) classes from
>> the subpackages the property pane shows 'Properties are not available',
>> while after doubleclick on such a class, the 'EEF property view' is shown
>> in a window. Closing this window results in a NullPointerException:
>>
>> (Caused by: java.lang.NullPointerException
>> at
>>
org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge.refresh(
>> TabbedPropertySheetPage.java:749)
>> at
>>
nl.tue.cif.v2x1x1.metamodel.cif.presentation.CifEditor$4$1.r un(CifEditor.java:732)
>>
>> This behavior does not change when also the XEditor.java for X in
>> {annotations, types, expressions} are adapted as described in the EEF
>> tutorial.
>>
>> My questions:
>> 1) Should I adapt the XEditor.java files for the subpackages?
>> 2) How to get it work ;)
>>
>> Thanks in advance,
>>
>> Ramon
>>
>
>
Re: [EEF] Using Ecore consisting of subpackages fails [message #623029 is a reply to message #543962] Thu, 01 July 2010 09:51 Go to previous message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
Ramon,

see comments below :

Le 01/07/2010 10:20, Ramon a écrit :
> Hi Stéphane,
>
> Thank you for pointing me in the right direction. The
> X_properties.plugin.xml files, where X denotes the name of a subpackage in
> the Ecore, contains contributorId's that include the name of the
> subpackage. When I use the contributorId of the package instead, the EEF
> properties are shown as one would expect.

we defenitely need a FAQ for that.

>
> Even, without adaptation of the XEditor.java files for the subpackages, the
> editor works fine. So, should these files be modified or not?

What files do you talk about ? the ditor needs to be modified to shows
the EEF widgets, but it can have only one contributorId defined. so the
multiples extension points must use the same contributorId.


>
> Best regards,
>
> Ramon
>
> Stéphane Bouchet wrote:
>
>> Hi ramon,
>>
>> could you please send me your actual plugin.xml with all the EEF stuff
>> on it ?
>>
>> I suspect that the contibutorId is not the same everywhere on it.
>>
>> In order to make it work, must must use the same identical contributorID
>> that is defined in the Editor class, in all place in the plugin.xml
>>
>>
>>
>> Le 30/06/2010 12:30, Ramon a écrit :
>>> Hi,
>>>
>>> I'm trying to use EEF. The Ecore file with the language definition
>>> contains a package cif, which contains the subpackages annotations, types
>>> and expressions. Generating EEF architecture results in, amongst others,
>>> the files X_properties.plugin.xml for X in {annotations, types,
>>> expressions, cif}. I've merged these files (omitting the 'double' parts)
>>> into the plugin.xml and adapted the CifEditor.java according to the EEF
>>> tutorial. For (instances of) classes from the cif package, the 'EEF
>>> property views' are shown 1) in the property pane, and 2) after
>>> doubleclick on such an instance. However, for (instances of) classes from
>>> the subpackages the property pane shows 'Properties are not available',
>>> while after doubleclick on such a class, the 'EEF property view' is shown
>>> in a window. Closing this window results in a NullPointerException:
>>>
>>> (Caused by: java.lang.NullPointerException
>>> at
>>>
> org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge.refresh(
>>> TabbedPropertySheetPage.java:749)
>>> at
>>>
> nl.tue.cif.v2x1x1.metamodel.cif.presentation.CifEditor$4$1.r un(CifEditor.java:732)
>>>
>>> This behavior does not change when also the XEditor.java for X in
>>> {annotations, types, expressions} are adapted as described in the EEF
>>> tutorial.
>>>
>>> My questions:
>>> 1) Should I adapt the XEditor.java files for the subpackages?
>>> 2) How to get it work ;)
>>>
>>> Thanks in advance,
>>>
>>> Ramon
>>>
>>
>>
>


--
Cheers,

Stéphane Bouchet, OBEO
Re: [EEF] Using Ecore consisting of subpackages fails [message #623031 is a reply to message #543994] Thu, 01 July 2010 12:42 Go to previous message
Ramon is currently offline RamonFriend
Messages: 10
Registered: July 2009
Junior Member
Hi Stéphane,

See below.

Stéphane Bouchet wrote:

> Ramon,
>
> see comments below :
>
> Le 01/07/2010 10:20, Ramon a écrit :
>> Hi Stéphane,
>>
>> Thank you for pointing me in the right direction. The
>> X_properties.plugin.xml files, where X denotes the name of a subpackage
>> in the Ecore, contains contributorId's that include the name of the
>> subpackage. When I use the contributorId of the package instead, the EEF
>> properties are shown as one would expect.

> we defenitely need a FAQ for that.
Or should the code generator of the X_properties.plugin.xml files 'omit' the
subpackage name in its contributorId generation?

>> Even, without adaptation of the XEditor.java files for the subpackages,
>> the editor works fine. So, should these files be modified or not?
>
> What files do you talk about ? the ditor needs to be modified to shows
> the EEF widgets, but it can have only one contributorId defined. so the
> multiples extension points must use the same contributorId.

For each package X and subpackage X one gets a XEditor.java, thus not only
for the package itself. So, there are multiple Editor.java files. Adapting
the editor for the package only results in correct behavior, so my question
is whether the subpackage XEditor.java files should be adapted also...

>
>>
>> Best regards,
>>
>> Ramon
>>
>> Stéphane Bouchet wrote:
>>
>>> Hi ramon,
>>>
>>> could you please send me your actual plugin.xml with all the EEF stuff
>>> on it ?
>>>
>>> I suspect that the contibutorId is not the same everywhere on it.
>>>
>>> In order to make it work, must must use the same identical contributorID
>>> that is defined in the Editor class, in all place in the plugin.xml
>>>
>>>
>>>
>>> Le 30/06/2010 12:30, Ramon a écrit :
>>>> Hi,
>>>>
>>>> I'm trying to use EEF. The Ecore file with the language definition
>>>> contains a package cif, which contains the subpackages annotations,
>>>> types and expressions. Generating EEF architecture results in, amongst
>>>> others, the files X_properties.plugin.xml for X in {annotations, types,
>>>> expressions, cif}. I've merged these files (omitting the 'double'
>>>> parts) into the plugin.xml and adapted the CifEditor.java according to
>>>> the EEF tutorial. For (instances of) classes from the cif package, the
>>>> 'EEF property views' are shown 1) in the property pane, and 2) after
>>>> doubleclick on such an instance. However, for (instances of) classes
>>>> from the subpackages the property pane shows 'Properties are not
>>>> available', while after doubleclick on such a class, the 'EEF property
>>>> view' is shown in a window. Closing this window results in a
>>>> NullPointerException:
>>>>
>>>> (Caused by: java.lang.NullPointerException
>>>> at
>>>>
>> org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge.refresh(
>>>> TabbedPropertySheetPage.java:749)
>>>> at
>>>>
>>
nl.tue.cif.v2x1x1.metamodel.cif.presentation.CifEditor$4$1.r un(CifEditor.java:732)
>>>>
>>>> This behavior does not change when also the XEditor.java for X in
>>>> {annotations, types, expressions} are adapted as described in the EEF
>>>> tutorial.
>>>>
>>>> My questions:
>>>> 1) Should I adapt the XEditor.java files for the subpackages?
>>>> 2) How to get it work ;)
>>>>
>>>> Thanks in advance,
>>>>
>>>> Ramon
>>>>
>>>
>>>
>>
>
>
Re: [EEF] Using Ecore consisting of subpackages fails [message #623048 is a reply to message #544040] Wed, 07 July 2010 13:20 Go to previous message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
hi ramon,

see my comments below :

Le 01/07/2010 14:42, Ramon a écrit :
> Hi Stéphane,
>
> See below.
>
> Stéphane Bouchet wrote:
>
>> Ramon,
>>
>> see comments below :
>>
>> Le 01/07/2010 10:20, Ramon a écrit :
>>> Hi Stéphane,
>>>
>>> Thank you for pointing me in the right direction. The
>>> X_properties.plugin.xml files, where X denotes the name of a subpackage
>>> in the Ecore, contains contributorId's that include the name of the
>>> subpackage. When I use the contributorId of the package instead, the EEF
>>> properties are shown as one would expect.
>
>> we defenitely need a FAQ for that.
> Or should the code generator of the X_properties.plugin.xml files 'omit' the
> subpackage name in its contributorId generation?
>

No, because you can have multiple EMF editors ( one for each package )
so you have to have differents IDs.

>>> Even, without adaptation of the XEditor.java files for the subpackages,
>>> the editor works fine. So, should these files be modified or not?
>>
>> What files do you talk about ? the ditor needs to be modified to shows
>> the EEF widgets, but it can have only one contributorId defined. so the
>> multiples extension points must use the same contributorId.
>
> For each package X and subpackage X one gets a XEditor.java, thus not only
> for the package itself. So, there are multiple Editor.java files. Adapting
> the editor for the package only results in correct behavior, so my question
> is whether the subpackage XEditor.java files should be adapted also...
>

This is what i explained upper :)

the "root" package can acces all your Eclass, but the subpackages, not.
so modifying the "root" editor for EEF like you did is the correct way.

if you don't use the subpacges editor, no need to modify them.


>>
>>>
>>> Best regards,
>>>
>>> Ramon
>>>
>>> Stéphane Bouchet wrote:
>>>
>>>> Hi ramon,
>>>>
>>>> could you please send me your actual plugin.xml with all the EEF stuff
>>>> on it ?
>>>>
>>>> I suspect that the contibutorId is not the same everywhere on it.
>>>>
>>>> In order to make it work, must must use the same identical contributorID
>>>> that is defined in the Editor class, in all place in the plugin.xml
>>>>
>>>>
>>>>
>>>> Le 30/06/2010 12:30, Ramon a écrit :
>>>>> Hi,
>>>>>
>>>>> I'm trying to use EEF. The Ecore file with the language definition
>>>>> contains a package cif, which contains the subpackages annotations,
>>>>> types and expressions. Generating EEF architecture results in, amongst
>>>>> others, the files X_properties.plugin.xml for X in {annotations, types,
>>>>> expressions, cif}. I've merged these files (omitting the 'double'
>>>>> parts) into the plugin.xml and adapted the CifEditor.java according to
>>>>> the EEF tutorial. For (instances of) classes from the cif package, the
>>>>> 'EEF property views' are shown 1) in the property pane, and 2) after
>>>>> doubleclick on such an instance. However, for (instances of) classes
>>>>> from the subpackages the property pane shows 'Properties are not
>>>>> available', while after doubleclick on such a class, the 'EEF property
>>>>> view' is shown in a window. Closing this window results in a
>>>>> NullPointerException:
>>>>>
>>>>> (Caused by: java.lang.NullPointerException
>>>>> at
>>>>>
>>> org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge.refresh(
>>>>> TabbedPropertySheetPage.java:749)
>>>>> at
>>>>>
>>>
> nl.tue.cif.v2x1x1.metamodel.cif.presentation.CifEditor$4$1.r un(CifEditor.java:732)
>>>>>
>>>>> This behavior does not change when also the XEditor.java for X in
>>>>> {annotations, types, expressions} are adapted as described in the EEF
>>>>> tutorial.
>>>>>
>>>>> My questions:
>>>>> 1) Should I adapt the XEditor.java files for the subpackages?
>>>>> 2) How to get it work ;)
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> Ramon
>>>>>
>>>>
>>>>
>>>
>>
>>
>


--
Cheers,

Stéphane Bouchet, OBEO
Previous Topic:extending the ecore
Next Topic:[EMF Compare]
Goto Forum:
  


Current Time: Fri Sep 20 08:28:01 GMT 2024

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

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

Back to the top