Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dynamic Languages Toolkit (DLTK) » Adding custom types in SourceModule
Adding custom types in SourceModule [message #20000] Wed, 23 January 2008 08:56 Go to next message
Abhijit is currently offline AbhijitFriend
Messages: 18
Registered: July 2009
Junior Member
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.

~abhijit.
Re: Adding custom types in SourceModule [message #20040 is a reply to message #20000] Wed, 23 January 2008 13:03 Go to previous messageGo to next message
Andrei Sobolev is currently offline Andrei SobolevFriend
Messages: 72
Registered: July 2009
Member
Hi Abhijit,

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.

Best regards,
Andrei Sobolev.

> 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.
>
> ~abhijit.
>
Re: Adding custom types in SourceModule [message #20103 is a reply to message #20040] Wed, 23 January 2008 15:05 Go to previous message
Abhijit is currently offline AbhijitFriend
Messages: 18
Registered: July 2009
Junior Member
hi Andrie,

Thanks for the reply. I wanted to ask one more thing: when will we be
expecting the next release of dltk?

regards,
Abhijit.
Previous Topic:vertical line numbers
Next Topic:Custom Views that depend on SourceModule
Goto Forum:
  


Current Time: Thu Mar 28 11:54:59 GMT 2024

Powered by FUDForum. Page generated in 0.03421 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top