Introduction

FireEdit is a small source code editor and is provided with basic editing functionalities. Since the idea is to extend it by the plugins system, as a basis FireEdit uses Fireball.Plugins, a class library developed for use as a base implementation for creating plugins system for any application. You can find the source of its dependencies here.

Using the Code

The objective of this article is to introduce how to implement your own plugin for FireEdit.

As an example for this article, I can use the simple plugin that adds to the HTML editor a bottom toolstrip with two buttons for switching from code to preview and vice versa.

Implementing your own plugin is very simple. You only need to inherit from FireEditPlugin, that is the base class used by FireEdit. For initializing your events and other things when the plugin is executed, you need to put this code in the Execute method by overriding it. For example, in this plugin I need to understand when a new CodeEditing window was created. See the following code:

The function must return truefor informing FireEdit that the plugin was loaded correctly. Now you are able to say when a new code editor was instanced but you need to say when the HTML language was set! See this piece of code:

Most of the code of this plugin is here. The rest is in the source code. I can't add it here for clarity. If you need more help or if you have created your own plugin, post a message on my forum.

N.B. To try your plugin, you need to load it from the Menu Plugins->Configure Plugins and click on Browse and Load Now. If you want the plugins to be loaded at startup, click on Load at Startup and next on Save Config. If you don't save ,the config can't be stored.

I was wondering if it was possible to get the code for the DLL that does the regions or at least the theory behind it so I can work on my own implimentation. I tried looking on your site, but I only speak English.

Hi, i'm currently doing an application to edit Ti-Basic (a programming languiage for texas instruments calculators), is opensource, and i'm doing in it on VB.Net

I was using:
http://www.mdxinfo.com/resources/scripting.php

to do the syntax hughlighting and the intellisense too...

It seems this control is too slow so i'm searching for a replacement, and i saw firedit, i notice it uses the fireball refenrences, and i was wondering if i could add this control to my software (and how)

When I input a chinese word with IME ,the word I typed appears twice.
For example, if I type“我不知道”，the text in the editor will be "我不知道我不知道"。
But when I copy some chinese words into the editor , everything is ok. I guess other language beside Chinese may have the same problem.

I have to manipulate automatically several lines of an opened file but I cannot find the access to the document lines. I want to change the backcolor of special lines and the line numbers set breakpoints and evaluate click events...

// Copyright (C) 2004 Sebastian Faltoni sebastian(at)dotnetfireball(dot)net
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#endregion License

using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;

----------------------------------------------------------------------------------------
(2) Class FireEditLineMarginRender.cs
----------------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
using Fireball.Windows.Forms;
using System.Drawing.Drawing2D;
using System.Drawing;

Now... I deleted all, downloaded fireedit.zip and firefx.zip here from codeproject and unpacked it. I didn't change any settings or code. I even have built the directory structure. I compile it and I get:
D:\FireBall\libs\Fireball.Core\Shell\ShellItem.cs(91,26): error CS0246: The type or namespace name 'IShellFolder' could not be found (are you missing a using directive or an assembly reference?)
D:\FireBall\libs\Fireball.Core\Shell\ShellItem.cs(246,16): error CS0246: The type or namespace name 'IShellFolder' could not be found (are you missing a using directive or an assembly reference?)
D:\FireBall\libs\Fireball.Core\Shell\ShellItem.cs(250,16): error CS0246: The type or namespace name 'IShellFolder' could not be found (are you missing a using directive or an assembly reference?)
D:\FireBall\libs\Fireball.Core\Shell\ShellItem.cs(255,16): error CS0246: The type or namespace name 'IShellFolder' could not be found (are you missing a using directive or an assembly reference?)
D:\FireBall\libs\Fireball.Core\Shell\ShellItem.cs(260,9): error CS0246: The type or namespace name 'IShellFolder' could not be found (are you missing a using directive or an assembly reference?)
D:\FireBall\libs\Fireball.Core\Drawing\GDI\FontEnum.cs(209,34): error CS0246: The type or namespace name 'ENUMLOGFONTEX' could not be found (are you missing a using directive or an assembly reference?)

So... has anybody the instructions how to compile it? The sources from www.dotnetfireball.net seem to miss the LineMarginRender class

Check out VS product feature comparison table at
http://msdn.microsoft.com/vstudio/products/compare/default.aspx
and look for "Class Designer / Object Test Bench". This functionality is not available in the free Express edition