cleaning up code-style to normalize naming
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@60 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/eclipse/settings/code-style/Eclipse Warnings.txt b/eclipse/settings/code-style/Eclipse Warnings.txt
deleted file mode 100644
index 89b384e..0000000
--- a/eclipse/settings/code-style/Eclipse Warnings.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Eclipse Warnings:
-Code style
- Non-static access to static member
- Method with a constructor Name
-Potential programming problems
- Assignment as no effect: Error
- Possible accidental boolean assignment:Error
- finally does not complete normally
- Using a char array in string concatenation
- Hidden catch block
-Name shadowing and conflicts
- Field declaration hides another field or variable
- Type parameter hides another type
- Interface methods conflicts with protected Object method
-Depreciated and restricted API
- Forbidden reference:Error
-Unnecessary code
- Local variable is never read
- Unused import
- Unnecessary cast of instanceof operation
- Unused break/continue label
-
diff --git a/eclipse/settings/code-style/Instructions-3.1.0.txt b/eclipse/settings/code-style/Instructions-3.1.0.txt
deleted file mode 100644
index 2287f4c..0000000
--- a/eclipse/settings/code-style/Instructions-3.1.0.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-Eclipse 3.1.0 instructions
-
-Code style/formatting:
-Window->Preferences->Java->Code Style->Formatter->Import...->gwtformat.xml
-
-Import organization:
-Window->Preferences->Java->Code Style->Organize Imports->Import...->gwt.importorder
-
-Member sort order:
-Window->Preferences->Java->Appearance->Members Sort Order
-There is no import here, make your settings match sort-order.PNG
diff --git a/eclipse/settings/code-style/README.txt b/eclipse/settings/code-style/README.txt
new file mode 100644
index 0000000..e6def33
--- /dev/null
+++ b/eclipse/settings/code-style/README.txt
@@ -0,0 +1,32 @@
+Eclipse 3.2.X instructions
+
+Code style/formatting:
+Window->Preferences->Java->Code Style->Formatter->Import...->gwt-format.xml
+
+Import organization:
+Window->Preferences->Java->Code Style->Organize Imports->Import...->gwt.importorder
+
+Member sort order:
+Window->Preferences->Java->Appearance->Members Sort Order
+There is no import here, make your settings match gwt-sort-order.png
+
+Checkstyle:
+1. Checkstyle is used to enforce good programming style. The Eclipse Checkstyle plugin can be found at:
+http://eclipse-cs.sourceforge.net/.
+
+2. Importing the GWT Checkstyle configuration:
+Window->Preferences->Checkstyle->new->import->gwtCheckstyle.xml as GWT Checks
+
+
+3. Enabled Custom GWT Checkstyle checks:
+After the first ant-build, CustomChecks.jar is created in build/lib.
+Go to <path-to-my-eclipse>/plugins/com.atlassw.tools.eclipse.checkstyle_x.x.x directory and copy the CustomChecks.jar into the extension-libraries directory
+
+
+4. Enable Checkstyle for each project:
+Package Explorer-> Project Name -> Preferences->Checkstyle
+ Check Checkstyle active for this project, the rest of the configuration should be already loaded.
+
+
+
+
diff --git a/eclipse/settings/code-style/google.header b/eclipse/settings/code-style/google.header
deleted file mode 100644
index 7c4135d..0000000
--- a/eclipse/settings/code-style/google.header
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright 2006 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
\ No newline at end of file
diff --git a/eclipse/settings/code-style/gwtCheckStyle.xml b/eclipse/settings/code-style/gwt-checkstyle.xml
similarity index 79%
rename from eclipse/settings/code-style/gwtCheckStyle.xml
rename to eclipse/settings/code-style/gwt-checkstyle.xml
index b721072..4ce1af2 100644
--- a/eclipse/settings/code-style/gwtCheckStyle.xml
+++ b/eclipse/settings/code-style/gwt-checkstyle.xml
@@ -40,6 +40,8 @@
</module>
<module name="JavadocStyle">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Well formed java docs"/>
+ <property name="checkHtml" value="false"/>
+ <property name="tokens" value="CLASS_DEF,CTOR_DEF,INTERFACE_DEF,METHOD_DEF,VARIABLE_DEF"/>
</module>
<module name="NeedBraces">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="make sure if has braces"/>
@@ -58,7 +60,7 @@
<property name="tokens" value="METHOD_DEF"/>
</module>
<module name="Header">
- <property name="headerFile" value="${checkstyle.header.file}"/>
+ <property name="header" value="/*\n * Copyright 2006 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the "License"); you may not\n * use this file except in compliance with the License. You may obtain a copy of\n * the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */"/>
</module>
<module name="ImportOrder">
<property name="groups" value="com.google, com, junit, net,org, java,javax"/>
@@ -115,11 +117,15 @@
<module name="MemberName">
<property name="format" value="[a-z]|[a-z][a-z_0-9][A-Za-z0-9_]*|[a-z](?<!f)[A-Z0-9]*"/>
</module>
- <module name="GenericIllegalRegexp">
- <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Author tags not allowed"/>
- <property name="severity" value="error"/>
- <property name="format" value="author"/>
- <property name="message" value="Author tags not allowed"/>
+ <module name="TodoComment">
+ <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Author tags"/>
+ <property name="format" value="@author"/>
+ </module>
+ <module name="Regexp">
+ <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="No one line javadoc comments"/>
+ <property name="format" value="[/][*][*][^\n]*[*][/]"/>
+ <property name="message" value="No one line javadoc comments"/>
+ <property name="illegalPattern" value="true"/>
</module>
</module>
<module name="PackageHtml">
@@ -132,4 +138,11 @@
<property name="offCommentFormat" value="CHECKSTYLE_OFF"/>
<property name="onCommentFormat" value="CHECKSTYLE_ON"/>
</module>
+ <module name="SuppressionCommentFilter">
+ <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Avoid name checking"/>
+ <property name="offCommentFormat" value="CHECKSTYLE_NAME_CHECKING_OFF"/>
+ <property name="onCommentFormat" value="CHECKSTYLE_NAME_CHECKING_ON"/>
+ <property name="checkFormat" value=".*Name.*"/>
+ <property name="messageFormat" value=".*name.*"/>
+ </module>
</module>
diff --git a/eclipse/settings/code-style/gwtformat.xml b/eclipse/settings/code-style/gwt-format.xml
similarity index 100%
rename from eclipse/settings/code-style/gwtformat.xml
rename to eclipse/settings/code-style/gwt-format.xml
diff --git a/eclipse/settings/code-style/gwt-sort-order.png b/eclipse/settings/code-style/gwt-sort-order.png
new file mode 100644
index 0000000..f3ce6f6
--- /dev/null
+++ b/eclipse/settings/code-style/gwt-sort-order.png
Binary files differ
diff --git a/eclipse/settings/code-style/sort-order.PNG b/eclipse/settings/code-style/sort-order.PNG
deleted file mode 100644
index 67ee72c..0000000
--- a/eclipse/settings/code-style/sort-order.PNG
+++ /dev/null
Binary files differ