Skip to content

Commit

Permalink
Fail gracefully when languages/MTs names miss
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Degueule committed Aug 3, 2015
1 parent 9d7de92 commit 175ff16
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Expand Up @@ -41,7 +41,7 @@ class LanguageExtensions
}

def boolean getIsComplete(Language l) {
return l.syntax !== null && l.syntax.isComplete && l.semantics.forall[isComplete]
return l.name !== null && l.syntax !== null && l.syntax.isComplete && l.semantics.forall[isComplete]
}

/**
Expand Down
Expand Up @@ -26,6 +26,7 @@ class ModelTypeExtensions

def boolean getIsComplete(ModelType mt) {
return
mt.name !== null &&
if (mt.isExtracted)
mt.extracted.isComplete
else
Expand Down
Expand Up @@ -132,10 +132,10 @@ class EPackageProvider
}

def dispatch String getFqn(Metamodel mm) {
return mm.owningLanguage.fullyQualifiedName.toString
return mm.owningLanguage.fullyQualifiedName?.toString
}

def dispatch String getFqn(ModelType mt) {
return mt.fullyQualifiedName.toString
return mt.fullyQualifiedName?.toString
}
}

0 comments on commit 175ff16

Please sign in to comment.