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

Bug 325099

Summary: Issue of global class accessing under namespace
Product: z_Archived Reporter: Q.S. Wang <qiangsheng.w>
Component: PDTAssignee: PHP UI <php.ui-inbox>
Status: CLOSED FIXED QA Contact: Ilina Stefanova <ilina.s>
Severity: normal    
Priority: P1 CC: ganoro, kalin.a
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch
none
patch
none
unit test patch
none
unit test patch 2 none

Description Q.S. Wang CLA 2010-09-13 07:09:04 EDT
The following code is not valid according the document at http://www.php.net/manual/en/language.namespaces.rules.php.

<?php
namespace qq;
class Httpd_document extends DOMDocument{
}

The document says "To reference any global class in the global namespace, its fully qualified name new \C() must be used. "


Now the CA, tool tip and go to source are all working for DOMDocument, but they should work for the \DOMDocument only.
Comment 1 xu jiaxi CLA 2010-10-11 01:10:27 EDT
Created attachment 180573 [details]
patch
Comment 2 Zhongwei Zhao CLA 2010-10-11 08:43:13 EDT
nice!
works for tool tip and go to source.but what about the CA?
Comment 3 xu jiaxi CLA 2010-10-11 22:08:00 EDT
sample code
<?php
namespace ns;

$e = new Exception();
$e->|  // active the CA, there are no proposals displayed

$e = new \Exception();
$e->|  // active the CA, you will get some functions displayed.
?>
So I think it works for CA too.
Comment 4 xu jiaxi CLA 2010-11-05 03:46:00 EDT
Created attachment 182454 [details]
patch
Comment 5 xu jiaxi CLA 2010-11-05 03:46:48 EDT
Created attachment 182455 [details]
unit test patch
Comment 6 xu jiaxi CLA 2010-11-05 04:05:36 EDT
Created attachment 182456 [details]
unit test patch 2

add more tests for selecting use statement
Comment 7 Zhongwei Zhao CLA 2011-04-19 02:28:25 EDT
change status
Comment 8 Kalin CLA 2011-07-25 07:14:17 EDT
Verified.