Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311357 - PHP 5.3 - Show tooltip description gets broken over a reference of a class constant
Summary: PHP 5.3 - Show tooltip description gets broken over a reference of a class co...
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:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-03 07:51 EDT by Kalin CLA
Modified: 2020-05-14 11:46 EDT (History)
2 users (show)

See Also:


Attachments
myscreen (174.23 KB, image/jpeg)
2010-05-03 07:52 EDT, Kalin CLA
no flags Details
Bad tooltip description (69.22 KB, image/png)
2010-05-17 10:46 EDT, Gadi Goldbarg CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kalin CLA 2010-05-03 07:51:48 EDT
Build Identifier: 2.2.0.v20100427




Reproducible: Always

Steps to Reproduce:
1. Have the following code in a php file in a PHP 5.3 project.
<?php
class MyClass {
    const myconstant = 'constant value';
    
    function showCons1tant() {
        echo self::myconstant;
    }
}

$class = new MyClass ();
$class->showConstant ();
echo $class::myconstant;
?>

2. Put the cursor in myconstant at line 12. Go to main menu | Edit | Show Tooltip description

Expected:
A relevant tooltip should be displayed in the launched pop-up pane.

Actual:
The tooltip seems broken.
Comment 1 Kalin CLA 2010-05-03 07:52:18 EDT
Created attachment 166768 [details]
myscreen
Comment 2 Kalin CLA 2010-05-03 07:53:22 EDT
The code is inspired by example 1 in http://php.net/manual/en/language.oop5.constants.php
Comment 3 Gadi Goldbarg CLA 2010-05-03 08:02:16 EDT
related to bug 206022
Comment 4 Zhongwei Zhao CLA 2010-05-03 23:14:13 EDT
Hi Kalin

I fixed your case.But I found other two cases related to this.
1.when you hover myconstant in statement echo $class::myconstant; ,you get the wrong description--"Occurrence of 'myconstant'".
2.when you type CTRL+click,there is no hyperlink available at all.

if I use echo MyClass::myconstant;,I get the right result.And I will fix the above two cases before I mark this bug fixed.
Comment 5 Zhongwei Zhao CLA 2010-05-04 01:23:01 EDT
fixed in head
Comment 6 Gadi Goldbarg CLA 2010-05-17 10:45:16 EDT
Re-tested at PDT-2.2.0.v20100517

Again it is reproducible and not only at myconstant - almost at all of elements

see attached
Comment 7 Gadi Goldbarg CLA 2010-05-17 10:46:14 EDT
Created attachment 168739 [details]
Bad tooltip description

Attached by
Teodor Kirkov
Comment 8 Zhongwei Zhao CLA 2010-05-17 11:27:32 EDT
fixed in head:)
Comment 9 Gadi Goldbarg CLA 2010-05-26 08:34:10 EDT
Tested in EclipsePdt-2.2.0.v20100521
Verified fixed.

Kalin Yanev
kalin.a@zend.com