Bug 253901 - [regression] The Parameter hint window is not closed in case user moves the cursor out of the function parentheses area
Summary: [regression] The Parameter hint window is not closed in case user moves the c...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Michael Spector CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-11-05 07:36 EST by Kalin CLA
Modified: 2020-05-14 11:07 EDT (History)
3 users (show)

See Also:


Attachments
ParamenterHint-BadFunctionality (116.71 KB, image/pjpeg)
2008-11-05 07:36 EST, Kalin CLA
no flags Details
patch (1.95 KB, patch)
2010-01-31 03:51 EST, Zhongwei Zhao CLA
no flags Details | Diff
new patch (4.71 KB, patch)
2010-02-27 00:14 EST, Zhongwei Zhao CLA
no flags Details | Diff
patch (849 bytes, patch)
2010-03-10 02:49 EST, Zhongwei Zhao CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kalin CLA 2008-11-05 07:36:54 EST
Created attachment 117061 [details]
ParamenterHint-BadFunctionality

Have the next php code in editor:
<?php
class bank{
}

/**
*This function deposits bank checks
*
*@param int $check_number
*@param float $check_sum
*@param bank $bank_info
*
*/
function deposit_check($check_num,$check_sum,$bank_info){
}

deposit_check(|) //<-Invoke Parameter hint ('ctrl+shift+space') here, where 
                 //the cursor "|" is located
?>

Move the cursor using keyboard arrows buttons (<- or ->)

Expected:
The Parameter hint window should be closed.

Actual:
The Parameter hint window is still opened.

See the attachment.
Comment 1 Zhongwei Zhao CLA 2010-01-31 03:51:32 EST
Created attachment 157705 [details]
patch
Comment 2 Zhongwei Zhao CLA 2010-02-26 02:11:23 EST
<?php
class bank{
}

/**
*This function deposits bank checks
*
*@param int $check_number
*@param float $check_sum
*@param bank $bank_info
*
*/
function deposit_check($check_num,$check_sum,$bank_info){
}

deposit_check(|) ;
deposit_check() 
?>


Actually the Parameter hint window will be there when your cursor moves to the second deposit_check() call.
In my opinion i think the patch is reasonable.What do you think of it?
Comment 3 Zhongwei Zhao CLA 2010-02-26 02:19:17 EST
Maybe the code in class PHPCompletionProposalComputer should be improve more,for there may be more than one "(" and ")",but basically i think it works when there are only one "(" and ")" pair.So i think i need think about this bug again to see if there is some better way:)
Comment 4 Zhongwei Zhao CLA 2010-02-27 00:14:00 EST
Created attachment 160394 [details]
new patch

Maybe this patch is better:)
Comment 5 Q.S. Wang CLA 2010-03-08 07:00:03 EST
Zhongwei, your patch is partially work. Could you double check the logic in the PHPContextInformationValidator.java to make sure that when the cursor move to up, down, left and right then the hint windows will be close.
At the moment, move down to next line, and move to left will not make the window be closed.
Comment 6 Zhongwei Zhao CLA 2010-03-10 02:49:32 EST
Created attachment 161574 [details]
patch
Comment 7 Q.S. Wang CLA 2010-03-10 04:34:55 EST
Applied the patch.
Thanks
Comment 8 Gadi Goldbarg CLA 2010-05-05 07:21:21 EDT
Tested in EclipsePdt-2.2.0.v20100427
Verified fixed.

Kalin Yanev
kalin.a@zend.com