Library of keywords, function, and method signatures [message #1020181] |
Sun, 17 March 2013 09:15  |
Eclipse User |
|
|
|
I have what I think is a pretty common task in front of me.
My language has a variety of built-in functions or methods. End users can build their own.
I want to accomplish a few things:
1) validate parameters (right number of params, right data types)
2) templated function completion.
I want to know what strategies are generally used as a best practice.
The way java works, the libraries on the end users machine are searched and a dynamic template proposal is offered.
That seems like the road I should be going down, but I thought I'd ask if there was a built-in way or barring that if anyone has an implementation example or tutorial to share. (My google-fu is not strong this morning)
Also, there could potentially be a lot of data to go through, and I obviously don't want to be reading a bunch of files with every keystroke, so a cache is in order. Is there a built-in cache for storing this kind of data (either from XText or within Eclipse), or am I left to do that on my own?
If I'm on my own, where (within what class) do you generally instantiate your cache so that it can be leveraged in validation/syntax highlighting/template proposals, etc.
|
|
|
|
Re: Library of keywords, function, and method signatures [message #1021382 is a reply to message #1020254] |
Tue, 19 March 2013 20:54  |
Eclipse User |
|
|
|
Alexander - I wanted to say a quick thank you.
It took me a while before I had the time to absorb that series of articles, but eventually it clicked. For an XText/EMF veteran it's probably a simple set of concepts, but for someone who hadn't referenced terms like Abstract Syntax Tree in twenty years...
Anyhow, that solved most of my question. The other part was checking parameter counts/types. That was simply a matter of implementing a Validator and once I had the cross reference in place, comparing the cross referenced parameters to the user parameters.
|
|
|
Powered by
FUDForum. Page generated in 0.12874 seconds