Skip to content

Grun.Net.config Details

Thad Ryker edited this page Mar 17, 2020 · 5 revisions

This configuration file has a number of different options broken up into the following groups

  • Syntax Highlighting Settings
  • Text Editor Settings
  • Graphing Color Settings
  • Graph Rendering Throttle Settings
  • Parser Message Settings

Syntax Highlighting

The syntax highlighting settings consist of various color and font sytle settings. All color settings will accept all valid HTML colors. This means you can supply colors by name or by hex codes ('Red' or '#FF0000' for example). The font style settings will take a value of Regular, Italics or Bold.

The various settings keys are as follows:

CommentTokenColor: The fore color to use when highlighting comment tokens.

CommentTokenBackgroundColor: The background color to use when highlighting comment tokens.

CommentTokenFontStyle: The font style to use when highlighting comment tokens.

KeywordTokenColor: The fore color to use when highlighting keyword tokens.

KeywordTokenBackgroundColor: The background color to use when highlighting keyword tokens.

KeywordTokenFontStyle: The font style to use when highlighting keyword tokens.

LiteralTokenColor: The fore color to use when highlighting literal tokens.

LiteralTokenBackgroundColor: The background color to use when highlighting literal tokens.

LiteralTokenFontStyle: The font style to use when highlighting literal tokens.

DefaultTokenColor: The fore color to use when highlighting all other tokens.

DefaultTokenBackgroundColor: The background color to use when highlighting all other tokens.

DefaultTokenFontStyle: The font style to use when highlighting all other tokens.

Text Editor Settings

The text editor settings consist of keys that determine the Font Family and Size used in the editor as well as color and behavior. The editor window only supports monospaced TrueType fonts. Attempting to use a font family that is not monospaced or TrueType will result in the default font family of 'Courier New' being assigned. Incorrectly spelling the font family name will similarly result in the default. The font size can be a valid decimal point or integer number. The colors may be any valid HTML color as above.

The keys are as follows:

EditorFontFamily: The font family to use in the editor window.

EditorFontSize: The font size to use in the editor window.

EditorTextColor: The color to use for editor text.

EditorBackgroundColor: The color to use for the editor background.

EditorCaretColor: The color to use for the editor caret cursor.

EditorCurrentLineColor: The color to use for highlighting the current line.

EditorLineNumberColor: The color to use for the line number indicator.

EditorWordWrap: Indicates whether word wrap is turned on.

EditorWordWrapIndent: The number of spaces word wrapped lines should be indented.

EditorAutoIndent: Indicates whether auto-indent is turned on.

EditorAutoBrackets: Indicates whether automatic bracket completion is turned on.

EditorTabLength: The number of spaces to convert a tab to.

Graphing Color Settings

The graphing color settings consist of keys that determine the colors to be used for each graph node. The three colors are text color, border color and background color. Valid values are any HTML color values as above.

The keys are as follows:

GraphNodeBorderColor: The color to use for graph node borders.

GraphNodeTextColor: The color to use for graph node text.

GraphNodeBackgroundColor: The color to use for graph node backgrounds.

Graph Rendering Throttle Settings

The graph rendering throttle settings are the most complex of the settings. These settings determine when GrunWin begins throttling the rate at which it renders the parse tree graph. The throttling feature exists to keep the tool performant and responsive. First there is a minimum node threshold number before throttling engages. It is important to remember that the throttling is reactive, based on the previous graph result. This means if you paste a massive chunk of text into the editor window, it will not initially engage throttling. However, the moment a change is made and it attempts to render the graph again, throttling will immediately kick in. As long as the graph contains fewer nodes than the threshold number, the graph will be rendered in real-time as you type. Once the node count meets or exceeds the threshold, throttling will kick in and that is when the other settings will matter. The next of those settings is the number of milliseconds to delay per graph node between rendering. The graphing system will multiply the current node count by this value to determine the total amount of milliseconds to delay before attempting to render the graph again. The third settings is the maximum number of milliseconds to delay for between renderings.
The previous two settings deal with throttling for short delays. The last settings deals with long throttling delays. A "long" throttling delay, is when GrunWin stops graphing altogether while the user is editing the source text. Once the user stops changing the text for at least a half second, graphing resumes. This last setting is another threshold value. It is the minimum number of render jobs that must stack up during a short delay, before GrunWin switches into a long throttling delay.

The keys are as follows:

NodeThresholdCountForThrottling: The minimum number of graph nodes that must exist before render throttling is engaged.

MillisecondsToDelayPerNodeWhenThrottling: The number of milliseconds to delay per node in the graph before the next render attampt (this only applies to short throttling delays).

MaximumRenderShortDelay: The maximum number of milliseconds to delay between renderings (this only applies to short throttling delays).

MinimumRenderCountToTriggerLongDelay: The minimum number of render jobs that must stack up during a short delay, before that delay transitions into a long delay.

Parser Message Settings

The parser message settings determine the font to use for displayed parser messages. The font family can be any valid family and the font size should be a valid decimal or integer font size.

ParserMessageFontFamily The font family to use in the parser message window.

ParserMessageFontSize: The font size to use in the parser message window.

Clone this wiki locally