mention reproducing and browser
[mir.git] / doc / CODINGSTYLE
1 last changed: $Date: 2002/12/08 07:05:56 $
2 ------------------------
3
4 please us spaces not tabs for indents. all indents should be 2 spaces wide.
5
6 If you use the vim editor, below is a good .vimrc entry for java files that
7 makes all tabs appear 2 chars. wide and makes indenting using the TAB key create
8 2 real spaces. It also sets the shiftwidth to 2 spaces.
9
10 in your .vimrc add the following:
11
12 autocmd FileType java source /path/to/file/.vimrc.java
13
14 create .vimrc.java and add the following:
15
16 set tabstop=2
17 set shiftwidth=2
18 set expandtab
19
20 if you can, please try to make your code terminal friendly so a line should
21 not be more than 80 characters wide pls. Not all mir code is like this and it
22 is not required (well what really is required?)
23
24 For java code, class names usually begin with a capital letter. e.g
25 StringUtils.java. Names for variables and methods should begin with a lower case
26 letter. However, if a variable or method is composed of more than one word
27 (glued together of course) the second and following word(s) should begin with
28 a capitalized letter. for example in the following code snippet:
29
30 String name = "titi";
31 Entity contentEntity = getContent();
32 contentEntity.setPropertyForValue("name", name);
33
34 some java code convention docs:
35
36 http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html