Skip to content

Commit

Permalink
Merge pull request #323 from modelix/fix/mps-adapters-unresolved-mode…
Browse files Browse the repository at this point in the history
…l-imports

fix(mps-model-adapters): handle unresolvable model imports
  • Loading branch information
mhuster23 authored Nov 15, 2023
2 parents fe88153 + 9a28ac3 commit 2a7759f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ data class MPSModelAsNode(val model: SModel) : IDefaultNodeAdapter {
} else if (link.conformsTo(BuiltinLanguages.MPSRepositoryConcepts.Model.rootNodes)) {
model.rootNodes.map { MPSNode(it) }
} else if (link.conformsTo(BuiltinLanguages.MPSRepositoryConcepts.Model.modelImports)) {
ModelImports(model).importedModels.mapNotNull {
MPSModelImportAsNode(it.resolve(model.repository), model)
ModelImports(model).importedModels.mapNotNull { modelRef ->
val target = modelRef.resolve(model.repository)
target?.let { MPSModelImportAsNode(it, model) }
}
} else if (link.conformsTo(BuiltinLanguages.MPSRepositoryConcepts.Model.usedLanguages)) {
getImportedLanguagesAndDevKits()
Expand Down

0 comments on commit 2a7759f

Please sign in to comment.