Re: Use statements in PHP 5.3

Todd Whiteman <[email protected]> Tue, 29 Dec 2009 11:37:12 -0800
Newsgroups gmane.comp.ide.komodo.general
Message-ID <[email protected]>
On 09-12-28 05:30 PM, Eddie Drapkin wrote:
> The project I'm working on, however, has stringent
> guidelines on the use of namespaces, most specifically that the \
> character should not appear in the code, but in use statements.  I'm
> used to automatically created import/use statements in my IDE, and
> Komodo does GREAT at detecting code and autocompleting namespaces, but
> to the best of my ability, I've been unable to get Komodo to do this.
> To be a little bit more clear, what I'm wanting to do is type "new
> \Foo\Bar\Baz()" and have Komodo convert that to "new Baz()" and
> automatically insert a "use \Foo\Bar\Baz;" statement at the top of the
> script.
>
> Is this possible?

Hi Eddie,

Komodo does not offer any features for converting a PHP namespace. You 
could file an enhancement request for such a feature at:
http://bugs.activestate.com/enter_bug.cgi?product=komodo

You should be able to type the "use \Foo\Bar\Baz;" at the top of the 
file and then Komodo *should* automatically give a "Baz" class 
completion after typing "new " and then also provide completions for the 
instance of this class.

I've just checked this, but Komodo is not including "Baz" in the list of 
classes and also fails to give proper completions on the class instance 
in this case, so I've filed these Komodo bugs:
     http://bugs.activestate.com/show_bug.cgi?id=85681
     http://bugs.activestate.com/show_bug.cgi?id=85682

Thanks for the report.

Cheers,
Todd
_______________________________________________
Komodo-discuss mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss