Archive for September, 2012

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!

RSyntaxTextArea 2.0.4.1 Released

Friday, September 7th, 2012

I usually don’t do such quick follow-up releases, but 2.0.4 introduced a font rendering bug that caused many Asian fonts to not be rendered properly out-of-the-box (at least on Windows).  This has been corrected in release 2.0.4.1 on SourceForge.  If your product has non-English speaking users it’s probably a good idea to upgrade to this release.

RSyntaxTextArea 2.0.4 Released

Sunday, September 2nd, 2012

RSyntaxTextArea 2.0.4 was just released!  Grab it either from SourceForge or SVN (see also web viewer, javadoc).  This release updates RSTA as well as the sister projects AutoComplete, RSTALanguageSupport, and SpellChecker, and adds yet another sister project:  RSTAUI!  Here’s the complete list of what’s new:

All:

  • Updated translations:  Chinese (peter_barnes), Russian (Nadiya), Polish (Chris), Spanish (Leonardo), Brazilian Portuguese (Pat), and Korean (Changkyoon).
  • Removed superfluous build warnings from projects when building with Ant 1.8+ (includeantruntime).

RSyntaxTextArea:

  • HTML, JSP, and PHP syntax highlighting now also highlight embedded CSS.
  • Background color highlighting for “secondary” languages (such as CSS and JS in HTML, JSP, and PHP).
  • Added code folding for Lisp and Clojure.
  • Minor Clojure syntax highlighting updates.
  • Changed default font to Consolas on Windows Vista and 7.
  • Decreased memory usage required for regex find and replace operations.
  • Improved performance of Mark Occurrences, especially when there are lots and lots of marked occurrences.
  • Added E4X highlighting to JavaScriptTokenMaker (can toggle on and off via a static property).
  • Added a property so that, when bracket matching is enabled, you can choose to have both brackets highlighted instead of just the “opposite” one.
  • Fix to RTextScrollPane class to facilitate using it in the NetBeans GUI designer.
  • Fixed misaligned icons in row header when code folding is enabled.
  • Fixed bug: FoldManager incorrectly auto-expanded deeply-nested folds for some edits that did not affect those folds.
  • Fixed bug: wrong initial width of line number margin when calling Gutter#setLineNumberingStartIndex(int).
  • GoToMemberWindow: Fixed occasional NPE.
  • TextEditorPane: Fixed bug: clear undo stack and dirty state when “loading” a new file.
  • TextEditorPane: Now automatically scrolls to top of file on load().
  • Fixed bug: NPE in DumbCompleteWordAction in some circumstances (whitespace at beginning of file).
  • TokenMakerFactory now allows user-defined TokenMakers to be loaded via different ClassLoaders.

AutoComplete:

  • Added template completions.  You can now create completions for constructs that have arbitrary structure and take any number of parameters, such as for-loops and other common boilerplate code.
  • Fixed memory leak when uninstalling AutoCompletes from text areas.

RSTALanguageSupport:

  • Tremendous updates to JavaScript code completion and syntax checking, all done by steve.  We now use Rhino 1.7R4 for parsing.  JS is now by far the best-supported language in RSTALanguageSupport.
  • JavaLanguageSupport: Much better display of Javadoc links in Javadoc completion popup.

RSTAUI:

  • New (optional) library providing fully functional, localized dialogs for Find and Replace operations in RSyntaxTextArea.  Supports searching forward and backward, regex searching, match case, mark all, and replace all.  The actual search operations are delegated to the RSTA library’s built-in SearchEngine class.
  • More common dialogs will be added to this library in the next release.  More information about this in a future blog post!