-
Notifications
You must be signed in to change notification settings - Fork 236
JavaFX Controls for Code Editing
This is an attempt to summarize what other options one has when they need a code editing control in JavaFX. Only native JavaFX implementations are included—no WebView-embedded JavaScript-based editors. My hope for the future is to somehow coordinate our efforts.
Available controls:
- RichTextFX (this project).
- e(fx)clipse's StyledText control
- SnapCode's code editor. SnapCode is an IDE that includes its own pure JavaFX code editor. Although it is currently not possible to use the editor independently of the IDE, it may not stay so forever, so it's good to keep an eye on it.
Let me know if there are other JavaFX implementations of code-editing controls. Also, please help me fill the question marks and keep the information on this page up to date.
RichTextFX | e(fx)clipse's StyledText | SnapCode's code editor | |
---|---|---|---|
available independently (1) | ✔ | ? | ✘ |
open source | ✔ | ✔ | ✘ |
text selection | ✔ | ✔ | ✔ |
Copy & Paste | ✔ | ✔ | ✔ |
Undo/Redo | ✔ | ? | ✔ |
built-in Find/Replace | ✘ (*) | ? | ✔ |
Tab/Shift+Tab indent/outdent | ✘ (*) | ? | ✔ |
use CSS for text styles | ✔ | ✔ | ✘ |
follow caret horizontally (2) | ✔ | ? | ✘ |
support for row markers (3) | ✔ | ? | ✔ |
popup positioning next to the caret or selection (4) | ✔ | ? | ✔ |
get the character index under the mouse (5) | ✔ | ? | ✔ |
not bound to any particular parser infrastructure | ✔ | ? | ? |
built-in lexer/parser | ✘ | ? | for Java |
Emacs key bindings | ✘ | ✘ | ✔ |
Horizontal print margin | ✘ | ✘ | ✔ |
line wrapping (6) | ✔ | ? | ✘ |
(*) Although not built-in in RichTextFX, these features can be implemented on top of it.
(1) That is, independently of any IDE or a larger framework.
(2) For example, when you type and reach the right edge of the text area, is the caret followed to the right as you keep typing?
(3) For example breakpoints, warnings, errors, ...
(4) Useful for showing e.g. an autocompletion box.
(5) Useful for showing customized tooltips for the syntactic element under the mouse.
(6) Not that you would ever need line wrapping in a code editor.
- Home
- General guidelines
- Core classes
- Text Styles: Inline, Style Class, and Custom Style Objects
- PS, S, and SEG: Explaining the main generics in RichTextFX
- Implementing custom objects
- How to Override the Default Behavior
- RichTextFX CSS Reference Guide
- Adding Support for Emojis
- Known Issues
- Test Automation