Navigation
Synopsis An outline is an IDE view with hyperlinks that quickly visualizes an outline of a source code file
Description To implement an outline, first make a function that maps a ParseTree to anything of node or a sub-type of node (any AlgebraicDataType or SyntaxDefinition will do).

The structure of the outline tree that you make will be displayed directly by the outline view in the IDE. To provide labels to the nodes use the label annotation (type str). To make the node a hyperlink, use the loc annotation.

Then, register the outliner:
rascal>import util::IDE;
ok
rascal>syntax Program = "main";
ok
rascal>registerOutliner("myLanguage", node (Program t) { 
>>>>>>>  n = "myNode"();
>>>>>>>  n@\loc = t@\loc;
>>>>>>>  n@label = "My node label";
>>>>>>>  return n;
>>>>>>>});
ok
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.