Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370964 - Content Assist provokes String Index Out Of Bounds Exception in "use" statement
Summary: Content Assist provokes String Index Out Of Bounds Exception in "use" statement
Status: CLOSED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-08 10:38 EST by Kalin CLA
Modified: 2020-05-14 11:18 EDT (History)
0 users

See Also:


Attachments
error log (3.55 KB, text/plain)
2012-02-08 10:38 EST, Kalin CLA
no flags Details
screenshot-case2 (56.10 KB, image/jpeg)
2012-02-08 10:39 EST, Kalin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kalin CLA 2012-02-08 10:38:38 EST
Created attachment 210737 [details]
error log

Have the following code in a php file (PHP 5.3 project):

<?php
namespace NN;
class AA1{
	
}
Have the next code in a second php file in the same project.

<?php

class BB1 extends AA1{
	
}
class AA1 is not recognized, you have to add use statement.
1. Invoke Content Assist at the cursor position below and select "AA1 - NN" in CA list.

<?php

use NN\|  
class BB1 extends AA1 {
	
}
2. Delete "\" just after NN and apply again Ctrl+Space

Expected:
1.

<?php

use NN\AA1
class BB1 extends AA1 {
	
}
Actual:
1.Nothing happened.
String Index Out Of Bounds Exception in the error log.

2. String Index Out Of Bounds Exception in a dialog.
The text in the dialog says: 
""Content Assist" did not complete normally. Please see the log for more information.
String index out of range: 6"

Found on Win 7.
Comment 1 Kalin CLA 2012-02-08 10:39:03 EST
Created attachment 210738 [details]
screenshot-case2
Comment 2 Kalin CLA 2012-02-09 02:12:22 EST
no pdt issue.
Closing...