Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ve-dev] ContainerManager


Hi,

By default, if you don't supply a constraint, it uses the component's name as the constraint. You must explicitly set the constraint to something, such as null.

Rich


cathyscott@xxxxxxxxxx
Sent by: ve-dev-bounces@xxxxxxxxxxx

12/08/2006 09:12 AM

Please respond to
Discussions people developing code for the Visual Editor project        <ve-dev@xxxxxxxxxxx>

To
ve-dev@xxxxxxxxxxx
cc
Subject
[ve-dev] ContainerManager





I am extending the VE so that it parses and generates Groovy SwingBuilder code instead of Java.
As the Groovy SwingBuilder class simply instantiates Swing components the only VE component that I am customizing is the CodeGen area.
There have been several mentions of a tutorial in this area but so far I have not seen one - other than CustomPrompter example which is pretty basic in respect of the helpers/decoders. Is there a more advanced tutorial or a chance of one soon?

So far I have followed the same workflow as for Java - I parse the groovy script and look for relevant expressions in the groovy AST. I then use these to build a Groovy BDM and then a VE model. The VE model is excatly the same as that used by the Java VE.
So far I have coded DecoderHelpers/mappers that do the equivalent of ConstructorAddDecoderHelper / ContainerAddDecoderHelper and SimpleAttributeDecoderHelper.

I can parse simple Groovy SwingBuilder scripts and build a VE model, edit simple properties and add a component to a JPanel. So far I am just using specifying a constraint in my source - just simple adds.

I have a problem at present which I need some help to debug.
I have a script that has a JPanel with a JLabel added to it. I can open the Groovy VE on it and create a model. But then if I edit, say the name property of the JLabel, I have an error compong from the VM - IllegalArgumentExceptio in jfc.vm.ContainerManager.addComponentBefore(..).
unknown constraint:fds
where the String fds is the value entered on the PropertySheet for the JLabel's name property.
I can debug into BeanAWTUtilities.invoke_addComponent(..) and the arguments being passed to the ComponentManager appear to be
-an REMBeanProxy for the JPanel
-anREMBeanProxy for the JLabel
- null for beforeComponent
-an REMBooleanTypeBeanProxy with value true

The error message is shown on the image for the JLabel on the canvas and on the status line.
How can I get some inormation about what is happening?
The model and the source code appear to be fine.

Thanks,
Cathy Scott

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


Back to the top