Skip to content

Commit 911627c

Browse files
committed
Add eclipse formatting and cleanup configuration
1 parent be43627 commit 911627c

File tree

11 files changed

+851
-11
lines changed

11 files changed

+851
-11
lines changed

eclipse/eclipse-code-formatter.xml

Lines changed: 295 additions & 0 deletions
Large diffs are not rendered by default.

eclipse/org.eclipse.jdt.core.prefs

Lines changed: 389 additions & 0 deletions
Large diffs are not rendered by default.

eclipse/org.eclipse.jdt.ui.prefs

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
cleanup.add_default_serial_version_id=true
2+
cleanup.add_generated_serial_version_id=false
3+
cleanup.add_missing_annotations=true
4+
cleanup.add_missing_deprecated_annotations=true
5+
cleanup.add_missing_methods=false
6+
cleanup.add_missing_nls_tags=false
7+
cleanup.add_missing_override_annotations=true
8+
cleanup.add_missing_override_annotations_interface_methods=true
9+
cleanup.add_serial_version_id=false
10+
cleanup.always_use_blocks=true
11+
cleanup.always_use_parentheses_in_expressions=false
12+
cleanup.always_use_this_for_non_static_field_access=true
13+
cleanup.always_use_this_for_non_static_method_access=false
14+
cleanup.convert_functional_interfaces=false
15+
cleanup.convert_to_enhanced_for_loop=false
16+
cleanup.correct_indentation=false
17+
cleanup.format_source_code=true
18+
cleanup.format_source_code_changes_only=false
19+
cleanup.insert_inferred_type_arguments=false
20+
cleanup.make_local_variable_final=false
21+
cleanup.make_parameters_final=false
22+
cleanup.make_private_fields_final=false
23+
cleanup.make_type_abstract_if_missing_method=false
24+
cleanup.make_variable_declarations_final=false
25+
cleanup.never_use_blocks=false
26+
cleanup.never_use_parentheses_in_expressions=true
27+
cleanup.organize_imports=true
28+
cleanup.qualify_static_field_accesses_with_declaring_class=false
29+
cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
30+
cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
31+
cleanup.qualify_static_member_accesses_with_declaring_class=true
32+
cleanup.qualify_static_method_accesses_with_declaring_class=false
33+
cleanup.remove_private_constructors=true
34+
cleanup.remove_redundant_type_arguments=true
35+
cleanup.remove_trailing_whitespaces=true
36+
cleanup.remove_trailing_whitespaces_all=true
37+
cleanup.remove_trailing_whitespaces_ignore_empty=false
38+
cleanup.remove_unnecessary_casts=true
39+
cleanup.remove_unnecessary_nls_tags=false
40+
cleanup.remove_unused_imports=true
41+
cleanup.remove_unused_local_variables=false
42+
cleanup.remove_unused_private_fields=true
43+
cleanup.remove_unused_private_members=false
44+
cleanup.remove_unused_private_methods=true
45+
cleanup.remove_unused_private_types=true
46+
cleanup.sort_members=false
47+
cleanup.sort_members_all=false
48+
cleanup.use_anonymous_class_creation=false
49+
cleanup.use_blocks=true
50+
cleanup.use_blocks_only_for_return_and_throw=false
51+
cleanup.use_lambda=true
52+
cleanup.use_parentheses_in_expressions=false
53+
cleanup.use_this_for_non_static_field_access=true
54+
cleanup.use_this_for_non_static_field_access_only_if_necessary=false
55+
cleanup.use_this_for_non_static_method_access=false
56+
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
57+
cleanup.use_type_arguments=false
58+
cleanup_profile=_Spring Cloud Cleanup Conventions
59+
cleanup_settings_version=2
60+
eclipse.preferences.version=1
61+
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
62+
formatter_profile=_Spring Cloud Java Conventions
63+
formatter_settings_version=12
64+
org.eclipse.jdt.ui.exception.name=e
65+
org.eclipse.jdt.ui.gettersetter.use.is=false
66+
org.eclipse.jdt.ui.ignorelowercasenames=true
67+
org.eclipse.jdt.ui.importorder=java;javax;org;com;\#;
68+
org.eclipse.jdt.ui.javadoc=true
69+
org.eclipse.jdt.ui.keywordthis=false
70+
org.eclipse.jdt.ui.ondemandthreshold=9999
71+
org.eclipse.jdt.ui.overrideannotation=true
72+
org.eclipse.jdt.ui.staticondemandthreshold=9999
73+
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\n * Copyright 2013-2015 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of 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,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n\n${package_declaration}\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\nthrow new UnsupportedOperationException("Auto-generated method stub", ${exception_var});</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\nthrow new UnsupportedOperationException("Auto-generated method stub");</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
74+
sp_cleanup.add_default_serial_version_id=true
75+
sp_cleanup.add_generated_serial_version_id=false
76+
sp_cleanup.add_missing_annotations=true
77+
sp_cleanup.add_missing_deprecated_annotations=true
78+
sp_cleanup.add_missing_methods=false
79+
sp_cleanup.add_missing_nls_tags=false
80+
sp_cleanup.add_missing_override_annotations=true
81+
sp_cleanup.add_missing_override_annotations_interface_methods=true
82+
sp_cleanup.add_serial_version_id=false
83+
sp_cleanup.always_use_blocks=true
84+
sp_cleanup.always_use_parentheses_in_expressions=true
85+
sp_cleanup.always_use_this_for_non_static_field_access=true
86+
sp_cleanup.always_use_this_for_non_static_method_access=false
87+
sp_cleanup.convert_to_enhanced_for_loop=false
88+
sp_cleanup.correct_indentation=false
89+
sp_cleanup.format_source_code=true
90+
sp_cleanup.format_source_code_changes_only=false
91+
sp_cleanup.make_local_variable_final=false
92+
sp_cleanup.make_parameters_final=false
93+
sp_cleanup.make_private_fields_final=false
94+
sp_cleanup.make_type_abstract_if_missing_method=false
95+
sp_cleanup.make_variable_declarations_final=false
96+
sp_cleanup.never_use_blocks=false
97+
sp_cleanup.never_use_parentheses_in_expressions=false
98+
sp_cleanup.on_save_use_additional_actions=true
99+
sp_cleanup.organize_imports=true
100+
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
101+
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
102+
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
103+
sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
104+
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
105+
sp_cleanup.remove_private_constructors=true
106+
sp_cleanup.remove_trailing_whitespaces=true
107+
sp_cleanup.remove_trailing_whitespaces_all=true
108+
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
109+
sp_cleanup.remove_unnecessary_casts=true
110+
sp_cleanup.remove_unnecessary_nls_tags=false
111+
sp_cleanup.remove_unused_imports=true
112+
sp_cleanup.remove_unused_local_variables=false
113+
sp_cleanup.remove_unused_private_fields=true
114+
sp_cleanup.remove_unused_private_members=false
115+
sp_cleanup.remove_unused_private_methods=true
116+
sp_cleanup.remove_unused_private_types=true
117+
sp_cleanup.sort_members=false
118+
sp_cleanup.sort_members_all=false
119+
sp_cleanup.use_blocks=true
120+
sp_cleanup.use_blocks_only_for_return_and_throw=false
121+
sp_cleanup.use_parentheses_in_expressions=false
122+
sp_cleanup.use_this_for_non_static_field_access=true
123+
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false
124+
sp_cleanup.use_this_for_non_static_method_access=false
125+
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

