Wednesday, January 25, 2006

Custom Snippets in Raptor EA 3 v 897

Raptor EA 3 is out build #897. Here's how to add snippets in this build. Eventually a UI could be built around managing the snippets and maybe even subscribe via an rss feed but in the mean time give this a try.

Adding Custom Snippets:

raptor -Draptor.user.snippets=/home/klrice/snippets.xml
or edit the raptor.conf file and add
AddVMOption -Draptor.user.snippets=/home/klrice/snippets.xml


The snippets file should look like this:

<?xml version = '1.0' encoding = 'UTF-8'?>
<snippets>
<group category="Kris' custom snippets" language="PLSQL">
<snippet name="Select EMP" description="Too lazy to type it out">
<code><![CDATA[select * from scott.emp]]>
</snippet>
<snippet name="Select EMP Local" description="Too lazy to type it out">
<code><![CDATA[select * from emp]]>
</snippet>
</group>
<group category="Kris' other snippets" language="PLSQL">
<snippet name="Select DEPT" description="Too lazy to type it out">
<code><![CDATA[select * from scott.dept]]>
</snippet>
</group>
</snippets>

Furthurmore the snippets window will reload eveytime it's opened if the file changes.

The Results
custom_snippets.png

No comments: