diverse-project / melange

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

Model type inference doesn't work with imported model type definitions #69

Open dvojtise opened 7 years ago

dvojtise commented 7 years ago

When I write

package org.gemoc.xfsm
import org.gemoc.sample.legacyfsm.fsm.FSMMT

language XFSM {
    syntax "platform:/resource/org.gemoc.sample.legacyfsm.fsm.model/model/fsm.ecore"
    with org.gemoc.sample.legacyfsm.fsm.k3dsa.*
}

the ModelType inference doesn't work even if I correctly set the project dependencies and add an import to the modeltype to make it visible in the java context.

The inference currently works only if the definition is local

package org.gemoc.xfsm
language FSMLocal {
    syntax "platform:/resource/org.gemoc.sample.legacyfsm.fsm.model/model/fsm.ecore"
}

language XFSM {
    syntax "platform:/resource/org.gemoc.sample.legacyfsm.fsm.model/model/fsm.ecore"    
    with org.gemoc.sample.legacyfsm.fsm.k3dsa.*
}
fcoulon commented 7 years ago

Actually the 'import' keyword purpose is to avoid qualified names in 'with' declaration. (the same behavior as in Java).

The only ModelTypes in the scope come from declared ModelTypes & declared Languages of the current .melange file. (+ crossref Languages)