<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://community.activestate.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>ActiveState Community Site - Introduction to building a Komodo extension - Comments</title>
 <link>http://community.activestate.com/forum-topic/introduction-building-komodo-extension</link>
 <description>Comments for &quot;Introduction to building a Komodo extension&quot;</description>
 <language>en</language>
<item>
 <title>Send the files to me</title>
 <link>http://community.activestate.com/forum-topic/introduction-building-komodo-extension#comment-5846</link>
 <description>&lt;p&gt;ericp at activestate dot com&lt;/p&gt;
&lt;p&gt;Please send the UDL sources, not just the XPI.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Eric&lt;/p&gt;
</description>
 <pubDate>Thu, 26 Jun 2008 09:27:11 -0700</pubDate>
 <dc:creator>ericp</dc:creator>
 <guid isPermaLink="false">comment 5846 at http://community.activestate.com</guid>
</item>
<item>
 <title>komodo crash - sending file</title>
 <link>http://community.activestate.com/forum-topic/introduction-building-komodo-extension#comment-5838</link>
 <description>&lt;p&gt;Where shall I send the file to?&lt;/p&gt;
&lt;p&gt;Btw, there&#039;s no source code, just the directories/files created by koext and the xpi.&lt;/p&gt;
</description>
 <pubDate>Thu, 26 Jun 2008 02:02:44 -0700</pubDate>
 <dc:creator>purpledog</dc:creator>
 <guid isPermaLink="false">comment 5838 at http://community.activestate.com</guid>
</item>
<item>
 <title>Could you send your source code to me?</title>
 <link>http://community.activestate.com/forum-topic/introduction-building-komodo-extension#comment-5810</link>
 <description>&lt;p&gt;New UDL-based languages should never cause Komodo to crash.&lt;br /&gt;
If you&#039;ve run into a bug, I&#039;d like to fix it as soon as possible.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Eric&lt;/p&gt;
</description>
 <pubDate>Wed, 25 Jun 2008 10:24:20 -0700</pubDate>
 <dc:creator>ericp</dc:creator>
 <guid isPermaLink="false">comment 5810 at http://community.activestate.com</guid>
</item>
<item>
 <title>komodo crash</title>
 <link>http://community.activestate.com/forum-topic/introduction-building-komodo-extension#comment-5792</link>
 <description>&lt;p&gt;I followed those 3 step and installed the xpi (leaving the udl and ko*.py as is). Then I restarted Komodo and try switching to the new language but that simply crashed Komodo (Edit 4.4)...&lt;/p&gt;
&lt;p&gt;Note that after the install I don&#039;t see any if the new language file in the komodo path (but I do see the glsl in the language menu)&lt;/p&gt;
&lt;p&gt;That would be nice to have a &quot;one click&quot; command to create a new language (with empty highlights and so on)...&lt;/p&gt;
</description>
 <pubDate>Wed, 25 Jun 2008 04:16:13 -0700</pubDate>
 <dc:creator>purpledog</dc:creator>
 <guid isPermaLink="false">comment 5792 at http://community.activestate.com</guid>
</item>
<item>
 <title>broken in 4.2.0 and 4.2.1</title>
 <link>http://community.activestate.com/forum-topic/introduction-building-komodo-extension#comment-3494</link>
 <description>&lt;p&gt;Please look at &lt;a href=&quot;http://bugs.activestate.com/show_bug.cgi?id=72556&quot;&gt;bug 72556&lt;/a&gt; for some issues that break usage of &#039;koext&#039; for relatively complex new UDL-based languages.&lt;/p&gt;
</description>
 <pubDate>Tue, 13 Nov 2007 17:11:21 -0800</pubDate>
 <dc:creator>trentm</dc:creator>
 <guid isPermaLink="false">comment 3494 at http://community.activestate.com</guid>
