Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Finding all uses of fields/methods/variables in a xbase model
Finding all uses of fields/methods/variables in a xbase model [message #1455009] Wed, 29 October 2014 00:57 Go to next message
Steven Derrien is currently offline Steven DerrienFriend
Messages: 50
Registered: July 2009
Member
Dear Xtext/Xbase users,

I am currently trying to build an extension of xbase named xtom and supporting pattern matching constructs similar to
those of Scala. To do so, I plan to use the existing Tom/Gom pattern matching framework by INRIA (http://tom.loria.fr/).


It turns out that generating consistent Tom+Java code requires that the code generation knows the list of all
cross-referenced JvmIdentifiable objects. More precisely, I would need to find all the variables/fields/functions
actually used in my Xbase DSL, and this regardless of where they are defined.

I had hope to find the information by inspecting the feature field of all XFeatureCall instances of a model during the
Jvm model inference stage, but the field always contain a JvmVoid object instance.

Could someone hint me on this ?

Thanks in advance,

Steven
Re: Finding all uses of fields/methods/variables in a xbase model [message #1457397 is a reply to message #1455009] Fri, 31 October 2014 09:27 Go to previous message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Steven,

you may not resolve feature calls in the model inferrer. Their
resolution is based on a proper JVM model that is already available. If
you need to resolve them to change the JVM model, you end up with a
chicken'n egg problem.
I'm not familiar with the INRIA tool, but I can imagine that the fields
/ references are only used as an implementation detail thus you could do
that in the code generation phase?

Best,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Previous Topic:Suppress Add Xtext Nature Dialogue causes Problem
Next Topic:Support @AttributeOverrides and @JoinColumns as Annotation in DSL
Goto Forum:
  


Current Time: Fri Apr 26 00:46:41 GMT 2024

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

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

Back to the top