Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [EMF Forms] ViewModel generation does not work with classes in packages
[EMF Forms] ViewModel generation does not work with classes in packages [message #1696128] Fri, 22 May 2015 08:59 Go to next message
Tobias Zangl is currently offline Tobias ZanglFriend
Messages: 15
Registered: May 2015
Junior Member
Hey,

first of all i was not sure if this is the right place for this topic or if it belongs to "EMF Technology"?

My Problem:
I have an ecore file with 3 subpackages and i am not able to create view model (projects) for the classes in the subpackages. For the classes in the ecore package everything works fine. I don't get any error message, it is just not creating any .viewmodel files.

Is there anything wrong with creating multiple subpackages in an ecore file?
Should i create multiple ecore files instead?

If i create the viewmodel file by hand in the text editor the View Model Editor does not complain but the emf forms preview brings the following error:
java.lang.NullPointerException
	at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSettingDelegate(EStructuralFeatureImpl.java:840)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSettingDelegate(BasicEObjectImpl.java:1561)
....


Any help would be appreciated. Smile

Greetings,
Tobi
Re: [EMF Forms] ViewModel generation does not work with classes in packages [message #1696183 is a reply to message #1696128] Fri, 22 May 2015 15:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Tobias,

Comments below.


On 22/05/2015 3:39 PM, Tobias Zangl wrote:
> Hey,
>
> first of all i was not sure if this is the right place for this topic
> or if it belongs to "EMF Technology"?
>
> My Problem:
> I have an ecore file with 3 subpackages and i am not able to create
> view model (projects) for the classes in the subpackages. For the
> classes in the ecore package everything works fine. I don't get any
> error message, it is just not creating any .viewmodel files.
>
> Is there anything wrong with creating multiple subpackages in an ecore
> file?
No, but it's generally inviting problems...
> Should i create multiple ecore files instead?
That's generally better support by the whole technology stack.
>
> If i create the viewmodel file by hand in the text editor the View
> Model Editor does not complain but the emf forms preview brings the
> following error:
> java.lang.NullPointerException
> at
> org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSettingDelegate(EStructuralFeatureImpl.java:840)
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSettingDelegate(BasicEObjectImpl.java:1561)
This suggests that you have a structural feature that doesn't have a
type. I'm not sure how that's possible for a model that's well formed.
But you say the generated model otherwise works fine?
> ...
>
> Any help would be appreciated. :)
>
> Greetings,
> Tobi


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EMF Forms] ViewModel generation does not work with classes in packages [message #1696223 is a reply to message #1696183] Sat, 23 May 2015 14:01 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Please also see:
http://eclipsesource.com/blogs/2013/03/19/emf-dos-and-don%C2%B4ts-5/

Am 22.05.2015 um 17:22 schrieb Ed Merks:
> Tobias,
>
> Comments below.
>
>
> On 22/05/2015 3:39 PM, Tobias Zangl wrote:
>> Hey,
>>
>> first of all i was not sure if this is the right place for this topic
>> or if it belongs to "EMF Technology"?
>>
>> My Problem:
>> I have an ecore file with 3 subpackages and i am not able to create
>> view model (projects) for the classes in the subpackages. For the
>> classes in the ecore package everything works fine. I don't get any
>> error message, it is just not creating any .viewmodel files.
>>
>> Is there anything wrong with creating multiple subpackages in an ecore
>> file?
> No, but it's generally inviting problems...
>> Should i create multiple ecore files instead?
> That's generally better support by the whole technology stack.
>>
>> If i create the viewmodel file by hand in the text editor the View
>> Model Editor does not complain but the emf forms preview brings the
>> following error:
>> java.lang.NullPointerException
>> at
>> org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSettingDelegate(EStructuralFeatureImpl.java:840)
>>
>> at
>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSettingDelegate(BasicEObjectImpl.java:1561)
>>
> This suggests that you have a structural feature that doesn't have a
> type. I'm not sure how that's possible for a model that's well formed.
> But you say the generated model otherwise works fine?
>> ...
>>
>> Any help would be appreciated. :)
>>
>> Greetings,
>> Tobi
>


--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] ViewModel generation does not work with classes in packages [message #1696324 is a reply to message #1696223] Mon, 25 May 2015 16:06 Go to previous message
Tobias Zangl is currently offline Tobias ZanglFriend
Messages: 15
Registered: May 2015
Junior Member
Thank you very much.

Everything works fine after splitting up the sub packages in different ecore files. Smile

Also thanks for the Dos and Dont's link, havent found that yet.

Greetings,
Tobi
Previous Topic:[CDO] How do Passive updates work ?
Next Topic:[OOMPH] ClassCastException on Installer start
Goto Forum:
  


Current Time: Thu Apr 25 19:51:12 GMT 2024

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

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

Back to the top