How to avoid including ecore for dsl and load dynamically using Namespace uri of the ecore ? [message #1017197] |
Mon, 11 March 2013 04:15 |
Srinivas MV Messages: 16 Registered: February 2013 |
Junior Member |
|
|
Hi,
I am new to xtext and trying to explore xtext . I have included my grammar and scope provider thanks to christian , Everytime i need to explicitly include my ecore within the project . Is there way in which i could load the ecore Eclass contents dynamically using Name spcae uri of the ecore.
Model:
"EClass:" theEClass=[ecore::EClass|FQN] "Feature:" theFeature=[ecore::EStructuralFeature];
FQN: ID("." ID)*;
public class MyDslscopeProvider extends AbstractDeclarativescopeProvider {
public Iscope scope_Model_theFeature(Model model, EReference ref) {
return scopes.scopeFor(model.getTheEClass().getEAllStructuralFeatures());
}
}
For the above grammar text dsl project will look similar like this
TestProject
|- my.dsl
|- sample.ecore
Everytime i need to include sample.ecore to show up classes in my project .. Is there way i could dynamically load and avoid adding sample.ecore everytime.
Regards,
Sri
[Updated on: Mon, 11 March 2013 04:16] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03440 seconds