Skip to content

Commit

Permalink
Add the new diagram directory methods to the diagrams/1 utility object
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoura committed Jul 27, 2014
1 parent 5400e60 commit 31e858c
Show file tree
Hide file tree
Showing 11 changed files with 162 additions and 14 deletions.
6 changes: 4 additions & 2 deletions RELEASE_NOTES.md
Expand Up @@ -80,8 +80,10 @@ generating entity predicate cross-reference diagrams.
* IMPROVED: The `diagrams` tool now allows overriding the default diagrams
layout direction.

* IMPROVED: The `diagrams` tool now prints public (or exported) predicate
nodes using a bold border and multifile predicate nodes using a lighter color.
* IMPROVED: When generating predicate cross-referencing diagrams for a single
entity, the `diagrams` tool now prints multifile predicate nodes using a
lighter color and prints locally declared public predicate nodes and module
exported predicate nodes using a bold border.

* FIXED: Bug in the `diagrams` tool when generating cross-referencing diagrams
for parametric entities.
Expand Down
84 changes: 82 additions & 2 deletions docs/diagrams_1.html
Expand Up @@ -27,7 +27,7 @@ <h1 class="code">diagrams(Format)</h1>
</dd>
<dt class="key">date:</dt>
<dd class="value">
<code>2014/6/20</code>
<code>2014/7/27</code>
</dd>
</dl>
<dl class="properties">
Expand Down Expand Up @@ -198,6 +198,86 @@ <h3 id="library/1" class="code">library/1</h3>
</dd>
</dl>
</div>
<div class="section">
<h3 id="directories/3" class="code">directories/3</h3>
<blockquote>
<p class="comment">Creates all supported diagrams for a set of directories using the specified options.</p>
</blockquote>
<dl class="properties">
<dt class="key">compilation flags:</dt>
<dd class="value">
<code>static</code>
</dd>
<dt class="key">template:</dt>
<dd class="value">
<code>directories(Project,Directories,Options)</code>
</dd>
<dt class="key">mode &ndash; number of solutions:</dt>
<dd class="value">
<code>directories(+atom,+list(atom),+list(compound)) &ndash; one</code>
</dd>
</dl>
</div>
<div class="section">
<h3 id="directories/2" class="code">directories/2</h3>
<blockquote>
<p class="comment">Creates all supported diagrams for a set of directories using the default options.</p>
</blockquote>
<dl class="properties">
<dt class="key">compilation flags:</dt>
<dd class="value">
<code>static</code>
</dd>
<dt class="key">template:</dt>
<dd class="value">
<code>directories(Project,Directories)</code>
</dd>
<dt class="key">mode &ndash; number of solutions:</dt>
<dd class="value">
<code>directories(+atom,+list(atom)) &ndash; one</code>
</dd>
</dl>
</div>
<div class="section">
<h3 id="directory/3" class="code">directory/3</h3>
<blockquote>
<p class="comment">Creates all supported diagrams for a directory using the specified options.</p>
</blockquote>
<dl class="properties">
<dt class="key">compilation flags:</dt>
<dd class="value">
<code>static</code>
</dd>
<dt class="key">template:</dt>
<dd class="value">
<code>directory(Project,Directory,Options)</code>
</dd>
<dt class="key">mode &ndash; number of solutions:</dt>
<dd class="value">
<code>directory(+atom,+atom,+list(compound)) &ndash; one</code>
</dd>
</dl>
</div>
<div class="section">
<h3 id="directory/2" class="code">directory/2</h3>
<blockquote>
<p class="comment">Creates all supported diagrams for a directory using default options.</p>
</blockquote>
<dl class="properties">
<dt class="key">compilation flags:</dt>
<dd class="value">
<code>static</code>
</dd>
<dt class="key">template:</dt>
<dd class="value">
<code>directory(Project,Directory)</code>
</dd>
<dt class="key">mode &ndash; number of solutions:</dt>
<dd class="value">
<code>directory(+atom,+atom) &ndash; one</code>
</dd>
</dl>
</div>
<div class="section">
<h3 id="files/3" class="code">files/3</h3>
<blockquote>
Expand Down Expand Up @@ -299,7 +379,7 @@ <h2>Remarks</h2>
<div class="section">
<dl class="remarks">
<dt class="comment">Common options:</dt>
<dd class="text">title/1, date/1, output_directory/1, relation_labels/1, node_type_captions/1, exclude_files/1, exclude_libraries/1, url_prefixes/1, and omit_path_prefix/1.</dd>
<dd class="text">title/1, date/1, output_directory/1, relation_labels/1, node_type_captions/1, exclude_files/1, exclude_libraries/1, url_prefixes/1, omit_path_prefix/1, entity_url_suffix_target/2, and layout/1.</dd>
</dl>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/diagrams_tool.html
Expand Up @@ -31,6 +31,6 @@ <h1>Diagrams tool</h1>
<li><a href="xref_diagram_0.html">xref_diagram</a></li>
<li><a href="xref_diagram_1.html">xref_diagram/1</a></li>
</ul>
<p>Generated on Sex 25 Jul 2014 12:16:56 WEST</p>
<p>Generated on Dom 27 Jul 2014 14:20:17 WEST</p>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/dot_graph_0.html
Expand Up @@ -27,7 +27,7 @@ <h1 class="code">dot_graph</h1>
</dd>
<dt class="key">date:</dt>
<dd class="value">
<code>2014/7/24</code>
<code>2014/7/26</code>
</dd>
</dl>
<dl class="properties">
Expand Down
2 changes: 1 addition & 1 deletion docs/entity_diagram_1.html
Expand Up @@ -27,7 +27,7 @@ <h1 class="code">entity_diagram(Format)</h1>
</dd>
<dt class="key">date:</dt>
<dd class="value">
<code>2014/6/20</code>
<code>2014/7/26</code>
</dd>
</dl>
<dl class="properties">
Expand Down
2 changes: 1 addition & 1 deletion docs/file_dependency_diagram_1.html
Expand Up @@ -27,7 +27,7 @@ <h1 class="code">file_dependency_diagram(Format)</h1>
</dd>
<dt class="key">date:</dt>
<dd class="value">
<code>2014/7/24</code>
<code>2014/7/26</code>
</dd>
</dl>
<dl class="properties">
Expand Down
2 changes: 1 addition & 1 deletion docs/file_load_diagram_1.html
Expand Up @@ -27,7 +27,7 @@ <h1 class="code">file_load_diagram(Format)</h1>
</dd>
<dt class="key">date:</dt>
<dd class="value">
<code>2014/6/18</code>
<code>2014/7/26</code>
</dd>
</dl>
<dl class="properties">
Expand Down
2 changes: 1 addition & 1 deletion docs/inheritance_diagram_1.html
Expand Up @@ -27,7 +27,7 @@ <h1 class="code">inheritance_diagram(Format)</h1>
</dd>
<dt class="key">date:</dt>
<dd class="value">
<code>2014/6/20</code>
<code>2014/7/26</code>
</dd>
</dl>
<dl class="properties">
Expand Down
2 changes: 1 addition & 1 deletion docs/uses_diagram_1.html
Expand Up @@ -27,7 +27,7 @@ <h1 class="code">uses_diagram(Format)</h1>
</dd>
<dt class="key">date:</dt>
<dd class="value">
<code>2014/6/20</code>
<code>2014/7/26</code>
</dd>
</dl>
<dl class="properties">
Expand Down
20 changes: 19 additions & 1 deletion docs/xref_diagram_1.html
Expand Up @@ -27,7 +27,7 @@ <h1 class="code">xref_diagram(Format)</h1>
</dd>
<dt class="key">date:</dt>
<dd class="value">
<code>2014/7/20</code>
<code>2014/7/26</code>
</dd>
</dl>
<dl class="properties">
Expand Down Expand Up @@ -96,6 +96,24 @@ <h2>Protected interface</h2>
</div>
<div class="private">
<h2>Private predicates</h2>
<div class="section">
<h3 id="included_predicate_/1" class="code">included_predicate_/1</h3>
<dl class="properties">
<dt class="key">compilation flags:</dt>
<dd class="value">
<code>dynamic</code>
</dd>
</dl>
</div>
<div class="section">
<h3 id="referenced_predicate_/1" class="code">referenced_predicate_/1</h3>
<dl class="properties">
<dt class="key">compilation flags:</dt>
<dd class="value">
<code>dynamic</code>
</dd>
</dl>
</div>
<div class="section">
<h3 id="external_predicate_/1" class="code">external_predicate_/1</h3>
<dl class="properties">
Expand Down
52 changes: 50 additions & 2 deletions tools/diagrams/diagrams.lgt
Expand Up @@ -28,11 +28,11 @@
:- info([
version is 2.0,
author is 'Paulo Moura',
date is 2014/06/20,
date is 2014/07/27,
comment is 'Predicates for generating all supported diagrams for libraries and files in one step using the specified format.',
parnames is ['Format'],
remarks is [
'Common options:' - 'title/1, date/1, output_directory/1, relation_labels/1, node_type_captions/1, exclude_files/1, exclude_libraries/1, url_prefixes/1, and omit_path_prefix/1.'
'Common options:' - 'title/1, date/1, output_directory/1, relation_labels/1, node_type_captions/1, exclude_files/1, exclude_libraries/1, url_prefixes/1, omit_path_prefix/1, entity_url_suffix_target/2, and layout/1.'
]
]).

