<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Fifesoft Blog</title>
	<atom:link href="http://fifesoft.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://fifesoft.com/blog</link>
	<description>Another boring blog about software</description>
	<lastBuildDate>Wed, 08 Sep 2010 02:05:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>&#8220;Block Selection&#8221; branch added to RSyntaxTextArea SVN</title>
		<link>http://fifesoft.com/blog/?p=291</link>
		<comments>http://fifesoft.com/blog/?p=291#comments</comments>
		<pubDate>Tue, 07 Sep 2010 13:20:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RSyntaxTextArea]]></category>

		<guid isPermaLink="false">http://fifesoft.com/blog/?p=291</guid>
		<description><![CDATA[An oft-requested feature is block selection.  Unfortunately, this is pretty difficult to implement in Swing, for a couple of reasons. Swing&#8217;s text package keeps a lot of handy implementation hooks private and package-private. Swing&#8217;s text package&#8217;s idea of &#8220;selection&#8221; is pretty much hard-coded to mean &#8220;a contiguous range of text.&#8221; In Java 6, #1 above [...]]]></description>
			<content:encoded><![CDATA[<p>An oft-requested feature is <em>block selection</em>.  Unfortunately, this is pretty difficult to implement in Swing, for a couple of reasons.</p>
<ol>
<li>Swing&#8217;s text package keeps a lot of handy implementation hooks private and package-private.</li>
<li>Swing&#8217;s text package&#8217;s idea of &#8220;selection&#8221; is pretty much hard-coded to mean &#8220;a contiguous range of text.&#8221;</li>
</ol>
<p>In Java 6, #1 above has been (mostly) remedied, making it a good deal easier to implement this feature completely if your text component only supports Java 6+.  Unfortunately for us, RSyntaxTextArea supports from 1.4 up!</p>
<p>Because of this, adding block selection to RSTA will be tricky.  Fortunately, I&#8217;ve been motivated to finally put forth some effort to make this a reality.  I&#8217;ve added a <a href="http://svn.fifesoft.com/svn/RSyntaxTextArea/RSyntaxTextArea/branches/block_selection/">branch</a> in SVN specifically for exploring block selection, and already, a little progress has been made:</p>
<div id="attachment_295" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/09/block_selection_1.png"><img class="size-medium wp-image-295" title="Block Selection" src="http://fifesoft.com/blog/wp-content/uploads/2010/09/block_selection_1-300x240.png" alt="Block Selection" width="300" height="240" /></a><p class="wp-caption-text">Block Selection</p></div>
<p>Obvious issues include:</p>
<ul>
<li>Cut doesn&#8217;t work properly (though Copy does)</li>
<li>Drag-and-drop of a block selection doesn&#8217;t work (not sure this is possible, at least with pre-1.6)</li>
<li>Typing over a block selection doesn&#8217;t have the &#8220;expected&#8221; behavior of typing on all block-selected lines</li>
</ul>
<p>Hopefully more progress will be made soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://fifesoft.com/blog/?feed=rss2&amp;p=291</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RSyntaxTextArea 1.4.2 Released!</title>
		<link>http://fifesoft.com/blog/?p=270</link>
		<comments>http://fifesoft.com/blog/?p=270#comments</comments>
		<pubDate>Tue, 03 Aug 2010 03:27:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AutoComplete]]></category>
		<category><![CDATA[RSyntaxTextArea]]></category>

		<guid isPermaLink="false">http://fifesoft.com/blog/?p=270</guid>
		<description><![CDATA[Last night, RSyntaxTextArea 1.4.2 was released on SourceForge!  That includes new releases of RSyntaxTextArea as well as AutoComplete and SpellChecker.  This release was mostly about bug fixes and improvements in code completion behavior.  Here&#8217;s a quick list of all of the changes in this release. Groovy syntax highlighting updates (GDK Object methods, Java 5/6 java.lang [...]]]></description>
			<content:encoded><![CDATA[<p>Last night, RSyntaxTextArea 1.4.2 was <a href="https://sourceforge.net/projects/rsyntaxtextarea/">released on SourceForge</a>!  That includes new releases of RSyntaxTextArea as well as AutoComplete and SpellChecker.  This release was mostly about bug fixes and improvements in code completion behavior.  Here&#8217;s a quick list of all of the changes in this release.</p>
<ul>
<li>Groovy syntax highlighting updates (GDK Object methods, Java 5/6 java.lang classes, URL&#8217;s in comments)</li>
<li>A fix to prevent security exception when setting AA hint in an applet (thanks to Frederic in the forums)</li>
<li>Fixing positioning of FocusableTips and code completion windows on multi-monitor setups (thanks to grzlbrmft in the forums for the bug report and testing).  I&#8217;m personally jealous of everybody out there with a dual monitor setup, who got to experience this bug.  <img src='http://fifesoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
<div id="attachment_276" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/08/autocomplete.png"><img class="size-medium wp-image-276" title="AutoComplete Windows" src="http://fifesoft.com/blog/wp-content/uploads/2010/08/autocomplete-300x230.png" alt="AutoComplete Windows" width="300" height="230" /></a><p class="wp-caption-text">AutoComplete Windows</p></div></li>
<li>AutoComplete&#8217;s description window now updates itself in response to a selection change after a small delay (120ms) instead of immediately, to help performance for language supports with slower descriptions (e.g. file IO).  This mimics Eclipse&#8217;s behavior.</li>
<li>Added ActionScript syntax highlighting.  Perhaps now I have no excuse to play with this language.
<p><div id="attachment_272" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/08/actionscript.png"><img class="size-medium wp-image-272" title="ActionScript" src="http://fifesoft.com/blog/wp-content/uploads/2010/08/actionscript-300x188.png" alt="ActionScript" width="300" height="188" /></a><p class="wp-caption-text">ActionScript</p></div></li>
<li>Improved performance of auto-completion list cell renderer for huge completion lists.  Helps with languages with huge amounts of functions, such as PHP.</li>
<li>When using <a href="http://javadoc.fifesoft.com/rsyntaxtextarea/org/fife/ui/rtextarea/SearchEngine.html">SearchEngine</a>, if the next match isn&#8217;t currently visible, center the found/replaced text after the search operation.  This is a seemingly small change but is a nice usability improvement, and is seen in better editors like Eclipse.  For example, if your cursor is here:
<p><div id="attachment_273" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/08/SearchEngine_1.png"><img class="size-medium wp-image-273" title="Starting to Search" src="http://fifesoft.com/blog/wp-content/uploads/2010/08/SearchEngine_1-300x190.png" alt="Starting to Search" width="300" height="190" /></a><p class="wp-caption-text">Starting to Search</p></div>
<p>And you used SearchEngine#find() in RSTA 1.4.1 to find the next instance of &#8220;clip&#8221;, the next instance would be selected and brought into the visible area like so:</p>
<div id="attachment_274" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/08/SearchEngine_before.png"><img class="size-medium wp-image-274" title="SearchEngine#find() result before 1.4.2" src="http://fifesoft.com/blog/wp-content/uploads/2010/08/SearchEngine_before-300x190.png" alt="SearchEngine#find() result before 1.4.2" width="300" height="190" /></a><p class="wp-caption-text">SearchEngine#find() result before 1.4.2</p></div>
<p>Note that the next instance is selected, but is barely scrolled into the view.  Starting with 1.4.2, the next match is scrolled to the center of the text area, vertically:</p>
<div id="attachment_275" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/08/SearchEngine_after.png"><img class="size-medium wp-image-275" title="SearchEngine#find(), after 1.4.2" src="http://fifesoft.com/blog/wp-content/uploads/2010/08/SearchEngine_after-300x190.png" alt="SearchEngine#find(), after 1.4.2" width="300" height="190" /></a><p class="wp-caption-text">SearchEngine#find(), after 1.4.2</p></div>
<p>If the next instance of the text you&#8217;re searching for is already visible, the editor is not scrolled, the text is merely selected.  If the next match is not currently visible, however, that&#8217;s when it will be scrolled to the center of the view.</li>
<li>Fix for SourceForge bug 2998448: regex &#8220;replace all&#8221; is always case-sensitive.</li>
<li>SearchEngine&#8217;s concept of &#8220;whole word&#8221; is more accurate now (allows for punctuation, such as &#8216;,&#8217;, at the end of words, for example).  Previously, a &#8220;whole word&#8221; had to be completely surrounded by whitespace.</li>
<li>Added start of JUnit tests for SearchEngine.java.</li>
<li>SearchEngine bug fixes for replaceAll() with regex and match case/whole word enabled.</li>
<li>Fixed auto-complete bug with overloaded functions.</li>
<li>Fixed auto-complete bug &#8211; capitalization should be corrected when completing a parameterized completion.</li>
<li>Improved properties file syntax highlighting: &#8216;:&#8217; can divide name/value pairs.</li>
<li>Added &#8220;our&#8221; keyword to Perl syntax highlighting.</li>
</ul>
<p>Grab it on the SourceForge page today!</p>
]]></content:encoded>
			<wfw:commentRss>http://fifesoft.com/blog/?feed=rss2&amp;p=270</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Very large push to RText SVN</title>
		<link>http://fifesoft.com/blog/?p=266</link>
		<comments>http://fifesoft.com/blog/?p=266#comments</comments>
		<pubDate>Sat, 31 Jul 2010 15:34:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RText]]></category>

		<guid isPermaLink="false">http://fifesoft.com/blog/?p=266</guid>
		<description><![CDATA[For some reason I&#8217;ve been batching up changes to RText, and haven&#8217;t pushed anything into SVN in 4 months.  Well, I came to my senses, and it&#8217;s all finally there! There will be 3 main areas focused on in the 1.2 RText release: Integrating the language support I&#8217;ve been blogging about (Java, HTML, Perl, etc.) [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason I&#8217;ve been batching up changes to RText, and haven&#8217;t pushed anything into <a href="http://svn.fifesoft.com/svn/RText/">SVN</a> in 4 months.  Well, I came to my senses, and it&#8217;s all finally there!</p>
<p>There will be 3 main areas focused on in the 1.2 RText release:</p>
<ol>
<li>Integrating the language support I&#8217;ve been blogging about (Java, HTML, Perl, etc.)</li>
<li>Usability improvements</li>
<li>Bug fixes</li>
</ol>
<p>The first item is already practically done.  I&#8217;ve integrated <a href="http://fifesoft.com/blog/?p=218">RSTALanguageSupport</a> via a <a href="http://fifesoft.com/blog/?p=235">plugin</a>.  I&#8217;ve still got a couple more ideas for the latter two items before 1.2 is good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://fifesoft.com/blog/?feed=rss2&amp;p=266</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Auto-Activation added to AutoComplete</title>
		<link>http://fifesoft.com/blog/?p=245</link>
		<comments>http://fifesoft.com/blog/?p=245#comments</comments>
		<pubDate>Mon, 07 Jun 2010 04:11:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AutoComplete]]></category>
		<category><![CDATA[RSTALanguageSupport]]></category>

		<guid isPermaLink="false">http://fifesoft.com/blog/?p=245</guid>
		<description><![CDATA[Sorry for the overloading of the &#8220;auto&#8221; prefix here&#8230; The &#8220;AutoComplete&#8221; library should probably have been named &#8220;CodeComplete&#8221;, but the point was to emphasize that it was usable for more scenarios than just code completion&#8230; Anyway, after a few requests, I&#8217;m adding what Eclipse refers to as Auto-Activation.  This means that you can have the [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry for the overloading of the &#8220;auto&#8221; prefix here&#8230; The &#8220;AutoComplete&#8221; library should probably have been named &#8220;CodeComplete&#8221;, but the point was to emphasize that it was usable for more scenarios than just <em>code</em> completion&#8230;</p>
<p>Anyway, after a few requests, I&#8217;m adding what Eclipse refers to as Auto-Activation.  This means that you can have the completion popup appear automatically after certain characters are typed.  For example, typing a &#8216;.&#8217; character in Java could cause the completion popup to appear after a small delay, removing the need to keep pressing Ctrl+Space.</p>
<p>The new methods are added to the <a href="http://javadoc.fifesoft.com/autocomplete/">AutoCompletion</a> class, and look like this:<br />
<code><br />
<span style="color: #0000ff;">public void setAutoActivationEnabled(boolean enabled)<br />
public boolean isAutoActivationEnabled()<br />
public void setAutoActivationDelay(int millis)<br />
public int getAutoActivationDelay()</span><br />
</code><br />
These methods allow you to toggle not only whether auto-activation is enabled, but also how long the delay should be between when they stop typing and when the popup appears.  It can be set to 0, meaning to always appear when possible, but often users want a small delay (maybe 200 milliseconds), so that it only shows up if they genuinely need it and stop typing.</p>
<p>Note that auto-activation depends on auto-completion itself being enabled.  If you&#8217;ve called setAutoCompleteEnabled(false) on an AutoCompletion, it will not honor the auto-activation property.</p>
<p>As to what characters trigger auto-activation, that is done on a per-CompletionProvider basis, since this can (and should) vary depending on what programming language is being edited.  The CompletionProvider interface now has a method:<br />
<code><br />
<span style="color: #0000ff;">public boolean isAutoActivateOkay(JTextComponent)</span><br />
</code><br />
that should return true or false, depending on whether the text at the current caret position is something that auto-activation should occur at.  The concrete base class, CompletionProviderBase (what all CompletionProviders actually extend from, allow you to set exactly what characters this method checks for:<br />
<code><br />
<span style="color: #0000ff;">public void setAutoActivationRules(boolean letters, String others)</span><br />
</code></p>
<p>The first parameter allows you to have auto-activation occur after any standard letter (e.g. Ascii).  I personally think this is annoying, but I have seen editors do it in the past (Visual Studio?).  The second parameter is a string, each char of which is treated as a char to auto-activate after.  So for example, with Java you could call &#8220;setAutoActivationRules(false, &#8220;.&#8221;)&#8221; to auto-activate after the user types a period.  For markup languages you could pass &#8220;&lt;&#8221; as the &#8220;others&#8221; String to auto-activate for tag names after &#8216;&lt;&#8221; is typed.</p>
<p>The <a href="http://fifesoft.com/blog/?p=218">RSTALanguageSupport library</a> is already taking advantage of this new feature.  The Java, HTML, and PHP supports all now auto-activate after appropriate characters by default.  They&#8217;re extra smart, and won&#8217;t auto-activate when not appropriate (e.g. typing &#8220;foo.&#8221; while in Javadoc won&#8217;t start auto-completion in Java, or typing &#8216;&lt;&#8217; while in a comment or attribute in HTML &#8211; while invalid in and of itself &#8211; will not cause code completion either).  If you&#8217;re an early adopter, be sure to check out out!  It was first added in <a href="http://svn.fifesoft.com/svn/RSyntaxTextArea/">revision 209</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://fifesoft.com/blog/?feed=rss2&amp;p=245</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Integrating Language Support into RText</title>
		<link>http://fifesoft.com/blog/?p=235</link>
		<comments>http://fifesoft.com/blog/?p=235#comments</comments>
		<pubDate>Sat, 22 May 2010 22:02:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RSTALanguageSupport]]></category>
		<category><![CDATA[RSyntaxTextArea]]></category>
		<category><![CDATA[RText]]></category>

		<guid isPermaLink="false">http://fifesoft.com/blog/?p=235</guid>
		<description><![CDATA[I&#8217;ve spent the last week or so doing tedious, but important, stuff &#8211; making sure the RSTALangaugeSupport API is robust enough to be used in other applications.  The hard work is starting to pay off: Perl support is almost completely integrated already! Here&#8217;s RText&#8217;s Options dialog, showing all the features related to Perl support that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent the last week or so doing tedious, but important, stuff &#8211; making sure the RSTALangaugeSupport API is robust enough to be used in other applications.  The hard work is starting to pay off: Perl support is almost completely integrated already!</p>
<div id="attachment_236" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/05/perl-lang-support-in-rtext.png"><img class="size-medium wp-image-236" title="perl-lang-support-in-rtext" src="http://fifesoft.com/blog/wp-content/uploads/2010/05/perl-lang-support-in-rtext-300x259.png" alt="Perl options in RText" width="300" height="259" /></a><p class="wp-caption-text">Perl options in RText</p></div>
<p>Here&#8217;s RText&#8217;s Options dialog, showing all the features related to Perl support that you can currently toggle.  As you can see, you can currently fiddle with both the code completion as well as the on-the-fly syntax checking <a href="http://fifesoft.com/blog/?p=229">I recently blogged about</a>.  For the latter, you have to have a Perl install somewhere on your machine.  RText will scan your PATH for a Perl install, and default to using that, but you can change it to another installation if you want.  Still pending is the ability to add modules to the @INC path.</p>
<p>Language support will be fully integrated into all aspects of RText.  For example, compile errors and warnings will show up in the Error Strip component:</p>
<div id="attachment_237" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/05/perl-lang-support-in-rtext-2.png"><img class="size-medium wp-image-237" title="perl-lang-support-in-rtext-2" src="http://fifesoft.com/blog/wp-content/uploads/2010/05/perl-lang-support-in-rtext-2-300x170.png" alt="Compiler errors in Error Strip" width="300" height="170" /></a><p class="wp-caption-text">Compiler errors in Error Strip</p></div>
<p>Also, function descriptions are displayed simply by hovering the mouse over them.  For example, below, my mouse is over the &#8220;print&#8221; function (sorry screen captures in Windows don&#8217;t capture the mouse pointer):</p>
<div id="attachment_238" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/05/perl-lang-support-in-rtext-3.png"><img class="size-medium wp-image-238" title="perl-lang-support-in-rtext-3" src="http://fifesoft.com/blog/wp-content/uploads/2010/05/perl-lang-support-in-rtext-3-300x215.png" alt="Function descriptions on mouse hover" width="300" height="215" /></a><p class="wp-caption-text">Function descriptions on mouse hover</p></div>
<p>Perl is one of the harder languages to integrate, simply because its language support has so many features (runtime compilation, etc.) that others don&#8217;t have.  Hopefully other language supports will be integrated into RText shortly.  Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://fifesoft.com/blog/?feed=rss2&amp;p=235</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl Syntax Checking</title>
		<link>http://fifesoft.com/blog/?p=229</link>
		<comments>http://fifesoft.com/blog/?p=229#comments</comments>
		<pubDate>Thu, 13 May 2010 04:07:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RSTALanguageSupport]]></category>
		<category><![CDATA[RSyntaxTextArea]]></category>

		<guid isPermaLink="false">http://fifesoft.com/blog/?p=229</guid>
		<description><![CDATA[Perl syntax checking has been added to RSTALanguageSupport.  You can configure it with the location of a Perl install on your system (by default it scans your PATH for a Perl binary), and then PerlLanguageSupport will automatically begin scanning your code for errors as you type: Next will be the ability to muck with the [...]]]></description>
			<content:encoded><![CDATA[<p>Perl syntax checking has been added to RSTALanguageSupport.  You can configure it with the location of a Perl install on your system (by default it scans your PATH for a Perl binary), and then <tt>PerlLanguageSupport</tt> will automatically begin scanning your code for errors as you type:</p>
<div id="attachment_232" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/05/perl_syntax_checking1.png"><img class="size-medium wp-image-232" title="perl_syntax_checking" src="http://fifesoft.com/blog/wp-content/uploads/2010/05/perl_syntax_checking1-300x234.png" alt="Perl Syntax Checking" width="300" height="234" /></a><p class="wp-caption-text">Perl Syntax Checking</p></div>
<p>Next will be the ability to muck with the @INC path to add other libraries.  Currently it only uses the default @INC of your Perl install.</p>
]]></content:encoded>
			<wfw:commentRss>http://fifesoft.com/blog/?feed=rss2&amp;p=229</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RSTALanguageSupport Progress</title>
		<link>http://fifesoft.com/blog/?p=218</link>
		<comments>http://fifesoft.com/blog/?p=218#comments</comments>
		<pubDate>Mon, 03 May 2010 02:47:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RSTALanguageSupport]]></category>
		<category><![CDATA[RSyntaxTextArea]]></category>

		<guid isPermaLink="false">http://fifesoft.com/blog/?p=218</guid>
		<description><![CDATA[The RSTALangaugeSupport library I&#8217;ve blogged about for so long has finally been added to the Subversion repository, but do note that it isn&#8217;t ready for prime time yet.  Use it at your own risk!  And send feedback when you do!  If you check out the project, please read the readme file first.  It&#8217;s fairly up [...]]]></description>
			<content:encoded><![CDATA[<p>The RSTALangaugeSupport library I&#8217;ve blogged about for so long has finally been added to the <a href="http://svn.fifesoft.com/svn/RSyntaxTextArea/">Subversion repository</a>, but do note that it isn&#8217;t ready for prime time yet.  Use it at your own risk!  And send feedback when you do!  <img src='http://fifesoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you check out the project, please read the <a href="http://svn.fifesoft.com/svn/RSyntaxTextArea/RSTALanguageSupport/trunk/readme.txt">readme file</a> first.  It&#8217;s fairly up to date and explains how to compile and use the library.</p>
<p>The library currently includes code completion for the <strong>standard C library</strong>, and despite a couple of rough edges, should be mostly complete:</p>
<div id="attachment_219" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/05/c_auto_completion.png"><img class="size-medium wp-image-219" title="C code completion" src="http://fifesoft.com/blog/wp-content/uploads/2010/05/c_auto_completion-300x183.png" alt="C code completion" width="300" height="183" /></a><p class="wp-caption-text">C code completion</p></div>
<p>C support takes advantage of the <a href="http://fifesoft.com/blog/?p=27">parameter assistance</a> feature of the AutoComplete library as well:</p>
<div id="attachment_220" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/05/c_parameter_assistance.png"><img class="size-medium wp-image-220" title="Parameter assistance for C functions" src="http://fifesoft.com/blog/wp-content/uploads/2010/05/c_parameter_assistance-300x233.png" alt="Parameter assistance for C functions" width="300" height="233" /></a><p class="wp-caption-text">Parameter assistance for C functions</p></div>
<p>There&#8217;s also the start of decent support for <strong>Java</strong>, which is much more robust and dynamic than the support for other languages such as C.  It actually evaluates your code when you hit ctrl+space, and gives you accurate completion choices based on your current location in the code, based on classes you&#8217;ve imported (referencing jars on your &#8220;classpath&#8221;), local variables if you&#8217;re in a method, etc.  This has been discussed in several previous blog posts.</p>
<div id="attachment_222" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/05/java_auto_completion.png"><img class="size-medium wp-image-222" title="Java code completion" src="http://fifesoft.com/blog/wp-content/uploads/2010/05/java_auto_completion-300x138.png" alt="Java code completion" width="300" height="138" /></a><p class="wp-caption-text">Java code completion</p></div>
<p>Yes, that tree widget on the left is actually included in RSTALanguageSupport as well!  However, it is currently Java-specific, and will not display an outline of source code in any other language.  It&#8217;s not high priority at the moment to generalize it, but it should probably happen sooner or later.  Java also supports parameter assistance when completing methods, like C does with its standard library.</p>
<p>There&#8217;s also code completion for <strong>Perl</strong>, supporting all built-in functions in Perl 5.10.x.  Rudimentary support for completions of variable names will appear for Perl in the next couple of days.</p>
<div id="attachment_223" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/05/perl_auto_completion.png"><img class="size-medium wp-image-223" title="Perl code completion" src="http://fifesoft.com/blog/wp-content/uploads/2010/05/perl_auto_completion-300x179.png" alt="Perl code completion" width="300" height="179" /></a><p class="wp-caption-text">Perl code completion</p></div>
<p>There&#8217;s also excellent support for <strong>HTML 5</strong> &#8211; completion for all valid tag names, and attributes are suggested as well (only those attributes valid for the tag they are describing).  The description information displayed in the tool tip-style side window is rather lacking, however (as you can tell from the screenshot), so help improving this documentation is more than welcome!</p>
<div id="attachment_224" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/05/html_auto_completion.png"><img class="size-medium wp-image-224" title="HTML Completion" src="http://fifesoft.com/blog/wp-content/uploads/2010/05/html_auto_completion-300x218.png" alt="HTML Completion" width="300" height="218" /></a><p class="wp-caption-text">HTML Completion</p></div>
<p><strong>PHP</strong> code completion is also included.  It uses the built-in HTML support when editing HTML, but when the caret is within PHP tags, PHP functions are suggested instead.  There is no documentation for PHP functions in the description window like there is for other languages just yet.</p>
<div id="attachment_225" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/05/php_auto_completion.png"><img class="size-medium wp-image-225" title="PHP code completion" src="http://fifesoft.com/blog/wp-content/uploads/2010/05/php_auto_completion-300x211.png" alt="PHP code completion" width="300" height="211" /></a><p class="wp-caption-text">PHP code completion</p></div>
<p>Similar to the C and Java support, parameter assistance is included for PHP functions:</p>
<div id="attachment_226" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/05/php_auto_completion_2.png"><img class="size-medium wp-image-226" title="Parameter assistance for PHP" src="http://fifesoft.com/blog/wp-content/uploads/2010/05/php_auto_completion_2-300x218.png" alt="Parameter assistance for PHP" width="300" height="218" /></a><p class="wp-caption-text">Parameter assistance for PHP</p></div>
<p>Hopefully that is enough to whet some appetites!  Please discuss and ask questions over in <a href="http://fifesoft.com/forum/">the forums</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://fifesoft.com/blog/?feed=rss2&amp;p=218</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TokenMakerMaker finally in Subversion</title>
		<link>http://fifesoft.com/blog/?p=214</link>
		<comments>http://fifesoft.com/blog/?p=214#comments</comments>
		<pubDate>Tue, 20 Apr 2010 22:31:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TokenMakerMaker]]></category>

		<guid isPermaLink="false">http://fifesoft.com/blog/?p=214</guid>
		<description><![CDATA[The &#8220;TokenMakerMaker&#8221; application that I blogged about oh-so-long-ago finally has a home in Subversion, in the parent RSyntaxTextArea repository.  I&#8217;ve been getting some more questions about it lately so I figured it might force me to give it a little more attention if it were &#8220;officially&#8221; public.  You can check it out here: http://svn.fifesoft.com/svn/RSyntaxTextArea/TokenMakerMaker/trunk The [...]]]></description>
			<content:encoded><![CDATA[<p>The &#8220;<a href="http://fifesoft.com/blog/?p=118">TokenMakerMaker</a>&#8221; application that I blogged about oh-so-long-ago finally has a home in Subversion, in the parent <a href="http://svn.fifesoft.com/svn/RSyntaxTextArea">RSyntaxTextArea repository</a>.  I&#8217;ve been getting some more questions about it lately so I figured it might force me to give it a little more attention if it were &#8220;officially&#8221; public.  You can check it out here:</p>
<p><a href="http://svn.fifesoft.com/svn/RSyntaxTextArea/TokenMakerMaker/trunk">http://svn.fifesoft.com/svn/RSyntaxTextArea/TokenMakerMaker/trunk</a></p>
<p>The usual caveats:</p>
<ol>
<li>I haven&#8217;t really worked on it since I last blogged about it, so it may have bugs.  It definitely has bugs dealing with the &#8220;multiline&#8221; string option.</li>
<li>The code isn&#8217;t pretty.</li>
<li>There will be no &#8220;official&#8221; releases for awhile, unlike RSyntaxTextArea, AutoComplete and SpellChecker.  If you want it, you&#8217;ll have to grab it from SVN.</li>
<li>Unlike all other RSyntaxTextArea-based projects, TokenMakerMaker requires Java 6 to run.  Since TMM is a developer tool and not a library, I don&#8217;t really see this as an issue, especially since even Java 5 has reached <a href="http://java.sun.com/products/archive/eol.policy.html">EOL</a>.</li>
</ol>
<p>While the project itself is open-source (probably <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a>, but I haven&#8217;t decided on a license just yet), any TokenMakers you generate from it are yours to keep &#8211; you can license them however you wish.  Do keep in mind however, that TokenMakers are only usable via RSyntaxTextArea, which is LGPL.</p>
<p>The TokenMakerMaker repository contains an Eclipse project.  To get it building error-free, you&#8217;ll also need to check out the RSyntaxTextArea project, and add it as a build dependency to your TMM project.  This is because TMM always uses the very latest bits of RSyntaxTextArea to keep them in-sync.</p>
<p>With both of the projects checked out, you can run TokenMakerMaker directly from Eclipse by launching org.fife.tmm.Main as a standard Java application.</p>
<p>Alternatively, you can build TokenMakerMaker, and launch it from the resulting executable jar.  To do so, you&#8217;ll need to first run the main target in the RSTA build.xml Ant script (&#8220;make-jar&#8221;).  This creates dist/rsyntaxtextarea.jar in the RSyntaxTextArea project, which is used by TokenMakerMaker.  Then you need to run the main target in the TMM build.xml script, which builds TokenMakerMaker.  The result is a stand-alone TokenMakerMaker application in TokenMakerMaker/dist.  You can run this application as follows:</p>
<pre style="padding-left: 30px;"><span style="color: #0000ff;">cd <em>rsta-projects-root</em>/TokenMakerMaker/dist
java -jar tmm.jar</span>
</pre>
<p>Here are some basic notes about using the UI:</p>
<ul>
<li>You can save and load your progress via Ctrl+O/Ctrl+S.  Your TokenMaker spec.  is saved in an XML file.  This way you can come back and work on it later if you  want, without having to dig into the generated flex.</li>
<li>Once the app  starts, the first thing you&#8217;ll want to do is go to File -&gt; Options.  In the  &#8220;General&#8221; panel you can specify a &#8220;working directory.&#8221;  This is the location  that generated *.flex, and their corresponding *.java files, will be placed.   Change this to wherever you want.  I believe old files with the same name will  be overwritten without prompting you if it&#8217;s okay, so be warned!  =)</li>
<li>On the &#8220;General&#8221; tab, the difference between &#8220;AbstractJFlexTokenMaker&#8221; and  &#8220;AbstractJFlexCTokenMaker&#8221; is that the latter will cause your TokenMaker to  auto-indent after lines ending in &#8216;{&#8216;, as well as auto-align closing &#8216;}&#8217; chars  when they are typed (assuming auto-indent <a href="http://javadoc.fifesoft.com/rsyntaxtextarea/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea.html#setAutoIndentEnabled%28boolean%29">is enabled in the RSyntaxTextArea it&#8217;s  running in</a>).  It&#8217;s supposed to be the option you want to pick if the language  you are creating derives syntax from C, and uses curly braces to denote code  blocks.</li>
<li>The app is supposed to be smart, and if you don&#8217;t enter a  value for a field that is required, you shouldn&#8217;t be able to generate anything  without an error prompt.  But there may be issues I haven&#8217;t discovered yet.</li>
<li><strong>TMM assumes that the Java install running it is a JDK</strong>.  If it isn&#8217;t, TMM  will still generate the .flex and .java source files for you, but it  will not be able to compile the resulting .java file and allow you to  test it in-proecess, which is one of its really cool features.  For this  reason, I&#8217;d suggest running it with a JDK as opposed to a JRE.</li>
</ul>
<p>Hopefully this is enough to get people started.  If you have any questions or issues, feel free to add a comment to this blog entry, or better yet, use the <a href="http://fifesoft.com/forum/">forums</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://fifesoft.com/blog/?feed=rss2&amp;p=214</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javadoc assistance for Java Code Completion</title>
		<link>http://fifesoft.com/blog/?p=211</link>
		<comments>http://fifesoft.com/blog/?p=211#comments</comments>
		<pubDate>Sun, 11 Apr 2010 12:15:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RSTALanguageSupport]]></category>
		<category><![CDATA[RSyntaxTextArea]]></category>

		<guid isPermaLink="false">http://fifesoft.com/blog/?p=211</guid>
		<description><![CDATA[I&#8217;ve added the ability to add &#8220;source attachments&#8221; to jars on the &#8220;class path&#8221; or &#8220;build path&#8221; (not sure what to call that, Eclipse uses &#8220;build path,&#8221; but RSTA isn&#8217;t compiling anything, since it&#8217;s just an editor&#8230;).  You can now get Javadoc in the description window alongside code completion choices.  In the example below, I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve added the ability to add &#8220;source attachments&#8221; to jars on the &#8220;class path&#8221; or &#8220;build path&#8221; (not sure what to call that, Eclipse uses &#8220;build path,&#8221; but RSTA isn&#8217;t compiling anything, since it&#8217;s just an editor&#8230;).  You can now get Javadoc in the description window alongside code completion choices.  In the example below, I&#8217;m editing java/lang/String.java, and I&#8217;ve attached the src.zip that comes with the JDK.  You&#8217;ll see that the Javadoc for the relevant String method is shown:</p>
<div id="attachment_212" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/04/ac_with_javadoc.png"><img class="size-medium wp-image-212" title="ac_with_javadoc" src="http://fifesoft.com/blog/wp-content/uploads/2010/04/ac_with_javadoc-300x181.png" alt="Source Attachments working" width="300" height="181" /></a><p class="wp-caption-text">Source Attachments working</p></div>
<p>Beyond that, I&#8217;ve been working on the API, using <a href="http://fifesoft.com/rtext/">RText</a> as the test application.</p>
<p>Also, not the source outline tree on the left.  I&#8217;m working on getting this component simple and usable as well.  I&#8217;m tempted to shove it into the RSTALanguageSupport library, since it would only be used with RSTA instances using the library, but since it isn&#8217;t specifically related to the editor, it may just end up in RText itself.  It&#8217;s really nice &#8211; it displays the outline of the source as parsed by the code completion parser, and clicking on an item in the tree jumps to that item in the source code.  However, it is Java-specific and is not currently meant to be used for outlining just any language.</p>
]]></content:encoded>
			<wfw:commentRss>http://fifesoft.com/blog/?feed=rss2&amp;p=211</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Java Code Completion Status</title>
		<link>http://fifesoft.com/blog/?p=201</link>
		<comments>http://fifesoft.com/blog/?p=201#comments</comments>
		<pubDate>Fri, 02 Apr 2010 03:04:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RSTALanguageSupport]]></category>
		<category><![CDATA[RSyntaxTextArea]]></category>

		<guid isPermaLink="false">http://fifesoft.com/blog/?p=201</guid>
		<description><![CDATA[The code completion library for standard programming languages for RSyntaxTextArea is almost ready for a public repository.  I plan on calling this library &#8220;RSTALanguageSupport&#8221; (nice name, huh?), as it contains support for editing common programming languages with RSyntaxTextArea. In getting this library tidied up, I&#8217;ve picked up the Java code completion yet again, since it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>The code completion library for standard programming languages for RSyntaxTextArea is <em>almost</em> ready for a public repository.  I plan on calling this library &#8220;RSTALanguageSupport&#8221; (nice name, huh?), as it contains support for editing common programming languages with RSyntaxTextArea.</p>
<p>In getting this library tidied up, I&#8217;ve picked up the Java code completion yet again, since it&#8217;s by far the most complex.  I thought I&#8217;d give a status update now so people don&#8217;t have unrealistic expectations about the library when it&#8217;s first released.</p>
<p>Assuming you&#8217;ve added any jars you want on your &#8220;build path&#8221; (to use Eclipse terminology), the Java code completion support can handle:</p>
<ol>
<li>Class fields and methods:
<div id="attachment_204" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/04/java_completion_11.png"><img class="size-medium wp-image-204" title="java_completion_1" src="http://fifesoft.com/blog/wp-content/uploads/2010/04/java_completion_11-300x233.png" alt="Completion of fields and methods" width="300" height="233" /></a><p class="wp-caption-text">Completion of fields and methods</p></div></li>
<li>Local variables in scope in the current method:
<p><div id="attachment_205" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/04/java_completion_2.png"><img class="size-medium wp-image-205" title="java_completion_2" src="http://fifesoft.com/blog/wp-content/uploads/2010/04/java_completion_2-300x191.png" alt="Completion for local variables" width="300" height="191" /></a><p class="wp-caption-text">Completion for local variables</p></div></li>
<li>Methods and static fields of non-primitive fields and local variables:
<p><div id="attachment_206" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/04/java_completion_3.png"><img class="size-medium wp-image-206" title="java_completion_3" src="http://fifesoft.com/blog/wp-content/uploads/2010/04/java_completion_3-300x180.png" alt="More local variable completion" width="300" height="180" /></a><p class="wp-caption-text">More local variable completion</p></div></li>
<li>Common Javadoc completions that I personally find extremely useful in Eclipse:
<p><div id="attachment_207" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/04/java_completion_4.png"><img class="size-medium wp-image-207" title="java_completion_4" src="http://fifesoft.com/blog/wp-content/uploads/2010/04/java_completion_4-300x174.png" alt="Javadoc completions" width="300" height="174" /></a><p class="wp-caption-text">Javadoc completions</p></div></li>
</ol>
<p>It does <em>not</em> currently handle completions for return types of methods:</p>
<p><div id="attachment_208" class="wp-caption aligncenter" style="width: 310px"><a href="http://fifesoft.com/blog/wp-content/uploads/2010/04/java_completion_5.png"><img class="size-medium wp-image-208" title="java_completion_5" src="http://fifesoft.com/blog/wp-content/uploads/2010/04/java_completion_5-300x248.png" alt="Can't do this just yet" width="300" height="248" /></a><p class="wp-caption-text">Can&#39;t do this just yet</p></div>
<p>This is the single issue that will take the longest to resolve, as it&#8217;ll take a re-hashing of how the code completion is parsing the code.  Other features and bug fixes will appear before this one is fixed.</p>
<p>Also, please note that the Java code completion should <em>not</em> be considered &#8220;good design.&#8221;  I am (poorly) self-taught in lexing/parsing, and so what I have now is certainly not optimized, easy to read, or using the latest design techniques.  It is what it is.  <img src='http://fifesoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   I consider this to be a learning experience, and that the library will improve over time.</p>
<p>That said, it seems reasonably performant (only a pause when it has to initially load completions for many new classes, such as multiple imports of large packages, such as &#8220;javax.swing.*&#8221;), and is more than usable on the machines I&#8217;ve tested on.  Memory usage could certainly be improved (stuff isn&#8217;t shared between multiple editors implementing Java completion that should be) but I plan to fix that soon.</p>
<p>As a side note &#8211; as you can see from the first screenshot, I&#8217;m also  working on tying Javadoc into the description window.  Notice that the  Javadoc for the &#8220;str&#8221; field is nicely formatted in the tool tip-style  side window?  That happens for all fields and methods in the current  source file.  I&#8217;m also working on the ability to add &#8220;source  attachments&#8221; for jars on the &#8220;classpath,&#8221; just like Eclipse, which will  be used for assistance with libraries.  So for example, you can point to  the src.zip included with your JDK, and get a nice description of each  class, field and method in the JDK, just like in your favorite real IDE!</p>
<p>Integration of this library into <a href="http://fifesoft.com/rtext/">RText</a> as a plugin is already underway.  As always, RText will be a showcase of all the cool stuff you can do with RSyntaxTextArea.</p>
]]></content:encoded>
			<wfw:commentRss>http://fifesoft.com/blog/?feed=rss2&amp;p=201</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
