Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » MoDisco Workflow(hints, how to, best practices?)
MoDisco Workflow [message #656569] Sat, 26 February 2011 21:02 Go to next message
Rob is currently offline RobFriend
Messages: 17
Registered: February 2011
Junior Member
Hey guys!

As I am quite new to the modeling stuff - especially with MoDisco, ATL and Acceleo - I tried to read some docu and tutorials.

I'd appreciate some hints or best practices concerning the following steps.

I'd like to do the following steps.

1) Create a PSM from a Java Project. I can do this with the MoDisco Discoverer to create a detailed Java Model.

2) I'd like to create PIM from this Java Model.
So far I am Using the KDM Discoverer first, and then the KDM2UML Discoverer.
Is there any direct way from Java-PSM to UML? I read the SimpleTransformationChain -Docu in MoDisco Wiki which shows some Setup with ATL and ATL-Module Files like "KDM2UML.atl" in the Run Configurations. Are these files available? Guess there are different Module Files for different Transformations? Or do I have to write the file on my own?

3) To create a PIM with UML I'd use ATL to create a UML-Model. Therefor I need to transform the Java PSM.
So I'd like to create a personalized ATL Configuration which transforms the Java-Model into a UML-Model containing only platform independent information.

4) In the next step I'd like to enrich the UML-Model again with new information for a target PSM (e.g. add annotations) so I'd like to do a transformation from UML to a JAVA-Model again.

5) Use Acceleo to generate code from the new PSM.


Would this be a valid Use Case for MoDisco?

I'am using Eclipse Helios SR2 with MoDisco 0.8.2 so far.

Many thanks in advance.

[Updated on: Sat, 26 February 2011 21:03]

Report message to a moderator

Re: MoDisco Workflow [message #656727 is a reply to message #656569] Mon, 28 February 2011 10:15 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hi George,

Here is some information regarding the points you mentioned.

1) Of course, you can directly use the MoDisco Java discoverer to get a Java model out of your Java project: http://wiki.eclipse.org/MoDisco/Components/Java/Documentatio n/0.9#Java_Discoverer . This Java model is an exact representation of the corresponding Java code ( http://wiki.eclipse.org/MoDisco/Components/Java/Documentatio n/0.9#Java_Metamodel).

2) You can also directly reuse the Java-to-KDM-to-UML transformation chain provided by MoDisco if it fits your needs. These two transformations are available from the MoDisco SVN.
You can also define your own transformations in ATL, and apply them to the various models you obtain during the process.

3) As said above, you can specify in ATL your own transformation from Java to UML for instance (as the two corresponding metamodels are already available) and apply it to your Java models.

4) They are different ways to enrich an existing model with extra information: you can do it either manually or automatically using ATL transformations for instance.
Anyway, you can also specify your own UML-to-Java transformation if required.

5) Once you have a Java model (which conforms to the MoDisco Java metamodel), you can directly use the Java generator provided in MoDisco to obtain the corresponding source code out of it: http://wiki.eclipse.org/MoDisco/Components/Java/Documentatio n/0.9#Java_Generation

I hope this helps to clarify a bit what can be done.

Best regards,

