Looking for a very simple Custom Language sample plugin

Hi again Dimitry,

Can you please point me to the "Hello World" of Custom Language plugins.

The Arc plugin is quite complicated, and no longer seems to compile with
the current plugin API.

I am hoping for a companion sample to go with the Custom Language tutorial

http://www.jetbrains.net/confluence/display/IDEADEV/DevelopingCustomLanguagePluginsforIntelliJIDEA

Thanks
Peter

3 comments
Comment actions Permalink

Hello Peter,

I don't think that any such plugin exists. The article used to draw samples
from the JavaScript plugin, but it has grown to be one of the most complicated
ones.

What problems in particular do you face?

Can you please point me to the "Hello World" of Custom Language
plugins.

The Arc plugin is quite complicated, and no longer seems to compile
with the current plugin API.

I am hoping for a companion sample to go with the Custom Language
tutorial

http://www.jetbrains.net/confluence/display/IDEADEV/DevelopingCustom
LanguagePluginsforIntelliJIDEA

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Hi Dmitry,

I like to start simple, so as suggested by the tutorial, I just
implemented a plugin.xml, FileTypeFactory, Language, and a getIcon()
method. I want to understand registering a language first.

Unfortunately, it doesn't work. I don't get an error, but the icon
doesn't change. The document doesn't offer any guidance, so I was
looking for sample code.

Here's my plugin.xml if that helps. Note that I based this on the Arc
code, but IntelliJ complains about the fileTypeFactory -- "Element
fileTypeFactory not allowed here"

Clojure 0.1 Custom Languages Red Shark Technology Supports Clojure code, including syntax highlighting, simple structure view, debugger, profiling and a REPL. com.redshark.clojure.ClojureStrings com.redshark.clojure.plugin.ClojureSupportLoader ]]>

0
Comment actions Permalink

Hello Peter,

You don't need to register your FileTypeFactory as both an extension and
an application component. The former is enough.

This probably doesn't explain why the plugin doesn't work, but that's the
only problem I see here.

Please make sure that your file type appears in Settings | File Types and
has correct extensions associated with it.

I like to start simple, so as suggested by the tutorial, I just
implemented a plugin.xml, FileTypeFactory, Language, and a getIcon()
method. I want to understand registering a language first.

Unfortunately, it doesn't work. I don't get an error, but the icon
doesn't change. The document doesn't offer any guidance, so I was
looking for sample code.

Here's my plugin.xml if that helps. Note that I based this on the Arc
code, but IntelliJ complains about the fileTypeFactory -- "Element
fileTypeFactory not allowed here"

<!DOCTYPE idea-plugin PUBLIC "Plugin/DTD"
"http://plugins.intellij.net/plugin.dtd">
<idea-plugin url="http://redsharktechnology/">
<name>Clojure</name>
<version>0.1</version>
<category>Custom Languages</category>
<vendor>Red Shark Technology</vendor>
<idea-version since-build="9013"/>
<description>Supports Clojure code, including syntax
highlighting,
simple structure view, debugger, profiling and a REPL.
</description>
<change-notes>
</change-notes>
<resource-bundle>
com.redshark.clojure.ClojureStrings
</resource-bundle>
<extensions defaultExtensionNs="com.intellij">
<fileTypeFactory
implementation="com.redshark.clojure.plugin.ClojureSupportLoader"/>
</extensions>
<application-components>
<component>
<implementation-class>com.redshark.clojure.plugin.ClojureSupportLoader
</implementation-class>
</component>
</application-components>
<project-components>
</project-components>
<actions>
</actions>
</idea-plugin>

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.