Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] Extending the ScriptModel

At the moment (as a quick hack) I can suggest only extending from PHP parser, handle .yaml files yourself and passing everything else to super.

Regards,
Alex

----- Original Message -----
From: "Robert Gründler" <doobre@xxxxxxxxx>
To: "DLTK Developer Discussions" <dltk-dev@xxxxxxxxxxx>
Sent: Tuesday, March 2, 2010 4:15:44 PM GMT +06:00 Almaty, Novosibirsk
Subject: Re: [Dltk-dev] Extending the ScriptModel


How about implementing org.eclipse.dltk.core.ISourceElementParser and generating appropriate model elements using enterType()/exitType() and enterMethod()/exitMethod() calls?

I've tried this, but my SourceElementParser gets only called for php sources, here's how i defined it:

   <extension
         point="org.eclipse.dltk.core.sourceElementParsers">
      <parser
            class="com.dubture.symfony2.internal.core.model.SymfonySourceElementParser"
            nature="org.eclipse.php.core.PHPNature"
            priority="0">
      </parser>
   </extension>


For .yml files, the parser is not being called. I've tried to set the nature to the nature of
my plugin, but then it doesn't get called at all.

Do i need to create a yaml content type and associate it with my nature for the parser to recognize .yml files
as source elements ? 


regards

-robert

_______________________________________________ dltk-dev mailing list dltk-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/dltk-dev

Back to the top