hi,

Do not worry,I think it is not a big problem that we pass SourceModule to
PHPIndexingVisitor:)

2011/6/29 Robert Gründler <[email protected]>

> **
> On 6/29/11 6:01 AM, 赵忠伟 wrote:
>
> I think you need ask this question in dltk group,after debugging,I think
> the DLTK indexer only can visit ISourceModule
>
>
> ok, this isn't a big problem, i can still use my own indexer then for
> non-php files.
>
>
>
> as your another question,we can not get ISourceModule from
> PhpIndexingVisitor,so you still can not visit the XML/Yaml config files:(
>
>
> hm, this is bad news for me ;)
>
> The reason is because Symfony2 declares the same framework elements in
> different places, like Route-Patterns for example. They
> can be declared in XML/Yaml files and also inside PHP DocBlocks.
>
> So my custom index looks a little bit different than the DLTK index, where
> each ModelElement found during indexing
> is tied to the parent container/resource.
>
> Which means that all my custom model elements need to have the
> IScriptProject as their parent, so when i search for them, i basically
> always search inside a project-scope.
>
> When i don't have a handle to the Project / SourceModule inside the
> PHPIndexingVisitor, i cant' make this relation to my custom elements.
>
> I hope my explanation is somewhat understandable ;)
>
> Is there maybe another way to get the containing SourceModule or at least
> the IScriptProject from within an PHPIndexingVisitor? Maybe
> by using some Utility class i haven't found yet?
>
> I've already searched a lot through the DLTK/PDT code, but unfortunately i
> couldn't find a way to do this.
>
>
> thanks again for your help!
>
>
> regards
>
> -robert
>
>
>
>
>
>
> 2011/6/27 Robert Gründler <[email protected]>
>
>> Hi,
>>
>> the framework i'm writing a plugin for uses XML/Yaml config files. Those
>> files define domainspecific
>> elements, which i'm currently indexing using a custom H2/SQL
>> implementation.
>>
>> I'm wondering if it's possible to get the DLTK/PHP indexer to also visit
>> those XML/Yaml files, so i can
>> use the existing Indexing framwork - probably store those elements as
>> IModelElement.USER_ELEMENT
>> and encode everything i need into the metadata (i'm doing this already for
>> TemplateVariables).
>>
>> All i'm need to do is to parse some xml/yaml attributes, which can then
>> later be used for code-hints
>> and Hyperlink-detection etc.
>>
>> I've tried already a couple of things, even to provide my own
>> LanguageToolkit, but it seems DLTK
>> only allows one toolkit per IScriptProject.
>>
>>
>> Any hints if this is possible? Or should i stay with my own indexer?
>>
>>
>> regards
>>
>> -robert
>>
>>
>> _______________________________________________
>> pdt-dev mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/pdt-dev
>>
>
>
>
> --
>
> Thanks!
>
> Best Regards!
>
> Zhao
>
>
> _______________________________________________
> pdt-dev mailing 
> [email protected]https://dev.eclipse.org/mailman/listinfo/pdt-dev
>
>
>
> _______________________________________________
> pdt-dev mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/pdt-dev
>
>


-- 

Thanks!

Best Regards!

Zhao
_______________________________________________
pdt-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/pdt-dev

Reply via email to