[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [ve-dev] Model does not change on property set
|
Hi
Sri,
Yes.
The code gen and property sheet are fine.
The
model changes are not shown in XMI viewer and neither are they saved in the
cache. So, next time when one opens the class, the button does not show the text
and neither has the preferredSize.
The
scenario is as follows:
1.
Drop the button on the canvas
2. A
CreationPolicy command sets text on the on the button
3.
Button appears on the canvas correctly - it shows text, the property sheet shows
text, the code has setText. But model does not show text.
After
Step 3:
4.
Resize the button on canvas. setPreferredSize is genearted in code. Property
sheet shows new preferredSize. The button size on canvas too is correct.
However, preferredSize does not appear in the model.
After
step 4: (Scenario A)
I save
and close the file. On reopen, reverse parser is started. However, the
button on the canvas does not show text and preferredSize.
When I
do refresh, I do not see any of the properties of the button in propertysheet.
However, if I have done clean build of the project before doing steps 1 to
4.
Refresh works ok.
Suppose after step 4 above:
5. Do
a refresh.
6. XMI
model shows text and preferredSize.
7. On
close and reopen, button appears with text and right size. NOTE: No reverse
parsing is done.
Suppose after step 3 above: (Scenario B)
4. In
propertySheet, change the text. The XMI model now shows text. The
old setText stmt in code shows the newly set text. No new exprn is
generated.
5. In
propertySheet, change preferredSize. The XMI model now shows preferredSize and
old setPreferredSize stmt in code shows new size. No new exprn is
generated.
6.
Save: close: reopen.
7.
Button appears with correct text and size. However, reverse parser still runs
and takes some time.
Conclusion:
Refresh before close works the best. It save the model correctly and no
reverse parsing is done on reopen.
If I
have not doen refresh before close. Then, in scnario A the model is bad and
reverse parser is started on reopen. Or in Scnario B, the model is
correct but even then the reverse parser is started.
No new
exprns are generated when properties are changed. Old exprns are
updated.
Clean
build has some role to play in all this. It seems cached
models are somehow getting corrupted.
Hope
these scenarios help you in tracking the problem.
Thanks
and regards,
Janak
Hi Janak,
The mere fact
that codegen is generating the setPreferredSize() and setText()
means that the properties are being
set in the model. Even the propertysheet is verifying
this. If the values were being unset/removed from the
model, then codegen would have
reacted
accordingly and removed/changed in the source.
Whats puzzling is that
these changes are not being shown in the XMI viewer,
and also not cached properly. When you set the
text/size, and later change it does it create
a new _expression_ in source, or just update the existing one?
It could be
that the XMI serialization is somehow broken which might explain
why its not able to refresh the XMI viewer
dynamically, and also not cache properly the
set properties. So because of this problem if you set 'text',
'preferredSize' and 'backgroundColor'
on an ULCButton, save, close and reopen the file, none of the above
properties are set?
Regards,
Sri.
"Janak Mulani"
<janak.mulani@xxxxxxxxx> Sent by: ve-dev-bounces@xxxxxxxxxxx
12/23/2005 03:59 AM
Please respond
to Discussions people developing code for the Visual Editor
project |
|
To
| "Discussions people
developing code for the Visual Editor project"
<ve-dev@xxxxxxxxxxx>
|
cc
|
|
Subject
| [ve-dev] Model does
not change on property set |
|
Hi Sri,
There is only one property being set on resize
and it is the preferredSize. The code gen generates setPreferredSize().
For that
matter, even if one changes the text (setText() is generated for this)
property to set the button text, this is not reflected on the model.
The code
is as follows:
private ULCButton getUlcButton() {
if (ulcButton ==
null) {
ulcButton = new ULCButton();
ulcButton.setPreferredSize(new
com.ulcjava.base.application.util.Dimension(131,79));
ulcButton.setText("ULCButton");
}
return
ulcButton;
}
So the code and propertysheet are fine when I set the
preferredSize and text properties. But the model is not updated.
However,
if I do refresh/synch then the model is ok - it shows preferredSize and
text.
So the question is why the model is not updated as soon as I set
properties? Why is the refresh necessary to have effect in the model?
Am I
missing some adapter? If so which one?
Thanks and regards,
Janak
-----Original Message-----
From:
ve-dev-bounces@xxxxxxxxxxx [mailto:ve-dev-bounces@xxxxxxxxxxx]On Behalf Of
Srimanth Gunturi
Sent: Thursday, December 22, 2005 5:51
PM
To: Discussions people developing code for the Visual Editor
project
Subject: Re: [ve-dev] FW: Do you have some time
today?
Hi Janak,
So
when the resize is done on a dropped ULCButton, the only property being
set
is 'size' in
the EMF model. But when you reload the source, both the 'size' and
'preferredSize'
properties are being set? How many expressions in the
source are being generated when
you do the resize?
It could be that in the runtime, two different API are being called to
set the size. One
which doesnt notify of 'preferredSize' change (when you
resize in UI), and one which
does (when you reload the source).
Could you please have a look if thats the case?
Regards,
Sri.
"Janak Mulani"
<janak.mulani@xxxxxxxxx> Sent by:
ve-dev-bounces@xxxxxxxxxxx
12/21/2005 06:31 AM
Please respond
to Discussions people developing code for the Visual Editor
project |
|
To
| "ve-Dev@Eclipse. Org"
<ve-dev@xxxxxxxxxxx>
|
cc
|
|
Subject
| [ve-dev] FW: Do you
have some time today? |
|
Hi VE Team,
Consider the
following scenario:
1. Put ULCButton on canvas
2. Resize it.
3.
Code gen is fine, property sheet is fine.
4. But the xml model does not
show preferredSize.
5. Do a refresh/synch. Now the xml model shows
preferredSize.
This means if the user saves before step 5 above, the
cached model won't
have preferredSize and when the class is reopened the
button will still
appear small.
Could you tell me what the problem
could be? Is some adapter missing
somewhere?
Thanks and
regards,
Janak
_______________________________________________
ve-dev
mailing
list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev
_______________________________________________
ve-dev mailing
list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev