Archive for December, 2008

AutoComplete added to Subversion

Wednesday, December 24th, 2008

I’ve gone ahead and added the AutoComplete project and its demo project to the RSyntaxTextArea Subversion repository.  Consider this to be a very early preview release.  Feedback is more than welcome, but please keep in mind that this is very much a work in progress!

AutoComplete can work on any JTextComponent.  It does not require RSyntaxTextArea.  But moving forward, it will come with built-in support for RSyntaxTextArea (it will be able to key off of its document parsing to deliver more intelligent completion choices, for example).  But feel free to use it in JTextFields or whatever else you want to use it in.

Javadoc for this early preview is here.  Check out the AutoCompleteDemo application for example usage.  The current simplest usage (just completion of simple words) is:


String[] words = new String[] { "aardvark", "angela", "apparel", "apple", "axe" };
WordCompletionProvider provider = new WordCompletionProvider(words);
AutoCompletion ac = new AutoCompletion(provider);
ac.setShowDescWindow(false);
ac.install(myTextComponent);

This will add autocompletion support for the words in the words array to myTextComponent. Simple as that. AutoCompleteDemo is a more complex example, providing autocompletion for the standard C library, complete with summaries of each method (see the screenshots below).

The code only requires Java 1.4 or greater to run, so practically everyone should be able to use it.  The license is LGPL, just like RSyntaxTextArea.

More Autocompletion progress

Tuesday, December 23rd, 2008

There’s been more autocompletion progress. It’s been mostly dirty work (making the API flexible, etc.), but there have been some cool new features added as well. First off, the rendering of autocompletion choices is now completely configurable, using standard ListCellRenderers. There will be a standard renderer that will try to nice things up a little for standard procedural and OO languages. Also, the completion and description windows are now resizable! This is a big usability improvement.

Here’s an updated screenshot of how things are looking now:

Autocompletion preview 2

Autocompletion preview 2

Autocompletion – Coming Soon!

Friday, December 19th, 2008

Here’s a little teaser…

Autocompletion Preview

Autocompletion Preview

Pretty nice huh?  It was easier to get basic autocomplete up and running in RSyntaxTextArea than I thought.  This will be an add-on library for RSTA, as not everybody will want or need this feature, and I’m trying to keep the core editor’s size down to a minimum.

It’s definitely still got some bugs and quirks, but it’s already in a usable state.  The project will get added to the RSTA Subversion repository once it’s a little more fully cooked.

RSyntaxTextArea Example Archive Started

Saturday, December 13th, 2008

I’ve created a new section to the RSyntaxTextArea site – an Examples page. This section will contain many examples on how to integrate RSyntaxTextArea into your project. It already has its first example – a standalone Java syntax highlighter.

The first round of examples will be for the latest stable release, 1.1. There is a fair amount of API changing in 1.2, so soon there will also be the exact same examples “ported” to 1.2.

Also note that the source code for the examples is available as a download of Eclipse projects. This makes it easy for you to just grab something and play around with it, to see how things work.

More examples will be added very soon, so stay tuned!

Fifesoft blog is online!

Tuesday, December 9th, 2008

Welcome to the fifesoft.com blog!  Here we’ll post about new projects, updates to existing projects, and more.  Hopefully this won’t become one of those abandoned blogs with only “I’m still alive” posts several months apart…