Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325476 - PHP Project Outline lists variables under the Constants node
Summary: PHP Project Outline lists variables under the Constants node
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP UI CLA
QA Contact: Ilina Stefanova CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-16 10:40 EDT by Sylvia Tancheva CLA
Modified: 2020-05-14 11:43 EDT (History)
0 users

See Also:


Attachments
screen-shot (39.02 KB, image/png)
2010-09-16 10:40 EDT, Sylvia Tancheva CLA
no flags Details
patch (1.83 KB, patch)
2010-11-07 23:39 EST, xu jiaxi CLA
no flags Details | Diff
patch (2.14 KB, patch)
2010-12-05 22:52 EST, 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 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.