platform-ui-home/code-conventions/index.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6, Wed Jan 28 16:25:29 2004 UTC revision 1.7, Fri Jan 30 17:50:31 2004 UTC
# Line 16  Line 16 
16                                          <img src="http://dev.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16 alt = "Eclipse idea banner">                                          <img src="http://dev.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16 alt = "Eclipse idea banner">
17                                  </td>                                  </td>
18                                  <td width="98%">                                  <td width="98%">
19                                  <p>The main Eclipse coding conventions can be found <a href="http://dev.eclipse.org/conventions.html">here</a>.                                  <p>The main Eclipse coding conventions can be found <a href="http://dev.eclipse.org/conventions.html">here</a>.</p>
20          The Platform UI Team has been using the following additional code conventions                                  <p>The Platform UI team separates the issue of coding
21          which can by applied by importing<a href="codeconventions.epf"> codeconventions.epf</a>.                                  conventions into two components: formatting, and compiler
22          For the newer code formatter (January 2004 or later), please use                                  warnings and errors.</p>
23          <a href="codeFormatter-PlatformUI.xml">codeFormatter-PlatformUI.xml</a></p>.                                  <p>For formatting, all of our code is formatted using the
24        <p>The changes are in the java and pde compiler settings.</p>                                  built-in "Java Conventions" formatter provided by JDT.  All
25        <!--                                  of imports should be organized using the default settings.
26                                  <p>Those that can be expressed with a preference can be imported <a href="codeconventions.epf">here.</a></p>                                  We discourage the use of the "Sort Memebers" functionality;
27                                  -->                                  however, if you are creating new files, feel free to use it
28                                    if you wish.  Do not use "Sort Members" on existing
29                                    code.</p>
30                                    <p>For compiler settings, we recommend changing the
31                                    following items from "Ignore" to "Warning".  As a note, it
32                                    is required that all Platform UI code (excluding code in
33                                    "org.eclipse.ui.tests") does not contain non-externalized
34                                    strings.
35                                    <ul>
36                                            <li>Style</li>
37                                            <ul>
38                                                    <li>Indirect access to a static member</li>
39                                                    <li>Possible accidental boolean assignment</li>
40                                                    <li>Undocumented empty block</li>
41                                            </ul>
42                                            <li>Advanced</li>
43                                            <ul>
44                                                    <li>Local variable declaration hides another field
45                                                    or variable</li>
46                                                    <li>Field declaration hides another field or
47                                                    variable</li>
48                                                    <li>Usage of non-externalized strings</li>
49                                            </ul>
50                                            <li>Unused Code</li>
51                                            <ul>
52                                                    <li>Local variable is never read</li>
53                                                    <li>Unused or unread private members</li>
54                                                    <li>Usage of deprecated API</li>
55                                                    <li>Unnecessary semicolon</li>
56                                                    <li>Unnecessary cast or 'instanceof' operation</li>
57                                            </ul>
58                                        </ul>
59                                        <p>These settings can be imported from this
60                                        <a href="codeConventions.epf">file</a>.
61                                  </td>                                  </td>
62                          </tr>                          </tr>
63                  </table>                  </table>

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7