Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Generative Graphiti(Is there a generative framework for Graphiti?)
Generative Graphiti [message #651991] Wed, 02 February 2011 11:24 Go to next message
Daniel Wetterbro is currently offline Daniel Wetterbro
Messages: 4
Registered: February 2011
Junior Member
Hi!

I've been looking into the Graphiti framework and I think it looks very clean and promising. I'd like to use use it together with an EMF domain model that's pretty large. Is there any framework/project to generate Graphiti code much in the same way as the GMF tooling can be used to generate code for the GMF runtime?

Thanks!
Daniel
Re: Generative Graphiti [message #651996 is a reply to message #651991] Wed, 02 February 2011 11:38 Go to previous messageGo to next message
Tim Kaiser is currently offline Tim Kaiser
Messages: 118
Registered: July 2009
Senior Member
Hi Daniel,

why do you want to generate?

In Graphiti, you can just use or extend the given default implementations.
The advantage: no undebuggable generator, just plain old JAVA with
all the great tools (Eclipse JDT) and all the available expertise.

Best regards, Tim


"Daniel Wetterbro" wrote in message news:iibeid$u3k$1@news.eclipse.org...

Hi!

I've been looking into the Graphiti framework and I think it looks very
clean and promising. I'd like to use use it together with an EMF domain
model that's pretty large. Is there any framework/project to generate
Graphiti code much in the same way as the GMF tooling can be used to
generate code for the GMF runtime?

Thanks!
Daniel
Re: Generative Graphiti [message #652006 is a reply to message #651996] Wed, 02 February 2011 12:11 Go to previous messageGo to next message
Daniel Wetterbro is currently offline Daniel Wetterbro
Messages: 4
Registered: February 2011
Junior Member
Thank you for your quick reply, Tim!

I'm not (yet) looking for an extension to the Graphiti framework facilities. But I'm having a big EMF meta model and would like to automatically generate Graphiti features code for a subset of elements from this model. Does there exist any special tool that could help me do that? I've looked into GMF, and I'm searching for something similar to the "mapping model" in the GMF tooling. My reason for considering Graphiti is its cleaner interface compared to the GMF runtime's.

I'm not yet familiar with the generic code generation projects like JET, Xpand etc. (I know for example that Xpand is used to tweak code generation in GMF) Do you recommend using any such project in particular? or maybe some kind of model transformation?
Re: Generative Graphiti [message #652034 is a reply to message #652006] Wed, 02 February 2011 13:16 Go to previous messageGo to next message
Tim Kaiser is currently offline Tim Kaiser
Messages: 118
Registered: July 2009
Senior Member
In general, i can imagine generation of an initial set of features
for a certain set of model elements. But one has to think twice how
well maintainable it is if one modifies/extends the generated code
(this will be necessary, i bet) and regenerates again etc.
I cannot recommend any special generation language/engine for Graphiti.

Instead of using code generation, it might be possible and more convenient
to use object-oriented techniques to minimize the amount of code one has to
write.

But if you end up writing a generation engine for Graphiti, please let us
know!
And also if you get some insights on which technology might be most useful
for achieving this...


"Daniel Wetterbro" wrote in message news:iibh9v$3l7$1@news.eclipse.org...

Thank you for your quick reply, Tim!

I'm not (yet) looking for an extension to the Graphiti framework facilities.
But I'm having a big EMF meta model and would like to automatically generate
Graphiti features code for a subset of elements from this model. Does there
exist any special tool that could help me do that? I've looked into GMF, and
I'm searching for something similar to the "mapping model" in the GMF
tooling. My reason for considering Graphiti is its cleaner interface
compared to the GMF runtime's.

I'm not yet familiar with the generic code generation projects like JET,
Xpand etc. (I know for example that Xpand is used to tweak code generation
in GMF) Do you recommend using any such project in particular? or maybe some
kind of model transformation?
Re: Generative Graphiti [message #652071 is a reply to message #652034] Wed, 02 February 2011 15:15 Go to previous messageGo to next message
Daniel Wetterbro is currently offline Daniel Wetterbro
Messages: 4
Registered: February 2011
Junior Member
I will tell you if I find something useful.
Thanks for the advice!

Best,
Daniel
Re: Generative Graphiti [message #652155 is a reply to message #652034] Wed, 02 February 2011 18:58 Go to previous messageGo to next message
Volker Wegert is currently offline Volker Wegert
Messages: 169
Registered: July 2009
Senior Member
"Tim Kaiser" <tim.kaiser@sap.com> writes:
> I'm not (yet) looking for an extension to the Graphiti framework
> facilities. But I'm having a big EMF meta model and would like to
> automatically generate Graphiti features code for a subset of elements from
> this model. Does there exist any special tool that could help me do that?
> I've looked into GMF, and I'm searching for something similar to the
> "mapping model" in the GMF tooling. My reason for considering Graphiti is
> its cleaner interface compared to the GMF runtime's.
>
> I'm not yet familiar with the generic code generation projects like JET,
> Xpand etc. (I know for example that Xpand is used to tweak code generation
> in GMF) Do you recommend using any such project in particular? or maybe some
> kind of model transformation?

For generation, I'd take a look at Xtend/Xpand, but that's a personal
preference. I've got several years of experience with various code generators,
and I've thought of generating some Graphiti code, too. Migrating a GMF
project to Graphiti, I found out that there is not much that is really worth
generating if you consider the features carefully. With some clever
inheritance and the upcoming patterns mechanism, you can be surprisingly
productive even without a generator. Besides, modeling and generating
behaviour is really hard.

That being said, there's one area that - in my opinion - could really use a
generator, and that's the graphical representation itself. It's a lot of
boring work to stuff lines into rectangles and get the positions and colors
just right, and it's even worse to code the features that update the graphical
representation. It'd be cool to have a graphiti editor that can be used to
draw the graphical representations for a Graphiti editor. :-) I've already
spent some thoughts on this, but I'd like to get a bit more fluent in graphiti
before trying to improve the toolkit :-)

Volker

--
* Volker Wegert * http://www.volker-wegert.de/contact *
"Man muß immer wieder mit Leuten rechnen, auf die man nicht zählen kann!"
(Hermann Kesten)
Re: Generative Graphiti [message #652838 is a reply to message #652155] Mon, 07 February 2011 10:18 Go to previous messageGo to next message
Daniel Wetterbro is currently offline Daniel Wetterbro
Messages: 4
Registered: February 2011
Junior Member
I appreciate your further comments, Volker!
Your generation idea is interesting, I'll give the OO approach a try first and see if there will be more time to refactor some parts to generation.

Thanks!
Daniel
Re: Generative Graphiti [message #652988 is a reply to message #651991] Mon, 07 February 2011 20:11 Go to previous message
Jos Warmer is currently offline Jos Warmer
Messages: 108
Registered: October 2010
Senior Member
I have started to use Graphiti for a large project and am working on a generator that can generate much of the default features you need in Graphiti from a simple model. It combines it in a flexible way with handwritten code on defined extension points so you can have the best of both worlds: the quick and simple MDD approach and the full possibility of tweaking it with java code.

The bad news however is that the generator is currently very specific to the project and it will take time before I have a version that I can distribute in a useful way.

Jos
Previous Topic:getX and getY in CreateReferenceFeature
Next Topic:Patterns - support for direct editing, removal, deletion?
Goto Forum:
  


Current Time: Thu Oct 30 14:24:02 GMT 2014

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

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