Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Jface ContentProposalAdapter not working on first typed char  RSS feed

 
Martin Torre Castro
Greenhorn
Posts: 6
Eclipse IDE Linux Python
  • Mark post as helpful
  • send pies
  • 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 Linux Python
  • Mark post as helpful
  • send pies
  • 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.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!