Changes between Version 9 and Version 10 of ScriptableInterface


Ignore:
Timestamp:
Sep 17, 2014, 4:04:59 PM (10 years ago)
Author:
manualwiki
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ScriptableInterface

    v9 v10  
    1010 * you can perform a series of batch refactorings in a single step by selecting multiple entities at once. \\ 
    1111 
     12=== Duplicated code analysis === 
     13==== Functions ==== 
     14* clone_identifierl/0: uses the default values of properties 
     15* clone_identifierl/1: takes a proplist as described above 
     16 
     17The default output format in this interface is the {{{nodes}}}, because for scripting {{{nodes}}} is the proper output format. 
     18However, any of the [CloneIdentifiErl#Algorithmsandprovidedservices available output formats] can be requested. 
     19 
     20* nodes: Returns the internal identifiers of the found clone groups. It is a good choice if you wish to further process the result by scripting using the ris interface. 
     21Command: {{{ris:clone_identifierl([{algorithm,sw_metrics}, {files,[ucl_alg_dm]}, {format,nodes}]).}}} 
     22{{{ 
     23[[[{entity,{'$gn',form,2}}],[{entity,{'$gn',form,3}}]]] 
     24}}} 
     25 
     26 
     27==== Result query functions ==== 
     28* show_dupcode/1 
     29* show_dupcode/2 
     30* show_dupcode_group/2 
     31* show_dupcode_group/3 
     32 
     33To find more information about these functions and their parameters please visit ErlangShellInterface. 
     34 
     35 
     36The result of the duplicated code detection can be used for scripting. 
     37 
     38==== Example ====  
     39 
     40We want to get every function that calls a duplicated code function. 
     41{{{#!erlang 
     42Clones = ris:clone_identifierl([{algorithm,sw_metrics}]). 
     43Calls = ris:q([lists:flatten(Clones),".called_by"]). 
     44ris:print(Calls). 
     45}}} 
    1246=== File manipulations === 
    1347