Bug 181848 - [misc] Fix indentation when displaying source code from java runtimes
Summary: [misc] Fix indentation when displaying source code from java runtimes
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-10 17:08 EDT by Walter Harley CLA
Modified: 2007-04-11 03:43 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Harley CLA 2007-04-10 17:08:07 EDT
Different teams treat tabs differently, and Eclipse has settings that meet the needs of virtually everyone.

However, regardless of individual team rules, we all have to look at the Java runtime source code from time to time.  And Sun is notorious for doing two things: using 8-space tab stops, and intermingling tabs and spaces.  The result is that unless one's own team rules involve 8-space tab stops (very unusual!), Java source becomes virtually unreadable, as a single space-indented line appears to be twice as deep as a single tab-indented line.

A specific fix would be to special-case the java runtime source code.  Since the Java runtime sources are in a well-defined location, and use well-known rules that do not correspond to most other teams' rules, it would be neat if the Java runtime source could be treated differently when displayed.  The code could either be displayed with 8-space tab stops, or dynamically reindented on the fly.

A more general alternative would be to always re-indent (pretty-print) the code when displaying source code for binary classes, regardless of what jar the class was found in (i.e., not just the java runtimes).  

Note that line breaks should never be changed, only indentation, in order to preserve stack traces.
Comment 1 Dani Megert CLA 2007-04-11 03:43:12 EDT
Would it be enough if you can set the Tab display with? Doing more would be too much as we would have to build a complete mapping layer in order make Debugging and other JDT tools work correctly.