</item>
<item>
 <title>Introduction to building a Komodo extension</title>
 <link>http://community.activestate.com/forum-topic/introduction-building-komodo-extension</link>
 <description>&lt;p&gt;(A short while ago Jaroslaw Zabiello asked a question on the&lt;br /&gt;
komodo-discuss list that motivated me to finally write up a beginner intro&lt;br /&gt;
to using some new tools in Komodo 4.2 beta 7 for creating Komodo&lt;br /&gt;
extensions. Here is my slightly edited response.)&lt;/p&gt;
&lt;p&gt;Jaroslaw Zabiello wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;is there any chance for syntax colouring for Mako templates&lt;br /&gt;
  (&lt;a href=&quot;http://makotemplates.org&quot; title=&quot;http://makotemplates.org&quot;&gt;http://makotemplates.org&lt;/a&gt;)...&lt;/p&gt;
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This is certainly possible with Komodo&#039;s UDL (User-Defined Languages)&lt;br /&gt;
system.&lt;/p&gt;
&lt;p&gt;You could take a stab at writing a Mako extension for Komodo (in&lt;br /&gt;
particular the Mako UDL definition) yourself. Komodo is still in the early&lt;br /&gt;
stages of making this kind of thing easy, but 4.2 (including the recent&lt;br /&gt;
beta7) improves on this a bit. Eric wrote up a (long) intro to writing UDL&lt;br /&gt;
definitions a while back on his blog:&lt;br /&gt;
&lt;a href=&quot;http://blogs.activestate.com/ericp/2007/01/kid_adding_a_ne.html&quot;&gt;http://blogs.activestate.com/ericp/2007/01/kid_adding_a_ne.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is how packing up the Mako UDL into a Komodo extension would&lt;br /&gt;
basically work -- if you are willing to help us work out the kinks.&lt;br /&gt;
Komodo 4.2 beta 7 includes a sort of SDK in its install tree. On Linux and&lt;br /&gt;
Windows this is found at &quot;&lt;em&gt;installdir&lt;/em&gt;/lib/sdk&quot;. That SDK includes two&lt;br /&gt;
tools:&lt;/p&gt;
&lt;pre&gt;koext       a command line tool for working with Komodo extensions
luddite     a tools for working with UDL
&lt;/pre&gt;&lt;p&gt;Put the SDK bin dir on your PATH and you should be able to run &lt;code class=&quot;geshifilter&quot;&gt;koext&lt;/code&gt; and&lt;br /&gt;
&lt;code class=&quot;geshifilter&quot;&gt;luddite&lt;/code&gt; at the command line. Similar to tools like cvs or svn, these are&lt;br /&gt;
tools with multiple sub-commands. (If running these doesn&#039;t work for you,&lt;br /&gt;
then please let us know so we can make the environment setup more smooth.&lt;br /&gt;
There is currently a dependency on having a Python 2.5 installation --&lt;br /&gt;
which we should be able to remedy if necessary.)&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Start your extension source dir (with `koext startext&#039;):&lt;/p&gt;
&lt;pre&gt;$ koext help startext
...prints instructions on using this command...
$ koext startext mako_language
...follow instructions for other extension meta-data...
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You should now be able to build your extension:&lt;/p&gt;
&lt;pre&gt;$ cd mako_language     # cd in to source dir
$ koext build
&lt;/pre&gt;&lt;p&gt;This will build an .xpi file that you can install into your Komodo.&lt;br /&gt;
However, the extension doesn&#039;t yet &lt;em&gt;do&lt;/em&gt; anything.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Generate stubs for defining a new language for&lt;br /&gt;
Komodo:&lt;/p&gt;
&lt;pre&gt;$ cd mako_language
$ koext help startlang
...
$ koext startlang Mako --ext .mako --is-html-based
&lt;/pre&gt;&lt;p&gt;This will generate a few files that you&#039;ll then need to fill out with&lt;br /&gt;
appropriate information for Mako template files. Namely:&lt;/p&gt;
&lt;pre&gt;udl/mako-mainlex.udl
    The lexing/syntax-coloring UDL definition for Mako.
components/koMako_UDL_Language.py
    The PyXPCOM component that defines the language for
    Komodo.
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Properly filling these out is a big topic beyond the scope of this email.&lt;br /&gt;
Your best references are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Eric&#039;s blog post for UDL information.&lt;/li&gt;
&lt;li&gt;The UDL reference in the Komodo documentation.&lt;/li&gt;
&lt;li&gt;Example .udl files in the SDK directory (lib/sdk/udl/...)&lt;/li&gt;
&lt;li&gt;Look at other &lt;code class=&quot;geshifilter&quot;&gt;ko*_UDL_Language.py&lt;/code&gt; files in your Komodo installation.&lt;br /&gt;
Many of the new languages added to Komodo in the 4.x series are based on&lt;br /&gt;
UDL and work in the exact same way as would your Mako language&lt;br /&gt;
component. Look for RHTML, Smarty, HTML, TemplateToolkit, and Mason.&lt;br /&gt;
They should be quite similar.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note: Komodo also has a &quot;Komodo Extension&quot; project template that you could&lt;br /&gt;
use for starting out. However, we are still working on merging the project&lt;br /&gt;
template and the &quot;koext&quot; tool in the SDK (probably for Komodo 4.3).&lt;/p&gt;
&lt;p&gt;I realize that this isn&#039;t quite as smooth a process as it could be yet,&lt;br /&gt;
but with the help of the beta-list we hope to get there in subsequent&lt;br /&gt;
releases.&lt;/p&gt;
</description>
 <comments>http://community.activestate.com/forum-topic/introduction-building-komodo-extension#comments</comments>
 <category domain="http://community.activestate.com/forums/komodo-extensions-0">Komodo Macros and Extensions</category>
 <category domain="http://community.activestate.com/os/all-any">All / Any</category>
 <pubDate>Thu, 06 Sep 2007 15:16:51 -0700</pubDate>
 <dc:creator>trentm</dc:creator>
 <guid isPermaLink="false">1390 at http://community.activestate.com</guid>
</item>
</channel>
</rss>
