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

Bug 325476

Summary: PHP Project Outline lists variables under the Constants node
Product: z_Archived Reporter: Sylvia Tancheva <silviya>
Component: PDTAssignee: PHP UI <php.ui-inbox>
Status: CLOSED FIXED QA Contact: Ilina Stefanova <ilina.s>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
screen-shot
none
patch
none
patch none

Description Sylvia Tancheva CLA 2010-09-16 10:40:14 EDT
Created attachment 179036 [details]
screen-shot

1. Have a PHP project with PHP file with some variables in it
2. Open PHP Project Outline view

Notice that the variables are listed under the constants node (screen-shot)
Comment 1 xu jiaxi CLA 2010-11-07 23:39:26 EST
Created attachment 182584 [details]
patch
Comment 2 xu jiaxi CLA 2010-11-08 03:51:01 EST
Hi Silviya
Do we need to display the constants defined by "const".
sample code:
<?php
const C = "1";
?>
Comment 3 Sylvia Tancheva CLA 2010-11-08 04:07:16 EST
I think that if they are global they should be displayed (const is available since PHP 5.3: http://www.php.net/manual/en/language.constants.syntax.php)
Comment 4 xu jiaxi CLA 2010-11-08 04:18:55 EST
OK, So do you mean that if they are defined under namespace, they should not be displayed?
for example(PHP5.3):
<?php
namesapce ns;
const A = 1;  // should not be displayed
define("B", 2); // should not be displayed
?>

<?php
const A = 1;  // should be displayed
define("B", 2); // should be displayed
?>
Comment 5 xu jiaxi CLA 2010-12-05 22:52:43 EST
Created attachment 184568 [details]
patch

just display GLOBAL constants.
constants in namespace/class/interface will not be displayed.
Comment 6 Zhongwei Zhao CLA 2011-06-08 04:47:11 EDT
applied the patch,thanks!
Comment 7 Ilina Stefanova CLA 2011-07-22 08:24:46 EDT
Verified.