Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [ve-dev] Deveopement on top of VE


blue


------------
Dr. Gili Mendel
IBM
Software Development
RTP Raleigh, NC
(919)543 6408, tie: 441 6408



Dave Orme <DaveO@xxxxxxxxxxxxxxx>
Sent by: ve-dev-admin@xxxxxxxxxxx

04/14/2004 11:59 AM

Please respond to
ve-dev

To
"'ve-dev@xxxxxxxxxxx'" <ve-dev@xxxxxxxxxxx>
cc
Subject
RE: [ve-dev] Deveopement on top of VE






>  I want to develop a GUI tool using the VE framework which
> will show my components  in the palette like the SWING
> components. By components are essentially java beans. Could
> somebody give me any pointers for how to start.


There are some documentation in http://www-106.ibm.com/developerworks/websphere/library/techarticles/0302_winchester/winchester.html on how to extend the VE's palette.  It is a bit old in the sense that the level of EMF that we now support has changed some of the syntax, but it will give you the starting point you are looking for.  You can use the current VE palette as a ref. point (org.eclipse.ve.jfc\palette\javavisualbeanscats.xmi) and the following in org.eclipse.ve.jfc\plugin.xml
<extension
         point="org.eclipse.ve.java.core.contributors">
      <palette
            container="org.eclipse.jdt.launching.JRE_CONTAINER"
            categories="palette/javavisualbeanscats.xmi"
            loc="last">
      </palette>
   </extension>


1) You're already at the right place.  Ask us anything you like; we'll try
to help.

2) Make sure you've downloaded and installed the latest VE driver based on
M8 (the thing we're testing right now).  [Gili, this is available, right?]

3) There are directions on my blog describing how to install everything so
you can hack on VE.  Just jump to
http://www.coconut-palm-software.com/the_visual_editor for this and more.
This will hopefully get formalized into a series of articles for the VE web
site soon, but for now, this is where you've got to go.

> I want to
> develop something very similar to the existing VE SWING
> reference implementation but using my own components. I have
> only a couple layouts and what I want to generate is not JAVA
> code but XML. Where can I find documentation for the API of
> VE? What parts of the VE feature should I use for develop a
> non-Java code generator? Thanks in advance -Anupama


There are a few options for you to generate XML from the full blown XML/Visual round tripping editor for which you will need to provide a new Visual Editor that combine the two (still using the existing VE model/targetVM etc.)

Another one, is to use the "Save As" mechanism, from which you can translate the (EMF) VE model into XML.  Note that you can searlized the EMF model to XMI with one line of code.   If you use an IDE to develop VE, you can see the EMF model by following these steps:

Turn on (tracing in general and) the debug/xmltext tracing option in your launch configuration of your IDE environment:


On the running environment, go to the VE pref. Page, and turn on the Show XML Text


The next time you open a class with VE, you will see the EMF model window:




There are no real good documents on this (Dave is working on some) besides the code.  But as you go along, feel free to ask more questions here.



I'll leave the specifics of this question for someone else. :-)

But in general, VE uses a pretty strict MVC architecture.  So your code is
doing one of the following:

1) Manipulating the model.

2) Keeping a view/editor synchronized with the model.

3) Interfacing with GEF

The model is defined in terms of EMF.  This sounds really hard at first,
until you realize that the EMF stuff is really just a language-neutral
reimplementation of java.lang.reflect.  So it's really just about learning a
new vocabulary for the stuff you already know how to say using
java.lang.reflect.

Your XML code is just a view/editor of the EMF model.  You'll use the
Eclipse editor toolkit to create an XML editor and use model change events
from the VEP model to keep your editor synchronized with the VEP model.
Similarly, your XML editor will make changes to the EMF model when someone
manipulates the XML.

I'm not sure how you will add a new layout manager to VE.  One of the other
developers will have to get you started there.


Regards,

Dave Orme
VEP project lead
_______________________________________________
ve-dev mailing list
ve-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/ve-dev


Back to the top