To create a Lua Add-in, copy the template found at the end of this file, and save it to a file with
*.nsla extension in the
C:\yPara\scriptIDE4\addIns\ directory.
There is a wiki page which describes the
Add-in Interface functions (the functions in the template with
addin_ prefix).
require("helper")
reference("siaIDEMain.dll")
reference("WeifenLuo.WinFormsUI.Docking")
function addin_connect(application, connectMode, addInInst, custom)
-- TODO: do initialization work
-- TODO: call addin_path() to register Commands, Content Viewers, etc.
end
function addin_disconnect(removeMode, custom)
end
function addin_getaddinwindow(PersistString)
end
function addin_onbeforeshutdown(cancel, custom)
end
function addin_onstartupcomplete(custom)
end
-- gets called when commands you registered via addin_path() are executed...
function addin_onnavigate(kind, source, command, args)
-- ...and dispatches these commands to Lua functions
-- e.g. command "MyAddin.DoSomething" will call function on_MyAddinDoSomething()
_G["on_"..command:gsub("%.", "_")](kind, source, command, args)
end
-- reserved for future use
function addin_onaddinupdate(addinChanged, custom) end