Community
Participate
Working Groups
My template for methods looks like this: /** * I just edited this template * ${cursor}${tags} */ Have the following code: function doSomething(String $hello) { return true; } Above the function start typing /**<Enter> Result(wrong): /** * * Enter description here ... * @param $hello */ function doSomething(String $hello) { return true; } For the same function generate the PHPDoc by using Source -> Generate Element Comment. The result will be the following (correct): /** * I just edited this template * @param String $hello * @return boolean */ function doSomething(String $hello) { return true; } So it seems that typing /**Enter does not apply the correct template.
Created attachment 176594 [details] patch workaround
(In reply to comment #1) > Created an attachment (id=176594) [details] > patch > > workaround what is exactly the problem that this workaround fixes? since there are several issues in this bug report...
now the result of /**<Enter> is /** * |//cursor position * I just edited this template * @param unknown_type $hello */ after apply the patch: the result of /**<Enter> is /** * |//cursor position * I just edited this template * @param String $hello * @return boolean */
ok, but any reason to "Thread.sleep()", this is the reason we have WAIT flag (that should work) or?
(In reply to comment #4) > ok, but any reason to "Thread.sleep()", this is the reason we have WAIT flag > (that should work) > > or? I hope it work,but it seems not,if it works this issue does not exist,I will have a look at WAIT flag and why it does not wait.
Hi zhao, Has this bug been fixed in HEAD? After typing /**<Enter>, I get the result below /** * * I just edited this template * @param unknown_type $hello */
(In reply to comment #6) > Hi zhao, > Has this bug been fixed in HEAD? no,please apply the patch,and then have a try:) > After typing /**<Enter>, I get the result below > /** > * > * I just edited this template > * @param unknown_type $hello > */
Created attachment 180925 [details] patch Now we can get the correct ASTNode by using the method name instead of method offset. But the return type is still incorrect, maybe this is another bug.
Created attachment 181048 [details] new patch committed to head already
change status
When I try to generate comment by typing /** <Enter>, I get this: /** * * @param String $hello */ When I generate it using Source -> Generate Element Comment, I get this: /** * @param String $hello * @return boolean */ After editing the method comments, the changes applies in both comment generation types. Example: /** * I just edited this template * @param String $hello * @return boolean */ and /** * * I just edited this template * @param String $hello */ But the difference remains. Reopen the issue. Ilina Stefanova
please try the latest build,thanks
Verified. Ilina Stefanova