Archive for the ‘RText’ Category

RText 2.5.2 Released

Friday, March 14th, 2014

RText 2.5.2 has been released on SourceForge and GitHub!  This release primarily brings the goodness from the RSTA libraries’ 2.5.2 update.  Here’s what’s new:

  • You can now configure RText to use JSHint for JavaScript error checking.
  • Added .htaccess file syntax highlighting.
  • Auto-indentation improved for file types with multiple “languages,” for example, CSS and JavaScript in an HTML file.
  • Updated RSyntaxTextArea libraries to 2.5.2.

Enjoy!

RSyntaxTextArea and RText 2.5.1 released!

Wednesday, November 13th, 2013

Both RSyntaxTextArea (and its sister projects) and RText have brand new 2.5.1 releases available on GitHub and SourceForge!  The RSTA updates fixed a couple of bugs that had crept into the library in the 2.5.0 release.  RText (which hasn’t seen an update in a few months) is now using the latest, greatest RSTA libraries, which also means it’s using the slick new search toolbars I blogged about previously.

Check ‘em out!

RText 2.0.7 Released

Tuesday, May 7th, 2013

RText 2.0.7 was released last weekend on SourceForge!  Here’s a list of what changed:

  1. Pretty-printing now works for JSON in addition to XML and HTML.
  2. The system console plugin now auto-completes file names on pressing tab.
  3. HTML, PHP, and JSP have new option, “Automatically add closing tags for HTML tags that require them,” as well as enhanced syntax highlighting.
  4. The text editor now includes an option to use the system selection colors for selected text and its background.
  5. The file chooser and File System Tree plugin now include “Paste” option to copy/paste file lists.
  6. Added Visual Basic syntax highlighting.
  7. Various code editor fixes and performance improvements.

Happy coding!

 

JSON Pretty-Printing

Sunday, February 24th, 2013

If you do any work with JSON, you may well run into scenarios where you’re looking at some data for debugging purposes, but can’t make heads or tails of it because it’s either all on one line, not indented, or otherwise simply poorly formatted.  With the upcoming RText 2.0.7 release, this will no longer be a problem.  Its “Tidy” plugin (now being rebranded to “Pretty Printing”, since it’s a more general term) is gaining JSON pretty-printing support, powered by the jsonbeans library.

You’ll be able to control the indentation style (either tabs, or some number of spaces), as well as the actual format of the output.  The format choices are:

  • JSON:  Strict adherence to the JSON standard, keys wrapped in double quotes.
  • JavaScript:  Formatting appropriate for a JavaScript object – quotes around appropriate values, but not around keys.
  • Minimal:  No double quotes around anything.  Useful if you want the data in as simple of a format as possible, even if it isn’t technically valid.

Simply set up your formatting preferences in the Pretty Printing Options dialog panel:

JSON Formatting Options

JSON Formatting Options

And when editing JSON, simply select Edit -> Pretty Printing.  Simple as that.  Don’t forget that a shortcut can be assigned to this menu item via the “Shortcuts” panel in the Options dialog if you use it frequently.

RText 2.0.6 Released

Saturday, January 26th, 2013

RText 2.0.6 was just released!  Here’s a rundown of the major changes:

Syntax highlighting and code folding for JSON.  Folks doing a lot of work with web applications will appreciate this.

JSON Support in RText

JSON Support in RText

Improvements to the UI when a Substance Look and Feel is installed.  All trees and lists now use Substance’s striping and rollover effects, and colors used in miscellaneous custom components were tweaked to better fit in with the current Substance skin.

Substance in AutoComplete Popups

Substance in AutoComplete Popups

Fixed a ClassCastException when adding a JRE in the Java options panel.  This was bug 3600567, and was accidentally introduced with the last refactoring of the Java language support.

Updated the Turkish and French localizations.  Thanks to Burak and Pat!

A major side effect of the improved Substance support is that compilation is now done in two phases.  RText has always only required Java 1.4, but Substance requires Java 6 or newer (we’re actually shipping with Insubstantial, which is an active fork of Substance, since the original author stopped working on it).  To get around this, all of the “core” RText classes are built with Java 1.4, and all of the classes requiring Substance are built with Java 6; these classes are only referenced from the application via reflection to avoid a hard dependency.  If Java 1.4 or Java 5 is detected, RText will never load anything Substance related.

When will RText drop support for 1.4?  Probably not for awhile, especially when I can easily use functionality in newer versions easily enough via reflection as I’m currently doing (and only then for Substance, opening a browser/system editors for files, and for the scripting API).  And performance improvements are received via simply running in a newer JVM, not from compiling with one.  Perhaps when Java 8 GA is released this September, it might be time to consider moving to Java 5.  :)

Anyway, the list of new features going into the next release is already growing!  More on that soon.

 

RText 2.0.5.1 Released

Monday, December 24th, 2012