Expand Down Expand Up @@ -131,6 +131,54 @@
library(Library) :-
::library(Library, []).

:- public(directories/3).
:- mode(directories(+atom, +list(atom), +list(compound)), one).
:- info(directories/3, [
comment is 'Creates all supported diagrams for a set of directories using the specified options.',
argnames is ['Project', 'Directories', 'Options']
]).

directories(Project, Directories, Options) :-
parameter(1, Format),
forall(
supported_diagram(Format, Diagram),
Diagram::directories(Project, Directories, Options)
).

:- public(directories/2).
:- mode(directories(+atom, +list(atom)), one).
:- info(directories/2, [
comment is 'Creates all supported diagrams for a set of directories using the default options.',
argnames is ['Project', 'Directories']
]).

directories(Project, Directories) :-
::directories(Project, Directories, []).

:- public(directory/3).
:- mode(directory(+atom, +atom, +list(compound)), one).
:- info(directory/3, [
comment is 'Creates all supported diagrams for a directory using the specified options.',
argnames is ['Project', 'Directory', 'Options']
]).

directory(Project, Directory, Options) :-
parameter(1, Format),
forall(
supported_diagram(Format, Diagram),
Diagram::directory(Project, Directory, Options)
).

:- public(directory/2).
:- mode(directory(+atom, +atom), one).
:- info(directory/2, [
comment is 'Creates all supported diagrams for a directory using default options.',
argnames is ['Project', 'Directory']
]).

directory(Project, Directory) :-
::directory(Project, Directory, []).

:- public(files/3).
:- mode(files(+atom, +list(atom), +list(compound)), one).
:- info(files/3, [
Expand Down

0 comments on commit 31e858c

Please sign in to comment.