[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [ve-dev] how does eclipse know
|
Thank
you Dr Gili and Jefrey for your explanations, it certainly sheds some light into
how things operate.
... we can spend
hours on this issue. But, the net net is that VE in its core will be
able to drop any JavaBean on the Free Form (see
http://java.sun.com/products/javabeans/docs/spec.html). VE will model
the bean, instantiate it with a null constructor, introspect it, and
will render properties on the PropertySheet.
To support WYSIWYG, the core VE was extended to screen
scrape certain component hierarchy. To extend VE we use override files
that could say that for a given hierarchy... use special (GEF) edit parts,
Decoders, hide/fluff properties etc. see
org.eclipse.ve.jfc\overrides\java\awt\Component.override as an example
override file for a Swing Component.
The Reverse Parsing process does not necessarily looks at all the
instance variables and code in your class. It tries to filter what is
rendered.
If it is a Swing/SWT
component will render them (e.g., see the modelled="true" in the
Component.override file).
If the class
is not to be modelled by default from an override file, you can for VE to
model it as following (this logic comes for rules that can be extended as
well):
1.
prefix the instance variable name with "ivj"
2. (This is on CVS and will be
available in the next build) An instance declaration has a comment that
starts as following // @jve:decl-index=0:
e.g., if you
use the ChooseBean to drop a none Swing/SWT component, it will generate code
like this
Foo myFoo
= null; //
@jve:decl-index=0:visual-constraint="56,58"
This implies that myFoo will be modeled, and will be
placed on the Canvas at coordinates 56,58.
Foo myFoo = null; //
@jve:decl-index=0:visual-constraint=""
myFoo will be modeled, and Free Flowed on
the FF.
Foo
ivjmyFoo = null;
ivjmyFoo will be modeled, and Free Flowed on the
FF.
Foo myFoo = null;
//
@jve:decl-index=0:
myFoo will be modeled, but will not be placed on the FF
Foo myFoo = null;
myFoo will NOT be
modeled... as it is not a "override designated Visual Class"
------------
Dr. Gili
Mendel
IBM
Software Development
RTP Raleigh, NC
(919)543 6408,
tie: 441 6408
Ps- Just out of interest how does the Visual
Editor know which are visual components and must the class follow a certain
structure ( a la JavaBean structure)? I was trying to port some old classes to
it and i'm redoing them... just thought if I understand how it builds it up I
can save some time. Thanks again for the prompt reply.