Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How can I get JvmGenericType which has type parameters from build pathes
How can I get JvmGenericType which has type parameters from build pathes [message #814854] Wed, 07 March 2012 00:13 Go to next message
Jeeeyul Lee is currently offline Jeeeyul LeeFriend
Messages: 117
Registered: July 2009
Location: Seoul
Senior Member

How can I get JvmGenericType which has type parameters from build pathes?

I could get Procedure$Procedure1 like this:
var procedureType = entity.jdtTypeProvider.findTypeByName("org.eclipse.xtext.xbase.lib.Procedures$Procedure1") as JvmGenericType

entity is my domain model, jdtTypeProvider function is:
def IJvmTypeProvider getJdtTypeProvider(EObject o){
   return jdtTypeProviderfactory.findOrCreateTypeProvider(o.eResource.resourceSet)
}



But I want to get JvmType which have explicit type parameter. And these parameter can be generated java class or also ordinary java class.

[Updated on: Wed, 07 March 2012 00:14]

Report message to a moderator

Re: How can I get JvmGenericType which has type parameters from build pathes [message #814919 is a reply to message #814854] Wed, 07 March 2012 02:15 Go to previous message
Jeeeyul Lee is currently offline Jeeeyul LeeFriend
Messages: 117
Registered: July 2009
Location: Seoul
Senior Member

I solved that like below:
var entityTypeRef = getTypeForName(entity.fullyQualifiedName, entity)
var procedureTypeRef = getTypeForName(typeof(Procedures$Procedure1), entity, entityTypeRef)


getTypeForName() from TypeReferences
Previous Topic:Generic grammar makes Eclipse throw OutOfMemoryError when running editor
Next Topic:Show API to my language
Goto Forum:
  


Current Time: Thu Mar 28 15:40:43 GMT 2024

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

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

Back to the top