Scripted Plugins

Written by Mattias Cibien on Dec 16, 2014.

One of the pillars of SuperbEdit philosophy is extensibility: the editor must be customized from the ground up allowing users to extend its behavior and implement new functionality.

This is achieved through the use of Packages which, until now, has been limited to .NET (C#, VB, F#) compiled DLLs.

As of this week I started investigating on a way to include scripting languages as a way to extend the editor, without the need to build a DLL every time you make a change.

I started with IronPython with the IronPythonMEF extension since it seemed the easiest way but I was wrong at all since IronPython does not support .NET attributes by default.

This attributes (ExportAction,ExportPanel are some examples) are the pillars for extending the program at this time.

You can read more about this way of extending by checking out MEF, the Managed Extensibility Framework included from .NET 4.0

Attributes support can actually be implemented but it is pretty difficult and I was about to put scripting on hold when a Python-Like language built around .NET came to my mind: Boo

Boo has a syntax like Python but is built to work closely with .NET and has a clearer syntax than his brothers (no more self. for example). Most of all it has full support for attributes and .NET features.

In almost three hours I got the basic implementation running and re-wrote the dummy plugin using Boo.

import SuperbEdit.Base
import System
import System.ComponentModel.Composition

[ExportAction(Menu: "", Order: 0, Owner: "Dummy", RegisterInCommandWindow: true)]
class DummyBooAction(ActionItem):

  [Import]
  shell as Lazy[of IShell]

  def constructor():
    super("DummyBooLang", "Just a developer helper.")

  override def Execute():
    shell.Value.EchoMessage("Test message")

The architecture around scripting is also pretty simple: instead of interpreting at runtime the contents of the file SuperbEdit, when started, compiles the scripts in the Packages folder into assemblies and loads them into memory. Compiled code is always faster than fully interpret the script files.

Moreover this on-the-fly compiler is actually intelligent and won’t try to rebuild your script if not necessary so startup performance is not much affected.

The code for this can be found in the feature/boo-scripting branch on the repository and automated builds are available at the time of writing. Check it out!

Right now, I am going to implement full support for multiple script files plugins (since single-files ones are preety useless), better error handling when compiling scripts and try to make the engine more open to other scripting possibilities (Scripted C# can be a very nice option).

Note: IronPython support is not dropped in favour of Boo but at the moment there is no ETA for it.


First Stable Release

Written by Mattias Cibien on Nov 26, 2014.

I know that most of the people do not like to compile a simple program in order to use it.

For this reason I am proud to announce the first stable release of SuperbEdit. The basic features including syntax highlighting are now included and the editor itself is pretty usable and therefore it’s the time to give it a try.

Even if we are releasing a stable bear in mind that not all the feature are present in this version; Panels, for example are not fully implemented and only one can be present in the interface at this time.

At the moment with stable we mean something that is free of critical bugs. The first feature complete version will be 1.0.

We hope that by releasing this version the community will give us some feedback on the features they are needing the most and start to develop magnificent plug-ins.

Head over to the Download page and tell us what you think.


Version Schemes

Written by Mattias Cibien on Nov 25, 2014.

Today, after having worked on providing basic syntax highlighting to the editor I have decided that it was time to start providing decent version numbers for the program since, as far from now, has most of the features it needs.

For this the new semantic versioning approach has been adopted: it is fully integrated with the GitFlow branching model and completely automated on both manual compilation and Continuous Integration.

From now on you will actually find builds identified in a new way.

What does this mean to you? From now on when filing a bug you can specify the specific version you are using and therefore help us in finding the document.


We have a new homepage

Written by Mattias Cibien on Nov 17, 2014.

Finally I found some time to get the home page of SuperbEdit online.

Everything here at the moment is at the “We are beginning” phase but in the next days everything is going to be expanded.

Meanwhile some news about the editor itself.

We are working hard on providing a full text editor with syntax highlighting; Dan is actually seeing into integrating AvalonEdit as the default text component while I am focusing on completing the API and getting multiple panels available. Everything looks very promising.

Also, we are actually trying to create a unique branding from the program starting with a new icon created by Erica Barrese. Thanks to her we are finally going to have an identity in both your taskbar and our facebook pageinstead of relying on a stock icon.

As a closing note remember that we are an open-source initiative so, if you are willing to help us and learn something new just head over to the contributing page and make something cool. We are accepting any kind of submission to the program core.

Have a nice day.


Subscribe

RSS Feed