How could i parse string and link its model with my files in eclipse project? [message #1703271] |
Thu, 30 July 2015 03:15  |
Eclipse User |
|
|
|
How could i parse string and link its model with my files in eclipse project?, as i read that we dont have to use standalone mode while working with eclipse projects.
Example of what i want to do:
I have file1.dsl in my project which contains some statements but the declaration of these statements are not in another file, i need to put them only in my code
|
|
|
|
|
|
|
|
|
|
|
|
Re: How could i parse string and link its model with my files in eclipse project? [message #1703525 is a reply to message #1703504] |
Sun, 02 August 2015 09:50  |
Eclipse User |
|
|
|
Hi,
I am a little bit confused.
As i said by adding file1.dsl and file2.dsl in eclipse project every thing work smoothly and i got no syntax errors in file1.dsl, cross reference is working also without any modifications in GlobalScopeProvider.
My expectations after removing file2.dsl from the project and loading it from the code as shown below, my expectation was that every thing will work correctly and syntax errors of file1.dsl will disappear.
URI uri = URI.createURI("file2.dsl");
XtextResourceSet resourceSet = injector.getInstance(XtextResourceSet.class);
Resource resource = resourceSet.getResource(uri, true);
EcoreUtil2.resolveLazyCrossReferences(resource, null);
Even if the way of loading the resource is wrong but i have only to load it in correct way but without any modifications in GlobalScopeProvider.
[Updated on: Sun, 02 August 2015 09:59] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.13718 seconds