Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ve-dev] Extending The visual editor


Hi Sheldon,

What the VE shows on the canvas is basically a screen capture of the live widgets running in a JVM, for which it knows how to deal with AWT/Swing or SWT.  For your GTK+ widgets if you could get Java wrappers for them that were SWT then the VE should be able to talk to them.  The VE also works from a Java EMF model of each control, so this way you'd have getters and setters that, through introspection, the VE would be able to understand and create properties for.  The Draw2d approach is another you could use, however I don't think it'd be a good one.  This would basically involve you having to rewrite your paint code from your GTK widget inside the GEF figure that the VE used for its edit part, which would duplicate effort and run the risk of being incorrect so you didn't get good fidelity between the two, but also would still require you having to do wrappers from the getters and setters in Java to your widget through JNI to ensure the property values were correctly applied, so to get this part done you'd have to have created the SWT wrapper anyways.

For the code generation look at the decoders.  These are attached as listeners to the EMF objects and listen to changes to do the correct code modification.  

Best regards,

Joe



"Sheldon Dsouza" <sheldond@xxxxxxxxx>
Sent by: ve-dev-bounces@xxxxxxxxxxx

11/12/2006 09:15

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

To
ve-dev@xxxxxxxxxxx
cc
Subject
[ve-dev] Extending The visual editor





Hi,

           I am currently working on a project where i have to create a WYSIWYG editor for  GTK+ widgets. I have gone through the tutorial for the custom widget, and found it useful for creating my own widgets. But i have the following problem, we have optimized the GTK+ widgets and have also created our own widgets how can this be incorporated into eclipse.

1. Do i have to modify SWT to include these widgets for the look and feel in the editor (to satisfy the WYSIWYG rule).
2. Or do i create the look and feel of the new widgets using Draw2d.

Secondly i have to generate C code and hence have to disable the java code generation. Which are the plugins for VE that i have to change or modify inorder to do this.

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


Back to the top