Releases: uni-bremen-agst/SEE
Whiteboard – Drawable-System
This release incorporates the changes by @Cyclone1337 from pull request #736.
Builds for Windows and Linux are available below.
Integrate Language Server Protocol functionality into Code Windows
This release incorporates the changes by @falko17 from pull request #751.
Builds for Windows and Linux are available below.
Details
This PR integrates LSP-based information and functionality into SEE's code windows. It is the third and final part of my master's thesis implementation.
This PR resolves #686 and it resolves #728.
LSP integration
The following Language Server features have been integrated into Code Windows1:
- Semantic Tokens: Syntax highlighting has been implemented using the semantic tokens provided by the Language Server. These are "semantic" as they offer slightly more information than usual lexer-based syntax highlighting tools give us. For example, we can render static elements in italics as an additional modifier to their color.
- Diagnostics are highlighted using the issue highlighting mechanism implemented in #369. Hovering over the corresponding diagnostic yields the message associated to it.
- As part of this, a custom converter has been implemented that converts Markdown text to TextMeshPro rich text. This way, bold elements are rendered bold, monospace segments are rendered in a monospace font, etc. This is also used for the next item.
- Hover information is shown to the user when they hover above an element in the code window. This most frequently consists of the rendered documentation for the hovered element.
- Navigation features are available upon right click on any element in the code window. This opens a right click menu where the user can select from "Find references", "Go to declaration", "Go to definition", "Go to implementation", "Show supertypes", and "Show outgoing calls". Note that options are not shown if the Language Server does not support the respective navigation. Upon selecting any of these, a menu opens from which the user can select a target to jump to (unless there is only one option, in which case it will be opened immediately).
- When holding down the Ctrl button and clicking on an element in the code window, it will jump to the definition of that element, as is customary in many IDEs.
- Additionally, the bug behind the Call Hierarchy capability not working has been identified. It is due to a bug in the OmniSharp LSP library which has been reported to the upstream repository. A workaround has also been applied to SEE, so the capability works now.
Additional changes
- Menu entries for all UI menus in SEE now use a
char
instead of aSprite
, where the character represents a FontAwesome codepoint, in accordance with our new icon system. This makes it much easier to use new icons compared to the old Sprite-based system. - In code windows, when navigating to a certain line (either from a code city block or from the LSP navigation), the line number is marked in red to indicate the target line.
- The tooltip has been improved to be constrained to a maximum size while not becoming bigger than it has to. This effectively leads to soft wrap functionality for the Tooltip, making bigger Tooltips more likely to fit on the screen.
- A timeout has been added to the
DashboardRetriever
. By default, it will fail a request after 5 seconds, but this is configurable in the editor. - A bug has been fixed that lead to menu entries not being removed properly if the menu is modified.
- A
ReferenceEqualityComparer
class has been added from the .NET 5 source code. - The existing scanner infrastructure has been heavily refactored to support getting syntax highlighting information both from Antlr and LSP.
- Where applicable, plain data classes have been converted to records for brevity.
- Updated to Unity 2022.3.38f1.
-
Note that all of these features will only be used if the corresponding option in the LSP handler has been enabled. ↩
Generate Code Cities using the Language Server Protocol
This release incorporates the changes by @falko17 from pull request #727.
Builds for Windows and Linux are available below.
Summary
This PR implements the main part of my master's thesis: It allows users to generate code cities based on information provided by LSP language servers. (Integration of LSP beyond that, e.g., in code windows, is not yet implemented.)
There are also several other changes, such as a determinate progress spinner—see details below.
Supported languages
Below are all the languages SEE supports now. For all of these languages, there's at least one language server configured in LSPServer.cs
for which I've tested and confirmed that code cities can be generated with it.
For each language server, a link has been provided to installation instructions for it. It will be shown if it is detected that the server is not installed.
Programming languages
- C
- C++
- C#
- Dart
- Go
- Haskell
- Java
- JavaScript
- Kotlin
$\LaTeX$ - Lua
- MATLAB
- PHP
- Python
- Ruby
- Rust
- TypeScript
- Zig
Miscellaneous languages
- JSON
- LaTeX
- Markdown
- XML
Note
These are just the languages I've tested. If there are any other languages for which there's interest of adding support to SEE, it should be rather simple to add them to LSPServer.cs
.
Details
- A new
LSPGraphProvider
has been added, along with various related components (LSPImporter
,LSPHandler
,LSPLanguage
,LSPServer
). This makes up the majority of the changes for this pull request and is the biggest step of #686.LSPLanguage
andLSPServer
are purely data models to represent languages and language servers for the user to choose from, respectively.LSPHandler
handles the actual communication with the LSP server and abstracts over/wraps OmniSharp's LSP client.LSPImporter
contains the actual main algorithm responsible for creating a code city, using a previously set upLSPHandler
.- I won't go into more detail on each of these here, as it would take up a lot of space, and I plan to do it in the master's thesis anyway.
- An important caveat: Due to a bug in OmniSharp that seems time-consuming to fix for now, we cannot retrieve the call hierarchy (i.e., outgoing calls) for nodes. Hence, these will only show up as "reference" edges.
- For the LSP import to work efficiently, an interval tree has been implemented as an augmented KD-tree.
- This is used to match node ranges to the most "fitting" nodes.
- Tests have been added to make sure this works correctly.
- A progress bar has been added in the editor for code cities. This can be used to signal the progress of an ongoing graph creation process to the user.
- For this purpose, a callback has been added that graph providers can use to report their progress.
- A determinate progress spinner (i.e., one that updates based on progress reports) has been implemented. It can be used as
LoadingSpinner.ShowDeterminate("Loading something...", out Action<float> updateProgress
, whereupdateProgress
can be called with a float from 0 to 1 to indicate the progress percentage.- For loading processes in general, the process name is now shown below the loading spinner rather than when hovering above it. This makes it more legible to the user what is happening.
- Cooperative cancelling has been implemented for graph providers. That is, ongoing asynchronous processes can now be cancelled using a
CancellationToken
. Currently, loading processes can be canceled by clicking on "Reset data". - A general representation of Ranges has been implemented into
Attributable
. Internally, these are represented as four integers (start line, end line, start character, end character). - The containment logic for ranges has been fixed, as there were previously some subtle errors. Tests have been written to catch such errors in the future.
- Additionally, ranges are now (non-transitively) comparable in order to find out which of two ranges takes up more characters.
- A workaround for an upstream bug in the CI has been implemented by reverting to an earlier version of the
github-script
dependency. - Unity has been updated to 2022.3.26f1.
- As a result of the above changes, the following NuGet dependencies have been added:
- OmniSharp's LSP implementation to use as an LSP client
- Supercluster.KDTree for an efficient kd-tree implementation for the LSP import algorithm. It has been augmented for use as an interval tree in the class
KDIntervalTree<E>
. - Markdig as a Markdown processor for LSP-provided user-facing text. Currently, the markdown is simply converted to plaintext, but in the future, we can use Markdig to convert it to TextMeshPro rich text tags.
694 avoid player leaving the scene through wallsfloor
This release incorporates the changes by @SarahAugustinowski from pull request #713.
Builds for Windows and Linux are available below.
Details
This should fix #694 but only for DesktopPlayers. VR-Player Movements are not fixed yet.
A charactercontroller and its method Move is now used to move the Player instead of using transform.position.
Every object which has the default-layer is ignored by the collider-check of the charactercontroller, so i introduce a new layer "BoxCollider".
There might were some problems with merging master into this branch. For this case, here is a overview about changes done in SEEWorld:
- added empty objects in "3D Models/Structure"
- added Boxcollider to each empty around the office sceen
- added a layer called BoxCollider to project and assign it to the before named empty objects
Fix player menu issues
This release incorporates the changes by @falko17 from pull request #707.
Builds for Windows and Linux are available below.
Details
This fixes a few bugs and issues in the player (or "mode") menu, namely:
- This fixes #705, that is, the player menu can now be closed by pressing the "ToggleMenu" key (space by default). Previously, it could only be opened, due to all keyboard shortcuts being disabled when the menu was open. Note that pressing the ToggleMenu key while the search field is focussed will not lead to the menu closing, and will instead insert that text in the search field (otherwise that character would be unsearchable).
- This fixes #670, that is, the search in the player menu (and all other nested menus) now works correctly again. Previously, entries were duplicated in the search results and stayed there until SEE was restarted. Asynchronicity and a semaphore had to be introduced to solve this – the latter to prevent multiple searches running concurrently (in case multiple characters are entered per frame). Details on what was changed are in the commit message for 2dfa584.
- Ascent was swapped with descent in the NestedMenu class, because it seems more reasonable to me to assume the root of a hierarchy at the top rather than the bottom (previously, this was inverted).
- Finally, Unity was updated to version 2022.3.20f1.
693 graph provider
This release incorporates the changes by @koschke from pull request #699.
Builds for Windows and Linux are available below.
Details
Graph providers have been introduced.
A user can now configure pipelines of different graph providers, e.g.:
- Read a graph from a GXL file (
GXLGraphProvider
). - Read metrics from a CSV file (
CSVGraphProvider
) and add these to the graph. - Read coverage metrics from a JaCoCo test report (
JaCoCoGraphProvider
) and add these to the graph.
The introduction of graph providers creates a flexible scheme without adding all kinds of attributes to an AbstractSEECity for loading data - whether needed or not.
Configuration at run-time is rudimentary. One can only modify existing attributes. A following up issue #698 has been created for that.
Scrollable PopupMenu and Bugfixes
This release incorporates the changes by @falko17 from pull request #692.
Builds for Windows and Linux are available below.
Details
This makes the PopupMenu scrollable. Specifically, when it reaches a certain size (40% of screen height), it won't grow larger than that, and will display a scrollbar with which the menu can be scrolled (in addition to using the mouse wheel).
Additional changes
- Since the popup menu now has bounded height, the TreeView has been changed to allow the user to sort the entries by all existing numeric and string attributes, instead of just the pre-selected ones that were present before.
- Dashboard tests are now allowed to fail when run in context of the CI. Local test runs are not impacted by this.
- An issue has been fixed in which the TreeView did not re-open properly by pressing Tab if it had been closed by its close icon via the mouse.
- A bug has been fixed in which only the TreeView for one city has been opened by pressing Tab. Now, upon pressing Tab, the TreeView for every active city is added to the window as a tab.
Closes #679.
Delete files created by tests
TreeView: Filtering, Sorting, Grouping
This release incorporates the changes by @falko17 from pull request #681.
Builds for Windows and Linux are available below.
Details
Apart from a lot of smaller improvements to the TreeWindow, this pull request adds the following functionality (accessible via buttons next to the search bar):
- Filtering: Both the normal tree view and the graph search can apply a combination of filters, handled by the
GraphFilter
class. Currently, this only includes toggle attributes and a toggle for edges. Filtered elements will not be shown in the TreeWindow (orphan nodes and dangling edges are "lifted" upwards). - Sorting: Both the normal tree view and the graph search can sort the results by a number of attributes via the
GraphSorter
class. Currently, this includes the source name, the source line, the filename, and the type. Sorters are applied in order, and can be made descending or ascending on a case-by-case basis. - Grouping: In the tree view, elements can be grouped together (i.e., put below a root node together) via the
TreeWindowGrouper
class. Currently, this is possible with the reflexion state and the element type. Only one group can be applied at a time. The hierarchy is preserved here – for details on what this means, see #680. Elements that do not actually belong to the group are rendered in italics.
All three modifiers can be combined in any desired way (e.g., filters can still be applied while grouping elements). Additionally, it should be very easy to include additional filters/sorters/groupers with this structure in place.
Additional Changes
- A static
Icons
class has been added, so that icon glyphs can be easily reused across different contexts. See https://github.com/uni-bremen-agst/SEE/wiki/Icons for details. - Headings for PopupMenus have been implemented.
- A bug in the MoveAction has been fixed that led to nodes not being unparented correctly in a reflexion analysis context.
- An option has been added to keep PopupMenus open even after clicking on them.
- A
DefaultDictionary
has been added that adds and returns a default value if an accessed dictionary key does not actually exist. - A bug in the CI has been fixed which led to bad patterns not being detected correctly.
- Unity has been updated to version 2022.3.15f1.
- Additional smaller bug fixes.
TreeView: Search and smaller improvements
This release incorporates the changes by @falko17 from pull request #656.
Builds for Windows and Linux are available below.
Details
This implements a search field for the TreeView. Left-clicking on a result will reveal it in the full hierarchy of the TreeView, while a right-click highlights it within the scene.
The search algorithm was also refactored into a general GraphSearch
class, which may be used to search for graph elements outside the TreeView class as well.
Additionally, the old SearchMenu
has been fully removed, as its functionality is now present within the TreeView.