Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » Java generation bug using MoDisco
Java generation bug using MoDisco [message #1790135] Tue, 05 June 2018 16:44
Camilo Mendoza is currently offline Camilo MendozaFriend
Messages: 5
Registered: May 2018
Junior Member
Hi, I have tried using MoDisco Java Generation API as described on http://download.eclipse.org/modeling/mdt/modisco/nightly/doc/org.eclipse.modisco.java.doc/mediawiki/java_generation/user.html, to convert .XMI models generated using MoDisco discoverer to source code.

I have ran into some problems with it. Specifically, I have problems with non-ASCII characters and some issues with comments on the transformation. I double -checked the model and it was being generated correctly, the problem is when using the Java Generation API to convert it to source code again. For example this following code was all commented

/*
	Some comment
	
	@PodamExclude
	@OneToMany
	private List<GuiaEntity> guias
	;


When the original code only have commented the documentation at the start.
/*
	Some comment
*/
	@PodamExclude
	@OneToMany
	private List<GuiaEntity> guias;

This code that is partially commented
 public List<GuiaEntity> replaceGuias(Long itinerarioId, List<GuiaEntity> guias) {
        ItinerarioEntity itinerario = getItinerario(itinerarioId);
        List<GuiaEntity> guiaList = guiaLogic.getGuias();
        //for (GuiaEntity guia : guiaList) {
          //  if (guias.contains(guia)) {
            //} else if (guia.getItinerario() != null && guia.getItinerario().equals(itinerario)) {
              //  guia.setItinerario(null);
            //}
        //}
        return guias;
    } 


Gets converted to this, which generates syntax errors.
public List<GuiaEntity> replaceGuias(Long itinerarioId
, List<GuiaEntity> guias
){
ItinerarioEntity
 itinerario
 =getItinerario(itinerarioId);
List<GuiaEntity>
 guiaList
 =guiaLogic.getGuias();
  //for (GuiaEntity guia : guiaList)
  //  if (guias.contains(guia))
  //} else if (guia.getItinerario() != null && guia.getItinerario().equals(itinerario))
  //  guia.setItinerario(null
  /
  /
return guias;
}


Is there a way to correct these bugs or is it something I have to work with? Thanks.

[Updated on: Tue, 05 June 2018 16:46]

Report message to a moderator

Previous Topic:Java generation bug using MoDisco
Next Topic:Feature type does not exist on MethodInvocation
Goto Forum:
  


Current Time: Thu Apr 18 13:33:39 GMT 2024

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

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

Back to the top