Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement search function with regex option #354

Closed
hendriklenz opened this issue Sep 6, 2016 · 9 comments
Closed

Implement search function with regex option #354

hendriklenz opened this issue Sep 6, 2016 · 9 comments

Comments

@hendriklenz
Copy link

Is it possible to implement an search function to the codearea? The search option should supports regex expressions and mark the results in the codearea.

Does there exists some examples?

@TomasMikula
Copy link
Member

Hi, would the JavaKeywords demo serve as a start? The difference is, in the demo the search expression is constant, whereas you will want to change it dynamically. Should not be too hard.

@hendriklenz
Copy link
Author

Hi Thomas,

thank you. I think the JavaKeywordsDemo is good to start. But what i was looking for is a default search implementation. I search for a keyword and goto each result step by step in the text like a normal search function in any editor.

Thanks
Hendrik

Am 06.09.2016 um 21:33 schrieb Tomas Mikula notifications@github.com:

Hi, would the JavaKeywords demo https://github.com/TomasMikula/RichTextFX/blob/master/richtextfx-demos/src/main/java/org/fxmisc/richtext/demo/JavaKeywords.java serve as a start? The difference is, in the demo the search expression is constant, whereas you will want to change it dynamically. Should not be too hard.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #354 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AA1LN-SuFdnwatlE5HzPrXY_A8yEBu1fks5qncAIgaJpZM4J1wUn.

HL-Systems
Hendrik Lenz
Kreuzweg 52
65589 Hadamar

Telefon: 06433 / 9489750
Fax: 06433 / 9489753

Internet: http://www.hl-systems.de
e-mail: mail@hlsystems.de

@TomasMikula
Copy link
Member

I wouldn't really try to include this in the core of the library (*), but it would make for a nice demo in the demo package.

The goal of RichTextFX isn't to build in as much functionality as any user could possibly want, but to provide a solid foundations on top of which applications (and other libraries) could be built.

@JordanMartinez
Copy link
Contributor

Since I've seen this idea phrased in various ways multiple times...

  • Question: Why don't we add [some feature] to RichTextFX?
    • Answer: Because it's outside of RichTextFX's scope; it's a base editor upon which others would build such features

...I've added it to #259's list of things to update in the ReadMe

@isjns
Copy link

isjns commented Oct 18, 2016

I've developed such a search feature. It currently displays the amount of occurrences of the searched phrase, and lets you navigate though the matches using the enter key or with up/down buttons:

example

Currently I have not been able to highlight all matches without losing any previous styling. Instead I just select the next interval with a match when you step through them. But shouldn't be too hard to implement such a behavior.

Would anyone be interested in me posting this feature? And if so: Where should I post it?

@JordanMartinez
Copy link
Contributor

See Tomas comment above:

I wouldn't really try to include this in the core of the library (*), but it would make for a nice demo in the demo package.

@isjns
Copy link

isjns commented Oct 18, 2016

Okay. So there's no place to post features built on the richtextfx library? A search function in particular is probably a feature that a lot of people expect from an editor (not that I'm arguing against your point above).

Maybe here? https://www.bountysource.com/issues/37614909-implement-search-function-with-regex-option

@JordanMartinez
Copy link
Contributor

So there's no place to post features built on the richtextfx library?

I think you should read through #275 and Tomas first comment in particular and then work with @Groostav

@JordanMartinez
Copy link
Contributor

I've updated the #259 ReadMe updates to include a note about not merging out-of-scope features into the main code but allowing them to be merged as demos in the demo package.

Closing since this is outside the scope of the main project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants