Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Find Text while setting the Scope to Selection, Removing Application Modal(After setting the Scope to selection, Its getting only the First value.)
Find Text while setting the Scope to Selection, Removing Application Modal [message #1741378] Wed, 24 August 2016 14:26 Go to next message
Naveen Sabapathy is currently offline Naveen SabapathyFriend
Messages: 46
Registered: July 2016
Member
I have constructed a Nattable, out of selected row I want to find some text.

Case 1:
After Pressing Ctrl+f, I'm getting the find window.
In Find I'm typing the text.
I'm setting the "Scope" as "Selection"

After Clicking the Find button I'm getting the first matching Cell, And that cell is set as the selected Row. So, I could not able to get the remaining rows.

Case 2:
And One more thing, While performing the search operation, I want to set the table Editable. (Want to remove the APPLICATION_MODAL for the dialog).

Case 3:
What is the efficient way to get all the matching cells. I want to display it and process it.

Case 4:
Is that the regular expression in the Nattable search is in working condition?

Re: Find Text while setting the Scope to Selection, Removing Application Modal [message #1741382 is a reply to message #1741378] Wed, 24 August 2016 15:05 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2623
Registered: July 2012
Senior Member
Case 1:
You mean the initial selection is removed after finding the first match? Is that correct? Your explanation is not very exact.
If that is the case then yes, that looks like a bug. Create a ticket.

Case 2:
You need to register the ui binding for executing the search with a different SearchAction instance. The instance needs to be created using the NatTable instance to support non modal operations.
uiBindingRegistry.registerKeyBinding(
                new KeyEventMatcher(SWT.MOD1, 'f'),
                new SearchAction(natTable, null));


Case 3:
None that I am aware of. You could give the SearchMarkupCommandHandler a try. But honestly I am not sure if it really works or if it still has some issues.

Case 4:
AFAIK the regular expression search is working. Why? Do you face some issues?
Re: Find Text while setting the Scope to Selection, Removing Application Modal [message #1743539 is a reply to message #1741382] Fri, 16 September 2016 09:32 Go to previous messageGo to next message
Naveen Sabapathy is currently offline Naveen SabapathyFriend
Messages: 46
Registered: July 2016
Member
Thanks for your reply.

Case 1: Quote:
If that is the case then yes, that looks like a bug. Create a ticket.

Following bug id has been created.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=501571

Case 2:
Non model operation is working fine. -- OK

But while selecting the Non model region.(Nattable). I'm getting the exception
 org.eclipse.core.runtime - org.eclipse.ui - 0 - Unhandled event loop exception
java.lang.NullPointerException
	at org.eclipse.nebula.widgets.nattable.search.action.SearchAction.isEquivalentToActiveContext(SearchAction.java:110)


Case 3:
Yet to test this action.

Case 4:
Quote:
AFAIK the regular expression search is working. Why? Do you face some issues?

I'm using normal notepad++ regular expression. like (^for start, $ for end etc.) but none of the regular expressions are working. Let me know the exact regular expressions.
Re: Find Text while setting the Scope to Selection, Removing Application Modal [message #1743550 is a reply to message #1743539] Fri, 16 September 2016 10:05 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2623
Registered: July 2012
Senior Member
Quote:
I'm using normal notepad++ regular expression. like (^for start, $ for end etc.) but none of the regular expressions are working. Let me know the exact regular expressions.


I don't know what you mean and what I should provide. We support default regular expressions syntax as documented in the web. Try to search for Java Regular expressions.

Probably if you use $ as end of the line expression it fails because there might be no end of the line for a simple string, as the end of the line is a special character.
Re: Find Text while setting the Scope to Selection, Removing Application Modal [message #1744362 is a reply to message #1743550] Mon, 26 September 2016 10:30 Go to previous messageGo to next message
Naveen Sabapathy is currently offline Naveen SabapathyFriend
Messages: 46
Registered: July 2016
Member
Thanks. Why we are getting exception while selecting non model region.
Re: Find Text while setting the Scope to Selection, Removing Application Modal [message #1744367 is a reply to message #1744362] Mon, 26 September 2016 11:11 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2623
Registered: July 2012
Senior Member
Because there is a bug in the implementation. Probably nobody tested non-modal search dialogs with the last change made a long time ago.

I worked on another issue related to the search dialog recently. Maybe that also fixes the NPE. It at least worked in my tests. It is not merged yet. Maybe you can test it locally and give feedback if it works with that patch.

https://git.eclipse.org/r/#/c/81874/
Re: Find Text while setting the Scope to Selection, Removing Application Modal [message #1744389 is a reply to message #1744367] Mon, 26 September 2016 12:50 Go to previous messageGo to next message
Naveen Sabapathy is currently offline Naveen SabapathyFriend
Messages: 46
Registered: July 2016
Member
Its working fine. Thanks you very much for providing the patch.
Re: Find Text while setting the Scope to Selection, Removing Application Modal [message #1744458 is a reply to message #1744389] Tue, 27 September 2016 08:23 Go to previous messageGo to next message
Naveen Sabapathy is currently offline Naveen SabapathyFriend
Messages: 46
Registered: July 2016
Member
While using the Search functionality in actual system. Switching between the eclipse views I'm facing the Widget disposed error at line no- 113.
 && this.natTable.getShell().equals(dialog.getNatTable().getShell())
where the dialog.getNatTable() is disposed.
Re: Find Text while setting the Scope to Selection, Removing Application Modal [message #1744530 is a reply to message #1744458] Tue, 27 September 2016 20:44 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2623
Registered: July 2012
Senior Member
Thanks for testing. I modified the implementation to take care of it and tested with several scenarios. It looks good in my tests but it would be great if you could also test again with the latest SNAPSHOT build #560
Previous Topic:Word wrapping problem in RichTextCellPainter
Next Topic:Conditional CellEditor activation based on EditAction
Goto Forum:
  


Current Time: Wed Nov 14 05:10:43 GMT 2018

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

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

Back to the top