Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

RSyntaxTextArea

> 开发工具
Open source

A syntax highlighting, code folding text editor for Java Swing applications.

1.2K stars0 likes2 views
WebsiteGitHub

About

A syntax highlighting, code folding text editor for Java Swing applications.

RSyntaxTextArea

RSyntaxTextArea is a customizable, syntax highlighting text component for Java Swing applications. Out of the box, it supports syntax highlighting for 50+ programming languages, code folding, search and replace, and has add-on libraries for code completion and spell checking. Syntax highlighting for additional languages can be added via tools such as JFlex.

RSyntaxTextArea is available under a BSD 3-Clause license. For more information, visit http://bobbylight.github.io/RSyntaxTextArea/.

Available in the Maven Central repository (com.fifesoft:rsyntaxtextarea:XXX). SNAPSHOT builds of the in-development, unreleased version are hosted on Sonatype.

Please see the wiki for an overview of features and a deep-dive into the code!

Building

RSyntaxTextArea uses Gradle to build. To compile, run all unit tests, and create the jar, run:

./gradlew build --warning-mode all

RSTA 4.0 and later requires Java 11 to run. If you need to support older Java versions, use the RSTA version specified in the following table:

RSTA Version Required to build (JDK) Required to run (JRE)
4.x 25 11
3.x 17 8
2.6.x 6 6

Demos

There are several simple demo applications in the RSyntaxTextAreaDemo submodule. To run the "main" one, which shows off syntax highlighting and code folding for several languages as well as several common configuration options, run:

bash
./gradlew RSyntaxTextAreaDemo:run

Example Usage

RSyntaxTextArea is simply a subclass of JTextComponent, so it can be dropped into any Swing application with ease.

…

Sister Projects

RSyntaxTextArea provides syntax highlighting, code folding, and many other features out-of-the-box, but when building a code editor you often want to go further. Below is a list of small add-on libraries that add more complex functionality:

  • AutoComplete - Adds code completion to RSyntaxTextArea (or any other JTextComponent).
  • RSTALanguageSupport - Code completion for RSTA for the following languages: Java, JavaScript, HTML, PHP, JSP, Perl, C, Unix Shell. Built on both RSTA and AutoComplete.
  • SpellChecker - Adds squiggle-underline spell checking to RSyntaxTextArea.
  • RSTAUI - Common dialogs needed by text editing applications: Find, Replace, Go to Line, File Properties.

Getting Help

  • Add an issue on GitHub
  • Peruse the wiki
  • Check the project's home page

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Javacode-editorjava-swing-applicationssyntax-highlighting

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具