Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321865

Summary: [PHP 5.3] wrong CA behavior in 'use' statement
Product: z_Archived Reporter: Kalin <kalin.a>
Component: PDTAssignee: Zhongwei Zhao <zhaozhongwei>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: gadi, ganoro, petyo_tanchev, qiangsheng.w
Version: unspecifiedFlags: ganoro: review+
qiangsheng.w: review+
zhaozhongwei: review? (zhaozhongwei)
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

Description Kalin CLA 2010-08-05 09:19:52 EDT
Build Identifier: 2.2.0.v20100621

Have the following code in php file under PHP 5.3 project:
<?php
namespace NNN;
 
use NNN| // type \ at cursor position |

 class Object {
    
}



The class Object will be suggested in CA list.
Double-click on Object in CA suggestion list.

Expected:
You should get:

<?php
namespace NNN;
 
use NNN\Object

 class Object {
    
}


Actual:
Nothing happened.
You still have the following:

<?php
namespace NNN;
 
use NNN\

 class Object {
    
}

Reproducible: Always
Comment 1 Kalin CLA 2010-08-05 09:54:21 EDT
the same when you have in file1.php under PHP 5.3 project:
<?php
namespace ns;
class CCC{
	
}

and in file1.php under same project you have typed:
<?php
use ns|   // type \ at cursor position |, then double click on CCC in CA:  CCC 
          //               will not be written in editor
Comment 2 Zhongwei Zhao CLA 2010-08-09 03:28:05 EDT
fixed in head and branch
Comment 3 Gadi Goldbarg CLA 2010-08-19 09:41:32 EDT
Verified fixed.
Kalin Yanev
kalin.a@zend.com
Comment 4 Zhongwei Zhao CLA 2010-08-25 09:46:44 EDT
the fixing code cause other bugs so reopen it,and use other method to fix this issue.
Comment 5 Zhongwei Zhao CLA 2010-09-01 03:50:48 EDT
Created attachment 177919 [details]
patch
Comment 6 Roy Ganor CLA 2010-09-03 17:52:58 EDT
reviewed,

thanks!
Comment 7 Zhongwei Zhao CLA 2010-09-10 22:38:15 EDT
fixed
Comment 8 Petyo Tanchev CLA 2010-10-06 10:35:06 EDT
Tested on 2.2.1.v20101001
Fixed