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

Bug 120458

Summary: [Field Assist] - auto-activation should occur on a delay
Product: [Eclipse Project] Platform Reporter: Susan McCourt <susan>
Component: UIAssignee: Susan McCourt <susan>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.2   
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Susan McCourt CLA 2005-12-12 17:24:51 EST
When the ContentProposalAdapter triggers auto-activation, this should happen on a delay.  Need to determine if delay length should be settable through API or not.
Comment 1 Dani Megert CLA 2005-12-13 08:41:01 EST
Clients must be able to
- enable/disable auto-completion
- set the delay
Comment 2 Susan McCourt CLA 2005-12-14 09:40:43 EST
Dani,

- does auto-completion need to be disabled dynamically?
In the current field assist implementation you get auto-completion only when you specify auto-activation chars.  But if you want to be able to specify auto-activation chars and then dynamically disable and enable auto-complete, that would require new API.

- I can add API to specify the autoactivation delay.  Can we use this same value as the delay for opening the secondary info popup?
Comment 3 Dani Megert CLA 2005-12-15 10:47:10 EST
>In the current field assist implementation you get auto-completion only when
>you specify auto-activation chars.
Good enough, that's how we do it and by querying the triggers upon typing we have a way to dynamically enable/disable this.

>- I can add API to specify the autoactivation delay.  Can we use this same
>value as the delay for opening the secondary info popup?
Our code currently does this but there are some known problems with this:
- some people like 0 for the auto-activation delay but still don't like the hover to come immediately
- a high auto-activation delay might be chosen by users but they'd still like the popup to come up quickly
Comment 4 Susan McCourt CLA 2006-01-15 19:25:52 EST
Implemented >20050115 with
ContentProposalAdapter.setAutoActivationDelay(int milliseconds).

Based on your input, this only controls the autoactivation delay.  The secondary popup delay is determined by a static value which is currently hardcoded.  If the need to control the secondary delay occurs in the future, we can expose that as well, but I don't see a need to do that now.

One clarification:
As I said before, you can control autoactivation by setting the autoactivation characters.  Setting the characters to an empty array will disable autoactivation.  

However, setting the auto activation characters to null has a different meaning.  When the activation characters are set to null, then the explicitly invoking keystroke is consulted.  If one is specified, there is no autoactivation.  But if neither a keystroke nor autoactivation characters are specified, then autoactivation is triggered on any alphanumeric.  
Comment 5 Susan McCourt CLA 2006-01-15 19:35:20 EST
Forgot to mention that protocol was also added for dynamically enabling/disabling auto-completion as requested in comment #1.
Comment 6 Susan McCourt CLA 2006-02-14 14:59:03 EST
verified in 20060214-0800 on Win XP 
In find/replace patch and in field assist example, there is a delay in activation.  Updated bug #120173 with reminder to expose this delay on the pref page of the example