On 03.06.11 11:31, Johannes Schmitt wrote:
There is another thing that would be cool that have IDE support for, and that are annotations. Eclipse PDT has already autocompletion for the "@var" annotation, but maybe that is extensible to include all annotations such as @Route, @Template, @Secure, etc.

yes, that's definitely something i was thinking about, and this should not be a big problem. There's already a plugin which does
this for aspect oriented programming:

http://code.google.com/p/apdt/

There could even be validation of annotations implemented, as in the apdt plugin. Connected to a native twig editor, things like autocompleting route names in templates etc could be added too.

Another thing that might be helpful, but I'm not sure if it's possible, is to have auto-completion for objects returned from the dependency injection container through ($container->get(...)) calls.

This is possible. Actually i've already a prototype running which parses the services from the xml/yml files and then provides type inference hinting to PDT based on the services name from $container->get('...');

Unfortunately there's some bad news on the twig-front: the twig support doesn't seem possible by extending built-in tools like WTP:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=225994

So it looks like the twig editor needs to be implemented from scratch - like in this eclipse plugin which is opensource:

http://smile-ez-plugin.sourceforge.net/

As i already mentioned i'm not very happy with this approach because re-writing all the existing html/js/css features for a HTML Editor takes a lot of time and definitely does not follow the DRY principles ;)

Maybe anyone on the list has another idea how to handle the twig-support?

Anyway, if you decide to make such a plugin I'd like to use, and contribute to it.

sounds great!


regards

-robert



Kind regards,
Johannes


2011/6/2 Robert Gründler <r.gruend...@gmail.com <mailto:r.gruend...@gmail.com>>

    as far as Twig Support is concerned, i've found the following
    existing plugins, which
    could probably be used as a base or part of a Symfony2 Plugin:

    * http://eclipse.kacprzak.org/ <-- django eclipse plugin ( unable
    to install via update site )

    * http://code.google.com/p/smartypdt/ <-- smarty eclipse plugin (
    syntax probably not compatible with twig?)

    The problem concerning twig support is that i would prefer to
    extend an existing
    HTML editor - preferably the one from the standard Web Tools
    Project (WTP) - instead
    of implementing a HTML/Twig editor from scratch.

    However, the WTP plugin does not seem to provide extensions to add
    additional language constructs
    without completely overriding their Lexer - like the PHP Plugin does.

    I've posted to the WTP plugin's mailing list - hopefully i'll get
    some info about the possibilities of
    extending the HTML Editor, so native Twig support could be
    implemented too.

    Concerning extensions to the PHP Sourcecodeeditor, i'm quite
    confident that this can
    be done more easily. The PDT Plugin provides a lot of useful
    extension points:

    http://wiki.eclipse.org/Extending_PDT_2.2


    cheers

    -robert



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

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


--
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 users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

--
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 users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to