Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Trouble with content assist in TextCellEditor
Trouble with content assist in TextCellEditor [message #1816602] Fri, 01 November 2019 09:46 Go to next message
Maria Fardig is currently offline Maria FardigFriend
Messages: 8
Registered: November 2017
Junior Member
Hi!

We´re trying to add content assist to some cells in a table by calling TextCellEditor.enableContentProposal(), but it does not seem to work properly.
When triggering the content proposal popup in the text cell, the cell editor looses focus in such a way that it's impossible to input more characters to filter the proposals. The expected behavior in my view is that one should be able to continue to write in the cell editor, and use the arrow and enter keys to interact with the proposal popup.
Is there some configuration that we have missed, or is this a bug? If the latter, would it be possible to work around in some way without rewriting the whole content assist support?

I've attached a small sample project that shows the problem, and also included an example from JFace which shows the expected behavior.

Thanks,
Maria
Re: Trouble with content assist in TextCellEditor [message #1816615 is a reply to message #1816602] Fri, 01 November 2019 14:41 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Looks like a regression between the old JFace implementation on which the support was initially implemented and the current JFace implementation.

You can override TextCellEditor#configureContentProposalAdapter to not setting the focus on the popup. That should at least fix the focus issue. But strangely the selection in the proposal jumps.

Please create a ticket so I don't forget to fix this. If you find a fix it would also be great to get a patch via Gerrit.
Re: Trouble with content assist in TextCellEditor [message #1816649 is a reply to message #1816615] Mon, 04 November 2019 08:09 Go to previous messageGo to next message
Maria Fardig is currently offline Maria FardigFriend
Messages: 8
Registered: November 2017
Junior Member
Thank you for the answer!
I noticed the same with the fix you're suggesting, for some reason the keystrokes trigger multiple calls to a listener in ContentProposalAdapter which makes the selection jump two steps. I don't know how to fix that though.
I'll create a ticket for this.

It's also worth noting that we're on NatTable 1.5 and JFace 3.11.1, so it can't be a new issue.

/Maria

[Updated on: Mon, 04 November 2019 08:19]

Report message to a moderator

Re: Trouble with content assist in TextCellEditor [message #1816656 is a reply to message #1816649] Mon, 04 November 2019 08:59 Go to previous messageGo to next message
Maria Fardig is currently offline Maria FardigFriend
Messages: 8
Registered: November 2017
Junior Member
Created https://bugs.eclipse.org/bugs/show_bug.cgi?id=552651
Re: Trouble with content assist in TextCellEditor [message #1816694 is a reply to message #1816656] Tue, 05 November 2019 08:38 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
I think I was able to fix this. The two step issue is because of the InternalTraverseListener. This one should not be executed in case a proposal popup is open. You can have a look at the Gerrit patch to see how I solved this in Core.
You should be able to fix it the same way by overriding TextCellEditor#enableContentProposal() the same way.
Re: Trouble with content assist in TextCellEditor [message #1816697 is a reply to message #1816694] Tue, 05 November 2019 09:44 Go to previous message
Maria Fardig is currently offline Maria FardigFriend
Messages: 8
Registered: November 2017
Junior Member
Works great, thank you very much for your time!

/Maria
Previous Topic:Comboboxcelleditor combo values based on cell value
Next Topic:Generating PDF in NatTable
Goto Forum:
  


Current Time: Fri Apr 19 19:56:43 GMT 2024

Powered by FUDForum. Page generated in 0.03343 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top