Discussion:
[emf-dev] [EMF Forms] Loading Model problem
Javier Alfonso
2017-01-18 15:14:14 UTC
Permalink
The problem: I created my user interface successfully, using the default
viewers, i created my objects, edited them and persisted them using XMI,
everything ok, the problem begins when i load the saved model, it is
rendered ok, i can see everything, but when i try to add new elements or
try to edit the existent, i get a null pointer exception, it is like the
view doesn't know how to edit or create new objects.
My load and save XMI code is based on Vogellas tutorial, maybe the problem
is in the way i assign the loaded objects to the rendered object?
The code i'm using is:
C c = null;
c = (C) resource.getContents().get(0);
and then i render c using the SWT renderer.

The difference to a non saved object is that i use the factory.create method

Any suggestions?
Ed Merks
2017-01-18 16:33:36 UTC
Permalink
Please use the forum to ask question. The EMF Forms project uses the
EMFT forum. Note there there is not enough information about what
you're doing to guess at the problem. If you have an exception, there's
a stack trace. Include that in your forum post.
Post by Javier Alfonso
The problem: I created my user interface successfully, using the
default viewers, i created my objects, edited them and persisted them
using XMI, everything ok, the problem begins when i load the saved
model, it is rendered ok, i can see everything, but when i try to add
new elements or try to edit the existent, i get a null pointer
exception, it is like the view doesn't know how to edit or create new
objects.
My load and save XMI code is based on Vogellas tutorial, maybe the
problem is in the way i assign the loaded objects to the rendered object?
C c = null;
c = (C) resource.getContents().get(0);
and then i render c using the SWT renderer.
The difference to a non saved object is that i use the factory.create method
Any suggestions?
_______________________________________________
emf-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/emf-dev
Javier Alfonso
2017-01-27 16:26:43 UTC
Permalink
sorry to keep bothering you, i posted a new question at
https://www.eclipse.org/forums/index.php/m/1752818/#msg_1752818
the problem is that i create an editing domain to load an work with my
model, but it seems that in some scenarios, emfforms is creating a new
editingdomain after rendering a component, resulting in consistency
problems, any suggestions?
Post by Ed Merks
Please use the forum to ask question. The EMF Forms project uses the
EMFT forum. Note there there is not enough information about what you're
doing to guess at the problem. If you have an exception, there's a stack
trace. Include that in your forum post.
The problem: I created my user interface successfully, using the default
viewers, i created my objects, edited them and persisted them using XMI,
everything ok, the problem begins when i load the saved model, it is
rendered ok, i can see everything, but when i try to add new elements or
try to edit the existent, i get a null pointer exception, it is like the
view doesn't know how to edit or create new objects.
My load and save XMI code is based on Vogellas tutorial, maybe the problem
is in the way i assign the loaded objects to the rendered object?
C c = null;
c = (C) resource.getContents().get(0);
and then i render c using the SWT renderer.
The difference to a non saved object is that i use the factory.create method
Any suggestions?
_______________________________________________
To change your delivery options, retrieve your password, or unsubscribe from this list, visithttps://dev.eclipse.org/mailman/listinfo/emf-dev
_______________________________________________
emf-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/emf-dev
Maximilian Koegel
2017-01-27 16:32:31 UTC
Permalink
Please refrain from posting questions to this mailinglist, ONLY post them
to the forum, as mentioned earlier. This mailinglist is the wrong audience.

Best regards,
Maximilian
Post by Javier Alfonso
sorry to keep bothering you, i posted a new question at
https://www.eclipse.org/forums/index.php/m/1752818/#msg_1752818
the problem is that i create an editing domain to load an work with my
model, but it seems that in some scenarios, emfforms is creating a new
editingdomain after rendering a component, resulting in consistency
problems, any suggestions?
Post by Ed Merks
Please use the forum to ask question. The EMF Forms project uses the
EMFT forum. Note there there is not enough information about what you're
doing to guess at the problem. If you have an exception, there's a stack
trace. Include that in your forum post.
The problem: I created my user interface successfully, using the default
viewers, i created my objects, edited them and persisted them using XMI,
everything ok, the problem begins when i load the saved model, it is
rendered ok, i can see everything, but when i try to add new elements or
try to edit the existent, i get a null pointer exception, it is like the
view doesn't know how to edit or create new objects.
My load and save XMI code is based on Vogellas tutorial, maybe the
problem is in the way i assign the loaded objects to the rendered object?
C c = null;
c = (C) resource.getContents().get(0);
and then i render c using the SWT renderer.
The difference to a non saved object is that i use the factory.create method
Any suggestions?
_______________________________________________
To change your delivery options, retrieve your password, or unsubscribe from this list, visithttps://dev.eclipse.org/mailman/listinfo/emf-dev
_______________________________________________
emf-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/emf-dev
_______________________________________________
emf-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/emf-dev
--
Dr. Maximilian Koegel

Senior Software Architect / General Manager
EclipseSource Munich

Email: ***@eclipsesource.com
Web: http://eclipsesource.com/munich
Mobil: +49 176 223 619 18
Phone: +49 89 21 555 30 - 10
Fax: +49 89 21 555 30 - 19
Skype: maximilian.koegel
Hangouts: ***@eclipsesource.com

EclipseSource Muenchen GmbH
Agnes-Pockels-Bogen 1
80992 MÃŒnchen

General Managers: Dr. Jonas Helming, Dr. Maximilian Koegel
Registered Office: Agnes-Pockels-Bogen 1, 80992 Muenchen,
Commercial Register MÃŒnchen, HRB 191789
Loading...