• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jface ContentProposalAdapter not working on first typed char

 
Greenhorn
Posts: 6
Eclipse IDE Python Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to make field-assisting for a Text widget I'm using in a SWT/JFace application.

I have a ModifyListener added on the Text component, and when this is triggered by a ModifyEvent, the setAutoCompletion() method down here and the next method are called:

The problem is that it works only after typing at least two characters. This means that if I have "387" as suggestion, I must type '3' and after that, '8'. The popup appears only with the second '8' character.

After that, it works always as expected, but I don't know why the first time the Text receives the event it doesn't work. I've been looking in "stackoverflow" and in Google but haven't found anything.

 
Martin Torre Castro
Greenhorn
Posts: 6
Eclipse IDE Python Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have found something that may be related in this sample of customized Text component.

It seems that when there's only one char typed I can notify listener, but I have tested it and it doesn't work for me.

Besides that I have checked the call to the listener and it does work. It's just the ContentProposalAdapter which doesn't get activated on the first typing.

 
reply
    Bookmark Topic Watch Topic
  • New Topic