All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fife.rtext.plugins.macros.js.template.txt Maven / Gradle / Ivy

Go to download

RText is a powerful, cross-platform programmer's text editor written in Java. It is designed to be easy to use, highly customizable and flexible. Part of RText's design is for the source code to be simple, easy to understand, and well documented, so that other programmers can look into its inner-workings and figure out how RText ticks with ease. A good place to start (besides the source code) is the Javadoc for all classes used in the project.

There is a newer version: 2.0.7
Show newest version
/*
 * This is a Rhino (Javascript) macro for RText.
 *
 * Global variables include:
 *   - rtext:           The focused application window, an instance of
 *                      org.fife.rtext.RText.
 *   - textArea:        The active text area, an instance of
 *                      org.fife.rtext.RTextEditorPane.
 *
 * You can use the entire RText and RSyntaxTextArea public API's:
 *   http://javadoc.fifesoft.com/rtext/
 *   http://javadoc.fifesoft.com/rsyntaxtextarea/
 */
importPackage(java.lang, javax.swing);

textArea.append("\nThis is new text\n");
textArea.caretPosition = textArea.document.length;
JOptionPane.showMessageDialog(rtext, "Text has been appended!");




© 2015 - 2024 Weber Informatics LLC | Privacy Policy