Complexity of adding Syntax Highlighting algorythms?

Hi All,

Im just wondering about how much complexity is involved and time is
required to implement custom syntax highlighting algorythms?

EG: to add Action Script, PHP and other custom script highlighting.

Currently I can edit these files without highlighting in IDEA, utilising
the CVS functionality. Adding SH would mean that our other developers
could use IDEA as their primary editor (opening up new lisences and a
source of more revinue for IntelliJ).

As a side thought, could this be done as a plugin?
Does the api support its use in this way?

Thanks


--
Dan Hardiker

8 comments
Comment actions Permalink

As i know Highlighting interface exist long time ago in Open API, but i not
use it...
Since 915 in OpenAPI is FileDitorProvider - you can create your own editor,
e.q. your ouw text editor.

Thanks!

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Dan Hardiker" <dhardiker@eorigen.com> wrote in message
news:bkpf4f$9ts$1@is.intellij.net...

Hi All,

>

Im just wondering about how much complexity is involved and time is
required to implement custom syntax highlighting algorythms?

>

EG: to add Action Script, PHP and other custom script highlighting.

>

Currently I can edit these files without highlighting in IDEA, utilising
the CVS functionality. Adding SH would mean that our other developers
could use IDEA as their primary editor (opening up new lisences and a
source of more revinue for IntelliJ).

>

As a side thought, could this be done as a plugin?
Does the api support its use in this way?

>

Thanks

>
>

--
Dan Hardiker

>


0
Comment actions Permalink

Im just wondering about how much complexity is involved and time is
required to implement custom syntax highlighting algorythms?



If you care just about the hilighting, you can define custom file type:

> Options > IDE Settings > File Types

There's also Comment/Uncomment plugin which works with custom file types.

0
Comment actions Permalink

dimiter wrote:

If you care just about the hilighting, you can define custom file type:

> Options > IDE Settings > File Types

There's also Comment/Uncomment plugin which works with custom file types.


Great! - I must have missed / overlooked that addition (90% of those
options werent there last time I checked).

Now to see if we can somehow get the IDEA to compile Action Script files
into SWF files! (there is already a java compiler ... pluging it in will
be the fun part ... maybe a custom ant process is the way to go)

0
Comment actions Permalink

On Tue, 23 Sep 2003 16:18:51 +0300, dimiter wrote:

If you care just about the hilighting, you can define custom file type:


Are there any pre-made extra custom file types on the wiki at all? Sounds
like a good mini-project...

--
"It's all in the heat of the moment, it's all in the pain..." Devy.
Mark Derricutt @ mark@talios.com @ talios.blog-city.com

0
Comment actions Permalink

Are there any pre-made extra custom file types on the wiki at all? Sounds
like a good mini-project...


http://www.intellij.org/twiki/bin/view/Main/FileTypeDefinitions

0
Comment actions Permalink

On Wed, 24 Sep 2003 10:58:34 +0300, dimiter wrote:

>> Are there any pre-made extra custom file types on the wiki at all?
>> Sounds like a good mini-project...


http://www.intellij.org/twiki/bin/view/Main/FileTypeDefinitions


Excellent - just made another RPM to my collection for these file-types.

I should publish my .spec's on the wiki at some point as well.

--
"It's all in the heat of the moment, it's all in the pain..." Devy.
Mark Derricutt @ mark@talios.com @ talios.blog-city.com

0
Comment actions Permalink

On Wed, 24 Sep 2003 10:58:34 +0300, dimiter wrote:

http://www.intellij.org/twiki/bin/view/Main/FileTypeDefinitions


Interesting - I copied these to ./config/filetypes off my IDEAHOME
directory ( which happens to be /usr/local/idea from my RPMS ) but IDEA
ignores them. Theres a ~/.IntelliJIdea/config/filetypes directory in my
homedir, but nothing for system wide...

Hmmm.


--
"It's all in the heat of the moment, it's all in the pain..." Devy.
Mark Derricutt @ mark@talios.com @ talios.blog-city.com
Now Playing: %s

0
Comment actions Permalink

dimiter wrote:

Options > IDE Settings > File Types


Are there any plans to add functional support? (Take the parsing that
most text editors like bbEdit / EditPlus do). For example, taking a
regex to define the start/end of functions so automatic indentation can
be performed.

An example for one for PHP is: ^[ \t]function[ \t].\(*$
or for java: ^[ \t](public |protected |private |static).\(*$

Thoughts?

0

Please sign in to leave a comment.