Repository navigation
Add the Structure tool window - #20
Merged
Merged
Conversation
The PSI module has returned a declaration outline since it was added, and nothing in the editor showed it. The Structure tool window lists the declarations of the active Visual X#, Kotlin, Java or Groovy document as an indented list. Selecting a declaration moves the caret to its start, and the declaration around the caret is marked. The list is read on a background thread, a moment after an edit so that typing does not parse once per key, and only while the tool window is open. The rows carry the document version they were read from, and a row of an older text does not navigate: its offsets would address other source. Python has a tokenizer and no parser, so the window says that it has no structure. The window is docked on the left below the Project tool window, with which it shares the column, opens from the stripe or with Alt+7, and is closed when Xide starts. StructureTest covers the rows, the declaration around an offset and the structure of each language; StructureUiTest drives the real shell: listing, navigation, the marked row, an edit, the shortcut and the empty states.
Leitwolf11
marked this pull request as ready for review
October 6, 2026 19:29
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PSI module has returned a declaration outline since #18, and nothing in the editor showed it. This adds the Structure tool window.
What it does
SourceAnalyzer.Alt+7and is closed when Xide starts.How it stays correct
Tests
StructureTest: rows from an outline, the innermost declaration around an offset, version check, the structure of each language, a text that does not parse, the empty cases.StructureUiTestdrives the real Compose shell: listing, hiding, navigation and the marked row, an edit,Alt+7, Kotlin, Python and no document../gradlew checkpasses locally on Windows.Not verified
Not in this change