Nags ; .NET API Generator for SciTE

Add intellisense-like capability to SciTE

A french version of the presentation is available here


Nags is a small practical tool for the user of the SciTE text editor. With Nags you can easily create API file from .NET assembly that can be then used with the built-in SciTE's autocompletation just like Visual Studio's intellisense.

Click here to download Nags (v0.3).

If you have ideas or feedback mail me at jeremie.laval[at]gmail[dot]com or post a comment here.

Nags installation

This is very simple, just extract the files from the archive somewhere on your hard disk. Binary version of Nags are provided in the bin directory, they have been compiled with Mono's gmcs compiler on Linux but it should work on Windows too. If you want to compile Nags yourself just run this command in the root folder of Nags :

cd src && gmcs -optimize+ /r:../bin/Mono.Cecil.dll /out:../bin/nags.exe Console.cs Parser.cs CommandLine.cs

Utilisation de Nags

For a complete list of commands type ''nags -help'' or ''nags'' in a terminal.

-out:{path} = this options tells nags where to write the API file.

-parse:{methods,properties,fields} = With this option you can choose what you want to parse in the assembly, NB : multiple values are possible, just separe them with comma.

-usekeywords = If you use this option it will turn on the replacement of .NET by type by langage specific keywords which are definined in the file config/keywords.conf.

-kwconfig:{path} = With this command you can choose a different config file for the replacement of .NET type.

For example to parse the Mono.Cecil.dll assembly you can use one of these commands :

  • mono nags.exe Mono.Cecil.dll
  • mono nags.exe -usekeywords Mono.Cecil.dll
  • mono nags.exe -usekeywords -kwconfig:../config/keywords.conf -out:Cecil.api Mono.Cecil.dll
  • mono nags.exe -parse:methods,properties Mono.Cecil.dll

Writing configuration files

With configuration files you can choose how Nags will translate the .NET type (like Int32) to your favorite langage specific keywords (like int for C#). Configuration file are formated with two value separated with a equal sign ('=') the left operand represents the .NET type and the right operand represents the langage keyword :

Void = void
Int32 = int
Int64 = long
Boolean = bool
String = string
Object = object
Byte = byte
Decimal = decimal
Float = float

Utilisation in SciTE

When you successfully created you API file you can use it in SciTE by adding this line in your User Options File (located in the Options menu) :

api.*.cs=~/.scite-api/mscorlib.api

Do not forget to change the path to the API file.

When everything is set up just hit Ctrl + I in order to show autocompletation.