Setting tab stops in line with the Java Coding conventions

Using the Java SDK with TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
armstrj
Posts: 1
Joined: Thu Jun 19, 2003 9:06 am

Setting tab stops in line with the Java Coding conventions

Post by armstrj »

http://java.sun.com/docs/codeconv/html/ ... 3.html#262
says that in Java code
Four spaces should be used as the unit of indentation. The exact construction of the indentation (spaces vs. tabs) is unspecified. Tabs must be set exactly every 8 spaces (not 4).
I think its impossible to do this correctly in TextPad. One needs to simultaneously achieve:

1. Pressing tab to move the cursor forward 4 spaces using spaces instead of tabs.

2. When opening a file with tab characters in tab stops should be set to every 8 characters.

I know how to do each of these on their own - but is it possible to do both at once?

At the moment I have to make do with just 1. which is fine when I look at my own code, but makes Sun's source code for Java look revolting.

Anyone know how to achieve this?
Post Reply