This PR integrates LSP-based information and functionality into SEE's code cities. It is the second of three parts of my master's thesis.
LSP integration
Specifically, the following LSP-enabled features have been implemented for code cities:
HoverInfo details are displayed when hovering above nodes. This can be, for example, documentation for the given node, or the signature of a method represented by the node.
The context menu displays navigation actions common in IDEs (e.g., "Show references", or "Go to declaration"). When the target is a single node, it is highlighted in the city. When the target consists of multiple nodes, a modified view of the TreeView is used so that the user can further filter and navigate to the targets.
Diagnostic counts (i.e., the number of errors, warnings, etc.) are displayed as erosion icons above the corresponding nodes. The diagnostics are matched to each node using the same interval-tree based algorithm that was used in #727.
Note that the actual contents of the diagnostics are not yet displayed—this will be implemented as part of the third LSP pull request, which adds LSP functionality to code windows.
Major additional changes
Tooltip
The Tooltip class has been refactored in two major ways:
The tooltip is now a singleton (there will never be more than one tooltip on screen).
The tooltip will work as tooltips would work in other traditional GUIs. That is, the tooltip will disappear when the mouse is moved, and will re-appear when the mouse is kept still for a certain amount of time. The tooltip will stop appearing when the mouse leaves the region of interest.
Label
The label (ShowLabel) is now shown at the position of the laser pointer, instead of in the middle of the node. This has the advantage that the label is more easily readable (the center of the node might be off-screen) and also that the node-related information is visually close to each other if the node also has a tooltip.
To this end, I've added a custom shader that combines the portal functionality with an overlay modifier which makes sure that the label is always shown in front of other objects (otherwise, the label may clip into a nearby node). I have moved this shader and the portal shader out of the TextMeshPro plugin directory and into SEE's resources folder, as they are custom-made for SEE and not part of the original TextMeshPro release.
Minor additional changes
The erosion icon system has been changed to allow leaf erosions to show up on inner nodes. For an explanation, see ef1f8cb5765972532c13d8da063954fb09210cae.
The log level for Dissonance has been set to Error to avoid Dissonance cluttering the log with warnings about mic samples being lost.
The packages have been updated to their most recent versions. This includes a new major release of the OpenAI package, which necessitated a change in the PersonalSpeechAssistant imports.
Unity has been updated to 2022.3.32f1 (which is already out-of-date…)
This PR integrates LSP-based information and functionality into SEE's code cities. It is the second of three parts of my master's thesis.
LSP integration
Specifically, the following LSP-enabled features have been implemented for code cities:
HoverInfo
details are displayed when hovering above nodes. This can be, for example, documentation for the given node, or the signature of a method represented by the node.Major additional changes
Tooltip
The Tooltip class has been refactored in two major ways:
Label
The label (
ShowLabel
) is now shown at the position of the laser pointer, instead of in the middle of the node. This has the advantage that the label is more easily readable (the center of the node might be off-screen) and also that the node-related information is visually close to each other if the node also has a tooltip.To this end, I've added a custom shader that combines the portal functionality with an overlay modifier which makes sure that the label is always shown in front of other objects (otherwise, the label may clip into a nearby node). I have moved this shader and the portal shader out of the TextMeshPro plugin directory and into SEE's resources folder, as they are custom-made for SEE and not part of the original TextMeshPro release.
Minor additional changes
Error
to avoid Dissonance cluttering the log with warnings about mic samples being lost.PersonalSpeechAssistant
imports.