• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.clients
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • Last Change
  • Annotate
  • Revision Log

root/tags/OMERO.insight_3_Beta1/CodeTemplate

Revision 4691, 3.5 kB (checked in by jburel, 21 months ago)

replaced name shoola by OMEROClient

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/*
2 * org.openmicroscopy.package.ClassName
3 *
4 *------------------------------------------------------------------------------
5 *  Copyright (C) 2006 University of Dundee. All rights reserved.
6 *
7 *
8 *      This program is free software; you can redistribute it and/or modify
9 *  it under the terms of the GNU General Public License as published by
10 *  the Free Software Foundation; either version 2 of the License, or
11 *  (at your option) any later version.
12 *  This program is distributed in the hope that it will be useful,
13 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 *  GNU General Public License for more details.
16 * 
17 *  You should have received a copy of the GNU General Public License along
18 *  with this program; if not, write to the Free Software Foundation, Inc.,
19 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 *------------------------------------------------------------------------------
22 */
23 
24 //the above license blurb is required
25 
26 
27package org.openmicroscopy.package.ClassName;
28
29//follow the pattern below for imports
30
31//Java imports
32import java.lang.reflect.*;             //avoid *, specify actual classes if possible
33import javax.swing.Action;              //follow alphabetical order
34import javax.swing.JFrame;
35 
36//Third-party libraries
37import org.open.source.ClassX;
38import org.open.source.lib.ClassY;
39
40//Application-internal dependencies
41import org.openmicroscopy.pkg.ClassX;
42
43//REMEMBER:
44// * line lenght is 80 chars (may be more occasionally for long string litterals)
45// * tabs are 4 spaces
46
47/**
48 * Put class description here.
49 * Format descriptions using (basic) HTML as needed.
50 * Use {@link target name} to reference fields and methods.
51 * Use the "code" tag to enclose any symbol that is contained in the source
52 * code and that is not to be referenced -- for example, a keyword or a
53 * variable name.
54 *
55 * Excluding the author clause, which is optional, all other clauses
56 * below are required. Just cut and paste. The second line below is
57 * automatically handled by CVS, never modify it.
58 *
59 * @author Your Name, <a href="mailto:your@email">your@email</a>
60 * @version 2.2
61 * <small>
62 * (<b>Internal version:</b> $Revision$ $Date$)
63 * </small>
64 * @since OME2.2
65 */
66public abstract class Template
67        extends BaseClass       
68        implements Interface
69{
70        /** One-line description may have this style. */
71        public static final int A_CONSTANT = 1;
72       
73        /**
74         * If you need more than one line to describe a member field, use
75         * this common style.
76         */
77        private int             aMemberField;
78        private String  anotherField;   //use tabs to nicely align field names
79       
80        /**
81         * Put method description here.
82         * Method signature is described following the order below:
83         *
84         * @param param1        A tab before description
85         * @param param2        A tab before description
86         * @return Object       A tab before description
87         * @throws MyException  A tab before description
88         */
89        public Object aMethod(String param1, int param2)        //a space after commas
90                throws MyException      //throws clause on next line
91        {       
92                int k = 0;      //a space between each symbol pair, no space before semicolon
93                                        //optional line after vars declaration
94                while (k < 10) {        //a space between keywords and parentheses
95                        if (k == 3 || k == -1)  { //a space between condition and operator
96                                byte x = (byte) k++;    //a space between cast and symbols
97                                break;
98                        } else {
99                                k = methodX(par1, par2, par3);  //a space after commas
100                        }       //brackets may be omitted if just one statement is enclosed
101                }
102                try {
103                        //some more code...
104                } catch (Exception e) {
105                        //exception handling code...
106                }
107        }
108
109}
Note: See TracBrowser for help on using the browser.

Download in other formats:

  • Original Format

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/