| Summary: | [rulers][ltk] Provide a bit more width by "integrating" the line numbers with the code | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dotan Cohen <bugs-eclipse-org-20110117> | ||||
| Component: | Text | Assignee: | Platform-Text-Inbox <platform-text-inbox> | ||||
| Status: | RESOLVED WONTFIX | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | daniel_megert, remy.suen, thatnitind | ||||
| Version: | 4.2 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Dotan Cohen
Created attachment 209168 [details]
Mockup
This mockup shows the proposed changes to the editor window. The only inconvenience to the coder is that the line number for line 9 is hidden. It is, however, easily inferred.
If you're inferring something, you're not entirely sure. In the mockup, when mixed with the code folding, there's no way to tell what line the visible import statement is on. What you'd probably want, instead, is a way to have the horizontal scrollbar increment and decrement its scrolling in chunks equal to the visible indentation's width. > If you're inferring something, you're not entirely sure. I am entirely sure that I would like a bit more horizontal space! There are a few places where that can be had, I started with one and I will propose more. I realize that this particular proposal is rather innovative and therefore controversial. > In the mockup, when mixed with the code folding, there's no way to tell > what line the visible import statement is on. Right, and what does it matter? Seriously, if I get into a situation that I need to know what line number the import statement is on, then I expand it and I can count. More likely, Eclipse will highlight the error and I won't have to count. The convenience of having an effectively wider code pane is more than worth that! > What you'd probably want, instead, is a way to have the horizontal scrollbar > increment and decrement its scrolling in chunks equal to the visible > indentation's width. No, quite the opposite. I want to reduce or eliminate the need for the horizontal scrollbar. There are several reasons why we don't plan to add this: - The line numbers would overlap with the whitespace characters. - The Quick Diff information would get lost for those lines where no line number is shown. - The line number ruler is not aware of any logic (e.g. code). A simple heuristic that prints the line number if there's not text would result in unreadable documents/text. We'd either have to provide a separate implementation for Java or introduce a hook where one can plug-in the heuristic. You could try to contribute your own ruler via 'org.eclipse.ui.workbench.texteditor.rulerColumns' extension point. I think it should be possible to draw into the text editor widget. |