Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364020 - [Regression]Code assist does not add imports when extending classes
Summary: [Regression]Code assist does not add imports when extending classes
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-17 07:30 EST by Sylvia Tancheva CLA
Modified: 2020-05-14 11:16 EDT (History)
1 user (show)

See Also:


Attachments

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