|Re: Adding custom types in SourceModule [message #20040 is a reply to message #20000]
||Wed, 23 January 2008 13:03
| Andrei Sobolev
Registered: July 2009
DLTK doesn't support adding of custom types to DLTK structure model.
Classes are not final because it is required by internal implementation.
They should not be subclassed.
You should map your language elements to standard elements (like type, field, method).
To provide some customization you could use modifiers.
In future versions we will provide custom renderer's for script explorer and outline, to display custom content.
> Hi people,
> I'm new to the dltk framework. I'm using Dltk 1.0.0 release on eclipse 3.3.
> We have language for which is have developed grammar in ANTLR 3.0. Now
> in our language we have specific types such as label/subroutine; in
> which case, these types doesnot fit into the types already provided by
> SourceModule. So how do i add new types, say, Label/SubRoutine to the
> SourceModule (using requestor)?
> I followed the following approach:
> 1) I extended from SourceField to create LabelField.
> 2) I extended MySourceModuleRequestor from
> SourceModuleStructureRequestor; but i was not able to instantiate it.
> 3) I inherited ISourceElementRequestor to have IMySourceElementRequestor
> and added enterLabel() method. But the infostack object used is private
> to ISourceElementRequestor and i cannot use it.
> Is there any other approach to add your own types in SourceModule?
> Please help. Thank you in advance.
Powered by FUDForum
. Page generated in 0.02130 seconds