Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ve-dev] Questions about decoder




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



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

11/25/2005 12:51 PM

Please respond to
Discussions people developing code for the Visual Editor project

To
"ve-Dev@Eclipse. Org" <ve-dev@xxxxxxxxxxx>
cc
Subject
[ve-dev] Questions about decoder





Hi VE Team,

What happens when a previously created visual class is opened?

Is the code parsed to create the EMF model? Is the decode method called?

> It depends if a valid cache exists (a likely scenario for the second time).
> If a cache exists, CodeGen will provide the EMF model immediately (from the cache),
> and launch a low (Thread) priority job to reverse parse and build the BDM metadata in the background.

It seems in parallel, the decoder is looking at the cached model. There will
always be a cached model if a previously created visual class is being
opened, right?

> A cache may or may not be valid (stale, in the case the file was edited with a Java Editor for example).

What happens after this? How is the cached model reconciled with the model
built by the parser in case both of them constructed the model?

> When one saves the file, VE will also save an image of the EMF model as a cache.

What is the significance of restore() method of IExpressionDecoderHelper?
What should this method do?

> See AbstractExpressionDecoder.decode(),  If there is no cache, a regular decode will be driven.
> This implies that the decoder will create/update EMF model elements, as well as all the BDM meta information.
> If a cache exists, this implies that the EMF model is already online; decoders will not change it.
> In this case a restore() is called.  A decoder is responsible to *restore* its meta information
> to the existing model (e.g., use the IJavaObject already in the model, attache adapters etc.)

Moreover  what is the significance of AbstractIndexedChildrenDecoderHelper's
getIndexParent() method?


> This to support SWT like patterns, where the Z order is not determined directly with the _expression_
> the decoder is associated with.  For example, a method createFoo(), with the following _expression_:
>  new Composite(parent, SWT.NONE);
>
> Also a method bar() that calls foo().   The Z order of the Composite constructor is associated with the call to foo()
> _expression_.


Thanks and regards,

Janak

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


Back to the top