Giter Club home page Giter Club logo

fxeditor's Introduction

FxEditor

screenshot

Announcement

This work on this project has been stopped by the author, in favor of RichTextArea , an incubating project under OpenJFX project:

Why

Nearly all Java text editors, Swing and FX alike, suffer from one deficiency: inability to work with large data models, such as logs or query results.

The goal of this project is to provide a professional FX text component that is capable of handling billions of lines, provides syntax highlighting, multiple carets and multiple selection, rich text capabilities, embedded images and embedded components.

The main idea which allows for all these features is separation of the editor and underlying data model. The data model then can be made as simple as a contiguous in-memory byte array, or as complex as memory-mapped file with a concurrent change log that enables editing of a very large files.

Features

  • supports up to 2^31 lines of text
  • multiple selection and carets
  • supports syntax highlight

Requirements

Requires JavaFX 21+.

Try It Out

The project is at a very early stage: less than 29% of all identified features is currently implemented.

To see how little is implemented, launch FxEditorApp.java

Example

public class MainWindow extends FxWindow
{
	public MainWindow()
	{
		super("TestFxEditorWindow");
		setTitle("FxEditor Demo");
		setSize(600, 700);
		
		// data model
		FxEditorModel m = new TestFxColorEditorModel();
		// editor component is a Pane
		FxEditor ed = new FxEditor(m);
		ed.setMultipleSelectionEnabled(true);
		// add to layout		
		setCenter(ed);
	}
}

See MainWindow.java

Warning

This project is not ready for production. Mutable (editable) text models are not yet implemented.

The editor relies on JavaFX PrismTextLayout to properly render proportional unicode text, which results in performance issues when trying to render very long lines (millions of symbols), making it unsuitable for projects that have to deal with such files, like programming editors or log viewers. A fixed-width replacement FxTextEditor is currently being worked on.

Similar Projects

License

This project and its source code is licensed under the Apache License 2.0 and you should feel free to make adaptations of this work. Please see the included LICENSE file for further details.

fxeditor's People

Contributors

andy-goryachev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fxeditor's Issues

Migrate feature todo list to issues / project

The excel spreadsheet isn't previewable online (and thus for any mobile viewers). It would be easier to track the current status as a series of issues, single issue with a table, or a github project board.

Should it be made into a single issue, here's the markdown for the current table:

## General

| Feature                                          | Status                                | Description |
| ------------------------------------------------ | ------------------------------------- | ----------- |
| multiple selection blocks                        | :white_check_mark:                    |             |
| multiple carets                                  | :white_check_mark:                    |             |
| line-oriented model                              | :white_check_mark:                    |             |
| int line index (2 billion lines)                 | :white_check_mark:                    |             |
| plain text model                                 | :white_large_square: Pending editable |             |
| syntax colored, arbitrary graphics model         | :white_large_square: Pending editable |             |
| supports unicode beyond basic multilingual plane | :white_check_mark:                    |             |

## Properties

| Feature                          | Status             | Description        |
| -------------------------------- | ------------------ | ------------------ |
| editable                         | :x:                |                    |
| line wrapping                    | :white_check_mark: |                    |
| show line numbers                | :white_check_mark: |                    |
| vertical scrollbar policy        | :x:                |                    |
| horizontal scrollbar policy      | :x:                |                    |
| matching token highlight logic   | :x:                |                    |
| spell checking logic             | :x:                |                    |
| line number area highlight logic | :x:                |                    |
| bookmark area logic              | :x:                |                    |
| bird eye view area               | :x:                |                    |

## Status Line Properties

| Feature   | Status | Description |
| --------- | ------ | ----------- |
| selection | :x:    |             |
| caret     | :x:    |             |

Question: multiple interactive/editable views into the same content

Hi.

I wonder, have you looked into a problem of having multiple views (panes or windows) looking into the same editable content, in such a way, that edits happening in one pane are reflected in the all other views (such a feature is present in all decent editors, after all).

Recently, I had to look into a similar problem yet I could not identify an efficient way to update multiple scene graphs with the same content.

Do you plan to support such a feature in your FxEditor component (I checked the feature spreadsheet, but could not see if it's there)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.