Skip to main content



      Home
Home » Modeling » MoDisco » Java generation bug using MoDisco
Java generation bug using MoDisco [message #1790134] Tue, 05 June 2018 12:44
Eclipse UserFriend
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 this bugs or is it something I have to work with? Thanks.
Previous Topic:C/C++ Discoverer
Next Topic:Java generation bug using MoDisco
Goto Forum:
  


Current Time: Sat May 17 06:29:35 EDT 2025

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

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

Back to the top