diff --git a/docs/hacking-guide/en/formatting.md b/docs/hacking-guide/en/formatting.md index 40ee5857d3..e6c4979fcd 100644 --- a/docs/hacking-guide/en/formatting.md +++ b/docs/hacking-guide/en/formatting.md @@ -4,7 +4,7 @@ Eclipse code formatting and (basic) project configuration files can be found at copy them _after importing all your projects_: for settings_dir in `find . -type d -name .settings`; do - \cp -v etc/org.eclipse.jdt.* $settings_dir + \cp -v etc/ide-settings/org.eclipse.jdt.* $settings_dir done Do not use the [maven-eclipse-plugin](https://maven.apache.org/plugins/maven-eclipse-plugin/) to copy the files as it diff --git a/docs/hacking-guide/en/ide.md b/docs/hacking-guide/en/ide.md index d292c732de..04da56ecd3 100644 --- a/docs/hacking-guide/en/ide.md +++ b/docs/hacking-guide/en/ide.md @@ -70,6 +70,13 @@ It is strongly recommended to turn off the auto-updating of .gitignore files by generates new .gitignore files in many directories that are not needed due to the top level .gitignore file. To turn it off, go to Preferences->Team->Git->Projects and deselect the "Automatically ignore derived resources" checkbox. +### Checkstyle setup +You can import the Artemis Checkstyle template into eclipse to do Checkstyle validation. As a prerequisite you need to make sure the Checkstyle plugin is installed into Eclipse which you can get form the Eclipse Marketplace. You also will need to configure Sevntu-Checkstyle. See http://sevntu-checkstyle.github.io/sevntu.checkstyle/ for instructions. Then to configure the template: + +* Open: Window -> Preferences -> Checkstyle +* Select New -> "Project Relative Configuration" in the "Type" dropdown +* Give the configuration a name and under location put "/artemis-pom/etc/checkstyle.xml" then hit ok +* You should now see your new configuration in the list of Checkstyle profiles. You can select the new configuration as the default if you want. ### Annotation Pre-Processing diff --git a/etc/ide-settings/org.eclipse.jdt.core.prefs b/etc/ide-settings/org.eclipse.jdt.core.prefs index d1b8d712fd..330f389976 100644 --- a/etc/ide-settings/org.eclipse.jdt.core.prefs +++ b/etc/ide-settings/org.eclipse.jdt.core.prefs @@ -57,17 +57,17 @@ org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=0 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 -org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=same_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=same_line org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block=next_line -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line -org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line -org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_block=same_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=same_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=same_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=same_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=same_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=same_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=same_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=same_line org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true org.eclipse.jdt.core.formatter.comment.format_block_comments=true