Xtype: JvmTypeReference not working as wanted (validation, scope) [message #1017027] |
Fri, 08 March 2013 12:04  |
Eclipse User |
|
|
|
Hi,
I have my language:
https://wwwsecu.irit.fr/hg/SMAC/victor-noel-phd/may/may-xtext2/ (rev 6fbd57747647)
The language is described in fr.irit.smac.may.speadl and I use xtext 2.4.
An example of instance is:
namespace Test {
ecosystem TestE1[X] {
provides test: String = b.test3;
requires test2: java.util.Map[X,String];
part b: Test.TestE2 {
bind test4 to b.test3;
bind test4 to this.test;
}
}
ecosystem TestE2[Y] {
provides test3: String = this.test3
requires test4: String
}
}
My problems are as follow:
1) I have elements of the language (the Ecosystem) that contains JvmParameterizedTypeReferences (in the Ports).
It seems the scope of the JvmArgumentTypeReference contained in the JvmParameterizedTypeReferences accepts both X and Y for the arguments of "requires test2: java.util.Map[X,String]".
Stranger, it seems content assist in that place shows me only Y and not X.
Obviously I would have though that X should only be proposed.
Did I miss something to enable that behaviour?
2) Isn't there any Validator to check that the number of argument of a JvmParameterizedTypeReferences is the correct one?
3) If I use the JvmModelInferer for my model, how should I say that an Ecosystem maps to a class with generic parameters? I started an extension of the JvmTypesBuilder (see AdvancedJvmTypeBuilder) but I'm not really sure this is the way to do it...
4) If I want to check that the type of a port referenced in a binding is the compatible with the type of the port it is bound to, how can I compute the actual type of the port. For example "bind test4 to this.test", test4 type should be using the types passed as arguments to b.
Thank you for any help
|
|
|
|
Powered by
FUDForum. Page generated in 0.04581 seconds