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 167614 - Goto Type should allow camel case filtering with standard (Zend Framework/PEAR) php naming conventions
Summary: Goto Type should allow camel case filtering with standard (Zend Framework/PEA...
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-24 17:25 UTC by pago
Modified: 2016-07-28 08:25 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Fix for this issue (2.47 KB, patch)
2009-06-25 21:38 UTC, pago
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pago 2009-06-24 17:25:26 UTC
In PHP it is common to use names like "Zend_Controller_Front" where the "_" can be thought of as a package.
Currently the camel case filtering for "Goto Type" doesn't work with names following this format.

For example, looking for the class "Zend_Form" using "ZF" als filter will show all types that start with a "Z" and
contain an additional "F" anywhere in the name. This can be reflected through a regular expression like the following:
/Z.*F.*/

As a result, the code navigator will show classes such as "Zend_Auth_Adapter_Http_Resolver_File", rendering it pretty
useless (the filter rule is way to fuzzy).

I'd like to propose to handle "_" as a simple lowercase letter and changing camel case to only allow lowercase letters
(including the underscore) between two uppercase characters.
So the regex for "ZF" would be like this: /Z[a-z_]*F.*/
Comment 1 pago 2009-06-25 21:38:11 UTC
Created attachment 84031 [details]
Fix for this issue
Comment 2 pago 2009-06-25 21:42:42 UTC
About the patch:

Camel-case completion will now forbid any uppercase letter to appear within a camel-case expression. This reduces the
number of results given for a camel-case search and improves the overall quality of the search (as explained in the
original description).

This fix also allows to mix wildcards and camel-case search so no power is lost through this change and enables the "?"
wildcard search. This reflects the behaviour shown by the "Goto Type"-dialog for Java.
Comment 3 Quality Engineering 2009-06-30 05:47:12 UTC
Integrated into 'main-golden', will be available in build *200906300200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/8b5d357282b8
User: Radek Matous <rmatous@netbeans.org>
Log: #167614 Goto Type should allow camel case filtering with standard (Zend Framework/PEAR) php naming conventions
Comment 4 Filip Zamboj 2010-09-15 12:29:16 UTC
batch reassigning
Comment 5 Tomas Mysik 2016-07-28 08:25:21 UTC
Patch is already applied, a long time ago.

Thanks for it!