[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pdt-dev] Implement support for annotations

hi,

thanks for the tip with the modelContentProvider extension, i'll take a look at this.

Probably this will also solve my first question ;)


regards

-robert




On 08.06.11 10:46, èåä wrote:
hi,

I do not understand your 1st question

for 2nd question,have a look at the following extension(but I am not sure if it is what you want):
ÂÂÂ <extension
ÂÂÂ ÂÂÂ point="org.eclipse.dltk.ui.modelContentProvider">
ÂÂÂ ÂÂÂ <modelContentProvider
ÂÂÂ ÂÂÂ ÂÂÂ id="org.eclipse.php.ui.modelContentProvider"
ÂÂÂ ÂÂÂ ÂÂÂ language="org.eclipse.php.core.PHPNature"
ÂÂÂ ÂÂÂ ÂÂÂ class="org.eclipse.php.internal.ui.provider.PHPModelContentProvider"/>
ÂÂÂ </extension>

2011/6/8 Robert GrÃndler <r.gruendler@xxxxxxxxx>
Hi,

i'm working on a PDT extension for a php framework which uses annotations
in PHPDocBlocks. An annotation basically has a similar syntax of a PHP class constructor:

use Symfony\Component\Config\Annotations\Route;Â <-- UseStatement

/**
Â* @Route("/", name="foo")Â //
Â*/

However, the parameters of the annotation do not match the parameters of the annotationclass,
so if i simply report a FakeConstructor of the IType Route, PDT's code assist inserts
the constructor of the class - which is not what i want.

Is there a way to report a FakeConstructor in a CompletionStrategy where i can also define
the parameters?

My second question is about adding "virtual elements" to the structured model - so they can be
displayed in the PHP Explorer.

The framework i'd like to support has various structures defined in multiple sourcemodules:

* Services ( a.k.a JavaBeans ) which are declared in XML/Yaml/PHP files
* Routings - also declared in XML/Yaml/PHP files
* etc ...

To provide a better overview of all those structures in a project, i'm thinking about adding them
to the project explorer - similar to the "Deployment Descriptor" of a Java EE project in eclipse:

- IScriptProject
 -- sources
 -- PHP Language Library
 -- PHP Include Path
 -- Project Descriptor
ÂÂÂ -- Services
ÂÂÂÂÂ -- Service A
ÂÂÂÂÂ -- Service B
ÂÂÂ -- Routings
ÂÂÂÂÂ -- Routing A


Can this be done with an existing PDT/DLTK extension point? I guess the biggest problem is that the underlying
sources are not SourceModules (XML/Yaml) of the PHP Language?


regards

-robert

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




--

Thanks!

Best Regards!

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