Hi,

Below job will list the number of lines of code in the table "Address" methods.
It searches for the nodes which has source code or type method and will display 
the count of lines in it.If you want to change the table name..Refer to the 
comment and change the tablename.

 static void CountLines_method(Args _args)
{
    TreeNodeTraverser t;
    treeNode parentTreeNode;
    #AOT

    ;
    parentTreeNode = infolog.findNode(#TablesPath+'\\Address');// Change the 
Tablename
    t = new TreeNodeTraverser(parentTreeNode,false);
    while(parentTreeNode)
    {
        if (SysTreeNode::hasSource(parentTreeNode))
        {
            info(strfmt('MethodName "%1" contains -  %2 lines of 
code',ParentTreeNode.AOTname(),ConLen(str2Con(ParentTreeNode.AOTgetSource(),'\n'))));
        }
        parentTreeNode =  t.next();
    }
}

Regards,
Sreenath


--- On Mon, 9/29/08, geethramesh <[EMAIL PROTECTED]> wrote:
From: geethramesh <[EMAIL PROTECTED]>
Subject: [Axapta-Knowledge-Village] How to retrieve the number of lines of code 
?
To: Axapta-Knowledge-Village@yahoogroups.com
Date: Monday, September 29, 2008, 7:38 PM










    
            Hi,
I would require to get the count of the number of lines of code written.
Am able to run through the SysDictionary class (say for eg, to retrieve the 
list of tables and its methods). 
For each method, I would like to get the count of the lines of code written..
Is there any way I can make use of the Editor class > currentLineNo method ?

Any help is appreciated.

Thanks in advance,
GR.

      

    
    
        
         
        
        








        


        
        


      

Reply via email to