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

Bug 364020

Summary: [Regression]Code assist does not add imports when extending classes
Product: z_Archived Reporter: Sylvia Tancheva <silviya>
Component: PDTAssignee: PHP Core <php.core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: kalin.a
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Sylvia Tancheva CLA 2011-11-17 07:30:09 EST
[From a forum post]
"Lets say I create a new file with a single class in it and the class extends another class in another namespace. The Code Assistant finds all occurences and displays them in the popup. But it does not add the import or at least print the qualified classname. It just prints the wrong classname with a yellow line and a warning."

Example:
File 1
<?php
namespace One;
class AAA{
}

File 2
<?php
namespace Two;
class BBB extends A| <- CA here and select AAA

Previously it would add a use statement at the top: use One\AAA; Now it does not add.
But for example if you type new A| <-CA here and select AAA, then it will add the use statement correctly.
Comment 1 Zhongwei Zhao CLA 2011-12-19 00:22:30 EST
I could not reproduce this bug(maybe it is fixed already),and I remember you opened another bug:

File 2
<?php
//namespace Two;
class BBB extends A| <- CA here and select AAA

there is no imports when the current is global namespace.

I fixed this case.
Comment 2 Kalin CLA 2012-07-04 04:41:27 EDT
Verified fixed.
Closing...

Kalin Yanev
kalin.a@zend.com