Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtype: JvmTypeReference not working as wanted (validation, scope)
Xtype: JvmTypeReference not working as wanted (validation, scope) [message #1017027] Fri, 08 March 2013 17:04 Go to next message
Victor Noël is currently offline Victor NoëlFriend
Messages: 112
Registered: June 2010
Senior Member
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
Re: Xtype: JvmTypeReference not working as wanted (validation, scope) [message #1017228 is a reply to message #1017027] Mon, 11 March 2013 08:59 Go to previous message
Victor Noël is currently offline Victor NoëlFriend
Messages: 112
Registered: June 2010
Senior Member
Hi,

Any idea about that?

Thank you Smile
Previous Topic:Recursive imports in xtext
Next Topic:importURI and cross references during serialization
Goto Forum:
  


Current Time: Fri Apr 26 06:27:41 GMT 2024

Powered by FUDForum. Page generated in 4.02993 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top