View unanswered posts | View active topics It is currently Tue Dec 12, 2017 9:12 am



Reply to topic  [ 2 posts ] 
 Better auto-completion 
Author Message
Junior Member

Joined: Mon Apr 03, 2006 12:52 pm
Posts: 6
Post Better auto-completion
Hello-
I write a lot of classes in PHP, and usually have a bit of a complex object model. I've been disappointed at the inability of every editor I try to "figure out" what types variables are beyond the very simple case of:

[PHP]$x = new MyClass();[/PHP]

Does anybody know of any editors that can do this a bit smarter? Something like this:
[php]
class Test1
{
var $t1member;
}
class Test2
{
var $t2member;
}
$t1 = new Test1();
$t1->t1member = array();
$t1->t1member[0] = new Test2();
[/php]

Now from here on out, I would like my IDE to have figured out that Test1.t1member is an array of Test2 objects, and respond with intellisense options appropriately after typing something like "$t1->t1member[17]->". Not just for $t1, but for any object of type or inheriting from type Test1.
Continuing code...
[php]$t1->t1member[0]->t2member = "hello world";
$x = $t1->t1member[0]->t2member;[/php]

And here I would expect my IDE to know that $x is probably a string type.

Does anybody know of any editors with this kind of capability? I've about given up, so I'm currently writing my own. If I were to do so and include the other standard features you see in other editors (ftp, collapsible side/bottom panels, complex find/replace in files, syntax highlighting, interactive debugging, etc.), would anybody be interested enough to buy it if it were reasonably priced?

Thanks for recommendations and opinions,
Jared


Fri May 19, 2006 3:10 pm
Report this post
Profile
Junior Member

Joined: Mon Apr 03, 2006 12:52 pm
Posts: 6
Post 
I tried the demo of VS.Php and really liked it...Of all the editors I've tried, it was my favorite. It had a couple of bugs that stopped me from making the purchase though. In one case, typing "->" after a certain variable in my code would close visual studio altogether, with no error message, exception or anything :-) Also I found that working with folders within projects didn't work as I expected, although I think that may be a vs bug more than the plug-in. And, obviously, at the time it lacked the type inference capability I was seeking. But I thought that it's handling of "references" and includes was better than anything else on the market, which makes it a very strong contender. I am primarily a .NET programmer, so the VS requirement is a plus in my book.

That array business looks pretty good...But I'm still not convinced it's as powerful as I'm looking for.

The first concern is that usually you fill arrays using variables, not explicit indexes. So will it make the assumption that the array values are all of the same type when it can't figure out an index? IMHO, that would be the way to go.

Thanks!
Jared


Wed Jul 05, 2006 9:56 am
Report this post
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.