Need comment of our customized means - need to write code in EditorScript class
Need comment of our customized means - need to write code in EditorScript class
Public void template_flow_mycom(Editor editor)
{
xppSource xppSource = new xppSource(editor.columnNo());
int currentLine = editor.currentLineNo();
int currentCol = editor.columnNo();
//add opening comment
Source template = "// + My Comment (Added by "+curUserId()+" - INC-vinod - Start "+date2str(today(),123,2,4,2,4,4)+")\n";
;
//adds an empty line
template+= strRep(" ",currentCol)+ "\n";
//add closing comment with correct number of spaces
template+= strRep(" ",currentCol) + "// - My Comment -INC-Vinod - End";
editor.insertLines(template);
//move cursor to the empty line between the comments
editor.gotoLine(currentLine+2);
editor.gotoCol(currentCol+4);
}
Comments
Post a Comment