Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [ve-dev] Codegen for GridBagConstraint


Hi Janak,
  1. You will need to switch the constraint to containment="false" I guarentee it won't work otherwise. Though I can't guarentee there was not some other problem preventing if from working after you switch to non-containment. :-)
  2. If you will be setting the constraint second, then the constraint setting must be done through a ruledcommand also or it will not be allocated correctly.


Rich




"Janak Mulani" <janak.mulani@xxxxxxxxx>
Sent by: ve-dev-bounces@xxxxxxxxxxx

07/12/2005 04:24 PM

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
RE: [ve-dev] Codegen for GridBagConstraint





Hi Rich,

Many thanks.

>>> RLK >>>
Yes, the "constraint" must not be containment="true". As I mentioned in my
just sent previous note IJavaInstances must always be containment="false"
while non-IJavaInstances (such as our intermediate object) must be
containment="true".

As for your constraint feature, you said it could be a String or
GridBagConstraint. It should be a IJavaInstance kind of String, not just a
plain string because you can't mix non-IJavaInstances and IJavaInstances on
the same feature.
>>>>>>>>

Yes our containment SF (which you refereed as constraint above) takes java
Objects which are IJavaInstances. We convert Strings also to IJavaInstances.
So there is no mixing.

>>> RLK >>>
I would also just set the constraint before setting the label into the
container and only use the ruled on the label being set into container.
Saves a little time so that the preset doesn't walk the same stuff twice.
>>>>>>

Please refer to my last mail Point 5.

I did just that - set containment on label before creating ruled command to
set label as value for components SF on the container
(ULCGridBagLayoutPane).

The problem as I pointed out in that while walking over the
GridBagConstraints on label, eContainer() for GridBagConstraints was not
null - it is the label. Therefore, based on non null eContainer() condition
it never executes the logic for creation of local var in the methods
getMethod() and handleValue().

In your case, eContainer() for GridBagConstraints is null and hence the
logic for location of variable is triggered.

As you suggested I will try setting containment = false in the SF and see if
this makes a difference.

BTW, I agree with you that our way of doing it - first adding label and then
setting constraint on it - is inefficient - even our DecoderAdapters are
fired twice.

Perhaps we should move to the model of Container-Containee relationship like
yours with ConstraintComponent - hopefully in the next version after lot of
clean up.

Thanks and regards,

Janak

_______________________________________________
ve-dev mailing list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev


Back to the top