pom.xml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<tag>HEAD</tag>
2121
</scm>
2222
<properties>
23+
<main.basedir>${basedir}</main.basedir>
2324
<archaius.version>0.6.3</archaius.version>
2425
<eureka.version>1.1.145</eureka.version>
2526
<feign.version>6.1.3</feign.version>
@@ -31,6 +32,34 @@
3132
<spring-integration-dsl.version>1.0.0.RELEASE</spring-integration-dsl.version>
3233
<cloud-connectors.version>1.1.1.BUILD-SNAPSHOT</cloud-connectors.version>
3334
</properties>
35+
<build>
36+
<plugins>
37+
<plugin>
38+
<groupId>org.apache.maven.plugins</groupId>
39+
<artifactId>maven-eclipse-plugin</artifactId>
40+
<configuration>
41+
<useProjectReferences>false</useProjectReferences>
42+
<additionalConfig>
43+
<file>
44+
<name>.settings/org.eclipse.jdt.ui.prefs</name>
45+
<location>${main.basedir}/eclipse/org.eclipse.jdt.ui.prefs</location>
46+
</file>
47+
<file>
48+
<name>.settings/org.eclipse.jdt.core.prefs</name>
49+
<location>${main.basedir}/eclipse/org.eclipse.jdt.core.prefs</location>
50+
</file>
51+
</additionalConfig>
52+
</configuration>
53+
</plugin>
54+
<plugin>
55+
<artifactId>maven-compiler-plugin</artifactId>
56+
<configuration>
57+
<source>1.7</source>
58+
<target>1.7</target>
59+
</configuration>
60+
</plugin>
61+
</plugins>
62+
</build>
3463
<dependencyManagement>
3564
<dependencies>
3665
<dependency>
@@ -267,15 +296,4 @@
267296
<module>spring-cloud-netflix-sidecar</module>
268297
<module>docs</module>
269298
</modules>
270-
<build>
271-
<plugins>
272-
<plugin>
273-
<artifactId>maven-compiler-plugin</artifactId>
274-
<configuration>
275-
<source>1.7</source>
276-
<target>1.7</target>
277-
</configuration>
278-
</plugin>
279-
</plugins>
280-
</build>
281299
</project>