Hugo


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: MoDisco Workflow [message #656980 is a reply to message #656569] Tue, 01 March 2011 09:17 Go to previous messageGo to next message
Gabriel BARBIER is currently offline Gabriel BARBIERFriend
Messages: 106
Registered: July 2009
Senior Member
Hello George,
In addition to Hugo's answer, I would like to say that exisiting transformation KdmToUml is already availiable in svn for version 0.8.x, and it will packaged in version 0.9.x. So if you have some time, you should try the Indigo bundle:

http://www.eclipse.org/downloads/index-developer.php

And use this update site:

http://download.eclipse.org/modeling/mdt/modisco/updates/mil estones/0.9

The last thing is (a bad news Embarrassed ) that we don't have already a generation from Uml to java in MoDisco. You will have to get one from Acceleo or Papyrus examples ...
Or, as Hugo said, you will have to write your own (code generation or transformation to Java model). And if you would like to contribute it to MoDisco, you are welcome !!!

Best regards
Gabriel

Re: MoDisco Workflow [message #656981 is a reply to message #656980] Tue, 01 March 2011 09:22 Go to previous messageGo to next message
Gabriel BARBIER is currently offline Gabriel BARBIERFriend
Messages: 106
Registered: July 2009
Senior Member
I forgot two points:

- Thanks for reading documentation (it's rare)

- Yes it is a valid use case ! (we have done some stuff similar but only on level of java models)
Re: MoDisco Workflow [message #659226 is a reply to message #656981] Fri, 11 March 2011 15:29 Go to previous messageGo to next message
Rob is currently offline RobFriend
Messages: 17
Registered: February 2011
Junior Member
Hello,

sorry for late response, quite busy currently.

Many thx for the useful hints.
I have decided that full platform independence is not necessary so i'll stay within the Java world and use the java metamodel for the full process.
It's going to relieve things because i don't have to switch between metamodels.

But throughout the project i will use Helios and not switch to Indigo. I think this would make things more complicated.

Anyway, UML to Java would be a good component in MoDisco. If I have time I can look into it for some contribution but currently my project has priority. Smile

Thx

br

[Updated on: Fri, 11 March 2011 15:30]

Report message to a moderator

Re: MoDisco Workflow [message #659330 is a reply to message #659226] Sat, 12 March 2011 12:04 Go to previous messageGo to next message
Rob is currently offline RobFriend
Messages: 17
Registered: February 2011
Junior Member
Concerning Modisco 0.9 I only installed Indigo M5 with Modisco to have a look into the Generator of JSP-Models.
But here a get an error which says in the Workspace Log File:

!MESSAGE An internal error occurred during: "Discovering generic Java Server Pages model".
!STACK 0
java.lang.NoSuchFieldError: type
at org.eclipse.modisco.jee.jsp.discoverer.parser.JSPLexer.mT67( JSPLexer.java:145)
at org.eclipse.modisco.jee.jsp.discoverer.parser.JSPLexer.mToke ns(JSPLexer.java:2421)
at org.antlr.runtime.Lexer.nextToken(Lexer.java:84)
at org.antlr.runtime.CommonTokenStream.fillBuffer(CommonTokenSt ream.java:95)
at org.antlr.runtime.CommonTokenStream.LT(CommonTokenStream.jav a:238)
at org.antlr.runtime.CommonTokenStream.LA(CommonTokenStream.jav a:300)
at org.eclipse.modisco.jee.jsp.discoverer.parser.JSPParser.page (JSPParser.java:274)
at org.eclipse.modisco.jee.jsp.discoverer.actions.DiscoverJspMo delFromFile$1.run(DiscoverJspModelFromFile.java:132)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


Am I missing something in the dependencies? The jsp.file I tried to rev. eng. was just a simple one generated from the Struts Template Project.

Thx.
Re: MoDisco Workflow [message #659471 is a reply to message #659330] Mon, 14 March 2011 08:23 Go to previous messageGo to next message
Fabien Giquel is currently offline Fabien GiquelFriend
Messages: 147
Registered: July 2009
Senior Member
Hi George,

it seems there is some compatibility problem between MoDisco component
and ANTLR component in your configuration.

Our continuous integration junit tests are ok and i just test them on my
local host in M5 configuration.
Could you indicate which version of org.anlr.runtime plugin do you have
in your configuration ?

Fabien.


----------------------------------------------------
Fabien GIQUEL
R&D Engineer
Mia-Software
rue Nina Simone
44000 NANTES
----------------------------------------------------
Re: MoDisco Workflow [message #660564 is a reply to message #659471] Sat, 19 March 2011 13:57 Go to previous message
Rob is currently offline RobFriend
Messages: 17
Registered: February 2011
Junior Member
Hello Fabien,

thx 4 your response.

I am just wondering, because I installed a completely fresh Indigo and only installed MoDisco via Installation Manager with Automatic Dependencies Installation and no other Plugins so far.
According to Plug-Ins Tab ANTLR Runtime is v 3.2.0.

Thx
Rob

[Updated on: Thu, 31 March 2011 09:20]

Report message to a moderator

Previous Topic:Google Summer of Code Participation
Next Topic:MoDisco/Acceleo + Minimal Java Model
Goto Forum:
  


Current Time: Fri Apr 19 08:21:52 GMT 2024

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

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

Back to the top