| Atomic Types and global methods [message #928894] |
Sun, 30 September 2012 23:45  |
Scot Malloy Messages: 1 Registered: September 2012 |
Junior Member |
|
|
I'm looking for a bit of advice on the best way to implement atomic types and global methods directly in the model (not AST) for a proprietary language. We've already got a DLTK (v2) based plugin deployed, but have dodged features requiring type knowledge to-date. Now we need to get some type knowledge into the plugin to support more useful code completion and documentation (among other things).
The language itself does not currently allow for user source definition of types (but does allow for user instantiation of the rather large number of built-ins), so there are no corresponding source files for the types and global methods (and while the global methods could be done this way using the short list of primitive types including the generic "Object", the much larger list of specific class and interface types can't be defined in the language syntax itself, since it lacks any kind of type definition statement).
I'm guessing, but in this situation, is the org.eclipse.dltk.core.model extension point is the way to go? (or is there a better way?).
If the model extension point is the suggested approach, where/how in the model would these types and global methods best be inserted (i.e. as children of what model object type in the model hierarchy?). Which classes in the current model package make sense to instantiate/extend for source-less type and method definitions (or should I implement my own IType and IMethod implementing classes?).
Cheers
|
|
|