Giter Site home page Giter Site logo

acefx's Introduction

AceFX

Ace Code Editor Wrapper For JavaFX. See https://ace.c9.io/

About

This project contains a few modifications to the base code for ace editor. These changes are done to force a bridge in to Java for copying/pasting. AceFX works by wrapping Ace editor inside a web-view, but by default this means ace is prone to java's garbage collection. Some efforts are made to ensure none of the core ace features are garbage collected.

Add to your project:

Gradle:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

dependencies {
	implementation 'com.github.orange451:AceFX:main-SNAPSHOT'
}

Maven:

<repositories>
	<repository>
	    <id>jitpack.io</id>
	    <url>https://jitpack.io</url>
	</repository>
</repositories>

<dependency>
    <groupId>com.github.orange451</groupId>
    <artifactId>AceFX</artifactId>
    <version>main-SNAPSHOT</version>
</dependency>

Sample usage

import dev.anarchy.ace.AceEditor;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class CodeEditorTest extends Application {
	@Override
	public void start(Stage stage) {
		AceEditor codeEditor = new AceEditor();
		codeEditor.setText("public static void main(String[] args) {\n\tSystem.out.println(\"Hello World\");\n}");
		codeEditor.setMode(Modes.Java);
		
		stage.setScene(new Scene(codeEditor, 320, 240));
		stage.centerOnScreen();
		stage.show();
	}
	
	public static void main(String[] args) {
		launch(args);
	}
}

acefx's People

Contributors

orange451 avatar

Stargazers

Alexey avatar Zhange avatar Dan Howard avatar

Watchers

James Cloos avatar Dan Howard avatar  avatar  avatar

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.