[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[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
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