![]() |
|
Navigation |
Synopsis Create proposals from the symboltree from the label annotations.
Function
Usage
import util::ContentCompletion;
Description Create proposals from the symboltree from the label annotations.
The newText property of a proposal will be the symbol's name, the proposal text shown will be the label.
Remember to set the "label" annotation on the tree and all children.
Examples
rascal>import ParseTree; ok rascal>import Type; ok rascal>import util::ContentCompletion; ok rascal>SymbolTree symbol = symbol("main", "method", ()); SymbolTree: symbol( "main", "method", ()) rascal>symbol@label = "main (Entry Point)"; SymbolTree: symbol( "main", "method", ())[ @label="main (Entry Point)" ] rascal>createProposalsFromLabels(symbol); list[CompletionProposal]: [sourceProposal("main","main (Entry Point)")] ![]() |