Graph
The Graph tab draws the whole project as an interactive graph. You can rearrange it, navigate from it to your source, and act on concepts and files through right-click menus.
What you see
| Shape | Meaning |
|---|---|
| Box with a header and rows | A concept. Each row is a field (has …) with its type and cardinality. |
| Rounded box | A property declared on its own. |
| Small square | A union type such as (Cat or Dog), used as a range or a field type. |
| Frame around boxes | A file: every node declared in one .dlf is grouped in the frame, labelled with the file name. |
| Line | Meaning |
|---|---|
| Thick, arrow | sub: the concept is a subclass of the one it points to. |
| Thin, arrow | has: a field pointing to its type. |
| Dashed, arrow | The range of a property. |
| Dotted | A member of a union. |
Nodes that do not belong to the open file are faded, so the file you are working on stands out. Hover a node to read its description. Hover a property (an arrow, a field row inside a box, or a property node) to read its # comment. A field or arrow without its own comment shows the comment of the top-level property of the same name, marked [inherited]. With neither, you see its signature, Domain -> Range, with cardinalities.
Moving around
| To | Do |
|---|---|
| Pan | Drag the background. |
| Zoom | Scroll (towards the pointer), or Zoom in / Zoom out in the magnifying-glass menu at the top right. The menu stays open, so you can click them several times. |
| Zoom into an area | Ctrl+drag (⌘+drag on a Mac) a rectangle. |
| Zoom out | Ctrl+Shift+drag a rectangle. |
| Move a node | Drag it. |
| Move a whole file | Drag its frame. |
| Start over | Reset layout, in the magnifying-glass menu at the top right, puts every node back where Agrafe first placed it. |
The layout, zoom included, is saved with the project: you find it as you left it, and so do the people you share the project with.
Going to the source
Hover a node: a ⌖ target appears at the right of its header. Click it to open the file at the declaration.
From the editor, right-click a name and choose Reveal in graph: the Graph tab opens, centres on the node and highlights it.
Right-click a node
| Item | Action |
|---|---|
| ⌖ Go to… | Opens the file at the declaration. Only for nodes that come from your source. |
| 🔗 Get references | Lists every place in the project where the name is used, with the line of source. Click one to go there. |
| 🕸 Show neighbors | Lists every node directly linked to this one (parents, children, field types, ranges…). Click one to go to its declaration. |
| 🆔 Copy id | Copies the node id, for example animals:Dog. |
| 📋 Copy label | Copies the displayed name, for example Dog. |
| ◎ Center in view | Pans so the node is in the middle, keeping the zoom. |
| ✏ Edit… | Opens the declaration’s source (header and body) in a box. Change it and Save (Ctrl+Enter). An edit that does not parse is refused and the box stays open. |
| 🔤 Rename | Turns the name on the node into a text box. Enter renames, Escape or clicking elsewhere cancels. Renames the concept or property and every reference to it, in every file of the project. Files that do not parse are left as they are, and named in a message. |
| ➕ New sub-concept… | Creates a concept with this one as its parent, in the same file. Concepts only. |
| ↗ Add property… | Adds a has name: type line inside the concept (cardinality optional: one string). If the concept has no body yet, it gets one. Concepts only. |
| ➕ New sub-property… | Creates a standalone property with a sub line pointing at this one. Properties only. |
| 🗑 Delete… | Removes the declaration, with its body and the # comment just above it. The box says how many references elsewhere will stop resolving. |
Right-click a property arrow
A has line draws an arrow from the concept to the property’s type. Right-click the arrow or its label for the same menu, acting on that has line: Go to… opens it, Copy id gives animals:owner, Edit… shows the line with its axioms, Rename puts a text box on the label and renames the property everywhere it is used, New sub-property… proposes the arrow’s concept and type as domain and range, Delete… removes the line, and Center in view centres on the arrow.
Right-click a file frame
| Item | Action |
|---|---|
| ✏ Rename file… | Opens a box with the file name (the folder is kept). Enter renames, Escape cancels. |
| 🗑 Delete file… | Asks for confirmation, then deletes the file. This cannot be undone. |
| ➕ Add concept… | Creates a concept (name, optional parent) at the end of the file. |
| ↗ Add property… | Creates a standalone property name: Domain -> Range at the end of the file, outside any concept. |
The round + button at the top left of the graph opens a menu with Concept and Property, which do the same in the open file.
Every change is written to the .dlf source, then the graph redraws. People with the file open see the change in their editor right away, and it appears in the file’s history like any other save.
The editing items and buttons are not offered on a public project.
Right-click the Graph tab
When other people have the project open, right-click the Graph tab title to choose what you see of them:
| Item | Action |
|---|---|
| Show / Hide others’ viewports | A labelled frame for the area each person is looking at. |
| Show / Hide others’ mouse | A dot with their name where their pointer is. |
Nodes someone else drags move on your screen too. See Collaboration.
When the graph is empty or dimmed
- Graph renders here after save: nothing has been saved yet.
- No concepts to draw yet. Write a
conceptand save.: the project compiles but declares no concept. - The graph needs source that parses.: nothing has compiled yet; the Problems panel says why.
- A dimmed graph under Showing the last valid graph… is the last version that compiled.