Bug 255204 - [regression] Parameters type is not displayed in Generated element comments doc block
Summary: [regression] Parameters type is not displayed in Generated element comments d...
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: Nir Cohen CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-11-13 10:54 EST by Kalin CLA
Modified: 2020-05-14 11:16 EDT (History)
5 users (show)

See Also:


Attachments
patch for the missing parameter type. (31.41 KB, patch)
2009-03-15 12:54 EDT, Zhongwei Zhao CLA
no flags Details | Diff
hey! attached is the patch (31.46 KB, application/octet-stream)
2009-03-16 03:01 EDT, Zhongwei Zhao CLA
no flags Details
hey! attached is the patch (3.78 KB, patch)
2009-03-16 03:28 EDT, Zhongwei Zhao CLA
jacek.pospychala: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kalin CLA 2008-11-13 10:54:21 EST
have the next code in editor:
<?php
function foo(array $first, int $second){
   return $third;
  
}
?>

Right click on the function foo in PHP Explorer -> Source -> Generate element comments 

Expected:
Generated doc block should be:
/**
* Enter description here...
*
*@param array $first
*@param int $second
*@return unknown
*/ 


Actual:

/**
 * @param $first
 * @param $second
 * @return unknown_type
 */

Here the topic is the missing types in doc block: int and array

About the missing part "Enter description here..." there is an opened bug: #254762
Comment 1 Kalin CLA 2008-11-13 10:55:04 EST
Found in N20081112
Comment 2 Zhongwei Zhao CLA 2009-03-15 12:54:19 EDT
Created attachment 128843 [details]
patch for the missing parameter type.

patch for the missing parameter type.
Comment 3 Zhongwei Zhao CLA 2009-03-15 13:01:21 EDT
About the missing part "Enter description here..." 

from the menu
Windows->Preferences->PHP->Templates

select methodcomment on the right table

double clicked or click on the edit button on the right of the table
replace
/**
 * ${tags}
 */
with
/**
 * Enter description here...
 *
 * ${tags}
 */
Comment 4 Roy Ganor CLA 2009-03-15 14:16:21 EDT
Thanks for your contribution,
two things though:

1. any contribution should be applied by a patch. to create a patch click on the project/s that you changed and click, team -> create patch. Attach the generated file as patch

2. about the template change, you can edit the templates in org.eclipse.php.ui\templates\phpdefault-templates.xml - this patch should include this change.

Many thanks!




Comment 5 Zhongwei Zhao CLA 2009-03-16 02:57:10 EDT
ok,i have created a patch.
Comment 6 Zhongwei Zhao CLA 2009-03-16 03:01:55 EDT
Created attachment 128879 [details]
hey! attached is the patch
Comment 7 Zhongwei Zhao CLA 2009-03-16 03:28:49 EDT
Created attachment 128880 [details]
hey! attached is the patch

the patch is about tow file,CodeGeneration.java and phpdefault-templates.xml
Comment 8 Roy Ganor CLA 2009-03-16 03:48:53 EDT
Thanks you very much,
committed to HEAD

contributed by zhongwei zhao

Comment 9 Kalin CLA 2009-04-29 06:10:29 EDT
re-tested in M6 - verified fixed.
Thanks Zhao, well done!