Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Access location of non-dsl files in workspace
Access location of non-dsl files in workspace [message #1796523] Mon, 15 October 2018 12:49 Go to next message
Eclipse UserFriend
Hello,

I am working on a DSL that queries EMF model contents.

As part of the DSL grammar, a user indicates the paths of the metamodel and model files that will be employed in the queries, such as:

    domainModel "models/dummy.ecore"
    domainModelInstance "models/dummy.model"

    <queries over the model here>


Being "models" a folder in the current project where the dsl files are defined.

I am having problems finding the absolute path or platform URI to load these resources to make them available for the dsl components (e.g. the validator would need the "dummy.ecore" metamodel to check the correctness of the query).

I do not know what is the preferred way to access these files, or if the usage of external files inside the functionality of dsl components is a supported or common feature in Xtext (or even desirable).

Thank you very much,
Alfonso
Re: Access location of non-dsl files in workspace [message #1796524 is a reply to message #1796523] Mon, 15 October 2018 12:54 Go to previous message
Eclipse UserFriend
i am not sure what you are exactly doing. but shouldn't you have actualy references to EClasses and EAttributes instead of some manual validation.
you may have a look what xtext itself does if you import a metamodel into grammar files
Previous Topic:Example for Semantic Refactoring
Next Topic:class can not be resolved to type
Goto Forum:
  


Current Time: Wed Jun 18 00:54:26 EDT 2025

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

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

Back to the top