leoroos/sandboxdroog — Issue #33: Additional imports for types necessary after a Transformation have to be added manually  to a DSL file
Author: leoroos
Created: 2011-10-18 15:35:43+00:00
State: open

For example the following line of Map DSL
{{{
def m2 = [Integer,String: 1="hans",2="peter"]
}}}
will be translated to
{{{
def m2 = buildMap(
Integer.class,
String.class,
[ //<- problematic
buildEntry(
1,
"hans"),
buildEntry(
2,
"peter")
] as Entry[])
}}}
(Tested with Groovy 1.7.8)

this is correct but introduces the Type `Entry`. Since no import for that type has been declared this will cause a `SnytaxErrorMessage`.

The declaration of additional import statements could be made available either through the `dslDefinition` extension or perhaps automatic resolving.