diverse-project / melange

The Melange Language Workbench
http://melange-lang.org
Eclipse Public License 1.0
28 stars 7 forks source link

Language runtime classes generate in the wrong package #70

Open dvojtise opened 7 years ago

dvojtise commented 7 years ago

in https://github.com/awortmann/xmontiarc we have started a melange project based on 3 ecore files CD, montiarc (which uses CD) and montiarcruntime the melange file is simple

package ur1.diverse.montiarc.xdsml
language XMontiArc {
    syntax "platform:/resource/ur1.diverse.montiarc.model/ur1.diverse.montiarc.model/montiarc.ecore" 
    syntax "platform:/resource/ur1.diverse.cd.model/model/cd.ecore"
    syntax "platform:/resource/ur1.diverse.montiarc.runtime.model/model/montiarcruntime.ecore"

    with ur1.diverse.montiarc.xdsml.montiarc.aspects.ComponentTypeAspect
    with ur1.diverse.montiarc.xdsml.montiarc.aspects.PortAspect
    with ur1.diverse.montiarc.xdsml.montiarc.aspects.ConnectorAspect
    with ur1.diverse.montiarc.xdsml.montiarc.aspects.SubcomponentDeclarationAspect
}

when using the generate all or generate runtime model we have sometime some classes that aren't generated in the good package. this seems to be random, beause modifing a line in the melange file and then generate again may generate the file at the rigth place

typically the Package.java and Factory.java seems to be generated in one of the known packacge but necesarily in the correct one (in the attached picture, cd contains the factory for montiarcruntime and vice versa, , but the mix can be different on other generation) capture_bugmelange_packagefactory

dvojtise commented 7 years ago

looking a bit more closely, it seems that the content of the files is ok, but the is the name of the files that are wrong