Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] Re: multiple source parsers

Hi Jae,

I think that configurable source parser idea is good, but I want to
propose some corrections.

1) Sometimes we need to override some contribution implementation with
same name with new version, as new plugin.
(Priorities was made for this purpose). I've added some logic to
SourceParserManager and DLTKContributionExtensionManager to support them
if only one parer with specified name are contributed.

2) We need to store store selected contribution information in core
preferences and provide generic user interface to select contribution
for specified nature.

3) As for per project parser configuration, I think that it is not good
idea, because not for all languages multiple parsers will be available.

Also: Before your modifications, for each module we create parser instance.
This is essential logic, becase almost all our parsers are not thread safe.
I've modified DLTKContributionExtensionManager to hold
ContributionElement inner class, instead of executable object instances.

Best regards, 
Andrei.
>  almost forgot, there is now an AbstractSourceParser base class that all
> ISourceParser implementations should inherit from that takes care of the
> 'informational' method implementations.
>
> On Nov 30, 2007 4:01 PM, Jae Gangemi <jgangemi@xxxxxxxxx> wrote:
>
>   
>> hello all -
>>
>>   i've just committed the initial changes required to start allowing
>> multiple source parser extension point implementations (a unit test too!).
>> aside from a package change for ISourceParser and the schema changes, all
>> other underlying functionality remains the same.
>>
>>   if anyone out there is working against the HEAD in cvs, you will need to
>> update your sourceParser extension point to look something like this:
>>
>>    <extension point="org.eclipse.dltk.core.sourceParsers ">
>>       <parserContribution natureId="org.eclipse.dltk.tcl.core.nature">
>>          <parser
>>                class="org.eclipse.dltk.tcl.internal.parser.TclSourceParser
>> "
>>                description="Tcl Source Parser"
>>                id="org.eclipse.dltk.tcl.sourceParser"
>>                name="Tcl Source Parser"
>>                priority="0" />
>>       </parserContribution>
>>    </extension>
>>
>>   the next steps will be to build a preference page that allows you to
>> choose the parser, and then to update calls that retrieve the parser to
>> determine which one to use based upon the user's preferences. once that's
>> done, my plan is to allow for project specific parsers and use that as a
>> basis to start adding some other project specific options (specifically
>> selecting which interpreter to use and allowing for project specific
>> debugging preferences [ie: break on first line, etc]).
>>
>> --
>> -jae
>>     
>
>
>
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> dltk-dev mailing list
> dltk-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/dltk-dev
>   



Back to the top