|
|
|
|
Re: How to read specific file from configuration? [message #1023794 is a reply to message #1023790] |
Mon, 25 March 2013 07:15 |
|
Hi,
first: the error look like an ambigous grammar.
second: for the import uri scoping you have to enable
fragment = scoping.ImportURIScopingFragment {}
fragment = exporting.SimpleNamesFragment {}
and disable
//fragment = scoping.ImportNamespacesScopingFragment {}
//fragment = exporting.QualifiedNamesFragment {}
//fragment = types.TypesGeneratorFragment {}
//fragment = xbase.XbaseGeneratorFragment {}
this: this only influences visibility. what is general there is only the stuff in the project.
(aka the container and the visible containers of it)
for further reading have a look http://blogs.itemis.de/stundzig/archives/773
if you have the feeling that something is missing in the docs please feel free to file a specific enhancement request.
~Christian
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
Re: How to read specific file from configuration? [message #1023845 is a reply to message #1023794] |
Mon, 25 March 2013 09:44 |
Steve Kallestad Messages: 62 Registered: March 2013 |
Member |
|
|
Christian Dietrich wrote on Mon, 25 March 2013 03:15Hi,
first: the error look like an ambigous grammar.
second: for the import uri scoping you have to enable
fragment = scoping.ImportURIScopingFragment {}
fragment = exporting.SimpleNamesFragment {}
and disable
//fragment = scoping.ImportNamespacesScopingFragment {}
//fragment = exporting.QualifiedNamesFragment {}
//fragment = types.TypesGeneratorFragment {}
//fragment = xbase.XbaseGeneratorFragment {}
this: this only influences visibility. what is general there is only the stuff in the project.
(aka the container and the visible containers of it)
for further reading have a look http://blogs.itemis.de/stundzig/archives/773
if you have the feeling that something is missing in the docs please feel free to file a specific enhancement request.
~Christian
The results from this are kind of funny.
If I change that code fragment, not only do I get automatic unwanted and undeclared imports from the same project, but from any project the entire workspace.
I'd be able to manage this problem if I could implement a scope provider that was actually aware of which resource it was grabbing data from, but even though the information is clearly available there's no way that I can see of getting to it.
My frustration with the documentation is that something simple like importing files should be covered clearly and it's not. There's a section on importing that covers one particular use case embedded in a tutorial, but
1) it's easy for a new user to glance over that tutorial,
2) there's a lot more to it than is covered in the tutorial,
3) so a new user is relegated to searching forums and googling
4) that frequently results in examples for other versions of xtext which may or may not be applicable
5) not only that, but the links for information in files generated by xtext are all 404s
and finally
6) I've run into this at literally every turn while learning xtext.
It's not something that can be covered in a bug report. My only recourse is to curse whatever it was that made me decide I needed an IDE to go with a simple scripting language.
I've been around here for two or three weeks now. You'd think that would be enough time for me to answer a straightforward and common use case question that I should have covered myself in the first few days, but all that my attempt resulted in was finding a glaring bug in my own project.
[Updated on: Mon, 25 March 2013 09:50] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02949 seconds