RText 2.0.5.1 was released earlier this week on SourceForge.  This was a minor release (no real new features) that will nevertheless be a very important update for some users.  Here’s what was new:

  1. Updated to RSyntaxTextArea 2.0.5.1, which fixes a keyboard issue with non-QWERTY keyboards.
  2. Several Substance skins are now available as LookAndFeels. Thanks to the Insubstantial project (https://github.com/Insubstantial/insubstantial). These Look and Feels are only available when running RText with Java 6 or newer.
  3. Updated the Spanish (Leonardo) and Arabic (Mawaheb) translations.

Basically, this release was just to have an RText that fixed the keyboard issue introduced with RSTA 2.0.5.  Including Insubstantial (i.e. Substance) was just a bonus.  Only very recently had a couple of important issues been fixed that made it usable in a project such as RText.  I’m hesitant to ship Substance with any project, since in my (albeit limited) experience it’s been very touchy (stuff like breaking in *point releases*, not even major ones), but since the core Swing library isn’t really updated any longer, I think things are stable enough these days to give it a try.

RText 2.0.5 Released

Thursday, November 29th, 2012

RText 2.0.5 has been released!  This release brings it up to date with all of the reatures added to RSyntaxTextArea 2.0.5, plus more cool stuff.  Here’s what’s new:

  • Code folding added for HTML, JSP, and PHP.
  • Added NSIS syntax highlighting and code folding.
  • Added a “Projects” docked window. Useful for organizing small programming projects while working in RText.
  • Added code folding and highlighting of multi-line strings for Scala.
  • Added Java 7 features to Groovy highlighting (underscores in numeric literals, binary literals, and new core classes/interfaces/enums).
  • Fixed an issue with CompleteMarkupTagAction and ToggleLineCommentAction conflicting with each other only on *nix (Windows and OS X didn’t have this issue).
  • Fixed possible NPE when editing XML on Linux only (!).
  • RText is now building on OS X once again.
  • Now ships with Groovy 1.8.8, so you no longer have to drop in your own groovy-all-xxx.jar to run Groovy macros in RText.
  • Wildcards are now permitted in the Go To Member dialog.
  • Added keyboard shortcuts for moving through docked window groups (Ctrl+Alt+arrow keys).
  • Updated translations – Chinese (peter_barnes), Russian (Nadiya), Italian (Argaar), German (Domenic), Korean (Changkyoon), Japanese (Josh), and Hungarian (Zityi).

Go check it out!

Project Support in RText

Tuesday, September 18th, 2012

The next release of RText will include support for projects.  Projects are collections of files logically grouped together, usually a part of the same application if you’re a developer.

The project support will be not be of the same scope as projects in Eclipse, NetBeans, or Visual Studio.  Rather, RText will take the approach used by other “programmer’s editors.”

The main UI component of projects support is the “Projects” docked window.  By default it is docked on the left-hand side of RText:

Projects Support Main Panel

Projects Support Main Panel

The root node in the tree view is the current workspace.  A workspace is simply a collection of zero or more projects.  This allows you to logically group projects that are related, for example.

Workspaces are loaded and saved as XML files.  On startup, RText loads the last project you had open.  You can create a new workspace, or open an existing one, via the docked window’s popup menu:

Open an Existing Project

Open an Existing Project

Opening another workspace  automatically saves the currently open one; this way, you don’t have to worry about manually saving your workspaces or projects.

Adding a new Project to the workspace is as easy as right-clicking, selecting “New Project…”, and giving the project a name.  You can use any characters you want in project names, as they aren’t represented by a physical file or folder (they’re simply “metadata” in the parent workspace’s XML).

In each project you create, you can add Files, Folders, and Logical Folders via the context menu:

Adding an Item to a Project

Adding an Item to a Project

The “Add Files…” menu item allows you to add one or more files to the project.  Again, the files in a project don’t need to live in a common parent directory, since the project is a logical grouping of files and folders.

The “Add Folder…” menu item allows you to add an entire folder to the project.  Not only that, but you can filter what files are displayed in the project UI.  So you could only dispaly *c, *.cpp, and *.h files, for example, or filter out “CVS” folders or *.bak files.

Finally, “Add Logical Folder…” adds a folder to the project that doesn’t actually exist on disk, but you can still add files, folders, and other logical folders to it.  Think of it as an extra organizational tool; you can logically group files in the UI with logical folders.

That’s it in a nutshell.  The plugin is fully integrated with RText – double-clicking a file opens it in an editor, you can delete or rename files directly from the plugin tree view, etc.  It’s already in SVN, so check it out and see what you think!

RText 2.0.4 Released!

Friday, September 7th, 2012

RText 2.0.4 was released today on SourceForge!  See also the Javadoc and SVN repository.  This release basically provides all the new functionality in the 2.0.4 release of RSyntaxTextArea (including the Asian language fix in 2.0.4.1) and fixes a couple of bugs.

I’ve been coming up with a list of changes in the 2.0.5 releases of RSTA and RText.  Look for a blog outlining them in a week or so.  Suggestions are of course welcome!

RText 2.0.3 Released

Saturday, May 5th, 2012

RText 2.0.3 was just released on SourceForge!  It’s based off of the recent 2.0.3 release of RSyntaxTextArea.  Here’s what’s new:

  • Added code folding for several languages, including C, C++, Java, Perl, XML, Groovy, C#, JavaScript, MXML, CSS and LaTeX.
  • Dockable window panels are now collapsible, allowing you to allot more screen real estate to the editors when necessary.
  • Added LaTeX syntax highlighting and code folding.
  • Added DTD syntax highlighting.
  • Added “Go to Member” shortcut (Ctrl+Shift+O) similar to Eclipse. Currently only for Java, JavaScript, and XML.
  • The Source Browser’s tree view of source code is now sortable.
  • License changed to modified BSD from GPL.  This allows folks to use pieces of RText without making their entire application GPL.

In short: code folding, more languages supported, and more liberal license.

Unfortunately, my MacBook is on the fritz, so I can’t create a Mac app bundle at the moment.  As soon as I can get this resolved, a Mac bundle will get uploaded to SourceForge.  Until then, folks on OS X can use the *nix bundle if necessary (it’s just a gzipped install).