Coding standards
In AgE platform we use the similar coding standards as in CAST project, except the following rules:
- packages suffix is org.jage.*
- Java file's header is set to:
/** * Copyright (C) 2006 - 2010 * Pawel Kedzior * Tomasz Kmiecik * Kamil Pietak * Krzysztof Sikora * Adam Wos * and other students of AGH University of Science and Technology * as indicated in each file separately. * * This file is part of jAgE. * * jAgE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * jAgE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with jAgE. If not, see http://www.gnu.org/licenses/ */ /* * File: ${filename} * Created: ${date} * Author: ${user} * $Id$ */
Eclipse configuration
To configure your Eclipse follow the instruction for CAST project using the files mentioned before. You need to download them to local drive and set correct paths.
Checkstyle
- configuration name: AgE Checks
- configuration file location: http://caribou.iisg.agh.edu.pl/pub/svn/age/jage/trunk/build-conf/src/main/resources/checkstyle/checkstyle.xml
- header file location (set as
${checkstyle.header.file
} property value):
http://caribou.iisg.agh.edu.pl/pub/svn/age/jage/trunk/build-conf/src/main/resources/checkstyle/age-header.txt
Code formating
- Formatter file location: http://caribou.iisg.agh.edu.pl/pub/svn/age/jage/trunk/build-conf/src/main/resources/eclipse/eclipse_age_formatter.xml
- Clean-up file location: http://caribou.iisg.agh.edu.pl/pub/svn/age/jage/trunk/build-conf/src/main/resources/eclipse/eclipse_age_cleanup.xml
- Code templates file location: http://caribou.iisg.agh.edu.pl/pub/svn/age/jage/trunk/build-conf/src/main/resources/eclipse/eclipse_age_codetemplates.xml
Recommended utility libraries
It is recommended to use well-supported utility libraries instead of writing own code for most common things like: parameter checking, extended collections, I/O etc. We encourage every developer working with AgE to use one of following libraries collections:
- Guava (Google Core Libraries): https://code.google.com/p/guava-libraries/
- Apache Commons: https://commons.apache.org/
You are free to use only one of them or explore their joined powers but try to follow the list of recommendations located below:
- For collections use Guava as it is more modern and constantly being improved.