| <?xml version="1.0" encoding="utf-8"?> |
| <?xml-stylesheet type="text/xsl" href="../../wtp.xsl"?> |
| <html> |
| <head> |
| <title>wtp project naming conventions</title> |
| <meta name="root" content="../../.." /> |
| </head> |
| <body> |
| |
| <h1>naming conventions</h1> |
| <em>Updated 2004-11-05</em> |
| |
| <h2>Introduction</h2> |
| <p> |
| This document summarizes the WTP project naming conventions for plug-ins, packages, and CVS modules. |
| </p> |
| |
| <h3>Plug-ins and Packages</h3> |
| <p> |
| One of the main goals of this naming convention is to make it easy to find the component that any class belongs to. |
| This is achieved by adopting the convention of putting the component name in the package or plug-in name, preferably as the fourth |
| component. |
| </p> |
| <p> |
| The <a target="_top" href="http://help.eclipse.org/help30/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/naming.html">Eclipse |
| Platform Naming Conventions</a> state that following org.eclipse, the third component of the package or plug-in name |
| should be the subproject name, which in our case is wst or jst. |
| The fourth component is the component name, e.g. xml or jsp, unless the code is non-API which |
| is signalled by the use of one of the following reserved words: |
| </p> |
| <ul> |
| <li>internal - code internal to the plug-in, i.e. not part of its API</li> |
| <li>examples - example code</li> |
| <li>tests - test cases</li> |
| </ul> |
| <p> |
| If one of the reserved works appears as the fourth part of the name, then the fifth part should be the component name. |
| </p> |
| <p> |
| In the WTP project we are relaxing this convention so that the reserved word may appear after the |
| fourth component. For example, org.eclipse.wst.xml.tests indicates test cases that are used for the xml component |
| of the wst subproject. |
| The prefered usage is to put the reserved names in the fifth position, leaving the fourth position for the component name. |
| </p> |
| <p> |
| Consider the following examples for the server component of the wst subproject: |
| </p> |
| <ul> |
| <li>org.eclipse.server.ui.internal.debug - OK and the preferred naming</li> |
| <li>org.eclipse.server.internal.ui.debug - OK for compatibility with Eclipse platform guidelines, but not preferred</li> |
| <li>org.eclipse.server.ui.debug.internal - OK but not preferred</li> |
| <li>org.eclipse.ui.debug.internal - WRONG since the component name is missing</li> |
| </ul> |
| |
| |
| <h3>CVS Modules</h3> |
| <p> |
| The WTP project <a href="http://dev.eclipse.org/viewcvs/index.cgi/?cvsroot=WebTools_Project">CVS</a> repository is organized as follows. |
| The top level folder is the subproject name, i.e. wst or jst. |
| The second level contains a components folders. |
| The components folder contains one folder per component, e.g. xml or jsp. |
| Each component folder contains the following folders: |
| </p> |
| <ul> |
| <li>features - the component features</li> |
| <li>plugins - the comnponent plug-ins</li> |
| <li>tests - the component test suites packaged as plug-ins</li> |
| </ul> |
| <p> |
| Any of the features, plugins, and tests folders may be absent if they do not apply to the component. |
| </p> |
| <p> |
| For example, the <a href="http://dev.eclipse.org/viewcvs/index.cgi/wst/components/server/?cvsroot=WebTools_Project">server</a> |
| component of the wst subproject is organized as follows: |
| <ul> |
| <li>wst</li> |
| <ul> |
| <li>components</li> |
| <ul> |
| <li>server</li> |
| <ul> |
| <li>features</li> |
| <li>plugins</li> |
| <li>tests</li> |
| </ul> |
| </ul> |
| </ul> |
| </ul> |
| </p> |
| |
| </body> |
| </html> |