This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 197252 - Autocomplete / suggestions for "throw new"
Summary: Autocomplete / suggestions for "throw new"
Status: RESOLVED DUPLICATE of bug 201310
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.0.1
Hardware: All All
: P4 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-31 00:43 UTC by normadize
Modified: 2011-08-31 09:20 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description normadize 2011-03-31 00:43:00 UTC
Hi Petr,

It would be nice if the editor would offer better suggestions when typing "throw new". That is, it could list only classes inheriting from the Exception class, including both user defined and core PHP ones such as ErrorException.

Currently the editor lists all known classes. This is a minor enhancement as the incremental typing will reduce the list, but that works if you already know the Exception class name. Some times you may not and it's useful to browse the list and pick an appropriate one;)

Bogdan
Comment 1 Petr Pisl 2011-03-31 15:13:12 UTC
Yest this can be easily done, but there is performance risk. Find out all classes that extends another class usually take a time. I will try to implement this after NB 7.0 will be released.
Comment 2 normadize 2011-03-31 15:27:28 UTC
Maybe use the old trick of maintaining a cache of all classes and add or remove from it when the user creates or removes a class inheriting from Exception ... would be faster than going through the entire list looking for Exception classes but more of a pain to implement.

However, this is not a major issue, I can definitely live without it.

ps. Zend Studio 8 has it though :)
Comment 3 OndrejBrejla 2011-04-04 13:15:02 UTC
Could be solved with http://netbeans.org/bugzilla/show_bug.cgi?id=194875
Comment 4 Ondrej Brejla 2011-08-31 09:20:49 UTC

*** This bug has been marked as a duplicate of bug 201310 ***