Skip to content
Commits on Source (16)
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="i18n"/>
<classpathentry kind="src" path="test"/>
<classpathentry kind="src" path="themes"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="src" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
<classpathentry exported="true" kind="con" path="org.springsource.ide.eclipse.gradle.classpathcontainer"/>
<classpathentry kind="con" path="org.springsource.ide.eclipse.gradle.dsld.classpathcontainer"/>
<classpathentry kind="con" path="GROOVY_DSL_SUPPORT"/>
<classpathentry kind="con" path="GROOVY_SUPPORT"/>
<classpathentry kind="output" path="bin"/>
</classpath>
.pc
ant-classes
bin
dist
javadoc
rsyntaxtextarea_*.zip
*.java~
build
.gradle
/.settings/
......@@ -12,6 +12,8 @@
</buildCommand>
</buildSpec>
<natures>
<nature>org.springsource.ide.eclipse.gradle.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
</natures>
</projectDescription>
#org.springsource.ide.eclipse.gradle.core.preferences.GradleProjectPreferences
#Fri Apr 24 23:23:42 EDT 2015
build.family.org.gradle.tooling.model.eclipse.HierarchicalEclipseProject=;
org.springsource.ide.eclipse.gradle.classpath.enableSorting=true
org.springsource.ide.eclipse.gradle.classpath.jar.remap.gradle.to.maven=true
org.springsource.ide.eclipse.gradle.linkedresources=
org.springsource.ide.eclipse.gradle.rootprojectloc=
#org.springsource.ide.eclipse.gradle.core.actions.GradleRefreshPreferences
#Sat Jul 19 01:32:42 EDT 2014
enableDSLD=true
env:
- DISPLAY=:99.0
# xvfb is required to simulate a windowing system for Swing GUI tests.
# http://ecmendenhall.github.io/blog/blog/2013/05/28/two-travis-ci-solutions/
before_install:
- "/bin/sh -e /etc/init.d/xvfb start"
# Oldest JDK supported by Travis CI
jdk:
- openjdk6
script:
- ./gradlew assemble -x signArchives -x uploadArchives
- ./gradlew check
# Update coverage info on coveralls.io
after_success:
- ./gradlew jacocoTestReport coveralls
[![Build Status](https://travis-ci.org/bobbylight/RSyntaxTextArea.svg?branch=master)](https://travis-ci.org/bobbylight/RSyntaxTextArea)
[![Coverage Status](https://coveralls.io/repos/bobbylight/RSyntaxTextArea/badge.svg)](https://coveralls.io/r/bobbylight/RSyntaxTextArea)
RSyntaxTextArea is a customizable, syntax highlighting text component for Java Swing applications. Out of
the box, it supports syntax highlighting for 40+ 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](https://github.com/bobbylight/RSyntaxTextArea/wiki) via tools such as [JFlex](http://jflex.de).
RSyntaxTextArea is available under a [modified BSD license](https://github.com/bobbylight/RSyntaxTextArea/blob/master/src/main/dist/RSyntaxTextArea.License.txt).
For more information, visit [http://bobbylight.github.io/RSyntaxTextArea/](http://bobbylight.github.io/RSyntaxTextArea/).
Available in the [Maven Central repository](http://search.maven.org/#search%7Cga%7C1%7Crsyntaxtextarea%20jar) (`com.fifesoft:rsyntaxtextarea:XXX`).
# Building
RSyntaxTextArea uses [Gradle](http://gradle.org/) to build. To compile, run
all unit tests, and create the jar, run:
./gradlew build
Note that RSTA only requires Java 5. To that end, the boot classpath will be set to accommodate
this if a variable `java5CompileBootClasspath` is set to the location of `rt.jar` in a Java 5 JDK.
This can be added to `<maven-home>/gradle.properties` if desired, to avoid diffs in the project's
`gradle.properties`.
When building with Java 8 or later, the `javadoc` task currently prints many warnings about Javadoc
"issues." This is because
[doclint](http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html)
is enabled by default in that release of Java. These warnings are harmless, and in a future
release will be cleaned up.
# Example Usage
RSyntaxTextArea is simply a subclass of JTextComponent, so it can be dropped into any Swing application with ease.
```java
import javax.swing.*;
import org.fife.ui.rtextarea.*;
import org.fife.ui.rsyntaxtextarea.*;
public class TextEditorDemo extends JFrame {
public TextEditorDemo() {
JPanel cp = new JPanel(new BorderLayout());
RSyntaxTextArea textArea = new RSyntaxTextArea(20, 60);
textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
textArea.setCodeFoldingEnabled(true);
RTextScrollPane sp = new RTextScrollPane(textArea);
cp.add(sp);
setContentPane(cp);
setTitle("Text Editor Demo");
setDefaultCloseOperation(EXIT_ON_CLOSE);
pack();
setLocationRelativeTo(null);
}
public static void main(String[] args) {
// Start all Swing applications on the EDT.
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new TextEditorDemo().setVisible(true);
}
});
}
}
```
# 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](https://github.com/bobbylight/AutoComplete) - Adds code completion to RSyntaxTextArea (or any other JTextComponent).
* [RSTALanguageSupport](https://github.com/bobbylight/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](https://github.com/bobbylight/SpellChecker) - Adds squiggle-underline spell checking to RSyntaxTextArea.
* [RSTAUI](https://github.com/bobbylight/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](https://github.com/bobbylight/RSyntaxTextArea/wiki)
* Ask in the [project forum](http://fifesoft.com/forum/)
* Check the project's [home page](http://bobbylight.github.io/RSyntaxTextArea/)
['java', 'osgi', 'distribution', 'maven', 'signing'].each { apply plugin: it }
// Jacoco and a coveralls upload plugin needed for publishing coverage results
['jacoco', 'com.github.kt3k.coveralls'].each { apply plugin: it }
group = 'com.fifesoft'
archivesBaseName = 'rsyntaxtextarea'
dependencies {
testCompile 'junit:junit:4.11'
}
// Regenerate local gradlew
task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}
// Add coveralls plugin to this build's classpath
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1'
}
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
compileJava {
sourceCompatibility javaVersion
targetCompatibility javaVersion
options.debug = true
options.debugOptions.debugLevel = 'source,vars,lines'
// Most folks will compile with the latest JDK available, but official builds
// use a Java 5 JDK. Add this property to gradle.properties for boot classpath
if (project.hasProperty('java5CompileBootClasspath')) {
if (new File(java5CompileBootClasspath).isFile()) {
println "Bootstrap classpath when compiling Java: ${java5CompileBootClasspath}"
options.bootClasspath = java5CompileBootClasspath
}
else {
println "Warning: Specified java5CompileBootClasspath does not exist: ${java5CompileBootClasspath}"
}
}
options.compilerArgs << "-Xlint:deprecation"
}
ext.sharedManifest = manifest {
attributes('Specification-Title': 'RSyntaxTextArea',
'Specification-Version': version,
'Implementation-Title': 'org.fife.ui',
'Implementation-Version': version,
// Not sure why Require-Capability is not being added by the osgi plugin...
'Require-Capability': 'osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=' + javaVersion + '))"')
}
jar {
manifest { from sharedManifest }
}
// We use "distributions" to create the zip files uploaded to SourceForge
distributions {
main {
baseName = 'rsyntaxtextarea'
contents {
from { [ 'build/libs', 'distfiles' ] }
rename 'RSyntaxTextArea-.*\\.jar', 'rsyntaxtextarea.jar'
}
}
src {
baseName = 'rsyntaxtextarea'
}
}
distZip.classifier = null
distZip.dependsOn jar
srcDistZip.classifier = 'src'
srcDistZip {
from projectDir
include 'src/**/*'
include 'build.gradle'
include '.classpath'
include '.project'
include 'gradle.properties'
include 'gradle/**/*'
include 'gradlew*'
include 'README.md'
include '.settings/**'
}
task buildSourceForgeZips << {
println "Building zip files for SourceForge"
}
buildSourceForgeZips.dependsOn clean, jar, distZip, srcDistZip
// Stuff to generate and upload Maven artifacts
task javadocJar (type: Jar, dependsOn: javadoc) {
manifest { from sharedManifest }
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourceJar (type: Jar) {
manifest { from sharedManifest }
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives jar, javadocJar, sourceJar
}
signing {
// Don't require signing for e.g. ./gradlew install
required { gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
repositories {
mavenCentral()
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
if (project.hasProperty('upload') && Boolean.parseBoolean(upload)) { // gradlew -Pupload=true
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/') {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
}
else {
repository(url: 'file:///' + projectDir + '/../localMavenRepo')
}
pom {
groupId = 'com.fifesoft'
name = 'rsyntaxtextarea'
project {
parent {
groupId 'org.sonatype.oss'
artifactId 'oss-parent'
version '7'
relativePath ''
}
groupId 'com.fifesoft'
artifactId 'rsyntaxtextarea'
packaging 'jar'
name 'rsyntaxtextarea'
description 'RSyntaxTextArea is the syntax highlighting text editor for Swing applications. ' +
'Features include syntax highlighting for 40+ languages, code folding, code completion, ' +
'regex find and replace, macros, code templates, undo/redo, line numbering and bracket ' +
'matching.'
inceptionYear '2003'
url 'http://www.fifesoft.com/rsyntaxtextarea/'
licenses {
license {
name 'Modified BSD License'
url 'http://fifesoft.com/rsyntaxtextarea/RSyntaxTextArea.License.txt'
distribution 'repo'
}
}
scm {
url 'https://github.com/bobbylight/RSyntaxTextArea'
connection 'scm:git:git://github.com/bobbylight/RSyntaxTextArea'
developerConnection 'scm:git:git@github.com:bobbylight/RSyntaxTextArea'
if (!project.version.endsWith('-SNAPSHOT')) {
tag project.version
}
}
developers {
developer {
name 'Robert Futrell'
url 'http://www.fifesoft.com'
organization = 'Fifesoft' /* https://issues.gradle.org/browse/GRADLE-1200 */
organizationUrl 'http://www.fifesoft.com/'
roles {
role 'architect'
role 'developer'
}
timezone '0'
}
}
// Says to enforce 1.5 compatibility when building
// Doesn't work as of Gradle 2.0 due to a Groovy bug; see
// http://jira.codehaus.org/browse/GROOVY-7023
// For now, append it via XML directly
/*
build {
plugins {
plugin {
artifactId 'maven-compiler-plugin'
version '2.3.2'
executions {
execution {
id 'default-compile'
configuration {
source '1.5'
target '1.5'
}
}
}
}
}
}
*/
withXml {
def pluginNode = asNode().appendNode('build').appendNode('plugins').appendNode('plugin')
pluginNode.appendNode('artifactId', 'maven-compiler-plugin')
pluginNode.appendNode('version', '2.3.2')
def executionNode = pluginNode.appendNode('executions').appendNode('execution')
executionNode.appendNode('id', 'default-compile')
executionNode.appendNode('configuration').appendNode('source', '1.5').
parent().appendNode('target', '1.5')
}
}
}
}
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<!--
This is the Ant build script for rsyntaxtextarea.jar.
Available targets include:
1. compile: Compiles all org.fife classes into ${class-dir}.
2. make-jar: Creates the jar file.
3. make-source-zip: Creates a source zip file.
3. make-javadoc: Creates the javadoc for RSyntaxTextArea.
Author: Robert Futrell
Version: 1.5
Date: 11aug2013
-->
<project name="RSyntaxTextArea" default="make-jar" basedir=".">
<description>RSyntaxTextArea build file</description>
<!-- Set global properties for this build. -->
<property name="version" value="2.5.0"/>
<property name="source-dir" location="src"/>
<property name="class-dir" location="ant-classes"/>
<property name="dist-dir" location="dist"/>
<property name="doc-dir" location="javadoc"/>
<property name="debug" value="true"/>
<property name="debuglevel" value="lines,vars,source"/>
<property name="java-level" value="1.5"/>
<!-- Compiles the classes. -->
<target name="compile" description="Compile the source">
<echo>Compiling with java: ${java.runtime.version}</echo>
<delete includeEmptyDirs="true" quiet="true" dir="${class-dir}"/>
<mkdir dir="${class-dir}"/>
<javac srcdir="${source-dir}" destdir="${class-dir}"
deprecation="yes" debug="${debug}" debuglevel="${debuglevel}"
source="${java-level}" target="${java-level}" includeantruntime="false"/>
</target>
<!-- Creates the jar file. -->
<target name="make-jar" depends="compile"
description="Create RSyntaxTextArea jar">
<delete includeEmptyDirs="true" quiet="true" dir="${dist-dir}"/>
<mkdir dir="${dist-dir}"/>
<jar destfile="${dist-dir}/rsyntaxtextarea.jar">
<fileset dir="${class-dir}"/>
<fileset dir="i18n"/>
<fileset dir="${source-dir}">
<include name="theme.dtd"/>
</fileset>
<manifest>
<attribute name="Specification-Title" value="RSyntaxTextArea"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Implementation-Title" value="org.fife.ui"/>
<attribute name="Implementation-Version" value="${version}"/>
<section name="RTextArea">
<attribute name="Specification-Title" value="RTextArea"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Implementation-Title" value="org.fife.ui.rtextarea"/>
<attribute name="Implementation-Version" value="${version}"/>
</section>
<section name="RSyntaxTextArea">
<attribute name="Specification-Title" value="RSyntaxTextArea-Core"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Implementation-Title" value="org.fife.ui.rsyntaxtextarea"/>
<attribute name="Implementation-Version" value="${version}"/>
</section>
</manifest>
</jar>
<copy todir="${dist-dir}">
<fileset dir="distfiles"/>
</copy>
</target>
<!-- Builds the source zip file. -->
<target name="make-source-zip" description="Builds the source zip file">
<zip destfile="./rsyntaxtextarea_${version}_Source.zip">
<fileset dir=".">
<include name="distfiles/**"/>
<include name="src/**"/>
<include name="i18n/**"/>
<include name="test/**"/>
<include name="themes/**"/>
<include name="build.xml"/>
<include name=".project"/>
<include name=".classpath"/>
</fileset>
</zip>
</target>
<!-- Builds the javadoc. -->
<target name="make-javadoc" depends="compile">
<javadoc destdir="${doc-dir}" author="true" version="true"
breakiterator="yes">
<packageset dir="${source-dir}" defaultexcludes="yes">
<include name="org/**"/>
</packageset>
</javadoc>
</target>
</project>
rsyntaxtextarea (2.5.8-1) unstable; urgency=medium
* Team upload.
* New upstream release
- Build with Gradle instead of Ant
* Fixed the build failure with Java 11 (Closes: #912394)
* Standards-Version updated to 4.2.1
* Switch to debhelper level 11
* Use salsa.debian.org Vcs-* URLs
* Track and download the new releases from GitHub
-- Emmanuel Bourg <ebourg@apache.org> Sat, 03 Nov 2018 23:11:52 +0100
rsyntaxtextarea (2.5.0-1) unstable; urgency=low
* new upstream release
......
......@@ -2,12 +2,19 @@ Source: rsyntaxtextarea
Section: java
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Uploaders: Vladimir Kotov <vladimir@kotov.lv>, Benjamin Mesing <ben@debian.org>
Build-Depends: debhelper (>= 9), javahelper (>= 0.4), maven-repo-helper, ant
Build-Depends-Indep: default-jdk, default-jdk-doc
Standards-Version: 3.9.4
Vcs-Git: git://git.debian.org/git/pkg-java/rsyntaxtextarea.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/rsyntaxtextarea.git
Uploaders:
Vladimir Kotov <vladimir@kotov.lv>,
Benjamin Mesing <ben@debian.org>
Build-Depends:
debhelper (>= 11),
default-jdk,
default-jdk-doc,
gradle-debian-helper,
javahelper,
maven-repo-helper
Standards-Version: 4.2.1
Vcs-Git: https://salsa.debian.org/java-team/rsyntaxtextarea.git
Vcs-Browser: https://salsa.debian.org/java-team/rsyntaxtextarea
Homepage: http://fifesoft.com/rsyntaxtextarea/
Package: librsyntaxtextarea-java
......
Format: http://dep.debian.net/deps/dep5/
Upstream-Name: RSyntaxTextArea
Upstream-Contact: Robert Futrell
Source: http://fifesoft.com/rsyntaxtextarea/
Source: https://github.com/bobbylight/RSyntaxTextArea
Files: *
Copyright: 2003-2013, Robert Futrell
......
javadoc /usr/share/doc/librsyntaxtextarea-java/api
\ No newline at end of file
build/docs/javadoc/ /usr/share/doc/librsyntaxtextarea-java/api
debian/pom.xml --no-parent --usj-name=rsyntaxtextarea
build/debian/rsyntaxtextarea.pom --no-parent --java-lib --usj-name=rsyntaxtextarea --artifact=build/libs/rsyntaxtextarea-*.jar
org.kt3k.gradle.plugin coveralls-gradle-plugin
#!/bin/sh -e
# called by uscan with '--upstream-version' <version> <file>
TAR=../rsyntaxtextarea_$2.orig.tar.gz
DIR=rsyntaxtextarea-$2.orig
unzip $3 -d $DIR
GZIP=--best tar -c -z -f $TAR $DIR
rm -rf $3 $DIR
# move to directory 'tarballs'
if [ -r .svn/deb-layout ]; then
. .svn/deb-layout
mv $TAR $origDir
echo "moved $TAR to $origDir"
fi
From: Benjamin Mesing <bensmail@gmx.net>
Date: Mon, 7 Oct 2013 21:18:31 +0200
Subject: =?UTF-8?q?Modified=20build.xml=20for=20debian=20specific=20settin?=
=?UTF-8?q?gs=0A-=20added=20clean=20target=0A-=20build=20java=20doc=0A-=20?=
=?UTF-8?q?link=20javadoc=20to=20system=20path?=
---
build.xml | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/build.xml b/build.xml
index e118d20..229e5c6 100644
--- a/build.xml
+++ b/build.xml
@@ -45,7 +45,7 @@
<!-- Creates the jar file. -->
- <target name="make-jar" depends="compile"
+ <target name="make-jar" depends="compile,make-javadoc"
description="Create RSyntaxTextArea jar">
<delete includeEmptyDirs="true" quiet="true" dir="${dist-dir}"/>
<mkdir dir="${dist-dir}"/>
@@ -100,12 +100,18 @@
<!-- Builds the javadoc. -->
<target name="make-javadoc" depends="compile">
<javadoc destdir="${doc-dir}" author="true" version="true"
- breakiterator="yes">
+ breakiterator="yes" windowtitle="RSyntaxTextArea API" doctitle="RSyntaxTextArea - ${version}">
<packageset dir="${source-dir}" defaultexcludes="yes">
<include name="org/**"/>
</packageset>
+ <link href="file:///usr/share/doc/default-jdk-doc/api" packagelistLoc="/usr/share/doc/default-jdk/api/" />
</javadoc>
</target>
+ <target name="clean">
+ <delete dir="${class-dir}" />
+ <delete dir="${dist-dir}" />
+ <delete dir="${doc-dir}" />
+ </target>
</project>
Description: Disables the coverall and jacoco plugins
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: not-needed
--- a/build.gradle
+++ b/build.gradle
@@ -1,6 +1,4 @@
['java', 'osgi', 'distribution', 'maven', 'signing'].each { apply plugin: it }
-// Jacoco and a coveralls upload plugin needed for publishing coverage results
-['jacoco', 'com.github.kt3k.coveralls'].each { apply plugin: it }
group = 'com.fifesoft'
archivesBaseName = 'rsyntaxtextarea'
@@ -24,13 +22,6 @@
}
}
-jacocoTestReport {
- reports {
- xml.enabled = true // coveralls plugin depends on xml format report
- html.enabled = true
- }
-}
-
compileJava {
sourceCompatibility javaVersion
targetCompatibility javaVersion