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 231176 - "Go to Type" does not support wildcards and CamelCase in Namespaces
Summary: "Go to Type" does not support wildcards and CamelCase in Namespaces
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-12 19:51 UTC by IfElseTrue
Modified: 2016-08-02 10:01 UTC (History)
0 users

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 IfElseTrue 2013-06-12 19:51:18 UTC
Go to Type does not support wildcards in Namespaces

Invoke "Go to Type" and search for library*Service. Nothing found. However, search for library\Services\ or library\Services\Service has results. CamelCase Navigation seems to be broken too.

Example files:

Service.php
<?php
namespace library\Services;
class Service {}

User.php
<?php
namespace library\Users;
class User {}
Comment 1 Ondrej Brejla 2013-06-12 20:41:02 UTC
Namespace navigation never worked, because infrastructure replaces backslashes with "" -> nothing. So if one finds Foo\Bar then PHP type searcher gets FooBar...so we don't have any chance to detect that user wants namespace.

Camelcase also never worked and can't (there is an enhancement...) because it's not supported by PHP index.

Tomorrow I'll file a new issue against navigation infrastructure about that backslash problem. Thanks.
Comment 2 Ondrej Brejla 2013-06-12 21:00:32 UTC
I read it again and I'm a bit confused right now...FQ name with namespace worked? Weird. It has to be hacked somehow :) I have to test it. It's evening and I'm tired...so tomorrow we'll see :)
Comment 3 IfElseTrue 2013-06-13 07:38:17 UTC
(In reply to comment #2)
> I read it again and I'm a bit confused right now...FQ name with namespace
> worked? Weird. It has to be hacked somehow :) I have to test it. It's evening
> and I'm tired...so tomorrow we'll see :)



yes, it does even very nice thing: it can list all classes in given namespace (stop typing after last backslash in namespace for that)
Comment 4 Ondrej Brejla 2013-06-13 08:38:28 UTC
Imho that "very nice thing" will be just side effect of a suspicious implementation :)

Nevertheless, it's a really complicated issue which will take a lot of time, because regular
expression search is not implemented for PHP index at all :( A lot of thing
will have to be rewritten. Probably it will affect everything what somehow
touches index... Not sure if it's a good idea to do that in this phase of
release. I don't think so, but I'll try to look at it much further.
Comment 5 Tomas Mysik 2016-08-02 10:01:09 UTC
As explained earlier, this is more enhancement more bug.

Thanks for reporting.