Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 371075 - use statement is added on wrong possition
Summary: use statement is added on wrong possition
Status: CLOSED FIXED
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-09 08:31 EST by Kalin CLA
Modified: 2020-05-14 11:17 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kalin CLA 2012-02-09 08:31:10 EST
<?php
namespace NN;
class CCC {
	
}

class DDD extends C| //<--invoke content assist at cursor position "|", then select "CCC"

Actual:
<?php
use NN\CCC;

namespace NN;
class CCC {
	
}

class DDD extends CCC


Expected:
<?php
namespace NN;
class CCC {
	
}

use NN\CCC;

class DDD extends CCC
Comment 1 Zhongwei Zhao CLA 2012-03-19 03:45:46 EDT
fixed
Comment 2 Sylvia Tancheva CLA 2012-07-06 11:01:09 EDT
Current situation:
No use statement added at all.
Actual:
<?php
namespace NN;
class CCC {

}

class DDD extends CCC;

Reopen
Ilina Stefanova
Comment 3 Dawid Pakula CLA 2015-05-27 14:52:08 EDT
No use statement is correct behavior (like in JDT). 

Both classes are in same namespace, use statement isn't necessary.
Comment 4 Sylvia Tancheva CLA 2015-06-01 07:50:11 EDT
Right! Both examples from Ilina and Kalin are not really correct.
Previously it was adding a use statement which is not just at wrong position but not at all needed.
Closing the bug