-
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
Some Feedback and Suggestions #104
Comments
Hi Robert, thank you for the feedback and suggestions. See my comments inline.
Can you open a separate issue for this with more detailed description and/or screenshot?
You can open a separate feature request. It also implies rectangular copy&paste.
It is unlikely there's going to be a baked in support for auto-completion. This project tries to be a flexible basis for code and other editors, not a full-featured editor by itself. Auto-completion is necessarily based on grammar (whether it's just a dictionary, or a programming language grammar), and I don't want RichTextFX to restrict what grammars/parsers/languages are supported. On the other hand, there is already enough support to add auto-completion on top of RichTextFX. You are already able to obtain the text content and the position in it, as well as display a popup window next to the cursor.
Again, it's unlikely there's going to be anything language specific in RichTextFX. On the other hand, I'm in favor of providing low-level support for this in RichTextFX, such as an API to hide/show a range of lines.
All the low-level support is already there, since it's just replacing lines of text with slightly modified lines of text. The actual implementation is again language specific, and thus unlikely to be included in RichTextFX.
The low-level support is already there, in terms of paragraph graphic factory. Line numbers in the demo are just a special case of this. All that said, I support any effort to provide a more out-of-the-box solution for code editing based on RichTextFX. It's just someone would have to take the initiative to create and maintain that project, and we can then coordinate our efforts. |
@TomasMikula Thank you for getting back with me so quickly! I understand entirely where you are coming from. I have filed the other tickets as you have suggested. I think the code folding solution would be perfectly fine with me specifically as a developer looking to use RichTextFX. I could work with that because it would be trivial and allow me to actually customize the code folding margin considering the modularity of the paragraph graphic factory. But if RTFX were to provide the underlying show/hide line mechanism would it also propagate this information to the paragraph graphic factory so that it knows the visible lines? That would be essential to its implementation as well as hiding the line numbers for hidden lines. I ask because I am wondering if you would go with an implementation which automatically handles hiding the line numbers/graphic for the corresponding margins as I haven't worked with the paragraph graphic factory yet. As for comment/uncomment multiple lines I hadn't actually considered multiple languages as I did with code folding. I agree with you and it's easy to implement on the developer side as it's just prepending lines with comment markers or using a regular expression pattern to remove them. I also agree with your auto-completion analysis as that is also likely to be better implemented by the developer. For instance, Eclipse automatic completion is a little more advanced than something you see in Scintilla. Additionally Scintilla is pretty horrible with large completion lists and lags quite badly, it simply isn't as customizable as it should be. That said, I see nothing wrong with a helper/plugin library on to of RTFX that would provide some generic functionality for this. Have there been any projects/plugins on top of RTFX to date? |
Yes, the implementation would automatically hide graphic of the hidden lines. Graphic factory is just a function that takes a line number and returns a
The only project I know exploring this area is Xanthic. |
@TomasMikula Sounds great, I filed #107 and I think that covers everything. Keep up the great work! |
I answered a question on StackOverflow on how to add the current line indicator. This can give you the idea of how you would implement breakpoints. |
I wanted to offer some feedback about any bugs I encountered or ways I thought the component could be improved.
This is an amazing framework for rich JavaFX editing and I really hope the project continues!
The text was updated successfully, but these errors were encountered: