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