NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[Fixed] Dont show abstract classes when you instantiate
Veteran

Joined: 30 Nov 2006
Posts: 186
Reply with quote
Hi.

I think it is annoying that abstract classes is shown in the auto completion list.

If you write

Code:
abstract class $myAbstractClass {}

class $myClass extends $myAbstractClass {}


and then start to instantiate a object

Code:
$myObject = new $my


then the code completion list pops up, but it shows abstract classes, and since you can't instantiate an abstract class, I think they should not show.
View user's profileFind all posts by hgrSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
It's a good idea, but on the other side if you have a single abstract base class and have to derive a lot of classes from it you will have to type the base class name each time because it wouldn't be shown Wink
For people writing frameworks or something that "functionality" would be annoying.
Perhaps when it can be turned off... I don't really like my editor to decide what I get to see and what shouldn't be shown.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Veteran

Joined: 30 Nov 2006
Posts: 186
Reply with quote
True, but it should be possible to see the difference.

If you extend and abstract class the token in front of your class name is "extends"

If your are instantiating then it is "new"

So it should be possible not to show the abstract classes when you instantiate an object, but show it if you wan't to extend it.

PS. Don't we all write frameworks Very Happy
View user's profileFind all posts by hgrSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
hgr wrote:
PS. Don't we all write frameworks Very Happy

One after the other Smile

Anyway sure, if the parser actually goes as far as keeping in mind the keyword before the code completion popup then that would be a good solution.
I don't think that is the case atm though, since the popup contains pretty much everything after you type extends Smile
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
thanks for your report. As of 5225 it works appropriately:


_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 30 Nov 2006
Posts: 186
Reply with quote
BRILLIANT Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy
View user's profileFind all posts by hgrSend private message
[Fixed] Dont show abstract classes when you instantiate
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 vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic