[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pdt-dev] How to add code-completion for PHP Framework
- From: Robert Gruendler <robert@xxxxxxxxxxx>
- Date: Thu, 29 Oct 2009 13:58:02 -0700
- Delivered-to: email@example.com
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:18.104.22.168pre) Gecko/20090915 Thunderbird/3.0b4
one more question regarding code completion extensions:
Some framework classes use "components", which are declared
in a class variable, like this:
$components = array('Foo', 'Bar');
After declaring those components, the fields 'Foo' and 'Bar',
are accessible via $this->Foo and $this->Bar.
Any hint which extension point i should use to add those fields
to the code completion of classes which declare the $components
On 10/28/2009 7:45 AM, robert@xxxxxxxxxxx wrote:
thanks a lot, this got me started, it's working fine now.
On Wed, 28 Oct 2009 13:08:58 +0200, Michael Spector<spektom@xxxxxxxxx>
I think goalEvaluatorFactories extension point would be sufficient for
You just need to add a rule that evaluates structures like:
ClassRegistry::init('MyObject'), and returns type (MyObject) for such
Take a look at
as an example, which evaluates structures like: new MyObject().
On Wed, Oct 28, 2009 at 1:03 PM,<robert@xxxxxxxxxxx> wrote:
i'm trying to write an eclipse plugin for the Cakephp
framework, and i'd like to start off with some
additional framework-specific code assistance.
The framework uses a central "ClassRegistry" factory
for object instantiation. So, there's no "new" keyword for
some objects, for example:
$myObject = ClassRegistry::init('MyObject');
Basically i would like to give a hint to PDT that
the variable "$myObject" is an instance of the "MyObject"
class, which has already been loaded into the PDT Model,
so i guess i would simply point to the "MyObject" IType in
the Model somehow.
Could anyone give me a hint what would be the best method
to accomplish this? I've already had a look at the extension
and "goalEvaluatorFactories", but i'm not sure what's the best
way to hook into PDT for this kind of thing.
pdt-dev mailing list
pdt-dev mailing list