Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » CASE-Tool and Code Generation (NON-EMF)(Need Advice or Best Practice Graphical Editor and Code Generation for a NON-EMF Model)
CASE-Tool and Code Generation (NON-EMF) [message #1143602] Fri, 18 October 2013 09:46 Go to next message
Sebastian Hochgatterer is currently offline Sebastian HochgattererFriend
Messages: 9
Registered: October 2013
Junior Member
hallo
I'm a new in model driven development.

I found graphiti and already made some tutorials. It's very easy to use.

I want to create a CASE-Tool which generates me the code(from the java model) and export it to an JAR File.
It's worth mentioned that the model can be extended to other subclasses. So it has to be generic or use a metamodel for requirement fields and new classes.

Lifecyle:
Open Editor
Open modified Java Domain Model
Create Diagram (Nodes, Connections)
Export the Model as JavaCode
Execute Java-Code Standalone


My tries and ideas:

I have a java domain model, I tried to load it with the non-emf option in graphiti.
After research i found on git-hub an sample (Github: phrea.public)
So working with the javamodel wasn't the problem for me.
The problem is that the model in generic an can extended with subclasses of the main three diagrammtypes.
Therefore I would use annotation for requirement fields. But I can figure out new class files of the model or
new subclasses of the parentclasses.
Is there a toolkit which easy creates me a metamodel of my javamodel, where I can specify the requirements and constraints between the java classes.
So i looking for a M2M tool which works with graphiti and generate me an executable code.

Whats the normal workflow and toolset to generate an Graphical Editor for my case which generates me execution code!


I hope my post was clear enought!


regards sebastian
Re: CASE-Tool and Code Generation (NON-EMF) [message #1148026 is a reply to message #1143602] Mon, 21 October 2013 07:55 Go to previous messageGo to next message
Albert Hofkamp is currently offline Albert HofkampFriend
Messages: 41
Registered: August 2009
Member
The EMF approach to your problem would be to make an EMF MM of your java code (domain model), initialize a diagram file, and edit it in the EMF graphical editor.
Then use genmodel for generating the output.

I am not familiar enough with creating an EMF MM from java code nor with your project to understand where the differences are, but it would seem like a useful solution to study for a bit if you didn't already do that.
As for the generator back-end, I'd suggest to use genmodel if you want EMF generated code, or flatten it back to text-files with an M2T conversion.

In your editor you'll need a meta-model instance to operate on, and EMF seems to be the logical choice to me. Note that EMF itself is again a bunch of classes in a package, so nothing stops you from making or changing the MM manually if you so desire.
Re: CASE-Tool and Code Generation (NON-EMF) [message #1151223 is a reply to message #1148026] Wed, 23 October 2013 07:47 Go to previous message
Sebastian Hochgatterer is currently offline Sebastian HochgattererFriend
Messages: 9
Registered: October 2013
Junior Member
Thanks for the quick reply.

Here are my steps how to implement my graphical editor!

Can you give me more input, pls?

1)Generation EMF Model:
For generation the .ecore model I would use MoDisco or is there a better tool? What is the best practice to annotation requirements class elements?
2)Generation EMF CODE BASE:
How can I get a genmodel is Graph and is there a best practice how I offer an API for further classes/code snippets ?
3)Graphiti: Implements necessary EClasses, with annotated .ecore model, in Graphiti to create my specific model!
4)Code Generation: Should I use XPand to generate the code out of the XML (Graphiti) file and used the .genmodel?


For additional knowledge.
As I already mentioned, my Model consists out of 3 Superclasses.
Nodes:
*Handler1
**Special Handler1
**Special Handler2
*Handler2
*Handler3

Connection:
*Buffer1
*Buffer2

Rules or Usecases
Handler1 is connected to Handler2 with Buffer1 object
Handler1 is connected to Handler3 with Buffer1 object
SpecialHandler1 is connected to Handler2 with Buffer1


thanks a lot


Previous Topic:How to associate keyboard shortcuts with custom features?
Next Topic:Create from Custom Feature
Goto Forum:
  


Current Time: Fri Mar 29 08:50:09 GMT 2024

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

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

Back to the top