On 6/7/11 10:56 PM, Christophe COEVOET wrote:

Classes used for annotations depends of the use statement in the file and the class name is the annotation name.

Yes, that's actually the problem ;) I want to provide code assistance in an IDE for the annotations, like the one for Java annotations.

Here's an example:

namespace Acme\DemoBundle\Controller;


use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Acme\DemoBundle\Form\ContactForm;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;


class DemoController extends Controller
{
    /**
     * @Route("/", name="_index")
* @ <--- *The cursor is here and the IDE wants to provide code assistance for the available annotations*
     */
    public function indexAction()
    {
        return array();
    }


I cannot rely on the "use" statements above to add codehints, as only 2 of them are actually annotations: Route + Template. The others 3 are "normal" classes. From the IDE's perspective, i know that the PHPDocBlock element "@Route" maps to the class Sensio\Bundle\FrameworkExtraBundle\Configuration\Route - but i have no clue if the class actually represents an annotation.

So what the IDE has to do is to parse all available classes in the project and somehow detect which one of them are annotations
and which one are not.


-robert



--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to symfony-devs@googlegroups.com
To unsubscribe from this group, send email to
symfony-devs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to