Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » code generation in VE
code generation in VE [message #123017] Thu, 13 April 2006 09:04 Go to next message
mithun ruikar is currently offline mithun ruikarFriend
Messages: 43
Registered: July 2009
Member
Hello,
I want to know how VE handles code generation after listening to model
dropped off the gef pallete on graphical viewers?.
And also how to both texteditor and graphical editor in sync.
Does it uses jet?
link to some tutorial for doing so would be appreciated.

thank you.

-- mithun
Re: code generation in VE [message #123070 is a reply to message #123017] Thu, 13 April 2006 14:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

In VE there is an underlying EMF Ecore model. When something is dropped
from the palette, commands are created through the GEF editparts. These
commands update the EMF model. Now the code generation part of VE has
added parts of itself as listeners (call Adapters in EMF). Since changes
to the EMF model are changes to features of the EMF model the listeners
get notified of feature changes. These codegen listeners then hear this
change and they go and make the appropriate change in the source code to
match how the model was changed.

We use the IDocument interface from the TextEditor. We just change it.
The jdt text editor listens for such changes and responds with the
changes showing up in the code.

We also listen to the IDocument too. If we hear changes that we didn't
make ourselves we parse those changes, see how they would change the EMF
model, and then go and change the EMF model. Since the GEF editparts are
also listening for changes to the EMF model it refreshes itself whenever
the EMF model changes.

We use jet only for some precompiled code patterns. We don't dynamically
use jet to create the code, just use precompiled jet templates for
creating small snippets of code.

There is no tutorial. What I gave here is only a general overview. The
actual implementation is far more complex because it has to handle many
different coding patterns and class hierarchies among other things.

mithun wrote:
> Hello, I want to know how VE handles code generation after listening to
> model dropped off the gef pallete on graphical viewers?.
> And also how to both texteditor and graphical editor in sync.
> Does it uses jet?
> link to some tutorial for doing so would be appreciated.
>
> thank you.
>
> -- mithun
>

--
Thanks,
Rich Kulp
Re: code generation in VE [message #123123 is a reply to message #123070] Fri, 14 April 2006 07:29 Go to previous message
mithun ruikar is currently offline mithun ruikarFriend
Messages: 43
Registered: July 2009
Member
Thank you for your help.
I never have got such good response from any other newsgroup,
Thank you again, and i will take it from here.

-- mithun
Re: code generation in VE [message #612630 is a reply to message #123017] Thu, 13 April 2006 14:08 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

In VE there is an underlying EMF Ecore model. When something is dropped
from the palette, commands are created through the GEF editparts. These
commands update the EMF model. Now the code generation part of VE has
added parts of itself as listeners (call Adapters in EMF). Since changes
to the EMF model are changes to features of the EMF model the listeners
get notified of feature changes. These codegen listeners then hear this
change and they go and make the appropriate change in the source code to
match how the model was changed.

We use the IDocument interface from the TextEditor. We just change it.
The jdt text editor listens for such changes and responds with the
changes showing up in the code.

We also listen to the IDocument too. If we hear changes that we didn't
make ourselves we parse those changes, see how they would change the EMF
model, and then go and change the EMF model. Since the GEF editparts are
also listening for changes to the EMF model it refreshes itself whenever
the EMF model changes.

We use jet only for some precompiled code patterns. We don't dynamically
use jet to create the code, just use precompiled jet templates for
creating small snippets of code.

There is no tutorial. What I gave here is only a general overview. The
actual implementation is far more complex because it has to handle many
different coding patterns and class hierarchies among other things.

mithun wrote:
> Hello, I want to know how VE handles code generation after listening to
> model dropped off the gef pallete on graphical viewers?.
> And also how to both texteditor and graphical editor in sync.
> Does it uses jet?
> link to some tutorial for doing so would be appreciated.
>
> thank you.
>
> -- mithun
>

--
Thanks,
Rich Kulp
Re: code generation in VE [message #612637 is a reply to message #123070] Fri, 14 April 2006 07:29 Go to previous message
mithun ruikar is currently offline mithun ruikarFriend
Messages: 43
Registered: July 2009
Member
Thank you for your help.
I never have got such good response from any other newsgroup,
Thank you again, and i will take it from here.

-- mithun
Previous Topic:what does the org.eclipse.jem package do in the CVS checkout of VE source?
Next Topic:Error trying to create a new visual class into a web project
Goto Forum:
  


Current Time: Wed Apr 24 22:21:05 GMT 2024

Powered by FUDForum. Page generated in 0.02980 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top