AX2012自定义注释脚本开发
废话少说,直接进入主题:
1.在类xppSource中增加一个类似的方法:
eg.
Source ifElse(Source _condition = '',
Source _ifStatement = '', Source _elseStatement = '') { this.if(_condition,_ifStatement); source += '\n';
source += this.indent()+strFmt('else'); source += '\n';
this.block(_elseStatement);
return source; }
2.在类EditorScripts中增加一个类似的方法:
eg.
void last_classHeader(Editor editor)
{
xppSource xppSource = new xppSource(editor.columnNo());
Source template = xppSource.classHeader();
;
editor.insertLines(template);
}
3.打开一个Job,快捷方式Alt+R打开脚本就能看到你的脚本了。