diff --git a/plugins/eclipse/src/org/jetbrains/idea/eclipse/importer/EclipseCodeStyleSchemeImporter.java b/plugins/eclipse/src/org/jetbrains/idea/eclipse/importer/EclipseCodeStyleSchemeImporter.java index 3c128ce92ccc..b3cc7ec25c32 100644 --- a/plugins/eclipse/src/org/jetbrains/idea/eclipse/importer/EclipseCodeStyleSchemeImporter.java +++ b/plugins/eclipse/src/org/jetbrains/idea/eclipse/importer/EclipseCodeStyleSchemeImporter.java @@ -246,6 +246,17 @@ public class EclipseCodeStyleSchemeImporter implements SchemeImporter #org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method= org.eclipse.jdt.core.formatter.indentation.size=Java:IndentOptions:INDENT_SIZE org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=Java:SPACE_WITHIN_EMPTY_METHOD_PARENTHESES @@ -167,7 +167,7 @@ org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized= org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=Java:SPACE_AFTER_TYPE_CAST org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=Java:SPACE_AFTER_COMMA #org.eclipse.jdt.core.formatter.brace_position_for_block_in_case= -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=Java:KEEP_BLANK_LINES_IN_CODE +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=Java: org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=Java:SPACE_BEFORE_METHOD_PARENTHESES org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=Java:SPACE_WITHIN_CATCH_PARENTHESES #org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration= @@ -219,7 +219,7 @@ org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=J #org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration= org.eclipse.jdt.core.formatter.wrap_before_binary_operator=Java:BINARY_OPERATION_SIGN_ON_NEXT_LINE #org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header= -#org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations= +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=Java:BLANK_LINES_AROUND_CLASS org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=Java:SPACE_WITHIN_SYNCHRONIZED_PARENTHESES #org.eclipse.jdt.core.formatter.indent_statements_compare_to_block= #org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration= diff --git a/plugins/eclipse/src/org/jetbrains/idea/eclipse/importer/EclipseXmlProfileElements.java b/plugins/eclipse/src/org/jetbrains/idea/eclipse/importer/EclipseXmlProfileElements.java index 40d9bd74b49f..b1b805c41dbd 100644 --- a/plugins/eclipse/src/org/jetbrains/idea/eclipse/importer/EclipseXmlProfileElements.java +++ b/plugins/eclipse/src/org/jetbrains/idea/eclipse/importer/EclipseXmlProfileElements.java @@ -63,6 +63,9 @@ public interface EclipseXmlProfileElements { String OPTION_ALIGN_CHAINED_CALLS = "org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation"; String OPTION_ALIGN_CONDITIONALS = "org.eclipse.jdt.core.formatter.alignment_for_conditional_expression"; + String OPTION_BLANK_LINES_BEFORE_FIRST_DECLARATION_IN_CLASS = "org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration"; + String OPTION_EMPTY_LINES_TO_PRESERVE = "org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve"; + int WRAP_MASK = 0x70; int DO_NOT_WRAP = 0x00; diff --git a/plugins/eclipse/testData/import/settings/eclipse_exported.xml b/plugins/eclipse/testData/import/settings/eclipse_exported.xml index 661c8d9a390c..7d3f95100c6a 100644 --- a/plugins/eclipse/testData/import/settings/eclipse_exported.xml +++ b/plugins/eclipse/testData/import/settings/eclipse_exported.xml @@ -80,7 +80,7 @@ - + @@ -164,7 +164,7 @@ - + @@ -217,7 +217,7 @@ - + diff --git a/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseSettingsImportTest.java b/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseSettingsImportTest.java index 9e3474eea351..acca9e192f1a 100644 --- a/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseSettingsImportTest.java +++ b/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseSettingsImportTest.java @@ -119,6 +119,12 @@ public class EclipseSettingsImportTest extends PlatformTestCase { javaSettings.ALIGN_MULTILINE_CHAINED_METHODS = false; javaSettings.TERNARY_OPERATION_WRAP = CommonCodeStyleSettings.DO_NOT_WRAP; javaSettings.ALIGN_MULTILINE_TERNARY_OPERATION = false; + javaSettings.BLANK_LINES_AFTER_CLASS_HEADER = -1; + javaSettings.BLANK_LINES_AFTER_ANONYMOUS_CLASS_HEADER = -1; + javaSettings.BLANK_LINES_AROUND_CLASS = -1; + javaSettings.KEEP_BLANK_LINES_IN_CODE = -1; + javaSettings.KEEP_BLANK_LINES_BEFORE_RBRACE = -1; + javaSettings.KEEP_BLANK_LINES_IN_DECLARATIONS = -1; indentOptions.USE_TAB_CHARACTER = false; indentOptions.SMART_TABS = false; indentOptions.TAB_SIZE = 3; @@ -217,6 +223,12 @@ public class EclipseSettingsImportTest extends PlatformTestCase { assertTrue(javaSettings.ALIGN_MULTILINE_CHAINED_METHODS); assertEquals(CommonCodeStyleSettings.WRAP_AS_NEEDED, javaSettings.TERNARY_OPERATION_WRAP); assertTrue(javaSettings.ALIGN_MULTILINE_TERNARY_OPERATION); + assertEquals(2, javaSettings.BLANK_LINES_AFTER_CLASS_HEADER); + assertEquals(2, javaSettings.BLANK_LINES_AFTER_ANONYMOUS_CLASS_HEADER); + assertEquals(3, javaSettings.BLANK_LINES_AROUND_CLASS); + assertEquals(5, javaSettings.KEEP_BLANK_LINES_IN_CODE); + assertEquals(5, javaSettings.KEEP_BLANK_LINES_IN_DECLARATIONS); + assertEquals(5, javaSettings.KEEP_BLANK_LINES_BEFORE_RBRACE); } finally { inputStream.close();