Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321865 - [PHP 5.3] wrong CA behavior in 'use' statement
Summary: [PHP 5.3] wrong CA behavior in 'use' statement
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Zhongwei Zhao CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-05 09:19 EDT by Kalin CLA
Modified: 2020-05-14 11:08 EDT (History)
4 users (show)

See Also:
ganoro: review+
qiangsheng.w: review+
zhaozhongwei: review? (zhaozhongwei)


Attachments
patch (12.94 KB, patch)
2010-09-01 03:50 EDT, Zhongwei Zhao CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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