Skip to main content



      Home
Home » Modeling » MoDisco » kdm missing some code elements?
kdm missing some code elements? [message #656639] Sun, 27 February 2011 15:01 Go to next message
Eclipse UserFriend
Hi,
I converted a simple java servlet project using modisco plugin. And seems like some information regarding my code is missing in corresponding kdm file.

KDM snippet:

<codeElement xsi:type="action:ActionElement" name="expression statement" kind="expression statement">
<source language="java">
<region file="/0/@model.2/@inventoryElement.1" language="java"/>
</source>
<codeElement xsi:type="action:ActionElement" name="method invocation" kind="method invocation">
<source language="java">
<region file="/0/@model.2/@inventoryElement.1" language="java"/>
</source>
<codeElement xsi:type="action:ActionElement" name="+" kind="infix expression">
<source language="java">
<region file="/0/@model.2/@inventoryElement.1" language="java"/>
</source>
<codeElement xsi:type="code:Value" name="string literal" type="/0/@model.0/@codeElement.1/@codeElement.9" ext="&quot;&lt;p>Welcome &quot;">
<source language="java">
<region file="/0/@model.2/@inventoryElement.1" language="java"/>
</source>
</codeElement>
<codeElement xsi:type="code:Value" name="string literal" type="/0/@model.0/@codeElement.1/@codeElement.9" ext="&quot; &quot;">
<source language="java">
<region file="/0/@model.2/@inventoryElement.1" language="java"/>
</source>
</codeElement>
<codeElement xsi:type="code:Value" name="string literal" type="/0/@model.0/@codeElement.1/@codeElement.9" ext="&quot;&lt;/p>&quot;">
<source language="java">
<region file="/0/@model.2/@inventoryElement.1" language="java"/>
</source>
</codeElement>
</codeElement>
<actionRelation xsi:type="action:Calls" to=" /0/@model.1/@codeElement.0/@codeElement.1/@codeElement.2/@co deElement.0 " from=" /0/@model.0/@codeElement.0/@codeElement.0/@codeElement.1/@co deElement.0/@codeElement.4/@codeElement.1/@codeElement.10/@c odeElement.0 "/>
</codeElement>
</codeElement>


Java Code:
PrintWriter out = response.getWriter();
String name = request.getParameter("firstName").toString();
String sur = request.getParameter("surname").toString();
out.println("<p>Welcome " + name + " " + sur+ "</p>");


I am not sure why the name and sur variables dont show up in kdm file where as constants like welcome are there.

I have no idea if I am doing something wrong.
This would be a great help if some one could give me some answer.

Thanx.

Re: kdm missing some code elements? [message #656983 is a reply to message #656639] Tue, 01 March 2011 04:28 Go to previous message
Eclipse UserFriend
Hello, java comments are not managed in version 0.8.x of MoDisco. But they are 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

And if it is still missing, well, it's a bug ... and we will correct it asap (or you could contribute a patch).

Regards
Gabriel

[Updated on: Tue, 01 March 2011 04:31] by Moderator

Previous Topic:Editing model from a Java application
Next Topic: inter-model references are forbidden. Configure launching options to allow them.
Goto Forum:
  


Current Time: Wed Jul 23 13:16:42 EDT 2025

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

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

Back to the top