RSyntaxTextArea 2.5.4 Now Available

November 26th, 2014

RSyntaxTextArea 2.5.4 (and all of its sister projects) are now available on GitHub, Maven and SourceForge!  The biggest change for all projects is the migration from Ant to Gradle for builds.  The primary motivation for this was to make it easier to create artifacts to put into Maven Central, as well as to tinker with something new.  Thus, this is the first release where everything is available in Maven on day 1!  Moving forward, artifacts in Maven will be a standard part of the RSTA release process.

But besides Maven integration, some other goodies were added too, such as syntax highlighting and code folding for Dart and D, as well as simple code completion for XML files.  Check it out!

Code Completion in XML

October 10th, 2014

I’ve been really, really lazy with adding code completion via DTDs and/or schemas for XML in RSTALanguageSupport, so in the meantime I decoded to add a simpler element/attribute completion scheme.

If you grab the latest from Git, RSTALanguageSupport’s XML support will now offer code completion suggestions for XML element and attribute names:

XML Element Completion

XML Element Completion

How does it decide what to suggest?

For element names, it scans the editor’s contents for any other elements that start with the prefix you’ve typed so far.  For attributes, it scans for other places where you’ve completed an element of the type you’re adding an attribute for; it then suggests any attributes you’ve used for that element elsewhere in the file (and haven’t currently used in the current element):

XML Attribute Completion

XML Attribute Completion

This kind of completion support is pretty handy when you’re editing a larger document, and know you’ve done “the right thing” elsewhere in the file, but cannot recall what it is offhand.  Just let RSTA tell you what to type.  :)

 

D support added to RSyntaxTextArea

September 13th, 2014

RSyntaxTextArea now supports syntax highlighting and code folding for D.  Nestable comments are handled properly.  The screenshot below shows some of D’s unique syntax features:

D syntax highlighting

D syntax highlighting

Dart Support added to RSyntaxTextArea

September 1st, 2014

Syntax highlighting and code folding has just been added for Dart.  Dart aficionados, clone the RSTA repo and let me know if I’ve missed anything with the highlighting!

Dart Support

Dart Support

RSyntaxTextArea: Paste from Clipboard History

August 29th, 2014

Just committed to Git is a new feature:  Clipboard History.  Pressing Ctrl+Shift+V (Cmd+Shift+V on OS X) will cause the “clipboard history” popup to appear below the current caret position:

Clipboard History

Clipboard History

This popup displays the most recent snippets of text added to the clipboard.  This allows you to paste any text that was *recently* on the clipboard, not just what’s *currently* in the clipboard buffer.  This is pretty useful if you’re a frequent copy-paster.

The clipboard history is implemented as a singleton instance of the org.fife.ui.rtextarea.ClipboardHistory class.  You can access it, but currently the only interesting thing you can do is set its maximum size.  By default, it only remembers the 12 most recent entries on the clipboard that can be interpreted as plain text.

RSyntaxTextArea in a JavaFX app

August 5th, 2014

While I’ll certainly not put much time into learning JavaFX, I did poke around at it a little, and it is a nice API.  It’s better designed than Swing, and easier to write clean code in.  In any case, I decided to see how RSyntaxTextArea worked in a JavaFX app, now that JavaFX 8 “fully” supports embedding Swing components into JavaFX apps.

It was pretty easy to do, and at first glance, worked great:

RSTA in JavaFX

RSTA in JavaFX

However, I hit a big snag:  When I resized the window, (what seemed like) every other repaint resulted in everything *but* the Swing content being unpainted!

RSTA in JavaFX - Flicker

RSTA in JavaFX – Flicker

I say every other repaint, because slowly resizing the window you would see constant flicker, between blackness instead of JavaFX rendering, and the JavaFX goodness you were supposed to see.

I took out the RSyntaxTextArea, this does not happen.  So this does not seem to occur in JavaFX apps with no Swing embedded in them.

I added in a JButton instead of the RSyntaxTextArea.  The flicker did not happen.  So it seems to not be all Swing content that does this.

I replaced the JButton with a JTextArea.  The flicker came back.  Okay, so it’s only *certain* Swing components.

Note that there is flicker with stand-alone JTextAreas/RSyntaxTextAreas; JScrollPanes don’t have to be in the equation to see this issue.

So what’s the deal?  Somehow certain Swing content causes the JavaFX rendering pipeline to bug out.

RText 2.5.3 Released!

July 22nd, 2014

RText 2.5.3 was released on GitHub!  Precompiled binaries for major OSes are on SourceForge, as usual.  Here’s what’s new:

  1. JavaScript macros now work with Java 8+, in addition to Java 6 and 7 (updates to support Nashorn properly).
  2. Improvements to PHP syntax highlighting.
  3. In HTML and XML, “mark occurrences” should match tag names even when the caret is in an attribute, not just when it is in the tag name itself.
  4. Java syntax highlighting updated for Java 8 classes, interfaces, and enums.
  5. SQL: Matching opening/closing parens are now highlighted.
  6. Groovy macros now use Groovy 2.3.3.

 

RSyntaxTextArea 2.5.3 Released!

June 29th, 2014

RSyntaxTextArea 2.5.3 was just released on GitHub!  Here’s what’s new:

RSyntaxTextArea:

  1. Improvements to PHP syntax highlighting.
  2. In HTML and XML, “mark occurrences” should match tag names even when the caret is in an attribute, not just when it is in the tag name itself.
  3. Java syntax highlighting updated for Java 8 classes, interfaces, and enums.
  4. SQL: matching opening/closing parens are now highlighted.
  5. Fixed several bugs.

AutoComplete:

  • Only minor changes to support/stay in sync with RSyntaxTextArea 2.5.3.

RSTAUI:

  • Only minor changes to support/stay in sync with RSyntaxTextArea 2.5.3.

RSTALanguageSupport:

  1. Improvements to CSS code completion.
  2. Improvements to PHP code completion.  Documentation for many functions is now included.
  3. JavaScriptOutlineTree now understands basic JavaScript OO paradigms much better.

SpellChecker:

  • Only minor changes to support/stay in sync with RSyntaxTextArea 2.5.3.

TokenMakerMaker:

  • Added “Recent Files” sub-menu to the File menu.
  • Added an option to install a theme on the RSTA editor when previewing changes to a TokenMaker.
  • Bumped version number in the About dialog to “1.0″ to match that in the documentation.

Enjoy!

 

JavaScript Outline Tree is getting smarter

June 8th, 2014

The JavaScriptOutlineTree class is getting smarter in the next release of RSTALanguageSupport.

As previously reported a little while ago, the outline tree has recently been able to recognize JS classes created by defining members on a prototype.  That functionality has just been extended in a couple of ways:  first, defining an entire prototype at once is now handled correctly (e.g. adding all fields to a prototype at once):

Recognizing prototypes

Recognizing prototypes

Next, Object.create() is parsed properly; all property descriptors passed in as the second argument to the method are properly added to the desired prototype:

Recognizing Object.create()

Recognizing Object.create()

Further, as the JS parser is smart enough to figure this stuff out now, you can quickly navigate to these newly-identified class members via Ctrl+Shift+O.  Pretty nice!

Only a couple of new things might get added before the next release – code completion for built-in objects such as Math, Object, JSON, etc.  Beyond that, I’d like to add some form of language support for Angular and possibly jQuery, but we’ll see.  As a large part of the JS language support was written by someone other than myself, who hasn’t been active recently, it might take a little bit of time for me to figure out the best way to add such features in (the JS language support is currently designed to support code completion for server-side scripting as well as browser-based JS work, so things aren’t as simple as they might seem).

RText 2.5.2 Released

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!