[xtext 2] parsing files shipped in the plug-in itself [message #662567] |
Thu, 31 March 2011 07:26 |
Alex Ruiz Messages: 103 Registered: March 2011 |
Senior Member |
|
|
Greetings,
I have found it very difficult to explain my problem. I apologize in advance if this explanation makes little or no sense
As part of the Xtext-based plug-in that I'm developing, I need to have some kind of "global model" that provides some elements to be available to all the Xtext editors that a user may create or open. I need these elements to provide scope resolution.
The only thing that comes to mind is to ship this base model as part of the plug-in itself and parse it at some point after my plug-in is loaded and have somehow a global reference to it.
For example, I'll have a base.dsl file inside my plug-in and the model obtained from parsing such file will be available to any .dsl file that users of my plug-in may create.
My questions are:
1. Am I on the right track? Does this idea make sense at all? I'm totally open to alternatives.
2. If my idea makes sense, at which point should I load and parse the file? so far the only way I found to find a file in a plug-in is the one described at http://www.eclipse.org/forums/index.php?t=msg&goto=66050 6&S=0d0d50ff15cf9d886e9b79301ea40efd
Many thanks in advance,
-Alex
[Updated on: Sun, 03 April 2011 08:15] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03458 seconds