spring-cloud-netflix-core/pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
<packaging>jar</packaging>
1313
<name>Spring Cloud Netflix Core</name>
1414
<description>Spring Cloud Netflix Core</description>
15+
<properties>
16+
<main.basedir>${basedir}/..</main.basedir>
17+
</properties>
1518
<dependencies>
1619
<dependency>
1720
<groupId>org.springframework.boot</groupId>

spring-cloud-netflix-eureka-server/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<name>Spring Cloud Netflix Eureka Server</name>
1313
<url>http://projects.spring.io/spring-cloud/</url>
1414
<properties>
15+
<main.basedir>${basedir}/..</main.basedir>
1516
<spring-cloud.version>1.0.0.BUILD-SNAPSHOT</spring-cloud.version>
1617
<wro4j.version>1.7.6</wro4j.version>
1718
</properties>

spring-cloud-netflix-hystrix-amqp/pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
<packaging>jar</packaging>
1313
<name>Spring Cloud Netflix Hystrix AMQP</name>
1414
<description>Spring Cloud Netflix Hystrix AMQP</description>
15+
<properties>
16+
<main.basedir>${basedir}/..</main.basedir>
17+
</properties>
1518
<dependencies>
1619
<dependency>
1720
<groupId>org.springframework.cloud</groupId>

spring-cloud-netflix-hystrix-dashboard/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<relativePath>..</relativePath>
1313
</parent>
1414
<properties>
15+
<main.basedir>${basedir}/..</main.basedir>
1516
<spring-cloud.version>1.0.0.BUILD-SNAPSHOT</spring-cloud.version>
1617
</properties>
1718
<dependencies>

spring-cloud-netflix-sidecar/pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
<packaging>jar</packaging>
1313
<name>Spring Cloud Netflix Sidecar</name>
1414
<url>http://projects.spring.io/spring-cloud/</url>
15+
<properties>
16+
<main.basedir>${basedir}/..</main.basedir>
17+
</properties>
1518
<dependencies>
1619
<dependency>
1720
<groupId>org.springframework.cloud</groupId>

spring-cloud-netflix-turbine-amqp/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<name>Spring Cloud Netflix Turbine AMQP</name>
1414
<description>Spring Cloud Netflix Turbine AMQP</description>
1515
<properties>
16+
<main.basedir>${basedir}/..</main.basedir>
1617
<rxjava.version>[1.0,1.1)</rxjava.version>
1718
<turbine.version>2.0.0-DP.2</turbine.version>
1819
</properties>

0 commit comments

Comments
 (0)