Changes between Version 27 and Version 28 of ErlangShellInterface


Ignore:
Timestamp:
Apr 13, 2013, 7:29:10 PM (12 years ago)
Author:
manualwiki
Comment:

Added tutorial for generating smart graph.

Legend:

Unmodified
Added
Removed
Modified
  • ErlangShellInterface

    v27 v28  
    254254{{{#!erlang 
    255255ri:print_dep/1 
     256}}} 
     257{{{#!comment 
     2583. For drawing smart graph: 
     259{{{#!erlang 
     260ri:generate_smart_graph/1 
     261}}} 
    256262}}} 
    257263 
     
    274280 * {{{dot}}} 
    275281    The file path of the generated {{{.dot}}} graph description. Unless it is a non-existing absolute path, the graph will be placed into the {{{./dep_files}}} directory. This option is only available when using {{{draw_dep}}}. 
     282{{{#!comment 
     283 * {{{output_path | string() }}} 
     284    This parameter is only for drawing smart graphs, and is optional. Smart graphs are stored in {{{.html}}} files. If this parameter is not set, the output will be a randomly generated {{{.html}}} file in your {{{tool/data}}} directory. 
     285}}} 
    276286 
    277287You can specify entities either with graph nodes (such as {{{{'$gn', func, 123}}}}) or with their identifier. Modules can be specified with their names as atoms (e.g. 'mnesia'), while functions are specified by their MFA descriptor as a string (e.g. "io:format/2") 
     
    326336{{{#!erlang 
    327337ri:print_dep([{level, func}, {gnode, ["cycle4:f5/1"]}]). 
     338}}} 
     339 
     340{{{#!comment 
     341* Drawing a smart graph by giving the output path. 
     342{{{#!erlang 
     343ri:generate_smart_graph([{dependency_options, [{type, all}]}, {dependency_level, func}, {output_path, "/tmp/alma.html"}]). 
     344}}} 
     345{{{#!erlang 
     346"Open a browser and go to file:///tmp/alma.html to see the result." 
     347}}} 
     348 
     349* Drawing a smart graph without the output path parameter. 
     350{{{#!erlang 
     351ri:generate_smart_graph([{dependency_options, [{type, all}]}, {dependency_level, mod}]). 
     352}}} 
     353{{{#!erlang 
     354"Open a browser and go to file:///home/aszabo/Dokumentumok/refactorerl/trunk/tool/data/sq_g3IAA2QAFXJlZmFjdG9yZXJsQGxvY2FsaG9zdAMAABJVAAAAAAAAAAA.html to see the result." 
     355}}} 
    328356}}} 
    329357