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

Bug 321666

Summary: Generate comment action generates wrong result when then cursor is inside parameter list of funciton
Product: z_Archived Reporter: Q.S. Wang <qiangsheng.w>
Component: PDTAssignee: Q.S. Wang <qiangsheng.w>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: gadi
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Q.S. Wang CLA 2010-08-04 00:54:14 EDT
public function foo(stdClass $a) {}

1. Place the cursor after the opening "(" of the parameters list of the method definition
2. Trigger the Generate Element Comment - the phpDoc of the method is written where the cursor is and not on top of the method

The generated comment is wrong.

public function foo(/**
                     * @var unknown_type
                     */
                    stdClass $a) {}
Comment 1 Q.S. Wang CLA 2010-08-04 00:56:48 EDT
If the current element is a parameter, generating the comment for the parent method.
Comment 2 Gadi Goldbarg CLA 2010-08-20 04:56:25 EDT
Verified fixed.
Kalin Yanev
kalin.a@zend.com