Forráskód Böngészése

BETA: Formatters for Java 8 and Eclipse Luna 4.4+.

Zoey76 11 éve
szülő
commit
8f59aeedda

+ 6 - 2
L2J_Server_BETA/.settings/org.eclipse.jdt.core.prefs

@@ -134,7 +134,7 @@ org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=81
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=85
 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=48
@@ -161,6 +161,7 @@ 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_lambda_body=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
@@ -205,8 +206,9 @@ org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=insert
@@ -254,6 +256,7 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=inser
 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
 org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
@@ -331,6 +334,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do n
 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert

+ 15 - 9
L2J_Server_BETA/.settings/org.eclipse.jdt.ui.prefs

@@ -1,5 +1,5 @@
-cleanup.add_default_serial_version_id=true
-cleanup.add_generated_serial_version_id=false
+cleanup.add_default_serial_version_id=false
+cleanup.add_generated_serial_version_id=true
 cleanup.add_missing_annotations=true
 cleanup.add_missing_deprecated_annotations=true
 cleanup.add_missing_methods=true
@@ -11,6 +11,7 @@ cleanup.always_use_blocks=true
 cleanup.always_use_parentheses_in_expressions=true
 cleanup.always_use_this_for_non_static_field_access=false
 cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=true
 cleanup.convert_to_enhanced_for_loop=true
 cleanup.correct_indentation=false
 cleanup.format_source_code=true
@@ -31,7 +32,7 @@ cleanup.qualify_static_method_accesses_with_declaring_class=false
 cleanup.remove_private_constructors=true
 cleanup.remove_trailing_whitespaces=false
 cleanup.remove_trailing_whitespaces_all=true
-cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_trailing_whitespaces_ignore_empty=true
 cleanup.remove_unnecessary_casts=true
 cleanup.remove_unnecessary_nls_tags=true
 cleanup.remove_unused_imports=true
@@ -42,18 +43,20 @@ cleanup.remove_unused_private_methods=true
 cleanup.remove_unused_private_types=true
 cleanup.sort_members=false
 cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
 cleanup.use_blocks=true
 cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
 cleanup.use_parentheses_in_expressions=true
 cleanup.use_this_for_non_static_field_access=true
 cleanup.use_this_for_non_static_field_access_only_if_necessary=true
 cleanup.use_this_for_non_static_method_access=true
 cleanup.use_this_for_non_static_method_access_only_if_necessary=true
-cleanup_profile=_L2J Clean Up v0.2
+cleanup_profile=_L2J Clean Up v0.3
 cleanup_settings_version=2
 eclipse.preferences.version=1
 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_L2J Formatter v0.3
+formatter_profile=_L2J Formatter v0.4
 formatter_settings_version=12
 org.eclipse.jdt.ui.exception.name=e
 org.eclipse.jdt.ui.gettersetter.use.is=true
@@ -78,6 +81,7 @@ sp_cleanup.always_use_blocks=true
 sp_cleanup.always_use_parentheses_in_expressions=true
 sp_cleanup.always_use_this_for_non_static_field_access=false
 sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=true
 sp_cleanup.convert_to_enhanced_for_loop=true
 sp_cleanup.correct_indentation=false
 sp_cleanup.format_source_code=true
@@ -94,24 +98,26 @@ sp_cleanup.organize_imports=true
 sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
 sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
 sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
 sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
 sp_cleanup.remove_private_constructors=true
 sp_cleanup.remove_trailing_whitespaces=false
 sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=true
 sp_cleanup.remove_unnecessary_casts=true
 sp_cleanup.remove_unnecessary_nls_tags=true
 sp_cleanup.remove_unused_imports=true
-sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_local_variables=true
 sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_members=true
 sp_cleanup.remove_unused_private_methods=true
 sp_cleanup.remove_unused_private_types=true
 sp_cleanup.sort_members=false
 sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
 sp_cleanup.use_blocks=true
 sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
 sp_cleanup.use_parentheses_in_expressions=true
 sp_cleanup.use_this_for_non_static_field_access=false
 sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true

+ 4 - 4
L2J_Server_BETA/java/com/l2jserver/gameserver/GeoData.java

@@ -1,18 +1,18 @@
 /*
  * Copyright (C) 2004-2014 L2J Server
- *
+ * 
  * This file is part of L2J Server.
- *
+ * 
  * L2J Server 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.
- *
+ * 
  * L2J Server 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 this program. If not, see <http://www.gnu.org/licenses/>.
  */

+ 3 - 4
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/RecipeData.java

@@ -68,8 +68,7 @@ public class RecipeData extends DocumentParser
 		{
 			if ("list".equalsIgnoreCase(n.getNodeName()))
 			{
-				recipesFile:
-				for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
+				RECIPES_FILE: for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
 				{
 					if ("item".equalsIgnoreCase(d.getNodeName()))
 					{
@@ -144,7 +143,7 @@ public class RecipeData extends DocumentParser
 								catch (Exception e)
 								{
 									_log.severe(getClass().getSimpleName() + ": Error in StatUse parameter for recipe item id: " + id + ", skipping");
-									continue recipesFile;
+									continue RECIPES_FILE;
 								}
 							}
 							else if ("altStatChange".equalsIgnoreCase(c.getNodeName()))
@@ -158,7 +157,7 @@ public class RecipeData extends DocumentParser
 								catch (Exception e)
 								{
 									_log.severe(getClass().getSimpleName() + ": Error in AltStatChange parameter for recipe item id: " + id + ", skipping");
-									continue recipesFile;
+									continue RECIPES_FILE;
 								}
 							}
 							else if ("ingredient".equalsIgnoreCase(c.getNodeName()))

+ 0 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/Hit.java

@@ -18,7 +18,6 @@
  */
 package com.l2jserver.gameserver.model;
 
-
 /**
  * @author UnAfraid
  */

+ 1 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/model/clientstrings/Builder.java

@@ -41,8 +41,7 @@ public abstract class Builder
 		final int arrayLength = array.length;
 		
 		char c, c2, c3;
-		LOOP:
-		for (; index1 < arrayLength; index1++)
+		LOOP: for (; index1 < arrayLength; index1++)
 		{
 			c = array[index1];
 			if ((c == '$') && (index1 < (arrayLength - 2)))