I think if this is implemented then it needs some changes to account for selections. Stuff like "Minify/Beautify a single code block" would work best if you could select the code block first, but the example API has nothing related to selections.
Thinking about selections: Why use line/column? I think it would make sense to do things with character positions from 0/1 to the length of the script. It's simpler and supports selections better. Helper methods can be given to find what line/column a certain position is given the source of a script.
Another point: using character positions instead of line/column will make it very easy to get the section of the script referred to using
string.sub or other string tools that refer to character positions.
LuaSourceContainer Plugin.ActiveScript [read only]
The script which the user is currently editing
Plugin:OpenScript(script, int cursorStart, [int cursorEnd])
Opens the script with the given cursor.
If cursorEnd is omitted, it is as if cursorEnd is the same as cursorStart.
If cursorStart and cursorEnd are the same, then the cursor is placed at the position.
If cursorStart is before cursorEnd, then a selection is made from cursorStart to cursorEnd, with the cursor on cursorEnd.
If cursorEnd is before cursorStart, a selection is made from cursorEnd to cursorStart, with the cursor on cursorEnd (the beginning of the selection).
int cursorStart, int cursorEnd Plugin:GetCursorPosition()
Returns beginning and end of the selection. This follows the same rules as OpenScript.
Plugin:SetCursorPosition(int cursorStart, int cursorEnd)
Sets the position of the cursor in the active script. This follows the same rules as OpenScript.
Somewhere reasonable, the following could be implemented for convenience:
int line, int column :CursorPositionToLineAndColumn(string source, int cursorPosition)
int cursorPosition :LineAndColumnToCursorPosition(string source, int line, int column)