Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Bug with XImportSectionNamespaceScopeProvider and JvmTypeParameter??
Bug with XImportSectionNamespaceScopeProvider and JvmTypeParameter?? [message #1068000] Thu, 11 July 2013 11:36 Go to next message
Victor Noël is currently offline Victor Noël
Messages: 112
Registered: June 2010
Senior Member
Hi,

In XImportSectionNamespaceScopeProvider, it seems there is some code to handle the fact an element is associated (via the JvmModelInferrer) to a JvmTypeParameterDeclarator and thus that its JvmTypeParameter should be part of the scope for stuff inside that JvmTypeParameterDeclarator.

But, when trying to complete a JvmTypeReference, the proposal does not show the JvmTypeParameters!
If I go into debug, the scope is well computed, but it seems it is not used at all...

I have an example project to illustrate it there:
https://wwwsecu.irit.fr/hg/SMAC/victor-noel-phd/may/may-xtext2-kevin/
(l/p: anon/anon)
Projects: org.xtext.example.mydsl and org.xtext.example.mydsl.ui

Here is an example mydsl model:

import java.util.Collection

component Comp1[Aaaa,B] {
	port p : Collection[Aaaa]
	instance p1 : Comp1[Collection[B],Collection[Aaaa]]
	
}

component Comp2[Cooo] {
	instance p1 : Comp1[Coo,Collection[String]]
}



If you try to complete the Coo in "instance p1 : Comp1[Coo,Collection[String]]" it does not propose Cooo!
Re: Bug with XImportSectionNamespaceScopeProvider and JvmTypeParameter?? [message #1072798 is a reply to message #1068000] Tue, 23 July 2013 10:13 Go to previous messageGo to next message
Victor Noël is currently offline Victor Noël
Messages: 112
Registered: June 2010
Senior Member
Hi,

Any idea about that? I'm still puzzled by it :/

Thanks!
Re: Bug with XImportSectionNamespaceScopeProvider and JvmTypeParameter?? [message #1072895 is a reply to message #1072798] Tue, 23 July 2013 14:29 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6140
Registered: July 2009
Senior Member
Hi,
afaik this does not even work with Xtend? does it?
Re: Bug with XImportSectionNamespaceScopeProvider and JvmTypeParameter?? [message #1072898 is a reply to message #1072895] Tue, 23 July 2013 14:33 Go to previous messageGo to next message
Victor Noël is currently offline Victor Noël
Messages: 112
Registered: June 2010
Senior Member
Oh!

I didn't get the idea to test that, and you are right, it does not.

I don't think it is something REALLY bothering as the developper can see directly which are the type parameters when coding.

I guess it would be then a nice feature to have?

On my side, it's alright to continue without that feature.

Thanks for the answer Smile
Re: Bug with XImportSectionNamespaceScopeProvider and JvmTypeParameter?? [message #1072906 is a reply to message #1072898] Tue, 23 July 2013 14:50 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6140
Registered: July 2009
Senior Member
Hi

feel free to file an enhancement request into bugzilla.

~Christian
Re: Bug with XImportSectionNamespaceScopeProvider and JvmTypeParameter?? [message #1072931 is a reply to message #1072906] Tue, 23 July 2013 15:53 Go to previous message
Victor Noël is currently offline Victor Noël
Messages: 112
Registered: June 2010
Senior Member
Hi,

it's done Smile
Previous Topic:Xdoc on hiatus?
Next Topic:Filter JvmType content assist for inferred type from specific source type from the dsl
Goto Forum:
  


Current Time: Tue Jul 29 04:57:29 EDT 2014

Powered by FUDForum. Page generated in 0.02792 seconds