Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » inter-model references are forbidden. Configure launching options to allow them.
inter-model references are forbidden. Configure launching options to allow them. [message #656921] Tue, 01 March 2011 01:01 Go to next message
Suhrit Rimal is currently offline Suhrit RimalFriend
Messages: 6
Registered: September 2010
Junior Member
I am using modisco 8 + eclipse helios (modeling) and did transformed java project to kdm. I dont get all the information present in java project.
I am getting following errors when i look into log file generated.

inter-model references are forbidden. Configure launching options to allow them.


My project has only one java class. which looks like

public class test {

public void echo(){
String message = "hello";
System.out.println(message+"world");
}
}


Is it bug that is present there??
also when i try using comments it doesnt makes into kdm but is present in java model.

my previous post is related to this too.


Re: inter-model references are forbidden. Configure launching options to allow them. [message #656984 is a reply to message #656921] Tue, 01 March 2011 09:30 Go to previous messageGo to next message
Gabriel BARBIER is currently offline Gabriel BARBIERFriend
Messages: 106
Registered: July 2009
Senior Member
Hello,
this is a known bug, and we have to apologize as correction has been made in head (version 0.9.x) but not reported in version 0.8.x. Sorry Confused

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

Regards
Gabriel

[Updated on: Tue, 01 March 2011 09:31]

Report message to a moderator

Re: inter-model references are forbidden. Configure launching options to allow them. [message #657223 is a reply to message #656984] Wed, 02 March 2011 01:26 Go to previous message
Suhrit Rimal is currently offline Suhrit RimalFriend
Messages: 6
Registered: September 2010
Junior Member
Hi,
Thankx for your reply. I installed Indigo and Modisco 9.
When I compare helios+8.X model and indigo +9.0 model its same. I think some information gets lost in KDM model when being trasnformed from Java Model.

I am using following code:
public class test {

public void echo(){
String message = "hello";
String newMessage ="world";
System.out.println(message+newMessage);
}
}

In Java Model What I can see is that message and newMessage gets add the information is still there but when it comes to KDM Model Information gets lost. I tried different variation. If inside println function we keep direct string something like System.out.println("hello"+"world"); the information is preserved but variables are never there even if it is direct string + some variable. Seecorresponding JavaCodeModel and KDM Model.

JavaCodeModel

<statements xsi:type="java:ExpressionStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:MethodInvocation" originalCompilationUnit="//@compilationUnits.0" method=" //@ownedElements.1/@ownedPackages.1/@ownedElements.1/@bodyDe clarations.0 ">
<arguments xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="+">
<rightOperand xsi:type="java:SingleVariableAccess" variable=" //@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@bod y/@statements.1/@fragments.0 "/>
<leftOperand xsi:type="java:SingleVariableAccess" variable=" //@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@bod y/@statements.0/@fragments.0 "/>
</arguments>
<expression xsi:type="java:SingleVariableAccess" variable=" //@ownedElements.1/@ownedPackages.0/@ownedElements.3/@bodyDe clarations.0/@fragments.0 ">
<qualifier xsi:type="java:TypeAccess" type="//@ownedElements.1/@ownedPackages.0/@ownedElements.3"/ >
</expression>
</expression>
</statements>

KDM model:

<codeElement xsi:type="action:ActionElement" name="expression statement" kind="expression statement">
<source language="java">
<region file="//@model.2/@inventoryElement.0" language="java"/>
</source>
<codeElement xsi:type="action:ActionElement" name="method invocation" kind="method invocation">
<source language="java">
<region file="//@model.2/@inventoryElement.0" language="java"/>
</source>
<codeElement xsi:type="action:ActionElement" name="+" kind="infix expression">
<source language="java">
<region file="//@model.2/@inventoryElement.0" language="java"/>
</source>
</codeElement>
<actionRelation xsi:type="action:Calls" to=" //@model.1/@codeElement.0/@codeElement.1/@codeElement.1/@cod eElement.0 " from=" //@model.0/@codeElement.0/@codeElement.0/@codeElement.0/@cod eElement.1/@codeElement.2/@codeElement.0 "/>
</codeElement>
</codeElement>


Well I dont know whether its a bug or KDM is just not meant to hold that much of information.
If I change message to "hello" inside function println I can see following things:

Java Code:
System.out.println("hello"+newMessage);

Java Model:
<statements xsi:type="java:ExpressionStatement" originalCompilationUnit="//@compilationUnits.0">
<expression xsi:type="java:MethodInvocation" originalCompilationUnit="//@compilationUnits.0" method=" //@ownedElements.1/@ownedPackages.1/@ownedElements.1/@bodyDe clarations.0 ">
<arguments xsi:type="java:InfixExpression" originalCompilationUnit="//@compilationUnits.0" operator="+">
<rightOperand xsi:type="java:SingleVariableAccess" variable=" //@ownedElements.0/@ownedElements.0/@bodyDeclarations.0/@bod y/@statements.1/@fragments.0 "/>
<leftOperand xsi:type="java:StringLiteral" originalCompilationUnit="//@compilationUnits.0" escapedValue="&quot;hello&quot;"/>
</arguments>
<expression xsi:type="java:SingleVariableAccess" variable=" //@ownedElements.1/@ownedPackages.0/@ownedElements.3/@bodyDe clarations.0/@fragments.0 ">
<qualifier xsi:type="java:TypeAccess" type="//@ownedElements.1/@ownedPackages.0/@ownedElements.3"/ >
</expression>
</expression>
</statements>

KDM MOdel

<codeElement xsi:type="action:ActionElement" name="method invocation" kind="method invocation">
<source language="java">
<region file="//@model.2/@inventoryElement.0" language="java"/>
</source>
<codeElement xsi:type="action:ActionElement" name="+" kind="infix expression">
<source language="java">
<region file="//@model.2/@inventoryElement.0" language="java"/>
</source>
<codeElement xsi:type="code:Value" name="string literal" type="//@model.0/@codeElement.1/@codeElement.9" ext="&quot;hello&quot;">
<source language="java">
<region file="//@model.2/@inventoryElement.0" language="java"/>
</source>
</codeElement>
</codeElement>
<actionRelation xsi:type="action:Calls" to=" //@model.1/@codeElement.0/@codeElement.1/@codeElement.1/@cod eElement.0 " from=" //@model.0/@codeElement.0/@codeElement.0/@codeElement.0/@cod eElement.1/@codeElement.2/@codeElement.0 "/>
</codeElement>

SO my thoughts are that there is CodeElement missing for newMessage storable unit where infix operation is performed.

If this is a bug I can give try fixing it I know the basics of MDT i guess its some ATL file where i need to do changes. Can you tell me where this file is and how to make changes to it.


Thanks
Suhrit
Previous Topic:kdm missing some code elements?
Next Topic:Just downloaded Eclipse, what is next?
Goto Forum:
  


Current Time: Sat Apr 20 10:15:51 GMT 2024

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

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

Back to the top