-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Display line numbers for the file in the editor #1648
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
Great patch! May I ask you if its possible to add an option in the preferences to enable/disable the line numbering? C |
Absolutely! :) This is still open too, right? |
Can we disable this by default? So the IDE looks the same when you upgrade, but people can turn the line numbers on if they want to? |
Absolutely. I shall return :) |
To introduce myself - |
add preference to enable/disable line numbers and make font change work
Line numbers are disabled by default. If the user prefers to display line numbers, he should go to file, preferences, and check the corresponding box. |
Thank you! I will work on this in a few days. I need to get a grant application in first :) |
Fix the line number font rendering problem on the Mac. Now, the TextAreaLineNumbers class extends the TextAreaPainter and just overloads the paintLine method to make it render the line number instead of rendering the whole line. Other than that, the superclass' drawing code is used. So: the same drawing code that renders the source code text in the editor is now also being used to render the line numbers.
I switched it so the same drawing code that renders the source code text in the editor is now also being used to render the line numbers. This should fix the Mac font rendering issue that Lauszus pointed out. |
Works for me. Lauszus? C |
It works here as well. Great work @cayci! |
Thank you! Are you able to merge this enhancement, or will it need to wait On Sun, Nov 3, 2013 at 4:17 PM, Kristian Sloth Lauszus <
|
Merged, it will be available with the next IDE release 1.5.5. |
Adds a JTextPanel to the left of the TextAreaPainter in the JEditTextArea.
Stores this in a new "LEFT" component of the JEditTextArea's ScrollLayout.
The new line number component only updates and repaints when one of the parameters changes (the displayed line numbers of the panel width (which is based on the display width of the maximum number).
The line number panel may update whenever the updateScrollBars() or painter.repaint() methods are called.
This completes issue #1502.