I am currently importing the Jest library (https://github.com/searchbox-io/Jest) in MPS. I have a few issues which I couldn't solve.
Concrete method call of generic method
The ImmutableMap class of Google's Guava library allows to customize the type of the "of-method" Is there any way to express this in MPS? The type checker accepts the call only when I add a cast to Map<string, Object> but this results in a compilation error.
Check if Java annotation is present
The call isAnnotationPresent() is only accepted by the type checker if I add "getClass()", but this results also in an error while compiling. How do I express this in the correct way?
Error: io/searchbox/action/AbstractAction.java : The method isAnnotationPresent(Class<? extends Annotation>) in the type AccessibleObject is not applicable for the arguments (Class<capture#2-of ? extends Class>) (line: 96)
Compatibility problems for method call parameters
While compiling, at every point in the code where jestClient.execute() is called an error occurs. The generated code however looks just like the original Java Code in IntelliJ.
Error: io/searchbox/client/config/discovery/NodeCheckerTest.java : The method execute(Action<T>) in the type JestClient is not applicable for the arguments (Action) (line: 167)
Erasure Failure (I don't know how to title this error)
I fixed this error with a workaround, but I just wanted to let you know, that this particular erasure didn't work for me. MPS didn't allow me to write "operationPath()" after builder. Only after casting builder in the concrete classes it was possible to call "operationPath()".