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 207175 - Code completion for fully qualified namespaces removes already typed identifiers
Summary: Code completion for fully qualified namespaces removes already typed identifiers
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: All All
: P2 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-11 13:42 UTC by Vladimir Riha
Modified: 2012-01-13 21:53 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2012-01-11 13:42:13 UTC
Steps to reproduce (based on comment #2 in issue #206521):

Create following files:
-- File foo.php
<?php
namespace Name1;
class Foo {
    static public function bar() {}
}

-- File test.php
<?php
    \|
?>

Invoke CC at place of "|", Name1 is (among others) offered, hit enter to confirm
=> result is: "Name1" (without the leading "\"), the "\" was removed.

Also notice following behavior:
-- File test.php
<?php
    \Name1\|
?>

Invoke CC at "|", Foo is offered, hit enter to confirm => result is "Foo::" (not "\Name1\Foo::"), the beginning is removed



Product Version: NetBeans IDE Dev (Build web-main-6696-on-20120111)
Java: 1.7.0_02; Java HotSpot(TM) Client VM 22.0-b10
System: Linux version 3.0.0-14-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 marcusson 2012-01-11 15:19:52 UTC
I'm unable to reproduce this bug with Dev build 201201090601.
Comment 2 Ondrej Brejla 2012-01-11 16:20:53 UTC
Ohhh...I know, where the problem is...(or I think that I know ;). There is a problem, that new PHP project is created as PHP_54 version...so it should be fixed in PHPCompletionItem:236...and there should be fixed PROPERTIES_CACHE too...because it doesn't invalidate now, when something in project properties changes.
Comment 3 Ondrej Brejla 2012-01-12 09:42:15 UTC
Part 1 fixed in web-main: http://hg.netbeans.org/web-main/rev/624413195a32
Comment 4 Ondrej Brejla 2012-01-12 09:54:18 UTC
This bug is fixed, I'll file a new one for caching issue.
Comment 5 Vladimir Riha 2012-01-13 10:38:39 UTC
verified


Product Version: NetBeans IDE Dev (Build web-main-6711-on-20120113)
Java: 1.7.0_02; Java HotSpot(TM) Client VM 22.0-b10
System: Linux version 3.0.0-14-generic-pae running on i386; UTF-8; en_US (nb)
Comment 6 Quality Engineering 2012-01-13 21:53:11 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/624413195a32
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #207175 - Code completion for fully qualified namespaces removes already typed identifiers (part 1)