Skip to content

Commit 715e4c3

Browse files
committed
Add README
1 parent e7f7a40 commit 715e4c3

3 files changed

Lines changed: 32 additions & 4 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# LARA Visualization Tool
2+
3+
Clava integration of LARA's web tool for visualization and analysis of the AST and its source code.
4+
5+
For more details, see the [LARA Framework repository](https://github.com/specs-feup/lara-framework).
6+
7+
## Usage
8+
9+
To launch or update the visualization tool, execute the following statements:
10+
11+
```js
12+
import VisualizationTool from "clava-js/api/visualization/VisualizationTool.js";
13+
14+
await VisualizationTool.visualize();
15+
```
16+
17+
Once ready, Clava will provide the URL that should be opened in the browser to access the web interface. The function can also change the AST root and URL domain and port.
18+
19+
Other properties will allow the user to know other important information from the server:
20+
21+
```js
22+
VisualizationTool.isLaunched; // true if the server is running
23+
VisualizationTool.url; // URL where the server is running
24+
VisualizationTool.port; // port to which the server is listening
25+
VisualizationTool.hostname; // hostname to which the server is listening
26+
```
27+
28+
For more details, refer to the `GenericVisualizationTool` documentation, from [LARA](https://github.com/specs-feup/lara-framework).

Clava-JS/src-api/visualization/VisualizationTool.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import GenericVisualizationTool from 'lara-js/api/visualization/GenericVisualiza
33
import ClavaAstConverter from './ClavaAstConverter.js';
44

55
export class VisualizationTool extends GenericVisualizationTool {
6-
private joinPointConverter = new ClavaAstConverter();
6+
private astConverter = new ClavaAstConverter();
77
private static instance: VisualizationTool = new VisualizationTool();
88

99
public static getInstance(): VisualizationTool {
1010
return this.instance;
1111
}
1212

1313
protected override getAstConverter(): GenericAstConverter {
14-
return this.joinPointConverter;
14+
return this.astConverter;
1515
}
1616
}
1717

ClavaLaraApi/src-lara/clava/visualization/VisualizationTool.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)