Skip to main content

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

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

Back to the top