Known Issue
Note: The SequenceDiagram plugin relies heavily on the UAST API.
Due to UAST API limitations, the following features are not supported.
1. Scala for comprehension calls is not supported
For example:
class B() { def bar() = Option("bar") } class A(b: B) { def foo() = { val r = "foo" + b.bar().getOrElse("?") r } def foo2() = { val r = for { x <- b.bar() } yield "foo" + x r.getOrElse("?") } }
the for comprehension call
val r = for { x <- b.bar() } yield "foo" + x
it's UAST tree is `UastEmptyexpression`
UMethod (name = foo2) UBlockExpression UDeclarationsExpression ULocalVariable (name = r) UastEmptyExpression(type = PsiType:Option<String>) UReturnExpression UQualifiedReferenceExpression USimpleNameReferenceExpression (identifier = r) UMethodCall(name = getOrElse) UIdentifier (Identifier (getOrElse)) ULiteralExpression (value = "?")
so the `b.bar()` method call will not generate base on `UastEmptyexpression`. Hopefully, the UAST api will solve this problem sooner.
2. Groovy method body is not supported
For example:
/** * A Class description */ class Student { /** the name of the person */ String name /** * Creates a greeting method for a certain person. * * @param otherPerson the person to greet * @return a greeting message */ //known issue: groovy method will not generate in UAST String greet(String otherPerson) { "Hello ${otherPerson}" // call java Fruit fruit = new Banana() fruit.eat() } }
Based on UAST api limitation, it's UAST tree is no method body mappings.
UFile (package = van.demo.grovvy) UClass (name = Student) UMethod (name = greet) UParameter (name = otherPerson)
When generate sequence of method `greet`, the calls in the method body will not generate (the call java code in the body of `greet`).
"Hello ${otherPerson}" // call java Fruit fruit = new Banana() fruit.eat()