Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325099 - Issue of global class accessing under namespace
Summary: Issue of global class accessing under namespace
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP UI CLA
QA Contact: Ilina Stefanova CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-13 07:09 EDT by Q.S. Wang CLA
Modified: 2020-05-14 11:08 EDT (History)
2 users (show)

See Also:


Attachments
patch (1.96 KB, patch)
2010-10-11 01:10 EDT, xu jiaxi CLA
no flags Details | Diff
patch (3.52 KB, patch)
2010-11-05 03:46 EDT, xu jiaxi CLA
no flags Details | Diff
unit test patch (2.47 KB, patch)
2010-11-05 03:46 EDT, xu jiaxi CLA
no flags Details | Diff
unit test patch 2 (2.32 KB, patch)
2010-11-05 04:05 EDT, xu jiaxi CLA
no flags Details | Diff

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