-
Notifications
You must be signed in to change notification settings - Fork 10
Add line numbers and code folding #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| * limitations under the License. | ||
| */ | ||
| package org.httprpc.sierra.tools.previewer; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you configure your editor so it doesn't reorder imports?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem, will do!
| editorPane.setCodeFoldingEnabled(true); | ||
| editorPane.setAntiAliasingEnabled(true); | ||
| editorPane.setEditable(true); // Ensure it's editable | ||
| editorPane.setEditable(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it editable by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep good catch, I'll remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the Sierra UI Previewer by replacing the standard JScrollPane with RTextScrollPane from the RSyntaxTextArea library, enabling line numbers and code folding indicators in the editor gutter. This improves the developer experience when editing Sierra XML files.
Key Changes:
- Reorganized imports to follow Java conventions (java., javax., org.* in alphabetical order)
- Changed
editorScrollPanefrom a UI-injected component (@outlet) to a manually created RTextScrollPane - Configured RTextScrollPane with line numbers and fold indicator support
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public MainFrame() { | ||
| super("Sierra UI Previewer"); | ||
|
|
||
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Trailing whitespace should be removed for consistency with the rest of the codebase.
Pull in RTextScrollPane and configure so gutter shows with line numbers and code folding (hover over gutter)