-
Notifications
You must be signed in to change notification settings - Fork 236
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
Add Support for TokenMarker #413
Comments
@dprutean RichTextFX is meant as a base upon which others can build. As such, the lack of support for syntax highlighters and search/replace dialog is intentional. As for the large files see #282. The feature you describe (as I understand it) is already implemented via an efficient VirtualFlow. See TomasMikula/Flowless
What do you mean by that? How should the sample application be improved? |
Still is nice to have maybe an extra module ( jar ) with search/replace functionality. Everybody needs this. Also having at least a base class / some samples for few language parsers would be great. Maybe the most powerfull free parsers at the moment, for SQL, Java, Groovy, etc. Users who decide for ReachTextFx will need also a solution for this, and having at least something included is great. Many users will contribute to extend this base. With improved examples I mean to simply double-click a jar ( could be a samples.jar ) and samples should start. There on different tabls should be few examples ( if different ). On one tab should show a checkbox for 'Show line number', 'show end line'- -maybe show end line markers in gray, etc. |
In my own project, I have no use for a search/replace functionality, though I understand why many others would want that.
I understand your desire, but as soon as we would add that feature, then others would ask that we add more such features using similar justification as you are now doing. That would quickly fall out of the scope of this project: changes that help one such party here may provide inflexibility to other parties who use this code in a different way. Tomas has shown in the demos package how RichTextFX could be built upon to add such functionality. So, although I wouldn't merge such features into the main project, if you wanted to create a demo that adds such functionality to the demo package, I would merge that. In some ways, it would make sense to create a
Are you suggesting something similar to the approach taken by ControlsFX's |
Agree with you. I find the best if possible to create one more module in your project. It is an advantage to have them together. A good find/replace functionality is not simple, may include regexp, show of markers on the right of the text pane, shortcuts ( F3 search next ), etc. |
We can discuss this further in the issue I've just opened.
Wait, so what are you agreeing with? I said we shouldn't merge such features into this project at all (which includes creating a separate module for that), but that seems to be what you are implying. Perhaps I wasn't as clear as I could have been? |
As for large files, with the provided document representation (implementation of 👍 for some RichTextFX-Extras project. |
Sorry for the last comment, is my mistake. Adding a search-replace functionality may also have a method to disable it: disableSearchReplace() - for users who wants to implement something else or simply disable. This is like when buying a car : the producer may say "we don't put any radio in our cars, some of our customers doesn't need one or they can choose what they like". Still, I think is better to already have the radio inside, the time spent to find and put one inside is also important for me. Same with implementing new code. Having a module in the same project has few advantages
Thank you also for the comment on large files. I plan to use the editor to edit SQL scripts, sometimes they can be database backups which are really large. The editor may stop to load text from the file if a certain limit is reached, and continue to load only if the scrollbar goes very down. Like facebook does when scrolling its content. Just think about it. |
I see RichTextFX more as a supplier of auto parts that an automaker (i.e. developers) can utilize to build a fully-featured car (e.g. code editors). Being a parts-maker, RichTextFX does not have the goal of building a fully functional car. The fact that it provides RichTextFX's goal is to provide a rich text area base upon which others can build. Developer's use-cases, as is my understanding, generally falls somewhere in these categories:
With that being the goal, one concern is to not include "features" that may be useless for some users, inflexible for others, or otherwise complicate things for others unnecessarily. For example, features that may benefit some but annoy and/or complicate use-cases for others would not be desirable, such as implementing a specific syntax-highlighter. The other concern is limited manpower and scope. Keeping the scope narrows makes it easier to fix bugs, which leads to stable code for everyone, and focuses the direction and manpower of the project, so that things actually get done rather than being talked about. However, the last concern to keep in mind is whether a developer can implement a feature on top of the base. If the developer cannot, then I think it should be included in the project. Specifically, #222 comes to mind. How would a developer implement that on top of the base area? It is possible, but it would feel very hackery. With those considerations in mind, should a search-and-replace feature be included? Here are my thoughts:
This is why I think implementing the code inside a Update: For my comment about users in Categories 1 & 2, it would make more sense, if this was implemented, to not have |
Closing due to being outside the scope of this project. I've also written an explanation of what "out of the scope of this project" means in the wiki |
I am looking to move from jidesoft.com code editor to RichTextFx. Few features I miss:
Support for TokenMarker. TokenMarkers are Java classes generated by JFlex lexical parser. See http://jflex.de/ and http://syntax.jedit.org/. I ask you to implement this because a good implementation will work very well on large files - the text verification will be done from the last line without any highglight till after the edited line, where the highlight is the same.
Add search / replace dialog directly to the editor. Having this directly build-in is a great advantage.
Consider features for editing large files. The best editors I saw, like the one from jidesoft can edit very large files, computing the lines and loading only the visible one. This feature may be pretty difficult.
Improve the sample application in your jar. When launching java -jar richTextFx.jar start directly the demo, and inside show all features you have.
The text was updated successfully, but these errors were encountered: