diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 7abcfd623b6..9964ff946df 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -7,6 +7,7 @@ - [ ] Change in CHANGELOG.md described - [ ] Tests created for changes -- [ ] Screenshots added (for bigger UI changes) - [ ] Manually tested changed features in running JabRef +- [ ] Screenshots added in PR description (for bigger UI changes) +- [ ] Ensured that [the git commit message is a good one](https://github.com/joelparkerhenderson/git_commit_message) - [ ] Check documentation status (Issue created for outdated help page at [help.jabref.org](https://github.com/JabRef/help.jabref.org/issues)?) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77710a6cc15..33d3ac00004 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# ## [Unreleased] ### Changed +- Added "*.*" (any file type) to the Import File Filter Dialog. [#3757] (https://github.com/JabRef/jabref/issues/3757) - Abbreviate journal names functionality is now running parallel, increasing performance significantly. [#2831] (https://github.com/JabRef/jabref/issues/2831) - Changed order of items in context menu [#298] (https://github.com/koppor/jabref/issues/298) - Changed ID-based entry generator to store the last used fetcher. [#2796] (https://github.com/JabRef/jabref/issues/2796) @@ -33,10 +34,12 @@ For more details refer to the [field mapping help page](http://help.jabref.org/e - We improved file saving so that hard links are now preserved when a save is performed [#2633](https://github.com/JabRef/jabref/issues/2633) - We changed the default dialog option when removing a [file link](http://help.jabref.org/en/FileLinks#adding-external-links-to-an-entry) from an entry. The new default removes the linked file from the entry instead of deleting the file from disk. [#3679](https://github.com/JabRef/jabref/issues/3679) -- The group editing window can now also be called by double-clicking the group to be edited. [koppor#277](https://github.com/koppor/jabref/issues/277) - The magnifier icon at the search shows the [search mode](https://help.jabref.org/en/Search#search-modes) again. [#3535](https://github.com/JabRef/jabref/issues/3535) - We added a new cleanup operation that replaces ligatures with their expanded form. [#3613](https://github.com/JabRef/jabref/issues/3613) +- We added the function to parse German month names. [#3536](https://github.com/JabRef/jabref/pull/3536) - Pressing ESC while searching will clear the search field and select the first entry, if available, in the table. [koppor#293](https://github.com/koppor/jabref/issues/293) +- We changed the metadata reading and writing. DublinCore is now the only metadata format, JabRef supports. (https://github.com/JabRef/jabref/pull/3710) +- We added another CLI functionality for reading and writing metadata to pdfs. (see https://github.com/JabRef/jabref/pull/3756 and see http://help.jabref.org/en/CommandLine) ### Fixed - We fixed several performance problems with the management of journal abbreviations [#3323](https://github.com/JabRef/jabref/issues/3323) @@ -50,6 +53,7 @@ The new default removes the linked file from the entry instead of deleting the f - We fixed an issue where not all bibtex/biblatex fields would be exported as latex-free to MS-Office XML [koppor#284](https://github.com/koppor/jabref/issues/284) - We fixed an issue where linked files would be deleted from bibliography entries despite choosing the "Cancel" option in the dialog menu. - We fixed the name of the group editing window to "Add group" instead of "Edit Group" when adding a new group. [koppor#277](https://github.com/koppor/jabref/issues/277) +- We fixed an issue where the "Copy linked files" dialog produced an error when the entry had no file [#3818](https://github.com/JabRef/jabref/issues/3818) ### Removed - We removed the [Look and Feels from JGoodies](http://www.jgoodies.com/freeware/libraries/looks/), because the open source version is not compatible with Java 9. diff --git a/build.gradle b/build.gradle index a208157e09a..198e15edb84 100644 --- a/build.gradle +++ b/build.gradle @@ -124,7 +124,7 @@ dependencies { // JavaFX stuff compile 'com.airhacks:afterburner.fx:1.7.0' - compile 'de.codecentric.centerdevice:javafxsvg:1.2.1' + compile 'de.codecentric.centerdevice:javafxsvg:1.3.0' compile 'de.jensd:fontawesomefx-materialdesignfont:1.7.22-4' compile 'de.saxsys:mvvmfx-validation:1.7.0' compile 'de.saxsys:mvvmfx:1.7.0' @@ -154,8 +154,8 @@ dependencies { compile 'com.github.tomtung:latex2unicode_2.12:0.2.2' - compile group: 'com.microsoft.azure', name: 'applicationinsights-core', version: '1.0.9' - compile group: 'com.microsoft.azure', name: 'applicationinsights-logging-log4j2', version: '1.0.9' + compile group: 'com.microsoft.azure', name: 'applicationinsights-core', version: '2.0.1' + compile group: 'com.microsoft.azure', name: 'applicationinsights-logging-log4j2', version: '2.0.1' testCompile 'org.junit.jupiter:junit-jupiter-api:5.1.0' testCompile 'org.junit.jupiter:junit-jupiter-params:5.1.0' @@ -193,26 +193,6 @@ dependencyUpdates.resolutionStrategy = { selection.reject("Cannot be updated to 9.*.* until Jabref works with Java 9") } } - withModule("com.microsoft.azure:applicationinsights-core") { ComponentSelection selection -> - if (selection.candidate.version.equals("1.0.10")) { - selection.reject("Version 1.0.10 is broken... waiting for 1.0.11") - } - } - withModule("com.microsoft.azure:applicationinsights-logging-log4j2") { ComponentSelection selection -> - if (selection.candidate.version.equals("1.0.10")) { - selection.reject("Version 1.0.10 is broken... waiting for 1.0.11") - } - } - withModule("com.microsoft.azure:applicationinsights-core") { ComponentSelection selection -> - if (selection.candidate.version.equals("2.0.0-BETA")) { - selection.reject("Version 2.0.0-BETA is broken... waiting for a working version... see #3561") - } - } - withModule("com.microsoft.azure:applicationinsights-logging-log4j2") { ComponentSelection selection -> - if (selection.candidate.version.equals("2.0.0-BETA")) { - selection.reject("Version 2.0.0-BETA is broken... waiting for a working version... see #3561") - } - } withModule("de.jensd:fontawesomefx-materialdesignfont") { ComponentSelection selection -> if (selection.candidate.version ==~ /2.*/) { selection.reject("Cannot be upgraded to version 2") diff --git a/config/Eclipse Code Style.epf b/config/Eclipse Code Style.epf new file mode 100644 index 00000000000..f0a04dd9eb8 --- /dev/null +++ b/config/Eclipse Code Style.epf @@ -0,0 +1,328 @@ +#Fri Mar 09 22:05:27 CET 2018 +\!/= +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.argumentPrefixes= +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.argumentSuffixes= +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.fieldPrefixes= +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.fieldSuffixes= +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.localPrefixes= +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.localSuffixes= +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_enum_constants=48 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=88 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=1 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.format_block_comments=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.format_header=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.format_html=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.format_line_comments=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.format_source_code=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.line_length=120 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.compact_else_if=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.continuation_indentation=2 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.indent_empty_lines=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.indentation.size=4 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.join_lines_in_comments=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.join_wrapped_lines=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.lineSplit=9999 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.tabulation.char=space +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.tabulation.size=4 +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.use_on_off_tags=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=false +/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +/instance/org.eclipse.jdt.ui/formatter_profile=_eclipse-cs JabRef +/instance/org.eclipse.jdt.ui/formatter_settings_version=13 +/instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.cleanupprofiles=\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n +/instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.exception.name=e +/instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.formatterprofiles=\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n +/instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.formatterprofiles.version=13 +/instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.gettersetter.use.is=true +/instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.overrideannotation=true +/instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.text.custom_code_templates= +@org.eclipse.jdt.core=3.13.100.v20171123-1049 +@org.eclipse.jdt.ui=3.13.51.v20171122-0652 +file_export_version=3.0 diff --git a/config/README.md b/config/README.md index 76ec69f0770..4088be4eff3 100644 --- a/config/README.md +++ b/config/README.md @@ -15,3 +15,16 @@ Style-checks are done for each pull request and installing this cody style confi 10. Press "OK" * Please let `.editorconfig` override the settings of IntelliJ + + +# Eclipse: + +The Eclipse code formatter style is stored in the `eclipse.gradle` file and gets imported automatically. +In case the formatter style needs to be adapted, configure it and export in in eclipse. + +1. Right click on the eclipse project "JabRef" +2. Select "Export > General > Preferences" +3. Select "Java Code Style preferences" +4. Choose output file +5. Compare the formatter settings in the epf file with the ones in the eclipse.gradle file (`org.eclipse.jdt.core.formatter.`) +6. Replace the Eclipse Code Style.epf with the exported epf file diff --git a/config/eclipseJabRef.xml b/config/eclipseJabRef.xml deleted file mode 100644 index 55862811cd5..00000000000 --- a/config/eclipseJabRef.xml +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/adr/template.md b/docs/adr/template.md index e1672a2dc09..7402da4d20e 100644 --- a/docs/adr/template.md +++ b/docs/adr/template.md @@ -1,9 +1,22 @@ # [short title of solved problem and solution] -User Story: [ticket/issue-number] +* Status: [accepted | superseeded by [ADR-0005](0005-example.md) | deprecated | ...] +* Deciders: [list everyone involved in the decision] +* Date: [when the decision was last updated] + +Technical Story: [description | ticket/issue URL] + + +## Context and Problem Statement +[Describe the context and problem statement, e.g., in free form using two to three sentences. You may want to articulate the problem in form of a question.] + + +## Decision Drivers + +* [driver 1, e.g., a force, facing concern, ...] +* [driver 2, e.g., a force, facing concern, ...] +* ... -[context and problem statement] -[decision drivers | forces | facing] ## Considered Options @@ -12,22 +25,26 @@ User Story: [ticket/issue-number] * [option 3] * ... + ## Decision Outcome -Chosen option: [option 1], because [justification. e.g., only option, which meets k.o. criterion decision driver | which resolves force force | ... | comes out best (see below)]. +Chosen option: "[option 1]", because [justification. e.g., only option, which meets k.o. criterion decision driver | which resolves force force | ... | comes out best (see below)]. Positive Consequences: - - [e.g., improvement of quality attribute satisfaction, follow-up decisions required, ...] - - ... +* [e.g., improvement of quality attribute satisfaction, follow-up decisions required, ...] +* ... Negative consequences: - - [e.g., compromising quality attribute, follow-up decisions required, ...] - - ... +* [e.g., compromising quality attribute, follow-up decisions required, ...] +* ... + ## Pros and Cons of the Options ### [option 1] +[example | description | pointer to more information | ...] + * Good, because [argument a] * Good, because [argument b] * Bad, because [argument c] @@ -35,6 +52,8 @@ Negative consequences: ### [option 2] +[example | description | pointer to more information | ...] + * Good, because [argument a] * Good, because [argument b] * Bad, because [argument c] @@ -42,7 +61,15 @@ Negative consequences: ### [option 3] +[example | description | pointer to more information | ...] + * Good, because [argument a] * Good, because [argument b] * Bad, because [argument c] * ... + + +## Links + +* [Link type] [Link to ADR] +* ... diff --git a/eclipse.gradle b/eclipse.gradle index e4ab6fbc1ae..8efd725e98e 100644 --- a/eclipse.gradle +++ b/eclipse.gradle @@ -136,295 +136,310 @@ tasks.eclipse.doFirst { org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning - org.eclipse.jdt.core.formatter.align_type_members_on_columns=false - org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 - org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 - org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0 - org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 - org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 - org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 - org.eclipse.jdt.core.formatter.alignment_for_assignment=0 - org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 - org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 - org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0 - org.eclipse.jdt.core.formatter.alignment_for_enum_constants=48 - org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 - 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=16 - org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 - org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=88 - org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=80 - org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 - org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0 - org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 - org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 - org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 - org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 + org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert + org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert + org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines + org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert + org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert + org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert + org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines + org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 - org.eclipse.jdt.core.formatter.blank_lines_after_package=1 - org.eclipse.jdt.core.formatter.blank_lines_before_field=0 - org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=1 + org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert + org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert + org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert + org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines + org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false + org.eclipse.jdt.core.formatter.indentation.size=4 + org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert + org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert + org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert + org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert + org.eclipse.jdt.core.formatter.disabling_tag=@formatter\\:off + org.eclipse.jdt.core.formatter.continuation_indentation=1 + org.eclipse.jdt.core.formatter.alignment_for_enum_constants=48 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 - org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 - org.eclipse.jdt.core.formatter.blank_lines_before_method=1 - org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 - 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_after_package=1 + org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert + org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines + org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0 + org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert + org.eclipse.jdt.core.formatter.comment.indent_root_tags=true + org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=false + org.eclipse.jdt.core.formatter.enabling_tag=@formatter\\:on + org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert + org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false + org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert + org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 + org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert + org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false + org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=do not insert + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert + org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert + org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 - org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line + org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert + org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=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_new_line_after_annotation_on_method=insert + org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert + org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 + org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert + org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert + org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert + org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false + org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert + org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line - org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line + org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert + org.eclipse.jdt.core.formatter.comment.line_length=9999 + org.eclipse.jdt.core.formatter.use_on_off_tags=true + org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert + org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert + org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert + org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert + org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false + org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert + org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line + org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert + org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=18 + org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert + org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 + org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert + org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false + org.eclipse.jdt.core.formatter.alignment_for_binary_expression=18 + org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert + org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=18 + org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert + org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert + org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line - org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line - org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line - org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line - org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line - org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line - org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line + org.eclipse.jdt.core.formatter.compact_else_if=true + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert + org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true + org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18 + org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert + org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=18 + org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=18 org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false + org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert + org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false - org.eclipse.jdt.core.formatter.comment.format_block_comments=false - org.eclipse.jdt.core.formatter.comment.format_header=false - org.eclipse.jdt.core.formatter.comment.format_html=true - org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false - org.eclipse.jdt.core.formatter.comment.format_line_comments=false - org.eclipse.jdt.core.formatter.comment.format_source_code=true - org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true - org.eclipse.jdt.core.formatter.comment.indent_root_tags=true - org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert - org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert - org.eclipse.jdt.core.formatter.comment.line_length=9999 - org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true - org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true - org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false - org.eclipse.jdt.core.formatter.compact_else_if=true - org.eclipse.jdt.core.formatter.continuation_indentation=2 - org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 - org.eclipse.jdt.core.formatter.disabling_tag=@formatter\\:off - org.eclipse.jdt.core.formatter.enabling_tag=@formatter\\:on - org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert + org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert + org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert + org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=18 org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true - org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true - org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true - org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true - org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true - org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true - org.eclipse.jdt.core.formatter.indent_empty_lines=false - org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true - org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true - org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true - org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true - org.eclipse.jdt.core.formatter.indentation.size=4 - org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=do not insert - org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert - 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=do not insert - org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not 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=do not insert - org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert - org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert - org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert - org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert - org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert - org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert - org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert - org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert - org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert - org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert - org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert - org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert - org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert - org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert - org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert - org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert - org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert - org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert - org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert + org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 + org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert - org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert - org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert + org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert + org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert + org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert + org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert + org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert + org.eclipse.jdt.core.formatter.comment.format_line_comments=false org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert - org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert - 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 - org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert + org.eclipse.jdt.core.formatter.align_type_members_on_columns=false + org.eclipse.jdt.core.formatter.alignment_for_assignment=2 + org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 + org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert + org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true + org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert + org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 + org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=1 + org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=2 + org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert + org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false + org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert + org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert + org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line + org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line + org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert + org.eclipse.jdt.core.formatter.comment.format_header=false + org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert + org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert + org.eclipse.jdt.core.formatter.alignment_for_method_declaration=16 + org.eclipse.jdt.core.formatter.join_wrapped_lines=false + org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert + org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true + org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true + org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert + org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 + org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true + org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line + org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert + org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=26 + org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false + org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines + org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=18 + org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert - org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert - org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert + org.eclipse.jdt.core.formatter.tabulation.size=4 + org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert + org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert + org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert + org.eclipse.jdt.core.formatter.comment.format_source_code=true + org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert + org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert + org.eclipse.jdt.core.formatter.blank_lines_before_field=0 + org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert + org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1 + org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert + org.eclipse.jdt.core.formatter.blank_lines_before_method=1 + org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 + org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0 + org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert + org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false + org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert + org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert + org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert + org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert + org.eclipse.jdt.core.formatter.comment.format_html=true + org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert + org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert + org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines + org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 + org.eclipse.jdt.core.formatter.indent_empty_lines=false + org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert + org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert + org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false + org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true + org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert - org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert - org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert + org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 + org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert + org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true + org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert + org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=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_comma_in_method_declaration_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert - org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert - org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert - org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert - 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.blank_lines_before_member_type=1 + org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert + org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=18 + org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert + org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert + org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true + org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert + org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert + org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=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 - org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert + org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert + org.eclipse.jdt.core.formatter.comment.format_block_comments=false + org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert + org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert + org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert + org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18 + org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert + org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true + org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert + org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert + org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line + org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true + org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert + org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert + org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert + org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines + org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert + org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true + org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert + org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line + org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line + org.eclipse.jdt.core.formatter.blank_lines_before_package=0 + org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert - org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert - org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert - org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert - org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert - org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert - org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert - org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert - org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert - org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert - org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert - org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert - org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert - org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert - org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert + org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 + org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert + org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert + org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true + org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert org.eclipse.jdt.core.formatter.join_lines_in_comments=false - org.eclipse.jdt.core.formatter.join_wrapped_lines=false - org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false - org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false - org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false - org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false - org.eclipse.jdt.core.formatter.lineSplit=9999 - org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false - org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false - org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 - org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 - org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true - org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines - org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocationc=common_lines - org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines - org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines - org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines + org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert + org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true + org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert org.eclipse.jdt.core.formatter.tabulation.char=space - org.eclipse.jdt.core.formatter.tabulation.size=4 - org.eclipse.jdt.core.formatter.use_on_off_tags=true - org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false - org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true - org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=false - org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true + org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert + org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 + org.eclipse.jdt.core.formatter.lineSplit=9999 + org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert + org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter '''. stripIndent()) diff --git a/lib/customjfx-1.0.0.jar b/lib/customjfx-1.0.0.jar deleted file mode 100644 index 4636cdd8975..00000000000 Binary files a/lib/customjfx-1.0.0.jar and /dev/null differ diff --git a/scripts/syncLang.py b/scripts/syncLang.py index 150d1bbc662..0b2386b3617 100644 --- a/scripts/syncLang.py +++ b/scripts/syncLang.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import division +import argparse # Requires Python 2.7, should be safe to use with jython. import codecs import datetime import logging @@ -13,8 +14,50 @@ RES_DIR = "src/main/resources/l10n" URL_BASE = "https://github.com/JabRef/jabref/tree/master/src/main/resources/l10n/" +try: + # Just to make sure not to break anything, in case py3.x is not supported. + import pathlib + + class PathFinder: + """ + This class is designed to automatically locate this script's path within the repository. + Once it found it's location it can easily provide paths to other important directories and files. + + requires Python 3.4 or higher + """ + + BASE_DIRECTORY_NAME = 'jabref' + + @staticmethod + def getJabRefBaseDirectory(): + """ + Searches the script's path backwards until it finds the matching base directory. + :return the path to JabRef's base directory as pathlib.Path object. + """ + cwd = pathlib.Path.cwd() + if cwd.name == PathFinder.BASE_DIRECTORY_NAME: + return cwd + + for parent in cwd.parents: + if parent.name == PathFinder.BASE_DIRECTORY_NAME: + return parent + # TODO What to do if base directory could not be found? + + # Important directories of the JabRef repository + JABREF_BASE_DIRECTORY = PathFinder.getJabRefBaseDirectory() + JABREF_SOURCE_DIRECTORY = JABREF_BASE_DIRECTORY / 'src' + JABREF_SCRIPTS_DIRECTORY = JABREF_BASE_DIRECTORY / 'scripts' + JABREF_LOCALIZATION_DIRECTORY = JABREF_SOURCE_DIRECTORY / 'main/resources/l10n' + + # Important files + JABREF_MAIN_LOCALIZATION_FILE = JABREF_LOCALIZATION_DIRECTORY / 'JabRef_en.properties' + JABREF_MAIN_MENU_LOCALIZATION_FILE = JABREF_LOCALIZATION_DIRECTORY / 'Menu_en.properties' +except ImportError: + logging.info("Unable to use PathFinder class.") + class Git: + def get_current_branch(self): """ :return: the current git branch @@ -36,10 +79,11 @@ def __call_command(self, command): class Keys: + def __init__(self, lines): self.lines = lines - def duplicates(self): + def find_duplicates(self): """ return: list of unicode strings """ @@ -49,8 +93,8 @@ def duplicates(self): key, value = self.__extract_key_and_value(line=line) if key: if key in keys_checked: - duplicates.append(u"{key}={value}".format(key=key, value=value)) - translation_in_list = "u{key}={value}".format(key=key, value=keys_checked[key]) + duplicates.append(self.format_key_and_value(key=key, value=value)) + translation_in_list = self.format_key_and_value(key=key, value=keys_checked[key]) if translation_in_list not in duplicates: duplicates.append(translation_in_list) else: @@ -70,15 +114,15 @@ def fix_duplicates(self): if key: if key in keys: if not keys[key]: - fixed.append("{key}={value}".format(key=key, value=keys[key])) + fixed.append(self.format_key_and_value(key=key, value=keys[key])) keys[key] = value elif not value: - fixed.append("{key}={value}".format(key=key, value=value)) + fixed.append(self.format_key_and_value(key=key, value=value)) elif keys[key] == value: - fixed.append("{key}={value}".format(key=key, value=value)) + fixed.append(self.format_key_and_value(key=key, value=value)) elif keys[key] != value: - not_fixed.append("{key}={value}".format(key=key, value=value)) - not_fixed.append("{key}={value}".format(key=key, value=keys[key])) + not_fixed.append(self.format_key_and_value(key=key, value=value)) + not_fixed.append(self.format_key_and_value(key=key, value=keys[key])) else: keys[key] = value @@ -149,18 +193,85 @@ def __extract_key_and_value(line): if index_key_end > 0: return line[0:index_key_end].strip(), line[index_key_end + 1:].strip() return None, None + + @staticmethod + def format_key_and_value(key, value): + return u"{key}={value}".format(key=key, value=value) class SyncLang: - def __init__(self, extended, out_file='status.md'): + + def __init__(self, extended_logging=False): """ :param extended: boolean: if the keys with problems should be printed """ - self.extended = extended + self.extended_logging = extended_logging self.main_jabref_preferences = os.path.join(RES_DIR, "JabRef_en.properties") self.main_menu_preferences = os.path.join(RES_DIR, "Menu_en.properties") - self.markdown_output = out_file + + def set_extended_logging_enabled(self, value): + self.extended_logging = bool(value) + + def print_missing_keys(self): + for file in self.__other_jabref_properties(): + file_name = self.__format_filename(file) + self.print_missing_keys_for_file(file_name) + for file in self.__other_menu_properties(): + file_name = self.__format_filename(file) + self.print_missing_keys_for_file(file_name) + + def print_missing_keys_for_file(self, file_name): + file_status = self.__get_status_for_file(file_name) + if file_status: + keys_missing, _, _, _ = file_status + + if len(keys_missing) > 0: + logging.info("Printing missing keys for file: " + file_name) + self.__print_keys(keys_missing) + else: + logging.info("No missing keys found for file:" + file_name) + + def print_obsolete_keys(self): + for file in self.__other_jabref_properties(): + file_name = self.__format_filename(file) + self.print_obsolete_keys_for_file(file_name) + for file in self.__other_menu_properties(): + file_name = self.__format_filename(file) + self.print_obsolete_keys_for_file(file_name) + + + def print_obsolete_keys_for_file(self, file_name): + file_status = self.__get_status_for_file(file_name) + if file_status: + _, keys_obsolete, _, _ = file_status + + if len(keys_obsolete) > 0: + + logging.info("Printing obsolete keys for file: " + file_name) + self.__print_keys(keys_obsolete) + else: + logging.info("No obsolete keys found for file: " + file_name) + + def print_duplicate_keys(self): + for file in self.__other_jabref_properties(): + file_name = self.__format_filename(file) + self.print_duplicate_keys_for_file(file_name) + for file in self.__other_menu_properties(): + file_name = self.__format_filename(file) + self.print_duplicate_keys_for_file(file_name) + + def print_duplicate_keys_for_file(self, file_name): + file_status = self.__get_status_for_file(file_name) + if file_status: + _, _, keys_duplicate, _ = file_status + + if len(keys_duplicate) > 0: + + logging.info("Printing duplicate keys for file: " + file_name) + self.__print_keys(keys_duplicate) + else: + logging.info("No duplicate keys found for file: " + file_name) def status(self): """ @@ -171,12 +282,12 @@ def status(self): self.__print_status_menu_properties() def __print_status_menu_properties(self): - self.__check_properties(main_property_file=self.main_menu_preferences, property_files=self.__all_menu_properties()) + self.__compare_properties(main_property_file=self.main_menu_preferences, property_files=self.__all_menu_properties()) def __print_status_jabref_properties(self): - self.__check_properties(main_property_file=self.main_jabref_preferences, property_files=self.__all_jabref_properties()) + self.__compare_properties(main_property_file=self.main_jabref_preferences, property_files=self.__all_jabref_properties()) - def update(self): + def update_properties(self): """ updates all the localization files fixing unambiguous duplicates, removing obsolete keys, adding missing keys, and sorting them @@ -190,28 +301,57 @@ def __update_menu_properties(self): def __update_jabref_properties(self): self.__update_properties(main_property_file=self.main_jabref_preferences, other_property_files=self.__other_jabref_properties()) + + def __get_main_file(self, file_name): + + file = os.path.join(RES_DIR, file_name) + + if file in self.__all_jabref_properties(): + return self.main_jabref_preferences + elif file in self.__all_menu_properties(): + return self.main_menu_preferences + + def __get_status_for_file(self, file_name): + main_file = self.__get_main_file(file_name) + if main_file: + main_lines = self.__read_lines_from_file(filename=main_file) + main_keys = Keys(main_lines) + + file = os.path.join(RES_DIR, file_name) + lines = self.__read_lines_from_file(file) + keys1 = Keys(lines) + keys = keys1.keys_from_lines() - def __check_properties(self, main_property_file, property_files): - main_lines = self.__read_file_as_lines(filename=main_property_file) + keys_missing = self.__missing_keys(main_keys.keys_from_lines(), keys) + keys_obsolete = self.__missing_keys(keys, main_keys.keys_from_lines()) + keys_duplicates = keys1.find_duplicates() + keys_not_translated = keys1.empty_keys() + + return (keys_missing, keys_obsolete, keys_duplicates, keys_not_translated) + else: + logging.debug("Unable to find main file for: " + file_name) + + def __compare_properties(self, main_property_file, property_files): + main_lines = self.__read_lines_from_file(filename=main_property_file) main_keys = Keys(main_lines) # the main property file gets compared to itself, but that is OK for file in property_files: filename = self.__format_filename(filepath=file) - lines = self.__read_file_as_lines(file) - keys1 = Keys(main_lines) + lines = self.__read_lines_from_file(file) + keys1 = Keys(lines) keys = keys1.keys_from_lines() keys_missing = self.__missing_keys(main_keys.keys_from_lines(), keys) keys_obsolete = self.__missing_keys(keys, main_keys.keys_from_lines()) - keys_duplicate = Keys(lines).duplicates() - keys_not_translated = Keys(lines=lines).empty_keys() + keys_duplicates = keys1.find_duplicates() + keys_not_translated = keys1.empty_keys() num_keys = len(keys) num_keys_missing = len(keys_missing) num_keys_not_translated = len(keys_not_translated) num_keys_obsolete = len(keys_obsolete) - num_keys_duplicate = len(keys_duplicate) + num_keys_duplicate = len(keys_duplicates) num_keys_translated = num_keys - num_keys_not_translated log = logging.error if num_keys_missing != 0 or num_keys_not_translated != 0 or num_keys_obsolete != 0 or num_keys_duplicate != 0 else logging.info @@ -220,23 +360,23 @@ def __check_properties(self, main_property_file, property_files): log = logging.error if num_keys_not_translated != 0 else logging.info log("\t{} not translated keys".format(num_keys_not_translated)) - if self.extended and num_keys_not_translated != 0: - logging.info("\t\t{}".format(", ".join(keys_not_translated))) + if self.extended_logging and num_keys_not_translated != 0: + self.__print_keys(keys_not_translated) log = logging.error if num_keys_missing != 0 else logging.info log("\t{} missing keys".format(num_keys_missing)) - if self.extended and num_keys_missing != 0: - logging.info("\t\t{}".format(", ".join(keys_missing))) + if self.extended_logging and num_keys_missing != 0: + self.__print_keys(keys_missing) log = logging.error if num_keys_obsolete != 0 else logging.info log("\t{} obsolete keys".format(num_keys_obsolete)) - if self.extended and num_keys_obsolete != 0: - logging.info("\t\t{}".format(", ".join(keys_obsolete))) + if self.extended_logging and num_keys_obsolete != 0: + self.__print_keys(keysobsolete) log = logging.error if num_keys_duplicate != 0 else logging.info log("\t{} duplicates".format(num_keys_duplicate)) - if self.extended and num_keys_duplicate != 0: - logging.info("\t\t{}".format(", ".join(keys_duplicate))) + if self.extended_logging and num_keys_duplicate != 0: + self.__print_keys(keys_duplicates) def __all_menu_properties(self): """ @@ -255,36 +395,37 @@ def __other_menu_properties(self): def __all_jabref_properties(self): """ - :return: list of strings: all the JabRef_*.preferences files with the english at the beginning + :return: list of strings: all the JabRef_*.preferences file paths with the english at the beginning """ jabref_property_files = sorted(self.__other_jabref_properties()) - jabref_property_files.insert(0, os.path.join(RES_DIR, "JabRef_en.properties")) + jabref_property_files.insert(0, self.main_jabref_preferences) return jabref_property_files def __other_jabref_properties(self): """ - :return: list of strings: all the JabRef_*.preferences files without the english one + :return: list of strings: all the JabRef_*.preferences file paths without the english one """ jabref_property_files = [s for s in os.listdir(RES_DIR) if (s.startswith('JabRef_') and not (s.startswith('JabRef_en')))] return [os.path.join(RES_DIR, file) for file in jabref_property_files] def __update_properties(self, main_property_file, other_property_files): - main_lines = self.__read_file_as_lines(filename=main_property_file) + main_lines = self.__read_lines_from_file(filename=main_property_file) main_keys = Keys(main_lines) + main_keys_dict = main_keys.translations_as_dict() - main_duplicates = main_keys.duplicates() + main_duplicates = main_keys.find_duplicates() num_main_duplicates = len(main_duplicates) if num_main_duplicates != 0: logging.error("There are {num_duplicates} duplicates in {file}, please fix them manually".format(num_duplicates=num_main_duplicates, file=self.__format_filename( filepath=main_property_file))) - if self.extended: - logging.info("\t{}".format(", ".join(main_duplicates))) + if self.extended_logging: + self.__print_keys(main_duplicates) return for other_property_file in other_property_files: filename = self.__format_filename(filepath=other_property_file) - lines = self.__read_file_as_lines(filename=other_property_file) + lines = self.__read_lines_from_file(filename=other_property_file) keys, not_fixed, fixed = Keys(lines).fix_duplicates() num_keys = len(keys) @@ -294,8 +435,8 @@ def __update_properties(self, main_property_file, other_property_files): if num_not_fixed != 0: logging.error("There are {num_not_fixed_duplicates} ambiguous duplicates in {file}, please fix them manually".format( num_not_fixed_duplicates=num_not_fixed, file=filename)) - if self.extended: - logging.error("\t{}".format(", ".join(not_fixed))) + if self.extended_logging: + self.__print_keys(not_fixed) continue keys_missing = self.__missing_keys(main_keys.keys_from_lines(), keys) @@ -304,8 +445,9 @@ def __update_properties(self, main_property_file, other_property_files): num_keys_missing = len(keys_missing) num_keys_obsolete = len(keys_obsolete) - for missing_key in keys_missing: - keys[missing_key] = "" + # for missing_key in keys_missing: + # Missing keys are added with main translation by default. + # keys[missing_key] = main_keys_dict[missing_key] for obsolete_key in keys_obsolete: del keys[obsolete_key] @@ -314,9 +456,10 @@ def __update_properties(self, main_property_file, other_property_files): for line in main_lines: key = main_keys.key_from_line(line) if key is not None: - # Do not write empty keys - if keys[key] != "": - other_lines_to_write.append(u"{key}={value}\n".format(key=key, value=keys[key])) + if keys.has_key(key): + # Do not write empty keys + if keys[key] != "": + other_lines_to_write.append(Keys.format_key_and_value(key=key, value=keys[key]) + "\n") else: other_lines_to_write.append(line) @@ -331,18 +474,18 @@ def __update_properties(self, main_property_file, other_property_files): logging.info("Processing file '{file}' with {num_keys} Keys".format(file=filename, num_keys=num_keys)) if num_fixed != 0: logging.info("\tfixed {} unambiguous duplicates".format(num_fixed)) - if self.extended: - logging.info("\t\t{}".format(", ".join(fixed))) + if self.extended_logging: + self.__print_keys(fixed) if num_keys_missing != 0: logging.info("\tadded {} missing keys".format(num_keys_missing)) - if self.extended: - logging.info("\t\t{}".format(", ".join(keys_missing))) + if self.extended_logging: + self.__print_keys(keys_missing) if num_keys_obsolete != 0: logging.info("\tdeleted {} obsolete keys".format(num_keys_obsolete)) - if self.extended: - logging.info("\t\t{}".format(", ".join(keys_obsolete))) + if self.extended_logging: + self.__print_keys(keys_obsolete) if sorted_lines: logging.info("\thas been sorted successfully") @@ -353,7 +496,7 @@ def __format_filename(filepath): removes the res_dir path :param filepath: string - :return: string + :return: pure file name of this file path (including file extension e.g. *.txt) """ return filepath.replace("{}\\".format(RES_DIR), "") @@ -362,13 +505,13 @@ def __write_file(filename, content): """ writes the lines to the file in `UTF-8` :param filename: string - :param content: list of unicode unicode: the lines to write + :param content: list of unicode strings: the lines to write """ with codecs.open(filename, 'w', encoding="UTF-8") as f: f.writelines(content) @staticmethod - def __read_file_as_lines(filename): + def __read_lines_from_file(filename): """ :param filename: string :param encoding: string: the encoding of the file to read (standard: `UTF-8`) @@ -377,7 +520,8 @@ def __read_file_as_lines(filename): with codecs.open(filename, 'r', encoding="UTF-8") as file: return [u"{}\n".format(line.strip()) for line in file.readlines()] - def __missing_keys(self, first_list, second_list): + @staticmethod + def __missing_keys(first_list, second_list): """ Finds all keys in the first list that are not present in the second list @@ -385,13 +529,14 @@ def __missing_keys(self, first_list, second_list): :param second_list: list of unicode strings :return: list of unicode strings """ - missing = [] - for key in first_list: - if key not in second_list: - missing.append(key) - return missing + return list(set(first_list).difference(second_list)) + + @staticmethod + def __print_keys(keys, logger=logging.info): + for key in keys: + logger("\t{}\n".format(key)) - def status_create_markdown(self): + def status_create_markdown(self, markdown_file='status.md'): """ Creates a markdown file of the current status. """ @@ -401,7 +546,7 @@ def _write_properties(output_file, property_files): output_file.write("| ------------- | ---- | --------------- | ------------------- | ------------ |\n") for file in property_files: - lines = self.__read_file_as_lines(file) + lines = self.__read_lines_from_file(file) keys = Keys(lines) num_keys = len(keys.translations_as_dict()) num_keys_missing_value = len(keys.empty_keys()) @@ -422,7 +567,7 @@ def _percentage(whole, part): return 0 return int(part / whole * 100.0) - with codecs.open(self.markdown_output, "w", encoding="UTF-8") as status_file: + with codecs.open(markdown_file, "w", encoding="UTF-8") as status_file: status_file.write('### Localization files status (' + datetime.datetime.now().strftime( "%Y-%m-%d %H:%M") + ' - Branch `' + Git().get_current_branch() + '` `' + Git().get_current_hash_short() + '`)\n\n') status_file.write('Note: To get the current status from your local repository, run `python ./scripts/syncLang.py markdown`\n') @@ -430,37 +575,87 @@ def _percentage(whole, part): _write_properties(status_file, self.__all_menu_properties()) _write_properties(status_file, self.__all_jabref_properties()) - logging.info('Current status written to ' + self.markdown_output) - - -if '__main__' == __name__: - - if len(sys.argv) == 2 and sys.argv[1] == "markdown": - SyncLang(extended=False, out_file='status.md').status_create_markdown() - - elif (len(sys.argv) == 2 or len(sys.argv) == 3) and sys.argv[1] == "update": - SyncLang(extended=len(sys.argv) == 3 and (sys.argv[2] == "-e" or sys.argv[2] == "--extended")).update() + logging.info('Current status written to ' + markdown_file) - elif (len(sys.argv) == 2 or len(sys.argv) == 3) and sys.argv[1] == "status": - SyncLang(extended=len(sys.argv) == 3 and (sys.argv[2] == "-e" or sys.argv[2] == "--extended")).status() - else: - logging.info("""This program must be run from the JabRef base directory. +def main(): + + syncer = SyncLang() + + def markdown_command(args): + syncer.set_extended_logging_enabled(False) + syncer.status_create_markdown() + + def status_command(args): + syncer.set_extended_logging_enabled(args.extended) + syncer.status() + + def update_command(args): + syncer.set_extended_logging_enabled(args.extended) + syncer.update_properties() + + def print_missing(args): + file_name = args.file + if file_name: + syncer.print_missing_keys_for_file(file_name) + else: + syncer.print_missing_keys() + + def print_obsolete(args): + file_name = args.file + if file_name: + syncer.print_obsolete_keys_for_file(file_name) + else: + syncer.print_obsolete_keys() + + def print_duplicates(args): + file_name = args.file + if file_name: + syncer.print_duplicate_keys_for_file(file_name) + else: + syncer.print_duplicate_keys() + + parser = argparse.ArgumentParser(add_help=True) + parser.description = "This script is used to synchronize the keys of different *.properties files." + + shared_arguments = argparse.ArgumentParser(add_help=False) + extended_argument = shared_arguments.add_argument("-e", "--extended", help="Prints extended information about the process to the terminal", required=False, action='store_true', default=False) + + subcommands = parser.add_subparsers(title="Subcommands", description="Provide different options for the user", dest="subcommand") + + # markdown parser + markdown_parser = subcommands.add_parser("markdown", description="Creates a markdown file of the current status") + markdown_parser.set_defaults(func=markdown_command) + # TODO add argument to pass a file name for the markdown file - Usage: syncLang.py {markdown, status [-e | --extended], update [-e | --extended]} - Option can be one of the following: + # status parser + status_parser = subcommands.add_parser("status", description="Prints the current status to the terminal", parents=[shared_arguments]) + status_parser.set_defaults(func=status_command) - status [-e | --extended]: - prints the current status to the terminal - [-e | --extended]: - if the translations keys which create problems should be printed + # update parser + update_parser = subcommands.add_parser("update", description="Compares all the localization files against the English one and fixes unambiguous duplicates, removes obsolete keys, adds missing keys, and sorts them", parents=[shared_arguments]) + update_parser.set_defaults(func=update_command) - markdown: - Creates a markdown file of the current status and opens it + # print parser + print_parser = subcommands.add_parser("print", description="Prints specific status info to the console") - update [-e | --extended]: - compares all the localization files against the English one and fixes unambiguous duplicates, - removes obsolete keys, adds missing keys, and sorts them - [-e | --extended]: - if the translations keys which create problems should be printed - """) + shared_print_arguments = argparse.ArgumentParser(add_help=False) + file_argument = shared_print_arguments.add_argument("-f", "--file", help="Specifies a file for the command to run with", required=False, action='store') + + print_options = print_parser.add_subparsers(title="Print Options", description="Different options for printing", dest="print_option_name") + + missing_parser = print_options.add_parser("missing", description="Prints all missing keys", parents=[shared_print_arguments]) + missing_parser.set_defaults(func=print_missing) + + obsolete_parser = print_options.add_parser("obsolete", description="Prints all obsolete keys", parents=[shared_print_arguments]) + obsolete_parser.set_defaults(func=print_obsolete) + + duplicates_parser = print_options.add_parser("duplicates", description="Prints all duplicate keys", parents=[shared_print_arguments]) + duplicates_parser.set_defaults(func=print_duplicates) + + parsed_args = parser.parse_args() + parsed_args.func(parsed_args) + + +if '__main__' == __name__: + main() diff --git a/src/main/java/org/jabref/Globals.java b/src/main/java/org/jabref/Globals.java index b854ef1a3c4..652a79ef828 100644 --- a/src/main/java/org/jabref/Globals.java +++ b/src/main/java/org/jabref/Globals.java @@ -1,5 +1,6 @@ package org.jabref; +import java.awt.GraphicsEnvironment; import java.awt.Toolkit; import java.util.Optional; import java.util.UUID; @@ -80,7 +81,7 @@ public static void startBackgroundTasks() { Globals.fileUpdateMonitor = new DefaultFileUpdateMonitor(); JabRefExecutorService.INSTANCE.executeInterruptableTask(Globals.fileUpdateMonitor, "FileUpdateMonitor"); - if (Globals.prefs.shouldCollectTelemetry()) { + if (Globals.prefs.shouldCollectTelemetry() && !GraphicsEnvironment.isHeadless()) { startTelemetryClient(); } } diff --git a/src/main/java/org/jabref/JabRefExecutorService.java b/src/main/java/org/jabref/JabRefExecutorService.java index b9c4886c257..5f2a4425f2b 100644 --- a/src/main/java/org/jabref/JabRefExecutorService.java +++ b/src/main/java/org/jabref/JabRefExecutorService.java @@ -1,6 +1,5 @@ package org.jabref; -import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -9,7 +8,6 @@ import java.util.TimerTask; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; -import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; @@ -18,9 +16,9 @@ import org.slf4j.LoggerFactory; /** - * Responsible for managing of all threads (except Swing threads) in JabRef + * Responsible for managing of all threads (except GUI threads) in JabRef */ -public class JabRefExecutorService implements Executor { +public class JabRefExecutorService { public static final JabRefExecutorService INSTANCE = new JabRefExecutorService(); private static final Logger LOGGER = LoggerFactory.getLogger(JabRefExecutorService.class); @@ -43,7 +41,6 @@ public class JabRefExecutorService implements Executor { private JabRefExecutorService() { } - @Override public void execute(Runnable command) { Objects.requireNonNull(command); executorService.execute(command); @@ -52,37 +49,18 @@ public void execute(Runnable command) { public void executeAndWait(Runnable command) { Objects.requireNonNull(command); Future future = executorService.submit(command); - while (true) { - try { - future.get(); - return; - } catch (InterruptedException ignored) { - // Ignored - } catch (ExecutionException e) { - LOGGER.error("Problem executing command", e); - } - } - } - - public boolean executeAndWait(Callable command) { - Objects.requireNonNull(command); - Future future = executorService.submit(command); - while (true) { - try { - future.get(); - return true; - } catch (InterruptedException ignored) { - // Ignored - } catch (ExecutionException e) { - LOGGER.error("Problem executing command", e); - return false; - } + try { + future.get(); + } catch (InterruptedException ignored) { + // Ignored + } catch (ExecutionException e) { + LOGGER.error("Problem executing command", e); } } /** * Executes a callable task that provides a return value after the calculation is done. - * + * * @param command The task to execute. * @return A Future object that provides the returning value. */ @@ -92,25 +70,19 @@ public Future execute(Callable command) { } /** - * Executes a collection of callable tasks and returns a List of the resulting Future objects after the calculation is done. - * + * Executes a collection of callable tasks and returns a List of the resulting Future objects after the calculation is done. + * * @param tasks The tasks to execute * @return A List of Future objects that provide the returning values. */ public List> executeAll(Collection> tasks) { Objects.requireNonNull(tasks); - List> futures = new ArrayList<>(); try { - futures = executorService.invokeAll(tasks); + return executorService.invokeAll(tasks); } catch (InterruptedException exception) { - LOGGER.error("Unable to execute tasks", exception); + // Ignored return Collections.emptyList(); } - return futures; - } - - public void executeInterruptableTask(final Runnable runnable) { - this.lowPriorityExecutorService.execute(runnable); } public void executeInterruptableTask(final Runnable runnable, String taskName) { @@ -121,15 +93,12 @@ public void executeInterruptableTaskAndWait(Runnable runnable) { Objects.requireNonNull(runnable); Future future = lowPriorityExecutorService.submit(runnable); - while (true) { - try { - future.get(); - return; - } catch (InterruptedException ignored) { - // Ignored - } catch (ExecutionException e) { - LOGGER.error("Problem executing command", e); - } + try { + future.get(); + } catch (InterruptedException ignored) { + // Ignored + } catch (ExecutionException e) { + LOGGER.error("Problem executing command", e); } } @@ -163,13 +132,13 @@ public void shutdownEverything() { // timer doesn't need to be canceled as it is run in daemon mode, which ensures that it is stopped if the application is shut down } - class NamedRunnable implements Runnable { + private class NamedRunnable implements Runnable { private final String name; private final Runnable task; - public NamedRunnable(String name, Runnable runnable) { + private NamedRunnable(String name, Runnable runnable) { this.name = name; this.task = runnable; } diff --git a/src/main/java/org/jabref/cli/ArgumentProcessor.java b/src/main/java/org/jabref/cli/ArgumentProcessor.java index b5579040cbe..cd4e96ce523 100644 --- a/src/main/java/org/jabref/cli/ArgumentProcessor.java +++ b/src/main/java/org/jabref/cli/ArgumentProcessor.java @@ -223,6 +223,11 @@ private List processArguments() { doAuxImport(loaded); } + if (cli.isXmpFacilities()) { + XmpUtilMain.executeXmpConsoleApplicaton(); + System.exit(0); + } + return loaded; } diff --git a/src/main/java/org/jabref/cli/JabRefCLI.java b/src/main/java/org/jabref/cli/JabRefCLI.java index f427c8e0dbb..e6585516889 100644 --- a/src/main/java/org/jabref/cli/JabRefCLI.java +++ b/src/main/java/org/jabref/cli/JabRefCLI.java @@ -140,6 +140,10 @@ public String getExportMatches() { return cl.getOptionValue("exportMatches"); } + public boolean isXmpFacilities() { + return cl.hasOption("readAndWriteXmpMetadata"); + } + public boolean isGenerateBibtexKeys() { return cl.hasOption("generateBibtexKeys"); } public boolean isAutomaticallySetFileLinks() { return cl.hasOption("automaticallySetFileLinks"); } @@ -232,6 +236,11 @@ private Options getOptions() { desc(Localization.lang("Automatically set file links")). build()); + options.addOption(Option.builder("xmp"). + longOpt("readAndWriteXmpMetadata"). + desc("Read and write xmp metadata from/to pdf files"). + build()); + return options; } diff --git a/src/main/java/org/jabref/cli/XMPUtilMain.java b/src/main/java/org/jabref/cli/XMPUtilMain.java deleted file mode 100644 index 430c49541bd..00000000000 --- a/src/main/java/org/jabref/cli/XMPUtilMain.java +++ /dev/null @@ -1,176 +0,0 @@ -package org.jabref.cli; - -import java.io.FileReader; -import java.io.IOException; -import java.io.StringWriter; -import java.nio.file.Paths; -import java.util.Collection; -import java.util.List; -import java.util.Optional; - -import javax.xml.transform.TransformerException; - -import org.jabref.Globals; -import org.jabref.logic.bibtex.BibEntryWriter; -import org.jabref.logic.bibtex.LatexFieldFormatter; -import org.jabref.logic.importer.ImportFormatPreferences; -import org.jabref.logic.importer.ParserResult; -import org.jabref.logic.importer.fileformat.BibtexParser; -import org.jabref.logic.xmp.XmpPreferences; -import org.jabref.logic.xmp.XmpUtilReader; -import org.jabref.logic.xmp.XmpUtilWriter; -import org.jabref.model.database.BibDatabaseMode; -import org.jabref.model.entry.BibEntry; -import org.jabref.preferences.JabRefPreferences; - -import org.apache.xmpbox.XMPMetadata; -import org.apache.xmpbox.xml.XmpSerializer; - -public class XMPUtilMain { - - private XMPUtilMain() { - } - - /** - * Command-line tool for working with XMP-data. - * - * Read or write XMP-metadata from or to pdf file. - * - * Usage: - *
- *
Read from PDF and print as bibtex:
- *
xmpUtil PDF
- *
Read from PDF and print raw XMP:
- *
xmpUtil -x PDF
- *
Write the entry in BIB given by KEY to the PDF:
- *
xmpUtil KEY BIB PDF
- *
Write all entries in BIB to the PDF:
- *
xmpUtil BIB PDF
- *
- * - * @param args - * Command line strings passed to utility. - * @throws IOException - * If any of the given files could not be read or written. - * @throws TransformerException - * If the given BibEntry is malformed. - */ - public static void main(String[] args) throws IOException, TransformerException { - - // Don't forget to initialize the preferences - if (Globals.prefs == null) { - Globals.prefs = JabRefPreferences.getInstance(); - } - - XmpPreferences xmpPreferences = Globals.prefs.getXMPPreferences(); - ImportFormatPreferences importFormatPreferences = Globals.prefs.getImportFormatPreferences(); - - int argsLength = args.length; - if (argsLength == 0) { - usage(); - } else if (argsLength == 1) { - if (args[0].endsWith(".pdf")) { - // Read from pdf and write as BibTex - List l = XmpUtilReader.readXmp(args[0], xmpPreferences); - - BibEntryWriter bibtexEntryWriter = new BibEntryWriter( - new LatexFieldFormatter(Globals.prefs.getLatexFieldFormatterPreferences()), false); - - for (BibEntry entry : l) { - StringWriter sw = new StringWriter(); - bibtexEntryWriter.write(entry, sw, BibDatabaseMode.BIBTEX); - System.out.println(sw.getBuffer()); - } - - } else if (args[0].endsWith(".bib")) { - // Read from BIB and write as XMP - try (FileReader fr = new FileReader(args[0])) { - ParserResult result = new BibtexParser(importFormatPreferences, Globals.getFileUpdateMonitor()).parse(fr); - Collection entries = result.getDatabase().getEntries(); - - if (entries.isEmpty()) { - System.err.println("Could not find BibEntry in " + args[0]); - } - } - } else { - usage(); - } - } else if (argsLength == 2) { - if ("-x".equals(args[0]) && args[1].endsWith(".pdf")) { - // Read from pdf and write as BibTex - List meta = XmpUtilReader.readRawXmp(Paths.get(args[1])); - - if (!meta.isEmpty()) { - XmpSerializer serializer = new XmpSerializer(); - serializer.serialize(meta.get(0), System.out, true); - } else { - System.err.println("The given pdf does not contain any XMP-metadata."); - } - return; - } - - if (args[0].endsWith(".bib") && args[1].endsWith(".pdf")) { - try (FileReader reader = new FileReader(args[0])) { - ParserResult result = new BibtexParser(importFormatPreferences, Globals.getFileUpdateMonitor()).parse(reader); - - List entries = result.getDatabase().getEntries(); - - if (entries.isEmpty()) { - System.err.println("Could not find BibEntry in " + args[0]); - } else { - XmpUtilWriter.writeXmp(Paths.get(args[1]), entries, result.getDatabase(), xmpPreferences); - System.out.println("XMP written."); - } - } - return; - } - - usage(); - } else if (argsLength == 3) { - if (!args[1].endsWith(".bib") && !args[2].endsWith(".pdf")) { - usage(); - return; - } - - try (FileReader reader = new FileReader(args[1])) { - ParserResult result = new BibtexParser(importFormatPreferences, Globals.getFileUpdateMonitor()).parse(reader); - - Optional bibEntry = result.getDatabase().getEntryByKey(args[0]); - - if (bibEntry.isPresent()) { - XmpUtilWriter.writeXmp(Paths.get(args[2]), bibEntry.get(), result.getDatabase(), xmpPreferences); - - System.out.println("XMP written."); - } else { - System.err.println("Could not find BibEntry " + args[0] + " in " + args[0]); - } - } - } else { - usage(); - } - } - - /** - * Print usage information for the command line tool xmpUtil. - * - * @see XMPUtilMain#main(String[]) - */ - private static void usage() { - System.out.println("Read or write XMP-metadata from or to pdf file."); - System.out.println(""); - System.out.println("Usage:"); - System.out.println("Read from PDF and print as bibtex:"); - System.out.println(" xmpUtil "); - System.out.println("Read from PDF and print raw XMP:"); - System.out.println(" xmpUtil -x "); - System.out - .println("Write the entry in given by to the PDF:"); - System.out.println(" xmpUtil "); - System.out.println("Write all entries in to the PDF:"); - System.out.println(" xmpUtil "); - System.out.println(""); - System.out - .println("To report bugs visit https://issues.jabref.org"); - } - -} diff --git a/src/main/java/org/jabref/cli/XmpUtilMain.java b/src/main/java/org/jabref/cli/XmpUtilMain.java new file mode 100644 index 00000000000..5ff5ffc6a0d --- /dev/null +++ b/src/main/java/org/jabref/cli/XmpUtilMain.java @@ -0,0 +1,129 @@ +package org.jabref.cli; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.StringWriter; +import java.nio.file.Paths; +import java.util.List; + +import javax.xml.transform.TransformerException; + +import org.jabref.Globals; +import org.jabref.logic.bibtex.BibEntryWriter; +import org.jabref.logic.bibtex.LatexFieldFormatter; +import org.jabref.logic.importer.ImportFormatPreferences; +import org.jabref.logic.importer.ParserResult; +import org.jabref.logic.importer.fileformat.BibtexParser; +import org.jabref.logic.xmp.XmpPreferences; +import org.jabref.logic.xmp.XmpUtilReader; +import org.jabref.logic.xmp.XmpUtilWriter; +import org.jabref.model.database.BibDatabaseMode; +import org.jabref.model.entry.BibEntry; +import org.jabref.preferences.JabRefPreferences; + +public class XmpUtilMain { + + private static XmpPreferences xmpPreferences; + private static ImportFormatPreferences importFormatPreferences; + + private XmpUtilMain() { + } + + /** + * Reads metadata from pdf and print all included bib entries to the console. + * + * @param filename Filename of the pdf file (.pdf) + */ + private static void readPdfAndPrintBib(String filename) throws IOException { + if (filename.endsWith(".pdf")) { + List entryList = XmpUtilReader.readXmp(filename, xmpPreferences); + + BibEntryWriter bibtexEntryWriter = new BibEntryWriter( + new LatexFieldFormatter(Globals.prefs.getLatexFieldFormatterPreferences()), false); + + for (BibEntry entry : entryList) { + StringWriter writer = new StringWriter(); + bibtexEntryWriter.write(entry, writer, BibDatabaseMode.BIBTEX); + System.out.println(writer.getBuffer()); + } + } else { + System.err.println("Insert a file path (.pdf)"); + } + } + + /** + * Writes all entries included in the bib file to the metadata section of the pdf file. + * + * @param bibFile Filename of the bib file (.bib) + * @param pdfFile Filename of the pdf file (.pdf) + */ + private static void writeBibFileToPdfMetadata(String bibFile, String pdfFile) throws FileNotFoundException, IOException, TransformerException { + if (bibFile.endsWith(".bib") && pdfFile.endsWith(".pdf")) { + try (FileReader reader = new FileReader(bibFile)) { + ParserResult result = new BibtexParser(importFormatPreferences, Globals.getFileUpdateMonitor()).parse(reader); + XmpUtilWriter.writeXmp(Paths.get(pdfFile), result.getDatabase().getEntries(), result.getDatabase(), xmpPreferences); + System.out.println("Metadata sucessfully written to Pdf."); + } + } else { + System.err.println("Insert correct file paths (.bib and .pdf)"); + } + } + + /** + * Print usage information for the console tool xmpUtil. + */ + private static void printMenu() { + System.out.println("---------------------Menu-----------------------"); + System.out.println("(0) Exit"); + System.out.println("(1) Read metadata from PDF and print as bibtex"); + System.out.println("(2) Write entries in bib file to Pdf metadata"); + System.out.println(" To report bugs visit https://issues.jabref.org"); + System.out.println("-------------------------------------------------"); + System.out.print("Choose an option: "); + } + + /** + * The tool is implemented as a console application with a read-evaluate-print cycle. + */ + public static void executeXmpConsoleApplicaton() { + if (Globals.prefs == null) { + Globals.prefs = JabRefPreferences.getInstance(); + } + + xmpPreferences = Globals.prefs.getXMPPreferences(); + importFormatPreferences = Globals.prefs.getImportFormatPreferences(); + + BufferedReader consoleReader = new BufferedReader(new InputStreamReader(System.in)); + + int option = -1; + while (option != 0) { + try { + XmpUtilMain.printMenu(); + option = Integer.parseInt(consoleReader.readLine()); + + if (option == 0) { + break; + } else if (option == 1) { + System.out.print("Insert your filename (.pdf): "); + String filename = consoleReader.readLine().trim(); + XmpUtilMain.readPdfAndPrintBib(filename); + } else if (option == 2) { + System.out.print("Insert your filename (.bib): "); + String bibFile = consoleReader.readLine().trim(); + System.out.print("Insert your filename (.pdf): "); + String pdfFile = consoleReader.readLine().trim(); + XmpUtilMain.writeBibFileToPdfMetadata(bibFile, pdfFile); + } + } catch (IOException | TransformerException e) { + System.err.println(e.getMessage()); + } + } + } + + public static void main(String[] args) { + XmpUtilMain.executeXmpConsoleApplicaton(); + } +} diff --git a/src/main/java/org/jabref/gui/BasePanel.java b/src/main/java/org/jabref/gui/BasePanel.java index 41fdfffe226..e5e947cc9c6 100644 --- a/src/main/java/org/jabref/gui/BasePanel.java +++ b/src/main/java/org/jabref/gui/BasePanel.java @@ -23,7 +23,6 @@ import java.util.Set; import java.util.stream.Collectors; -import javax.swing.JComponent; import javax.swing.JOptionPane; import javax.swing.JTextArea; import javax.swing.SwingUtilities; @@ -61,7 +60,6 @@ import org.jabref.gui.externalfiletype.ExternalFileMenuItem; import org.jabref.gui.externalfiletype.ExternalFileType; import org.jabref.gui.externalfiletype.ExternalFileTypes; -import org.jabref.gui.fieldeditors.FieldEditor; import org.jabref.gui.filelist.AttachFileAction; import org.jabref.gui.filelist.FileListEntry; import org.jabref.gui.filelist.FileListTableModel; @@ -177,9 +175,6 @@ public class BasePanel extends StackPane implements ClipboardOwner { // Used to track whether the base has changed since last save. private BibEntry showing; - // in switching between entries. - private PreambleEditor preambleEditor; - // Keeps track of the preamble dialog if it is open. private StringDialog stringDialog; private SuggestionProviders suggestionProviders; @@ -361,17 +356,6 @@ private void setupActions() { actions.put(Actions.SELECT_ALL, (BaseAction) mainTable.getSelectionModel()::selectAll); - // The action for opening the preamble editor - actions.put(Actions.EDIT_PREAMBLE, (BaseAction) () -> { - if (preambleEditor == null) { - PreambleEditor form = new PreambleEditor(frame, BasePanel.this, bibDatabaseContext.getDatabase()); - form.setVisible(true); - preambleEditor = form; - } else { - preambleEditor.setVisible(true); - } - }); - // The action for opening the string editor actions.put(Actions.EDIT_STRINGS, (BaseAction) () -> { if (stringDialog == null) { @@ -519,7 +503,8 @@ public void update() { .openConsole(frame.getCurrentBasePanel().getBibDatabaseContext().getDatabaseFile().orElse(null))); actions.put(Actions.PULL_CHANGES_FROM_SHARED_DATABASE, (BaseAction) () -> { - DatabaseSynchronizer dbmsSynchronizer = frame.getCurrentBasePanel().getBibDatabaseContext() + DatabaseSynchronizer dbmsSynchronizer = frame.getCurrentBasePanel() + .getBibDatabaseContext() .getDBMSSynchronizer(); dbmsSynchronizer.pullChanges(); }); @@ -875,7 +860,8 @@ private boolean saveDatabase(File file, boolean selectedOnly, Charset enc, SaveSession session; final String SAVE_DATABASE = Localization.lang("Save library"); try { - SavePreferences prefs = SavePreferences.loadForSaveFromPreferences(Globals.prefs).withEncoding(enc) + SavePreferences prefs = SavePreferences.loadForSaveFromPreferences(Globals.prefs) + .withEncoding(enc) .withSaveType(saveType); BibtexDatabaseWriter databaseWriter = new BibtexDatabaseWriter<>( FileSaveSession::new); @@ -1066,7 +1052,8 @@ private void createMainTable() { mainTable.addSelectionListener(listEvent -> Globals.stateManager.setSelectedEntries(mainTable.getSelectedEntries())); // Update entry editor and preview according to selected entries - mainTable.addSelectionListener(event -> mainTable.getSelectedEntries().stream() + mainTable.addSelectionListener(event -> mainTable.getSelectedEntries() + .stream() .findFirst() .ifPresent(entry -> { preview.setEntry(entry); @@ -1231,12 +1218,6 @@ private void instantiateSearchAutoCompleter() { } } - public void updatePreamble() { - if (preambleEditor != null) { - preambleEditor.updatePreamble(); - } - } - public void assureStringDialogNotEditing() { if (stringDialog != null) { stringDialog.assureNotEditing(); @@ -1478,10 +1459,6 @@ public BibDatabase getDatabase() { return bibDatabaseContext.getDatabase(); } - public void preambleEditorClosing() { - preambleEditor = null; - } - public void stringsClosing() { stringDialog = null; } @@ -1844,16 +1821,6 @@ private class UndoAction implements BaseAction { @Override public void action() { try { - JComponent focused = Globals.getFocusListener().getFocused(); - if ((focused != null) && (focused instanceof FieldEditor) && focused.hasFocus()) { - // User is currently editing a field: - // Check if it is the preamble: - - FieldEditor fieldEditor = (FieldEditor) focused; - if ((preambleEditor != null) && (fieldEditor.equals(preambleEditor.getFieldEditor()))) { - preambleEditor.storeCurrentEdit(); - } - } getUndoManager().undo(); markBaseChanged(); frame.output(Localization.lang("Undo")); @@ -1891,9 +1858,11 @@ public void action() { List files = bes.get(0).getFiles(); - Optional linkedFile = files.stream().filter(file -> (FieldName.URL.equalsIgnoreCase(file.getFileType()) - || FieldName.PS.equalsIgnoreCase(file.getFileType()) - || FieldName.PDF.equalsIgnoreCase(file.getFileType()))).findFirst(); + Optional linkedFile = files.stream() + .filter(file -> (FieldName.URL.equalsIgnoreCase(file.getFileType()) + || FieldName.PS.equalsIgnoreCase(file.getFileType()) + || FieldName.PDF.equalsIgnoreCase(file.getFileType()))) + .findFirst(); if (linkedFile.isPresent()) { @@ -1954,7 +1923,8 @@ public void action() throws SaveException { FileDialogConfiguration fileDialogConfiguration = new FileDialogConfiguration.Builder() .withDefaultExtension(FileType.BIBTEX_DB) .addExtensionFilter(FileType.BIBTEX_DB) - .withInitialDirectory(Globals.prefs.get(JabRefPreferences.WORKING_DIRECTORY)).build(); + .withInitialDirectory(Globals.prefs.get(JabRefPreferences.WORKING_DIRECTORY)) + .build(); Optional chosenFile = dialogService.showFileSaveDialog(fileDialogConfiguration); if (chosenFile.isPresent()) { diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index 55719e04a5f..22495817dba 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -905,7 +905,7 @@ private MenuBar createMenu() { new SeparatorMenuItem(), factory.createMenuItem(StandardActions.LIBRARY_PROPERTIES, new LibraryPropertiesAction(this)), - factory.createMenuItem(StandardActions.EDIT_PREAMBLE, new OldDatabaseCommandWrapper(Actions.EDIT_PREAMBLE, this, Globals.stateManager)), + factory.createMenuItem(StandardActions.EDIT_PREAMBLE, new PreambleEditor(this)), factory.createMenuItem(StandardActions.EDIT_STRINGS, new OldDatabaseCommandWrapper(Actions.EDIT_STRINGS, this, Globals.stateManager)) ); diff --git a/src/main/java/org/jabref/gui/PreambleEditor.java b/src/main/java/org/jabref/gui/PreambleEditor.java index 72a65a7e474..821b46088dd 100644 --- a/src/main/java/org/jabref/gui/PreambleEditor.java +++ b/src/main/java/org/jabref/gui/PreambleEditor.java @@ -1,214 +1,56 @@ package org.jabref.gui; -import java.awt.BorderLayout; -import java.awt.Component; -import java.awt.Container; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Insets; -import java.awt.event.ActionEvent; -import java.awt.event.FocusAdapter; -import java.awt.event.FocusEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; - -import javax.swing.AbstractAction; -import javax.swing.Action; -import javax.swing.JPanel; -import javax.swing.LayoutFocusTraversalPolicy; -import javax.swing.text.JTextComponent; - -import org.jabref.Globals; -import org.jabref.gui.actions.Actions; -import org.jabref.gui.fieldeditors.FieldEditor; -import org.jabref.gui.fieldeditors.TextArea; -import org.jabref.gui.keyboard.KeyBinding; +import java.util.Optional; + +import javafx.scene.control.ButtonType; +import javafx.scene.control.DialogPane; +import javafx.scene.control.TextArea; + +import org.jabref.gui.actions.SimpleCommand; import org.jabref.gui.undo.UndoablePreambleChange; -import org.jabref.gui.util.WindowLocation; import org.jabref.logic.l10n.Localization; import org.jabref.model.database.BibDatabase; -import org.jabref.preferences.JabRefPreferences; - -class PreambleEditor extends JabRefDialog { - // A reference to the entry this object works on. - private final BibDatabase database; - private final BasePanel panel; - - private final FieldEditor editor; - - private final UndoAction undoAction = new UndoAction(); - private final StoreFieldAction storeFieldAction = new StoreFieldAction(); - private final RedoAction redoAction = new RedoAction(); - // The action concerned with closing the window. - private final CloseAction closeAction = new CloseAction(); - - public PreambleEditor(JabRefFrame baseFrame, BasePanel panel, BibDatabase database) { - super(null, PreambleEditor.class); - this.panel = panel; - this.database = database; - - addWindowListener(new WindowAdapter() { - - @Override - public void windowClosing(WindowEvent e) { - closeAction.actionPerformed(null); - } - - @Override - public void windowOpened(WindowEvent e) { - editor.requestFocus(); - } - }); - setFocusTraversalPolicy(new LayoutFocusTraversalPolicy() { - - @Override - protected boolean accept(Component c) { - return super.accept(c) && (c instanceof FieldEditor); - } - }); - JPanel pan = new JPanel(); - GridBagLayout gbl = new GridBagLayout(); - pan.setLayout(gbl); - GridBagConstraints con = new GridBagConstraints(); - con.fill = GridBagConstraints.BOTH; - con.weighty = 1; - con.insets = new Insets(10, 5, 10, 5); +class PreambleEditor extends SimpleCommand { - editor = new TextArea(Localization.lang("Preamble"), database.getPreamble().orElse("")); - - // TODO: Reenable this - //setupJTextComponent((TextArea) editor); - - //gbl.setConstraints(editor.getLabel(), con); - //pan.add(editor.getLabel()); - - con.weightx = 1; - - gbl.setConstraints(editor.getPane(), con); - pan.add(editor.getPane()); - - Container conPane = getContentPane(); - conPane.add(pan, BorderLayout.CENTER); - setTitle(Localization.lang("Edit preamble")); - - WindowLocation pw = new WindowLocation(this, JabRefPreferences.PREAMBLE_POS_X, JabRefPreferences.PREAMBLE_POS_Y, - JabRefPreferences.PREAMBLE_SIZE_X, JabRefPreferences.PREAMBLE_SIZE_Y); - pw.displayWindowAtStoredLocation(); - } - - private void setupJTextComponent(JTextComponent ta) { - // Set up key bindings and focus listener for the FieldEditor. - ta.getInputMap().put(Globals.getKeyPrefs().getKey(KeyBinding.CLOSE_DIALOG), "close"); - ta.getActionMap().put("close", closeAction); - ta.getInputMap().put(Globals.getKeyPrefs().getKey(KeyBinding.PREAMBLE_EDITOR_STORE_CHANGES), "store"); - ta.getActionMap().put("store", storeFieldAction); - - ta.getInputMap().put(Globals.getKeyPrefs().getKey(KeyBinding.UNDO), "undo"); - ta.getActionMap().put(Actions.UNDO, undoAction); - ta.getInputMap().put(Globals.getKeyPrefs().getKey(KeyBinding.REDO), "redo"); - ta.getActionMap().put(Actions.REDO, redoAction); - - ta.addFocusListener(new FieldListener()); - } - - public void updatePreamble() { - editor.setText(database.getPreamble().orElse("")); - } + private final TextArea editor = new TextArea(); - public FieldEditor getFieldEditor() { - return editor; - } + private final JabRefFrame frame; - public void storeCurrentEdit() { - storeFieldAction.actionPerformed(null); + public PreambleEditor(JabRefFrame frame) { + this.frame = frame; } - private class FieldListener extends FocusAdapter { + @Override + public void execute() { + BasePanel panel = frame.getCurrentBasePanel(); + BibDatabase database = frame.getCurrentBasePanel().getDatabase(); - /* - * Focus listener that fires the storeFieldAction when a TextArea - * loses focus. - */ - @Override - public void focusLost(FocusEvent e) { - if (!e.isTemporary()) { - storeFieldAction.actionPerformed(new ActionEvent(e.getSource(), 0, "")); - } - } + DialogPane pane = new DialogPane(); - } + editor.setText(frame.getCurrentBasePanel() + .getDatabase() + .getPreamble() + .orElse("")); + pane.setContent(editor); - class StoreFieldAction extends AbstractAction { + Optional pressedButton = frame.getDialogService().showCustomDialogAndWait(Localization.lang("Edit Preamble"), pane, ButtonType.APPLY, ButtonType.CANCEL); - public StoreFieldAction() { - super("Store field value"); - putValue(Action.SHORT_DESCRIPTION, "Store field value"); - } - - @Override - public void actionPerformed(ActionEvent e) { + if (pressedButton.isPresent() && pressedButton.get().equals(ButtonType.APPLY)) { String toSet = editor.getText(); // We check if the field has changed, since we don't want to mark the // base as changed unless we have a real change. if (!database.getPreamble().orElse("").equals(toSet)) { + panel.getUndoManager().addEdit( - new UndoablePreambleChange(database, panel, database.getPreamble().orElse(null), toSet)); + new UndoablePreambleChange(database, database.getPreamble().orElse(null), toSet)); database.setPreamble(toSet); - //if ((toSet == null) || toSet.isEmpty()) { - // editor.setLabelColor(GUIGlobals.NULL_FIELD_COLOR); - //} else { - // editor.setLabelColor(GUIGlobals.ENTRY_EDITOR_LABEL_COLOR); - //} - editor.setValidBackgroundColor(); - if (editor.hasFocus()) { - editor.setActiveBackgroundColor(); - } + panel.markBaseChanged(); } - - } - } - - class UndoAction extends AbstractAction { - - public UndoAction() { - super("Undo", IconTheme.JabRefIcons.UNDO.getIcon()); - putValue(Action.SHORT_DESCRIPTION, "Undo"); } - @Override - public void actionPerformed(ActionEvent e) { - panel.runCommand(Actions.UNDO); - } - } - - class RedoAction extends AbstractAction { - - public RedoAction() { - super("Redo", IconTheme.JabRefIcons.REDO.getIcon()); - putValue(Action.SHORT_DESCRIPTION, "Redo"); - } - - @Override - public void actionPerformed(ActionEvent e) { - panel.runCommand(Actions.REDO); - } - } - - class CloseAction extends AbstractAction { - - public CloseAction() { - super(Localization.lang("Close window")); - } - - @Override - public void actionPerformed(ActionEvent e) { - storeFieldAction.actionPerformed(null); - panel.preambleEditorClosing(); - dispose(); - } } } diff --git a/src/main/java/org/jabref/gui/StringDialog.java b/src/main/java/org/jabref/gui/StringDialog.java index fafe58f3a71..1ec90ffecd8 100644 --- a/src/main/java/org/jabref/gui/StringDialog.java +++ b/src/main/java/org/jabref/gui/StringDialog.java @@ -217,7 +217,6 @@ public StringTable(StringTableModel stm) { TableColumnModel cm = getColumnModel(); cm.getColumn(0).setPreferredWidth(800); cm.getColumn(1).setPreferredWidth(2000); - sp.getViewport().setBackground(Globals.prefs.getColor(JabRefPreferences.TABLE_BACKGROUND)); getInputMap().put(Globals.getKeyPrefs().getKey(KeyBinding.CLOSE_DIALOG), "close"); getActionMap().put("close", closeAction); getInputMap().put(Globals.getKeyPrefs().getKey(KeyBinding.HELP), "help"); diff --git a/src/main/java/org/jabref/gui/actions/CopyFilesAction.java b/src/main/java/org/jabref/gui/actions/CopyFilesAction.java index e4827104b41..8ba3e2db382 100644 --- a/src/main/java/org/jabref/gui/actions/CopyFilesAction.java +++ b/src/main/java/org/jabref/gui/actions/CopyFilesAction.java @@ -8,7 +8,6 @@ import javafx.concurrent.Task; import org.jabref.Globals; -import org.jabref.JabRefGUI; import org.jabref.gui.DialogService; import org.jabref.gui.JabRefFrame; import org.jabref.gui.copyfiles.CopyFilesDialogView; @@ -16,6 +15,7 @@ import org.jabref.gui.copyfiles.CopyFilesResultListDependency; import org.jabref.gui.copyfiles.CopyFilesTask; import org.jabref.gui.util.DirectoryDialogConfiguration; +import org.jabref.logic.l10n.Localization; import org.jabref.model.database.BibDatabaseContext; import org.jabref.model.entry.BibEntry; import org.jabref.preferences.JabRefPreferences; @@ -43,6 +43,10 @@ private void startServiceAndshowProgessDialog(Task data) { + if (data.isEmpty()) { + dialogService.showInformationDialogAndWait(Localization.lang("Copy linked files to folder..."), Localization.lang("No linked files found for export.")); + return; + } CopyFilesDialogView dlg = new CopyFilesDialogView(databaseContext, new CopyFilesResultListDependency(data)); dlg.show(); } @@ -57,7 +61,7 @@ public void execute() { Optional exportPath = dialogService.showDirectorySelectionDialog(dirDialogConfiguration); exportPath.ifPresent(path -> { - databaseContext = JabRefGUI.getMainFrame().getCurrentBasePanel().getDatabaseContext(); + databaseContext = frame.getCurrentBasePanel().getBibDatabaseContext(); Task> exportTask = new CopyFilesTask(databaseContext, entries, path); startServiceAndshowProgessDialog(exportTask); diff --git a/src/main/java/org/jabref/gui/collab/PreambleChangeViewModel.java b/src/main/java/org/jabref/gui/collab/PreambleChangeViewModel.java index 47946d0196e..a3f707b5cd5 100644 --- a/src/main/java/org/jabref/gui/collab/PreambleChangeViewModel.java +++ b/src/main/java/org/jabref/gui/collab/PreambleChangeViewModel.java @@ -18,7 +18,6 @@ class PreambleChangeViewModel extends ChangeViewModel { private final InfoPane tp = new InfoPane(); private final JScrollPane sp = new JScrollPane(tp); - public PreambleChangeViewModel(String mem, PreambleDiff diff) { super(Localization.lang("Changed preamble")); this.disk = diff.getNewPreamble(); @@ -43,7 +42,7 @@ public PreambleChangeViewModel(String mem, PreambleDiff diff) { @Override public boolean makeChange(BasePanel panel, BibDatabase secondary, NamedCompound undoEdit) { panel.getDatabase().setPreamble(disk); - undoEdit.addEdit(new UndoablePreambleChange(panel.getDatabase(), panel, mem, disk)); + undoEdit.addEdit(new UndoablePreambleChange(panel.getDatabase(), mem, disk)); secondary.setPreamble(disk); return true; } diff --git a/src/main/java/org/jabref/gui/copyfiles/CopyFilesTask.java b/src/main/java/org/jabref/gui/copyfiles/CopyFilesTask.java index 2afefe6becc..7dd83dbd4be 100644 --- a/src/main/java/org/jabref/gui/copyfiles/CopyFilesTask.java +++ b/src/main/java/org/jabref/gui/copyfiles/CopyFilesTask.java @@ -39,7 +39,7 @@ public class CopyFilesTask extends Task> { private final long totalFilesCount; private final List entries; private final List results = new ArrayList<>(); - private Optional newPath; + private Optional newPath = Optional.empty(); private int numberSucessful; private int totalFilesCounter; @@ -55,8 +55,7 @@ public CopyFilesTask(BibDatabaseContext databaseContext, List entries, } @Override - protected List call() - throws InterruptedException, IOException { + protected List call() throws InterruptedException, IOException { updateMessage(Localization.lang("Copying files...")); updateProgress(0, totalFilesCount); @@ -104,6 +103,7 @@ protected List call() } } updateMessage(Localization.lang("Finished copying")); + String sucessMessage = Localization.lang("Copied %0 files of %1 sucessfully to %2", Integer.toString(numberSucessful), Integer.toString(totalFilesCounter), newPath.map(Path::getParent).map(Path::toString).orElse("")); updateMessage(sucessMessage); bw.write(sucessMessage); diff --git a/src/main/java/org/jabref/gui/customjfx/CustomJFXPanel.java b/src/main/java/org/jabref/gui/customjfx/CustomJFXPanel.java index 0dbd2da2000..07279a55d91 100644 --- a/src/main/java/org/jabref/gui/customjfx/CustomJFXPanel.java +++ b/src/main/java/org/jabref/gui/customjfx/CustomJFXPanel.java @@ -1,44 +1,15 @@ package org.jabref.gui.customjfx; -import java.awt.event.InputMethodEvent; -import java.lang.reflect.Field; - import javafx.embed.swing.JFXPanel; import javafx.scene.Scene; import org.jabref.gui.AbstractView; -import org.jabref.gui.customjfx.support.InputMethodSupport; import org.jabref.gui.util.DefaultTaskExecutor; -import org.jabref.logic.util.OS; - -import com.sun.javafx.embed.EmbeddedSceneInterface; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -/*** - * WARNING: THIS IS A CUSTOM HACK TO PREVENT A BUG WITH ACCENTED CHARACTERS PRODUCING AN NPE IN LINUX
- * So far the bug has only been resolved in openjfx10: https://bugs.openjdk.java.net/browse/JDK-8185792 - * +/** + * Remove as soon as possible */ -public class CustomJFXPanel extends JFXPanel { - - private static final Logger LOGGER = LoggerFactory.getLogger(CustomJFXPanel.class); - private Field scenePeerField = null; - - private CustomJFXPanel() { - super(); - try { - scenePeerField = this.getClass().getSuperclass().getDeclaredField("scenePeer"); - scenePeerField.setAccessible(true); - } catch (NoSuchFieldException | SecurityException e) { - LOGGER.error("Could not access scenePeer Field", e); - - } - } - - public static JFXPanel create() { - return OS.LINUX ? new CustomJFXPanel() : new JFXPanel(); - } +public class CustomJFXPanel { public static JFXPanel wrap(Scene scene) { JFXPanel container = new JFXPanel(); @@ -47,34 +18,4 @@ public static JFXPanel wrap(Scene scene) { return container; } - @Override - protected void processInputMethodEvent(InputMethodEvent e) { - if (e.getID() == InputMethodEvent.INPUT_METHOD_TEXT_CHANGED) { - sendInputMethodEventToFX(e); - } - - } - - private void sendInputMethodEventToFX(InputMethodEvent e) { - String t = InputMethodSupport.getTextForEvent(e); - - int insertionIndex = 0; - if (e.getCaret() != null) { - insertionIndex = e.getCaret().getInsertionIndex(); - } - - EmbeddedSceneInterface myScencePeer = null; - try { - //the variable must be named different to the original, otherwise reflection does not find the right ones - myScencePeer = (EmbeddedSceneInterface) scenePeerField.get(this); - } catch (IllegalArgumentException | IllegalAccessException ex) { - LOGGER.error("Could not access scenePeer Field", ex); - } - - myScencePeer.inputMethodEvent( - javafx.scene.input.InputMethodEvent.INPUT_METHOD_TEXT_CHANGED, - InputMethodSupport.inputMethodEventComposed(t, e.getCommittedCharacterCount()), - t.substring(0, e.getCommittedCharacterCount()), - insertionIndex); - } } diff --git a/src/main/java/org/jabref/gui/exporter/ExportCommand.java b/src/main/java/org/jabref/gui/exporter/ExportCommand.java index 22134072914..e78d39292ae 100644 --- a/src/main/java/org/jabref/gui/exporter/ExportCommand.java +++ b/src/main/java/org/jabref/gui/exporter/ExportCommand.java @@ -1,6 +1,5 @@ package org.jabref.gui.exporter; -import java.nio.file.Files; import java.nio.file.Path; import java.util.List; import java.util.stream.Collectors; @@ -58,18 +57,6 @@ private void export(Path file, FileChooser.ExtensionFilter selectedExtensionFilt FileUtil.addExtension(file, selectedExtension); } - if (Files.exists(file)) { - // Warn that the file exists: - - boolean overwriteFilePressed = frame.getDialogService().showConfirmationDialogAndWait(Localization.lang("Export"), - Localization.lang("'%0' exists. Overwrite file?", file.getFileName().toString()), - Localization.lang("Overwrite file"), - Localization.lang("Cancel")); - - if (!overwriteFilePressed) { - return; - } - } final Exporter format = FileFilterConverter.getExporter(selectedExtensionFilter, exporters).orElseThrow(() -> new IllegalStateException("User didn't selected a file type for the extension")); List entries; if (selectedOnly) { @@ -89,8 +76,8 @@ private void export(Path file, FileChooser.ExtensionFilter selectedExtensionFilt // Make sure we remember which filter was used, to set // the default for next time: - Globals.prefs.put(JabRefPreferences.LAST_USED_EXPORT, format.getId()); - Globals.prefs.put(JabRefPreferences.EXPORT_WORKING_DIRECTORY, file.getParent().getFileName().toString()); + Globals.prefs.put(JabRefPreferences.LAST_USED_EXPORT, format.getDescription()); + Globals.prefs.put(JabRefPreferences.EXPORT_WORKING_DIRECTORY, file.getParent().toString()); final List finEntries = entries; AbstractWorker exportWorker = new AbstractWorker() { diff --git a/src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java b/src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java index 516317828ec..cf4fe81b36a 100644 --- a/src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java +++ b/src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java @@ -6,8 +6,6 @@ import java.nio.file.Path; import java.util.Optional; -import javax.swing.JOptionPane; - import javafx.scene.control.Alert.AlertType; import javafx.scene.control.ButtonBar.ButtonData; import javafx.scene.control.ButtonType; @@ -198,7 +196,7 @@ private boolean saveDatabase(File file, boolean selectedOnly, Charset encoding) frame.getDialogService().showErrorDialogAndWait(Localization.lang("Save library"), Localization.lang("Could not save file.") + Localization.lang("Character encoding '%0' is not supported.", encoding.displayName())); - throw ex; + throw new SaveException(ex.getMessage(), ex); } catch (SaveException ex) { if (ex == SaveException.FILE_LOCKED) { throw ex; @@ -211,8 +209,7 @@ private boolean saveDatabase(File file, boolean selectedOnly, Charset encoding) LOGGER.error("A problem occured when trying to save the file", ex); } - JOptionPane.showMessageDialog(null, Localization.lang("Could not save file.") + ".\n" + ex.getMessage(), - Localization.lang("Save library"), JOptionPane.ERROR_MESSAGE); + frame.getDialogService().showErrorDialogAndWait(Localization.lang("Save library"), Localization.lang("Could not save file."), ex); throw ex; } @@ -248,30 +245,30 @@ private boolean saveDatabase(File file, boolean selectedOnly, Charset encoding) success = false; } } + } - // backup file? - try { - if (success) { - session.commit(file.toPath()); - // Make sure to remember which encoding we used. - panel.getBibDatabaseContext().getMetaData().setEncoding(encoding, ChangePropagation.DO_NOT_POST_EVENT); - } else { - session.cancel(); - } - } catch (SaveException e) { - LOGGER.debug("Problems saving during backup creationg", e); - boolean saveWithoutBackupClicked = frame.getDialogService().showConfirmationDialogAndWait(Localization.lang("Unable to create backup"), - Localization.lang("Save failed during backup creation") + ". " + Localization.lang("Save without backup?"), - Localization.lang("Save without backup"), Localization.lang("Cancel")); + // backup file? + try { + if (success) { + session.commit(file.toPath()); + // Make sure to remember which encoding we used. + panel.getBibDatabaseContext().getMetaData().setEncoding(encoding, ChangePropagation.DO_NOT_POST_EVENT); + } else { + session.cancel(); + } + } catch (SaveException e) { + LOGGER.debug("Problems saving during backup creationg", e); + boolean saveWithoutBackupClicked = frame.getDialogService().showConfirmationDialogAndWait(Localization.lang("Unable to create backup"), + Localization.lang("Save failed during backup creation") + ". " + Localization.lang("Save without backup?"), + Localization.lang("Save without backup"), Localization.lang("Cancel")); - if (saveWithoutBackupClicked) { - session.setUseBackup(false); + if (saveWithoutBackupClicked) { + session.setUseBackup(false); - session.commit(file.toPath()); - panel.getBibDatabaseContext().getMetaData().setEncoding(encoding, ChangePropagation.DO_NOT_POST_EVENT); - } else { - success = false; - } + session.commit(file.toPath()); + panel.getBibDatabaseContext().getMetaData().setEncoding(encoding, ChangePropagation.DO_NOT_POST_EVENT); + } else { + success = false; } } diff --git a/src/main/java/org/jabref/gui/fieldeditors/TextArea.java b/src/main/java/org/jabref/gui/fieldeditors/TextArea.java deleted file mode 100644 index 958c0f9a21e..00000000000 --- a/src/main/java/org/jabref/gui/fieldeditors/TextArea.java +++ /dev/null @@ -1,161 +0,0 @@ -package org.jabref.gui.fieldeditors; - -import java.awt.Color; -import java.lang.reflect.InvocationTargetException; - -import javax.swing.JComponent; -import javax.swing.SwingUtilities; - -import javafx.embed.swing.JFXPanel; -import javafx.scene.Scene; - -import org.jabref.gui.GUIGlobals; -import org.jabref.gui.customjfx.CustomJFXPanel; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * An implementation of the FieldEditor backed by a {@link EditorTextArea}. - * Used for multi-line input, currently all BibTexFields except Bibtex key! - */ -public class TextArea implements FieldEditor { - - private static final Logger LOGGER = LoggerFactory.getLogger(TextArea.class); - - private final JFXPanel swingPanel; - - private final EditorTextArea textArea; - private String fieldName; - - public TextArea(String fieldName, String content) { - this(fieldName, content, ""); - } - - public TextArea(String fieldName, String content, String title) { - textArea = new EditorTextArea(content); - textArea.setPromptText(title); - - swingPanel = CustomJFXPanel.wrap(new Scene(textArea)); - swingPanel.setBackground(GUIGlobals.activeBackgroundColor); - - - /* - // Add the global focus listener, so a menu item can see if this field - // was focused when an action was called. - addFocusListener(Globals.getFocusListener()); - addFocusListener(new FieldEditorFocusListener()); - */ - - this.fieldName = fieldName; - - /* - FieldTextMenu popMenu = new FieldTextMenu(this); - this.addMouseListener(popMenu); - label.addMouseListener(popMenu); - */ - } - - @Override - public String getFieldName() { - return fieldName; - } - - public void setFieldName(String newName) { - fieldName = newName; - } - - @Override - public void setBackground(Color color) { - //not needed - } - - @Override - public JComponent getPane() { - return swingPanel; - } - - @Override - public JComponent getTextComponent() { - return null; - } - - @Override - public boolean hasFocus() { - return false; - } - - @Override - public void setActiveBackgroundColor() { - setBackgroundColor(GUIGlobals.activeBackgroundColor); - } - - @Override - public void setValidBackgroundColor() { - setBackgroundColor(GUIGlobals.validFieldBackgroundColor); - } - - @Override - public void setInvalidBackgroundColor() { - setBackgroundColor(GUIGlobals.invalidFieldBackgroundColor); - } - - private void setBackgroundColor(Color color) { - if (SwingUtilities.isEventDispatchThread()) { - setBackground(color); - } else { - try { - SwingUtilities.invokeAndWait(() -> setBackground(color)); - } catch (InvocationTargetException | InterruptedException e) { - LOGGER.info("Problem setting background color", e); - } - } - } - - @Override - public String getText() { - return textArea.getText(); - } - - @Override - public void setText(String newText) { - textArea.setText(newText); - } - - @Override - public void append(String text) { - // not needed - } - - @Override - public void setEnabled(boolean enabled) { - // not needed - } - - @Override - public void paste(String textToInsert) { - /* - replaceSelection(textToInsert); - */ - } - - @Override - public String getSelectedText() { - return null; - } - - @Override - public void undo() { - // Nothing - } - - @Override - public void redo() { - // Nothing - } - - @Override - public void requestFocus() { - // not needed - } -} diff --git a/src/main/java/org/jabref/gui/groups/GroupTreeController.java b/src/main/java/org/jabref/gui/groups/GroupTreeController.java index 672f5979513..265f7dc6b86 100644 --- a/src/main/java/org/jabref/gui/groups/GroupTreeController.java +++ b/src/main/java/org/jabref/gui/groups/GroupTreeController.java @@ -28,7 +28,6 @@ import javafx.scene.input.ClipboardContent; import javafx.scene.input.DragEvent; import javafx.scene.input.Dragboard; -import javafx.scene.input.MouseButton; import javafx.scene.input.TransferMode; import javafx.scene.layout.StackPane; import javafx.scene.text.Text; @@ -173,18 +172,7 @@ public void initialize() { // Simply setting to null is not enough since it would be replaced by the default node on every change row.setDisclosureNode(null); row.disclosureNodeProperty().addListener((observable, oldValue, newValue) -> row.setDisclosureNode(null)); - - // Opens the group's edit window when the group gets double clicked - row.setOnMouseClicked((mouseClickedEvent) -> { - if (mouseClickedEvent.getButton().equals(MouseButton.PRIMARY) - && (mouseClickedEvent.getClickCount() == 2)) { - GroupNodeViewModel groupToEdit = row.itemProperty().getValue(); - if (groupToEdit != null) { - viewModel.editGroup(groupToEdit); - } - } - }); - + // Add context menu (only for non-null items) row.contextMenuProperty().bind( EasyBind.monadic(row.itemProperty()) diff --git a/src/main/java/org/jabref/gui/importer/ImportCommand.java b/src/main/java/org/jabref/gui/importer/ImportCommand.java index 4849fce65ec..e802a404b1f 100644 --- a/src/main/java/org/jabref/gui/importer/ImportCommand.java +++ b/src/main/java/org/jabref/gui/importer/ImportCommand.java @@ -29,6 +29,7 @@ public class ImportCommand extends SimpleCommand { private final JabRefFrame frame; private final boolean openInNew; + private final DialogService dialogService; /** * @param openInNew Indicate whether the entries should import into a new database or into the currently open one. @@ -36,6 +37,7 @@ public class ImportCommand extends SimpleCommand { public ImportCommand(JabRefFrame frame, boolean openInNew) { this.frame = frame; this.openInNew = openInNew; + this.dialogService = frame.getDialogService(); } @Override @@ -43,14 +45,15 @@ public void execute() { SortedSet importers = Globals.IMPORT_FORMAT_READER.getImportFormats(); List extensions = importers.stream().map(Importer::getFileType) .collect(Collectors.toList()); - FileChooser.ExtensionFilter allImports = FileFilterConverter.forAllImporters(importers); + FileChooser.ExtensionFilter allImports = FileFilterConverter.forAllImporters(importers); + FileChooser.ExtensionFilter anyFile = new FileChooser.ExtensionFilter(Localization.lang("Any file"), "*.*"); FileDialogConfiguration fileDialogConfiguration = new FileDialogConfiguration.Builder() + .addExtensionFilter(anyFile) .addExtensionFilter(allImports) .addExtensionFilters(extensions) .withInitialDirectory(Globals.prefs.get(JabRefPreferences.IMPORT_WORKING_DIRECTORY)) .build(); - DialogService dialogService = frame.getDialogService(); DefaultTaskExecutor.runInJavaFXThread(() -> { dialogService.showFileOpenDialog(fileDialogConfiguration) .ifPresent(path -> doImport(path, importers, fileDialogConfiguration.getSelectedExtensionFilter())); @@ -59,7 +62,7 @@ public void execute() { private void doImport(Path file, SortedSet importers, FileChooser.ExtensionFilter selectedExtensionFilter) { if (!Files.exists(file)) { - frame.getDialogService().showErrorDialogAndWait(Localization.lang("Import"), + dialogService.showErrorDialogAndWait(Localization.lang("Import"), Localization.lang("File not found") + ": '" + file.getFileName() + "'."); return; diff --git a/src/main/java/org/jabref/gui/importer/actions/MergeReviewIntoCommentAction.java b/src/main/java/org/jabref/gui/importer/actions/MergeReviewIntoCommentAction.java index 71b52e42eaf..c1aa6a96b74 100644 --- a/src/main/java/org/jabref/gui/importer/actions/MergeReviewIntoCommentAction.java +++ b/src/main/java/org/jabref/gui/importer/actions/MergeReviewIntoCommentAction.java @@ -20,7 +20,7 @@ public void performAction(BasePanel basePanel, ParserResult parserResult) { migration.performMigration(parserResult); List conflicts = MergeReviewIntoCommentMigration.collectConflicts(parserResult); - if (new MergeReviewIntoCommentConfirmationDialog(basePanel).askUserForMerge(conflicts)) { + if (!conflicts.isEmpty() && new MergeReviewIntoCommentConfirmationDialog(basePanel).askUserForMerge(conflicts)) { migration.performConflictingMigration(parserResult); } } diff --git a/src/main/java/org/jabref/gui/importer/actions/MergeReviewIntoCommentConfirmationDialog.java b/src/main/java/org/jabref/gui/importer/actions/MergeReviewIntoCommentConfirmationDialog.java index 1c11fcd254c..2f789560771 100644 --- a/src/main/java/org/jabref/gui/importer/actions/MergeReviewIntoCommentConfirmationDialog.java +++ b/src/main/java/org/jabref/gui/importer/actions/MergeReviewIntoCommentConfirmationDialog.java @@ -25,13 +25,14 @@ public boolean askUserForMerge(List conflicts) { .map(Optional::get) .collect(Collectors.joining(",\n")); - int answer = JOptionPane.showConfirmDialog( + String[] options = {Localization.lang("Merge fields")}; + int answer = JOptionPane.showOptionDialog( null, bibKeys + " " + Localization.lang("has/have both a 'Comment' and a 'Review' field.") + "\n" + Localization.lang("Since the 'Review' field was deprecated in JabRef 4.2, these two fields are about to be merged into the 'Comment' field.") + "\n" + Localization.lang("The conflicting fields of these entries will be merged into the 'Comment' field."), - Localization.lang("Review Field Migration"), JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE); + Localization.lang("Review Field Migration"), JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); return 0 == answer; } diff --git a/src/main/java/org/jabref/gui/maintable/MainTable.css b/src/main/java/org/jabref/gui/maintable/MainTable.css index 5efa7a253ed..90b6289d03f 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTable.css +++ b/src/main/java/org/jabref/gui/maintable/MainTable.css @@ -3,6 +3,7 @@ -fx-padding: 0; -fx-border-insets: 0; -fx-background-color: -fx-light-background; + -fx-table-cell-border-color: transparent; } .table-view .column-header-background { diff --git a/src/main/java/org/jabref/gui/maintable/MainTable.java b/src/main/java/org/jabref/gui/maintable/MainTable.java index 3487e21a524..f033e89eddb 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTable.java +++ b/src/main/java/org/jabref/gui/maintable/MainTable.java @@ -9,7 +9,6 @@ import java.util.Optional; import java.util.stream.Collectors; -import javax.swing.JTable; import javax.swing.undo.UndoManager; import javafx.collections.ListChangeListener; @@ -35,21 +34,16 @@ import org.jabref.gui.externalfiletype.ExternalFileTypes; import org.jabref.gui.keyboard.KeyBinding; import org.jabref.gui.keyboard.KeyBindingRepository; -import org.jabref.gui.renderer.CompleteRenderer; -import org.jabref.gui.renderer.GeneralRenderer; -import org.jabref.gui.renderer.IncompleteRenderer; import org.jabref.gui.undo.NamedCompound; import org.jabref.gui.undo.UndoableInsertEntry; import org.jabref.gui.util.LocalDragboard; import org.jabref.gui.util.ViewModelTableRowFactory; -import org.jabref.logic.TypedBibEntry; import org.jabref.logic.l10n.Localization; import org.jabref.logic.util.UpdateField; import org.jabref.model.database.BibDatabaseContext; import org.jabref.model.entry.BibEntry; import org.jabref.preferences.JabRefPreferences; -import ca.odell.glazedlists.matchers.Matcher; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -57,27 +51,11 @@ public class MainTable extends TableView { private static final Logger LOGGER = LoggerFactory.getLogger(MainTable.class); - private static GeneralRenderer defRenderer; - private static GeneralRenderer reqRenderer; - private static GeneralRenderer optRenderer; - private static GeneralRenderer resolvedRenderer; - private static GeneralRenderer grayedOutRenderer; - private static GeneralRenderer veryGrayedOutRenderer; - - private static IncompleteRenderer incRenderer; - private static CompleteRenderer compRenderer; - private static CompleteRenderer grayedOutNumberRenderer; - private static CompleteRenderer veryGrayedOutNumberRenderer; - private final BasePanel panel; - //private final boolean tableColorCodes; - //private final boolean tableResolvedColorCodes; private final ScrollPane pane; private final BibDatabaseContext database; private final UndoManager undoManager; - // needed to activate/deactivate the listener - private PersistenceVisualStateTable tableColumnListener; private final MainTableDataModel model; private final NewDroppedFileHandler fileHandler; @@ -125,14 +103,6 @@ public MainTable(MainTableDataModel model, JabRefFrame frame, pane.setFitToWidth(true); this.pane.getStylesheets().add(MainTable.class.getResource("MainTable.css").toExternalForm()); - // TODO: Color - //tableColorCodes = Globals.prefs.getBoolean(JabRefPreferences.TABLE_COLOR_CODES_ON); - //tableResolvedColorCodes = Globals.prefs.getBoolean(JabRefPreferences.TABLE_RESOLVED_COLOR_CODES_ON); - //pane.getViewport().setBackground(Globals.prefs.getColor(JabRefPreferences.TABLE_BACKGROUND)); - //setGridColor(Globals.prefs.getColor(JabRefPreferences.GRID_COLOR)); - if (!preferences.showGrid()) { - this.setStyle("-fx-table-cell-border-color: transparent;"); - } // TODO: Tooltip for column header /* @@ -154,9 +124,6 @@ public String getToolTipText(MouseEvent event) { //setTransferHandler(xfer); //pane.setTransferHandler(xfer); - // Todo: Set default sort order - // setupComparatorChooser(); - // TODO: Float marked entries //model.updateMarkingState(Globals.prefs.getBoolean(JabRefPreferences.FLOAT_MARKED_ENTRIES)); @@ -184,18 +151,6 @@ public void copy() { } } - // Enum used to define how a cell should be rendered. - private enum CellRendererMode { - REQUIRED, - RESOLVED, - OPTIONAL, - OTHER - } - - static { - //MainTable.updateRenderers(); - } - public void cut() { copy(); panel.delete(true); @@ -356,83 +311,6 @@ public MainTableDataModel getTableModel() { return model; } - /* - // TODO: if the content of the cell is bigger than the cell itself render it as the tooltip - @Override - public String getToolTipText(MouseEvent e) { - String toolTipText = super.getToolTipText(e); - Point p = e.getPoint(); - int col = columnAtPoint(p); - int row = rowAtPoint(p); - - Rectangle bounds = getCellRect(row, col, false); - Dimension d = prepareRenderer(getCellRenderer(row, col), row, col).getPreferredSize(); - // if the content of the cell is bigger than the cell itself render it as the tooltip (thus throwing the original tooltip away) - if ((d != null) && (d.width > bounds.width) && (getValueAt(row, col) != null)) { - toolTipText = getValueAt(row, col).toString(); - } - return toolTipText; - } - - // TODO: Support float mode - @Override - public TableCellRenderer getCellRenderer(int row, int column) { - - int score = -3; - DefaultTableCellRenderer renderer = MainTable.defRenderer; - - if ((model.getSearchState() != MainTableDataModel.DisplayOption.FLOAT) - || matches(row, SearchMatcher.INSTANCE)) { - score++; - } - if ((model.getGroupingState() != MainTableDataModel.DisplayOption.FLOAT) - || matches(row, GroupMatcher.INSTANCE)) { - score += 2; - } - - // Now, a grayed out renderer is for entries with -1, and - // a very grayed out one for entries with -2 - if (score < -1) { - if (column == 0) { - MainTable.veryGrayedOutNumberRenderer.setNumber(row); - renderer = MainTable.veryGrayedOutNumberRenderer; - } else { - renderer = MainTable.veryGrayedOutRenderer; - } - } - else if (score == -1) { - if (column == 0) { - MainTable.grayedOutNumberRenderer.setNumber(row); - renderer = MainTable.grayedOutNumberRenderer; - } else { - renderer = MainTable.grayedOutRenderer; - } - } - - else if (column == 0) { - if (isComplete(row)) { - MainTable.compRenderer.setNumber(row); - renderer = MainTable.compRenderer; - } else { - // Return a renderer with red background if the entry is incomplete. - MainTable.incRenderer.setNumber(row); - renderer = MainTable.incRenderer; - } - } else if (tableColorCodes || tableResolvedColorCodes) { - CellRendererMode status = getCellStatus(row, column, tableResolvedColorCodes); - if (status == CellRendererMode.REQUIRED) { - renderer = MainTable.reqRenderer; - } else if (status == CellRendererMode.OPTIONAL) { - renderer = MainTable.optRenderer; - } else if (status == CellRendererMode.RESOLVED) { - renderer = MainTable.resolvedRenderer; - } - } - - return renderer; - } - */ - public BibEntry getEntryAt(int row) { return model.getEntriesFilteredAndSorted().get(row).getEntry(); } @@ -453,29 +331,8 @@ public List getSelectedEntries() { */ private void setupComparatorChooser() { // TODO: Proper sorting - /* - // First column: - List comparators = comparatorChooser.getComparatorsForColumn(0); - comparators.clear(); - comparators.add(new FirstColumnComparator(panel.getBibDatabaseContext())); - - for (int i = 1; i < tableFormat.getColumnCount(); i++) { - MainTableColumn tableColumn = tableFormat.getTableColumn(i); - - comparators = comparatorChooser.getComparatorsForColumn(i); - comparators.clear(); - - if (SpecialField.RANKING.getFieldName().equals(tableColumn.getColumnName())) { - comparators.add(new RankingFieldComparator()); - } else if (tableColumn.isIconColumn()) { - comparators.add(new IconComparator(tableColumn.getBibtexFields())); - } else { - comparators = comparatorChooser.getComparatorsForColumn(i); - comparators.clear(); - comparators.add(new FieldComparator(tableFormat.getColumnName(i).toLowerCase(Locale.ROOT))); - } - } + /* // Set initial sort columns: // Default sort order: @@ -543,98 +400,18 @@ private void setupComparatorChooser() { }); */ } - /* - // TODO: Reenable background coloring of fields (required/optional/...) - private CellRendererMode getCellStatus(int row, int col, boolean checkResolved) { - try { - BibEntry be = getEntryAt(row); - if (checkResolved && tableFormat.getTableColumn(col).isResolved(be)) { - return CellRendererMode.RESOLVED; - } - Optional type = EntryTypes.getType(be.getType(), panel.getBibDatabaseContext().getMode()); - if (type.isPresent()) { - String columnName = getColumnName(col).toLowerCase(Locale.ROOT); - if (columnName.equals(BibEntry.KEY_FIELD) || type.get().getRequiredFieldsFlat().contains(columnName)) { - return CellRendererMode.REQUIRED; - } - if (type.get().getOptionalFields().contains(columnName)) { - return CellRendererMode.OPTIONAL; - } - } - return CellRendererMode.OTHER; - } catch (NullPointerException ex) { - return CellRendererMode.OTHER; - } - } - */ - - public Optional findEntry(BibEntry entry) { - return model.getEntriesFilteredAndSorted() - .stream() - .filter(viewModel -> viewModel.getEntry().equals(entry)) - .findFirst(); - } - - private boolean matches(int row, Matcher m) { - return getBibEntry(row).map(m::matches).orElse(false); - } - - private boolean isComplete(int row) { - Optional bibEntry = getBibEntry(row); - if (bibEntry.isPresent()) { - TypedBibEntry typedEntry = new TypedBibEntry(bibEntry.get(), panel.getBibDatabaseContext()); - return typedEntry.hasAllRequiredFields(); - } - return true; - } - - private Optional getBibEntry(int row) { - try { - return Optional.of(model.getEntriesFilteredAndSorted().get(row).getEntry()); - } catch (IndexOutOfBoundsException e) { - return Optional.empty(); - } + private Optional findEntry(BibEntry entry) { + return model.getEntriesFiltered().stream() + .filter(viewModel -> viewModel.getEntry().equals(entry)) + .findFirst(); } /** * Repaints the table with the most recent font configuration */ public void updateFont() { - /* // TODO: Font & padding customization - setFont(GUIGlobals.currentFont); - int maxOfIconsAndFontSize = Math.max(GUIGlobals.currentFont.getSize(), Globals.prefs.getInt(JabRefPreferences.ICON_SIZE_SMALL)); - setRowHeight(Globals.prefs.getInt(JabRefPreferences.TABLE_ROW_PADDING) + maxOfIconsAndFontSize); - // Update Table header with new settings - this.getTableHeader().setDefaultRenderer(new MainTableHeaderRenderer(this.getTableHeader().getDefaultRenderer())); - this.getTableHeader().resizeAndRepaint(); - */ - } - - public static void updateRenderers() { - - MainTable.defRenderer = new GeneralRenderer(Globals.prefs.getColor(JabRefPreferences.TABLE_BACKGROUND), - Globals.prefs.getColor(JabRefPreferences.TABLE_TEXT)); - Color sel = MainTable.defRenderer.getTableCellRendererComponent(new JTable(), "", true, false, 0, 0).getBackground(); - MainTable.reqRenderer = new GeneralRenderer(Globals.prefs.getColor(JabRefPreferences.TABLE_REQ_FIELD_BACKGROUND), Globals.prefs.getColor(JabRefPreferences.TABLE_TEXT)); - MainTable.optRenderer = new GeneralRenderer(Globals.prefs.getColor(JabRefPreferences.TABLE_OPT_FIELD_BACKGROUND), Globals.prefs.getColor(JabRefPreferences.TABLE_TEXT)); - MainTable.resolvedRenderer = new GeneralRenderer( - Globals.prefs.getColor(JabRefPreferences.TABLE_RESOLVED_FIELD_BACKGROUND), - Globals.prefs.getColor(JabRefPreferences.TABLE_TEXT)); - MainTable.incRenderer = new IncompleteRenderer(); - MainTable.compRenderer = new CompleteRenderer(Globals.prefs.getColor(JabRefPreferences.TABLE_BACKGROUND)); - MainTable.grayedOutNumberRenderer = new CompleteRenderer(Globals.prefs.getColor(JabRefPreferences.GRAYED_OUT_BACKGROUND)); - MainTable.veryGrayedOutNumberRenderer = new CompleteRenderer(Globals.prefs.getColor(JabRefPreferences.VERY_GRAYED_OUT_BACKGROUND)); - MainTable.grayedOutRenderer = new GeneralRenderer(Globals.prefs.getColor(JabRefPreferences.GRAYED_OUT_BACKGROUND), - Globals.prefs.getColor(JabRefPreferences.GRAYED_OUT_TEXT), MainTable.mixColors(Globals.prefs.getColor(JabRefPreferences.GRAYED_OUT_BACKGROUND), - sel)); - MainTable.veryGrayedOutRenderer = new GeneralRenderer(Globals.prefs.getColor(JabRefPreferences.VERY_GRAYED_OUT_BACKGROUND), - Globals.prefs.getColor(JabRefPreferences.VERY_GRAYED_OUT_TEXT), MainTable.mixColors(Globals.prefs.getColor(JabRefPreferences.VERY_GRAYED_OUT_BACKGROUND), - sel)); - } - - private static Color mixColors(Color one, Color two) { - return new Color((one.getRed() + two.getRed()) / 2, (one.getGreen() + two.getGreen()) / 2, (one.getBlue() + two.getBlue()) / 2); + // setFont(GUIGlobals.currentFont); } } diff --git a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java index 603baac8352..31090c1c512 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java +++ b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java @@ -31,6 +31,7 @@ import org.jabref.gui.specialfields.SpecialFieldViewModel; import org.jabref.gui.util.OptionalValueTableCellFactory; import org.jabref.gui.util.ValueTableCellFactory; +import org.jabref.gui.util.comparator.RankingFieldComparator; import org.jabref.logic.l10n.Localization; import org.jabref.model.database.BibDatabaseContext; import org.jabref.model.entry.BibEntry; @@ -184,6 +185,10 @@ private TableColumn } column.setCellValueFactory(cellData -> cellData.getValue().getSpecialField(specialField)); + if (specialField == SpecialField.RANKING) { + column.setComparator(new RankingFieldComparator()); + } + return column; } diff --git a/src/main/java/org/jabref/gui/maintable/MainTablePreferences.java b/src/main/java/org/jabref/gui/maintable/MainTablePreferences.java index f4c1b6baec9..ac29efc7304 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTablePreferences.java +++ b/src/main/java/org/jabref/gui/maintable/MainTablePreferences.java @@ -1,12 +1,10 @@ package org.jabref.gui.maintable; public class MainTablePreferences { - private final boolean showGrid; private final ColumnPreferences columnPreferences; private final boolean resizeColumnsToFit; - public MainTablePreferences(boolean showGrid, ColumnPreferences columnPreferences, boolean resizeColumnsToFit) { - this.showGrid = showGrid; + public MainTablePreferences(ColumnPreferences columnPreferences, boolean resizeColumnsToFit) { this.columnPreferences = columnPreferences; this.resizeColumnsToFit = resizeColumnsToFit; } @@ -19,8 +17,4 @@ public boolean resizeColumnsToFit() { return resizeColumnsToFit; } - - public boolean showGrid() { - return showGrid; - } } diff --git a/src/main/java/org/jabref/gui/openoffice/StyleSelectDialog.java b/src/main/java/org/jabref/gui/openoffice/StyleSelectDialog.java index 09824d81494..799cf4fe015 100644 --- a/src/main/java/org/jabref/gui/openoffice/StyleSelectDialog.java +++ b/src/main/java/org/jabref/gui/openoffice/StyleSelectDialog.java @@ -132,9 +132,11 @@ private void init() { // Create a preview panel for previewing styles // Must be done before creating the table to avoid NPEs - preview = new PreviewPanel(null, null, Globals.getKeyPrefs(), Globals.prefs.getPreviewPreferences(), frame.getDialogService()); - // Use the test entry from the Preview settings tab in Preferences: - preview.setEntry(prevEntry); + DefaultTaskExecutor.runInJavaFXThread(() -> { + preview = new PreviewPanel(null, null, Globals.getKeyPrefs(), Globals.prefs.getPreviewPreferences(), frame.getDialogService()); + // Use the test entry from the Preview settings tab in Preferences: + preview.setEntry(prevEntry); + }); setupTable(); updateStyles(); diff --git a/src/main/java/org/jabref/gui/plaintextimport/TextInputDialog.java b/src/main/java/org/jabref/gui/plaintextimport/TextInputDialog.java index f5c00bfe48a..cbdd69816fb 100644 --- a/src/main/java/org/jabref/gui/plaintextimport/TextInputDialog.java +++ b/src/main/java/org/jabref/gui/plaintextimport/TextInputDialog.java @@ -618,8 +618,8 @@ private class SimpleCellRenderer extends DefaultListCellRenderer { private final Font usedFont; private final Icon okIcon = IconTheme.JabRefIcons.PLAIN_TEXT_IMPORT_DONE.getSmallIcon(); private final Icon needIcon = IconTheme.JabRefIcons.PLAIN_TEXT_IMPORT_TODO.getSmallIcon(); - private final Color requiredColor = Globals.prefs.getColor(JabRefPreferences.TABLE_REQ_FIELD_BACKGROUND); - private final Color optionalColor = Globals.prefs.getColor(JabRefPreferences.TABLE_OPT_FIELD_BACKGROUND); + private final Color requiredColor = new Color(230, 235, 255); + private final Color optionalColor = new Color(230, 255, 230); public SimpleCellRenderer(Font normFont) { diff --git a/src/main/java/org/jabref/gui/preftabs/AdvancedTab.java b/src/main/java/org/jabref/gui/preftabs/AdvancedTab.java index 523b3ba741b..ba94be7d18c 100644 --- a/src/main/java/org/jabref/gui/preftabs/AdvancedTab.java +++ b/src/main/java/org/jabref/gui/preftabs/AdvancedTab.java @@ -13,6 +13,7 @@ import org.jabref.gui.DialogService; import org.jabref.gui.help.HelpAction; import org.jabref.gui.remote.JabRefMessageHandler; +import org.jabref.gui.util.DefaultTaskExecutor; import org.jabref.logic.help.HelpFile; import org.jabref.logic.journals.JournalAbbreviationPreferences; import org.jabref.logic.l10n.Localization; @@ -122,10 +123,10 @@ private void storeRemoteSettings() { if (remotePreferences.useRemoteServer()) { - dialogService.showWarningDialogAndWait(Localization.lang("Remote server port"), + DefaultTaskExecutor.runInJavaFXThread(() -> dialogService.showWarningDialogAndWait(Localization.lang("Remote server port"), Localization.lang("Remote server port") .concat(" ") - .concat(Localization.lang("You must restart JabRef for this to come into effect."))); + .concat(Localization.lang("You must restart JabRef for this to come into effect.")))); } } @@ -159,9 +160,9 @@ public boolean validateSettings() { } } catch (NumberFormatException ex) { - dialogService.showErrorDialogAndWait(Localization.lang("Remote server port"), + DefaultTaskExecutor.runInJavaFXThread(()-> dialogService.showErrorDialogAndWait(Localization.lang("Remote server port"), Localization.lang("You must enter an integer value in the interval 1025-65535 in the text field for") - + " '" + Localization.lang("Remote server port") + '\''); + + " '" + Localization.lang("Remote server port") + '\'')); return false; } diff --git a/src/main/java/org/jabref/gui/preftabs/AppearancePrefsTab.java b/src/main/java/org/jabref/gui/preftabs/AppearancePrefsTab.java index c884fd07f1a..59e10e24011 100644 --- a/src/main/java/org/jabref/gui/preftabs/AppearancePrefsTab.java +++ b/src/main/java/org/jabref/gui/preftabs/AppearancePrefsTab.java @@ -8,7 +8,6 @@ import java.util.stream.Collectors; import javax.swing.BorderFactory; -import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JLabel; @@ -19,6 +18,7 @@ import org.jabref.gui.DialogService; import org.jabref.gui.GUIGlobals; +import org.jabref.gui.util.DefaultTaskExecutor; import org.jabref.logic.l10n.Localization; import org.jabref.logic.util.OS; import org.jabref.preferences.JabRefPreferences; @@ -35,12 +35,8 @@ class AppearancePrefsTab extends JPanel implements PrefsTab { private final JabRefPreferences prefs; - private final JCheckBox colorCodes; - private final JCheckBox resolvedColorCodes; private final JCheckBox overrideFonts; - private final JCheckBox showGrid; - private final ColorSetupPanel colorPanel; - private Font usedFont = GUIGlobals.currentFont; + private final Font usedFont = GUIGlobals.currentFont; private int oldMenuFontSize; private int oldSmallIconSize; private int oldLargeIconSize; @@ -48,7 +44,6 @@ class AppearancePrefsTab extends JPanel implements PrefsTab { private final JTextField fontSize; private final JTextField largeIconsTextField; private final JTextField smallIconsTextField; - private final JTextField rowPadding; // look and feel private final JComboBox classNamesLAF; private String currentLAF = ""; @@ -78,22 +73,12 @@ public AppearancePrefsTab(DialogService dialogService, JabRefPreferences prefs) // Font sizes: fontSize = new JTextField(5); - // Row padding size: - rowPadding = new JTextField(5); - // Icon sizes: largeIconsTextField = new JTextField(5); smallIconsTextField = new JTextField(5); - colorCodes = new JCheckBox( - Localization.lang("Color codes for required and optional fields")); - - resolvedColorCodes = new JCheckBox(Localization.lang("Color code for resolved fields")); - overrideFonts = new JCheckBox(Localization.lang("Override default font settings")); - showGrid = new JCheckBox(Localization.lang("Show gridlines")); - FormLayout layout = new FormLayout("1dlu, 8dlu, left:pref, 4dlu, fill:pref, 4dlu, fill:60dlu, 4dlu, fill:pref", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout); @@ -105,8 +90,6 @@ public AppearancePrefsTab(DialogService dialogService, JabRefPreferences prefs) classNamesLAF.setEditable(true); customLAF.addChangeListener(e -> classNamesLAF.setEnabled(((JCheckBox) e.getSource()).isSelected())); - colorPanel = new ColorSetupPanel(colorCodes, resolvedColorCodes, showGrid); - // only the default L&F shows the OSX specific first drop-down menu if (!OS.OS_X) { JPanel pan = new JPanel(); @@ -165,24 +148,6 @@ public AppearancePrefsTab(DialogService dialogService, JabRefPreferences prefs) builder.append(generalPanel); builder.nextLine(); - builder.appendSeparator(Localization.lang("Table appearance")); - JPanel p2 = new JPanel(); - p2.add(new JLabel(Localization.lang("Table row height padding") + ":")); - p2.add(rowPadding); - builder.append(p2); - builder.nextLine(); - builder.append(colorCodes); - builder.nextLine(); - builder.append(resolvedColorCodes); - builder.nextLine(); - builder.append(showGrid); - builder.nextLine(); - JButton fontButton = new JButton(Localization.lang("Set table font")); - builder.append(fontButton); - builder.nextLine(); - builder.appendSeparator(Localization.lang("Table and entry editor colors")); - builder.append(colorPanel); - JPanel upper = new JPanel(); JPanel sort = new JPanel(); JPanel namesp = new JPanel(); @@ -197,9 +162,6 @@ public AppearancePrefsTab(DialogService dialogService, JabRefPreferences prefs) overrideFonts.addActionListener(e -> largeIconsTextField.setEnabled(overrideFonts.isSelected())); overrideFonts.addActionListener(e -> smallIconsTextField.setEnabled(overrideFonts.isSelected())); - fontButton.addActionListener( - e -> new FontSelectorDialog(null, usedFont).getSelectedFont().ifPresent(x -> usedFont = x)); - JPanel pan = builder.getPanel(); pan.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); add(pan, BorderLayout.CENTER); @@ -215,10 +177,6 @@ public void setValues() { classNamesLAF.setSelectedItem(currentLAF); classNamesLAF.setEnabled(!useDefaultLAF); - colorCodes.setSelected(prefs.getBoolean(JabRefPreferences.TABLE_COLOR_CODES_ON)); - resolvedColorCodes.setSelected(prefs.getBoolean(JabRefPreferences.TABLE_RESOLVED_COLOR_CODES_ON)); - rowPadding.setText(String.valueOf(prefs.getInt(JabRefPreferences.TABLE_ROW_PADDING))); - oldOverrideFontSize = prefs.getBoolean(JabRefPreferences.OVERRIDE_DEFAULT_FONTS); oldMenuFontSize = prefs.getInt(JabRefPreferences.MENU_FONT_SIZE); oldLargeIconSize = prefs.getInt(JabRefPreferences.ICON_SIZE_LARGE); @@ -232,8 +190,6 @@ public void setValues() { fontSize.setEnabled(overrideFonts.isSelected()); smallIconsTextField.setEnabled(overrideFonts.isSelected()); largeIconsTextField.setEnabled(overrideFonts.isSelected()); - showGrid.setSelected(prefs.getBoolean(JabRefPreferences.TABLE_SHOW_GRID)); - colorPanel.setValues(); } @Override @@ -251,20 +207,15 @@ public void storeSettings() { prefs.putBoolean(JabRefPreferences.FX_FONT_RENDERING_TWEAK, fxFontTweaksLAF.isSelected()); isRestartRequired |= oldFxTweakValue != fxFontTweaksLAF.isSelected(); - prefs.putBoolean(JabRefPreferences.TABLE_COLOR_CODES_ON, colorCodes.isSelected()); - prefs.putBoolean(JabRefPreferences.TABLE_RESOLVED_COLOR_CODES_ON, resolvedColorCodes.isSelected()); prefs.put(JabRefPreferences.FONT_FAMILY, usedFont.getFamily()); prefs.putInt(JabRefPreferences.FONT_STYLE, usedFont.getStyle()); prefs.putInt(JabRefPreferences.FONT_SIZE, usedFont.getSize()); prefs.putBoolean(JabRefPreferences.OVERRIDE_DEFAULT_FONTS, overrideFonts.isSelected()); GUIGlobals.currentFont = usedFont; - colorPanel.storeSettings(); - prefs.putBoolean(JabRefPreferences.TABLE_SHOW_GRID, showGrid.isSelected()); try { int size = Integer.parseInt(fontSize.getText()); int smallIconSize = Integer.parseInt(smallIconsTextField.getText()); int largeIconSize = Integer.parseInt(largeIconsTextField.getText()); - int padding = Integer.parseInt(rowPadding.getText()); if (overrideFonts.isSelected()) { if (size != oldMenuFontSize) { prefs.putInt(JabRefPreferences.MENU_FONT_SIZE, size); @@ -286,11 +237,9 @@ public void storeSettings() { } if (isRestartRequired) { - dialogService.showWarningDialogAndWait(Localization.lang("Settings"), - Localization.lang("Some appearance settings you changed require to restart JabRef to come into effect.")); + DefaultTaskExecutor.runInJavaFXThread(()-> dialogService.showWarningDialogAndWait(Localization.lang("Settings"), + Localization.lang("Some appearance settings you changed require to restart JabRef to come into effect."))); } - - prefs.putInt(JabRefPreferences.TABLE_ROW_PADDING, padding); } catch (NumberFormatException ex) { // should not happen as values are checked beforehand LOGGER.error("Invalid data value, integer expected", ex); @@ -303,7 +252,7 @@ private boolean validateIntegerField(String fieldName, String fieldValue, String Integer.parseInt(fieldValue); } catch (NumberFormatException ex) { - dialogService.showErrorDialogAndWait(errorTitle, Localization.lang("You must enter an integer value in the text field for") + " '" + fieldName + "'"); + DefaultTaskExecutor.runInJavaFXThread(() -> dialogService.showErrorDialogAndWait(errorTitle, Localization.lang("You must enter an integer value in the text field for") + " '" + fieldName + "'")); return false; } return true; @@ -322,13 +271,7 @@ public boolean validateSettings() { return false; } - if (!validateIntegerField(Localization.lang("Size of small icons"), smallIconsTextField.getText(), - Localization.lang("Invalid setting"))) { - return false; - } - - // Test if row padding is a number: - return validateIntegerField(Localization.lang("Table row height padding"), rowPadding.getText(), + return validateIntegerField(Localization.lang("Size of small icons"), smallIconsTextField.getText(), Localization.lang("Invalid setting")); } diff --git a/src/main/java/org/jabref/gui/preftabs/ColorSetupPanel.java b/src/main/java/org/jabref/gui/preftabs/ColorSetupPanel.java deleted file mode 100644 index 41b6154016c..00000000000 --- a/src/main/java/org/jabref/gui/preftabs/ColorSetupPanel.java +++ /dev/null @@ -1,200 +0,0 @@ -package org.jabref.gui.preftabs; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Component; -import java.awt.Graphics; -import java.awt.Rectangle; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; - -import javax.swing.BorderFactory; -import javax.swing.Icon; -import javax.swing.JButton; -import javax.swing.JCheckBox; -import javax.swing.JColorChooser; -import javax.swing.JPanel; - -import org.jabref.Globals; -import org.jabref.logic.l10n.Localization; -import org.jabref.preferences.JabRefPreferences; - -import com.jgoodies.forms.builder.FormBuilder; -import com.jgoodies.forms.layout.FormLayout; - -public class ColorSetupPanel extends JPanel { - - private static final int ICON_WIDTH = 30; - private static final int ICON_HEIGHT = 20; - private final List buttons = new ArrayList<>(); - - - public ColorSetupPanel(JCheckBox colorCodes, JCheckBox resolvedColorCodes, JCheckBox showGrid) { - - FormLayout layout = new FormLayout( - "30dlu, 4dlu, fill:pref, 4dlu, fill:pref, 8dlu, 30dlu, 4dlu, fill:pref, 4dlu, fill:pref", - "pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref"); - FormBuilder builder = FormBuilder.create().layout(layout); - - buttons.add(new ColorButton(JabRefPreferences.TABLE_TEXT, Localization.lang("Table text color"))); - buttons.add(new ColorButton(JabRefPreferences.MARKED_ENTRY_BACKGROUND0, - Localization.lang("Marking color %0", "1"))); - buttons.add(new ColorButton(JabRefPreferences.TABLE_BACKGROUND, Localization.lang("Table background color"))); - buttons.add(new ColorButton(JabRefPreferences.MARKED_ENTRY_BACKGROUND1, - Localization.lang("Marking color %0", "2"))); - buttons.add(new ColorButton(JabRefPreferences.TABLE_REQ_FIELD_BACKGROUND, - Localization.lang("Background color for required fields"), colorCodes)); - buttons.add(new ColorButton(JabRefPreferences.MARKED_ENTRY_BACKGROUND2, - Localization.lang("Marking color %0", "3"))); - buttons.add(new ColorButton(JabRefPreferences.TABLE_OPT_FIELD_BACKGROUND, - Localization.lang("Background color for optional fields"), colorCodes)); - buttons.add(new ColorButton(JabRefPreferences.MARKED_ENTRY_BACKGROUND3, - Localization.lang("Marking color %0", "4"))); - buttons.add(new ColorButton(JabRefPreferences.INCOMPLETE_ENTRY_BACKGROUND, - Localization.lang("Color for marking incomplete entries"))); - buttons.add(new ColorButton(JabRefPreferences.MARKED_ENTRY_BACKGROUND4, - Localization.lang("Marking color %0", "5"))); - buttons.add(new ColorButton(JabRefPreferences.GRID_COLOR, Localization.lang("Table grid color"), showGrid)); - buttons.add( - new ColorButton(JabRefPreferences.MARKED_ENTRY_BACKGROUND5, Localization.lang("Import marking color"))); - - buttons.add(new ColorButton(JabRefPreferences.FIELD_EDITOR_TEXT_COLOR, - Localization.lang("Entry editor font color"))); - buttons.add(new ColorButton(JabRefPreferences.VALID_FIELD_BACKGROUND_COLOR, - Localization.lang("Entry editor background color"))); - buttons.add(new ColorButton(JabRefPreferences.ACTIVE_FIELD_EDITOR_BACKGROUND_COLOR, - Localization.lang("Entry editor active background color"))); - buttons.add(new ColorButton(JabRefPreferences.INVALID_FIELD_BACKGROUND_COLOR, - Localization.lang("Entry editor invalid field color"))); - buttons.add(new ColorButton(JabRefPreferences.TABLE_RESOLVED_FIELD_BACKGROUND, - Localization.lang("Background color for resolved fields"), resolvedColorCodes)); - - buttons.add(new ColorButton(JabRefPreferences.ICON_ENABLED_COLOR, Localization.lang("Color for enabled icons"))); - buttons.add(new ColorButton(JabRefPreferences.ICON_DISABLED_COLOR, Localization.lang("Color for disabled icons"))); - - int rowcnt = 0; - int col = 0; - int row; - for (ColorButton but : buttons) { - row = (2 * (rowcnt / 2)) + 1; // == 2*floor(rowcnt/2) + 1 - builder.add((JButton)but).xy((6 * col) + 1, row); - builder.add(but.getDefaultButton()).xy((6 * col) + 3, row); - builder.add(but.getName()).xy((6 * col) + 5, row); - but.addActionListener(new ColorButtonListener(but)); - col = 1 - col; // Change 0 -> 1 -> 0 ... - rowcnt++; - } - - setLayout(new BorderLayout()); - add(builder.getPanel(), BorderLayout.CENTER); - - setValues(); - - } - - public void setValues() { - for (ColorButton but : buttons) { - but.setColor(Globals.prefs.getColor(but.getKey())); - } - - } - - public void storeSettings() { - for (ColorButton but : buttons) { - Globals.prefs.putColor(but.getKey(), but.getColor()); - } - } - - static class ColorButtonListener implements ActionListener { - - private final ColorButton button; - - - public ColorButtonListener(ColorButton button) { - this.button = button; - } - - @Override - public void actionPerformed(ActionEvent e) { - Color chosen = JColorChooser.showDialog(null, button.getName(), button.getColor()); - if (chosen != null) { - button.setColor(chosen); - button.getCheckBox().ifPresent(checkBox -> checkBox.setSelected(true)); - } - } - } - - /** - * A button to display the chosen color, and hold key information about a color setting. - * Includes a method to produce a Default button for this setting. - */ - static class ColorButton extends JButton implements Icon { - private Color color = Color.white; - private final String key; - private final String name; - private Optional checkBox = Optional.empty(); - - public ColorButton(String key, String name, JCheckBox checkBox) { - this(key, name); - this.checkBox = Optional.of(checkBox); - } - - public ColorButton(String key, String name) { - setIcon(this); - this.key = key; - this.name = name; - setBorder(BorderFactory.createRaisedBevelBorder()); - } - - public JButton getDefaultButton() { - JButton toDefault = new JButton(Localization.lang("Default")); - toDefault.addActionListener(e -> { - setColor(Globals.prefs.getDefaultColor(key)); - repaint(); - }); - return toDefault; - } - - public String getKey() { - return key; - } - - @Override - public String getName() { - return name; - } - - public Color getColor() { - return color; - } - - public void setColor(Color color) { - this.color = color; - } - - @Override - public void paintIcon(Component c, Graphics g, int x, int y) { - Rectangle r = g.getClipBounds(); - g.setColor(color); - g.fillRect(r.x, r.y, r.width, r.height); - } - - @Override - public int getIconWidth() { - return ColorSetupPanel.ICON_WIDTH; - } - - @Override - public int getIconHeight() { - return ColorSetupPanel.ICON_HEIGHT; - } - - public Optional getCheckBox() { - return checkBox; - } - } - -} diff --git a/src/main/java/org/jabref/gui/preftabs/FontSelectorDialog.java b/src/main/java/org/jabref/gui/preftabs/FontSelectorDialog.java deleted file mode 100644 index 5d9b65a63a9..00000000000 --- a/src/main/java/org/jabref/gui/preftabs/FontSelectorDialog.java +++ /dev/null @@ -1,337 +0,0 @@ -package org.jabref.gui.preftabs; - -/* - Taken from JpicEdt -modified slightly by nizar batada for JabRef - - EepicViewFactory.java - February 11, 2002 - jPicEdt, a picture editor for LaTeX. - copyright (C) 1999-2002 Sylvain Reynal - Portions copyright (C) 2000, 2001 Slava Pestov - Portions copyright (C) 1999 Jason Ginchereau - - D\uFFFDpartement de Physique - Ecole Nationale Sup\uFFFDrieure de l'Electronique et de ses Applications (ENSEA) - 6, avenue du Ponceau - F-95014 CERGY CEDEX - - Tel : +33 130 736 245 - Fax : +33 130 736 667 - e-mail : reynal@ensea.fr - jPicEdt web page : http://trashx.ensea.fr/jpicedt/ - - This program 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 2 - of the License, or any later version. - - This program 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, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -import java.awt.BorderLayout; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.Font; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.GraphicsEnvironment; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.GridLayout; -import java.awt.RenderingHints; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; - -import javax.swing.Box; -import javax.swing.BoxLayout; -import javax.swing.JButton; -import javax.swing.JLabel; -import javax.swing.JList; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.JTextField; -import javax.swing.border.EmptyBorder; -import javax.swing.border.TitledBorder; - -import org.jabref.gui.JabRefDialog; -import org.jabref.logic.l10n.Localization; - -/** - * A font chooser widget. - * @author Slava Pestov (jEdit), Sylvain Reynal - * @since jpicedt 1.3.2.beta-9 - * @version $Id$ - *

- * $Log$ - * Revision 1.8 2007/07/19 01:35:35 coezbek - * JabRef 2.4b1 Plug-In System established. Yeah! - * - * Revision 1.7 2006/04/26 08:46:57 kiar - * fix dialog.show() deprecation messages, change build.xml - * - * Revision 1.6 2004/02/27 23:28:41 mortenalver - * Some code tidying, no effect on behaviour (hopefully) - * - * Revision 1.5 2004/02/24 23:30:18 mortenalver - * Added more translations, and started work on a Replace string feature - * - * Revision 1.4 2004/02/17 09:14:02 mortenalver - * Similar update in Font selection preview. - * - * Revision 1.3 2004/02/17 07:35:22 mortenalver - * Experimenting with antialiasing in table. - * - * Revision 1.2 2003/12/14 23:48:02 mortenalver - * . - * - * Revision 1.1 2003/11/07 22:18:07 nbatada - * modified it slightly from initial version - * - * Revision 1.1 2003/11/07 22:14:34 nbatada - * modified it from initial version - * - * Revision 1.4 2003/11/02 01:51:06 reynal - * Cleaned-up i18n labels - * - * Revision 1.3 2003/08/31 22:05:40 reynal - * - * Enhanced class interface for some widgets. - * - - */ - - -/////////////////////////////////////////////////////////////////////////////// - -public class FontSelectorDialog extends JabRefDialog { - - /** - * For some reason the default Java fonts show up in the - * list with .bold, .bolditalic, and .italic extensions. - */ - private static final String[] HIDEFONTS = {".bold", ".italic"}; - private static final String PLAIN = "plain"; - private static final String BOLD = "bold"; - private static final String BOLD_ITALIC = "bold-italic"; - - private static final String ITALIC = "italic"; - - private static final String[] STYLES = {PLAIN, BOLD, ITALIC, BOLD_ITALIC}; - - private static final String[] SIZES = {"9", "10", "12", "14", "16", "18", "24"}; - // private members - private boolean isOK; - private final JTextField familyField = new JTextField(); - private final JList familyList; - private final JTextField sizeField = new JTextField(); - private final JList sizeList = new JList<>(SIZES); - private final JTextField styleField = new JTextField(); - private final JList styleList = new JList<>(STYLES); - - private final JLabel preview; - - - public FontSelectorDialog(Component comp, Font font) { - - super(JOptionPane.getFrameForComponent(comp), Localization.lang("Font selection"), true, FontSelectorDialog.class); // - JPanel content = new JPanel(new BorderLayout()); - content.setBorder(new EmptyBorder(12, 12, 12, 12)); - setContentPane(content); - - JPanel listPanel = new JPanel(new GridLayout(1, 3, 6, 6)); - - familyList = new JList<>(getFontList()); - - JPanel familyPanel = createTextFieldAndListPanel(Localization.lang("Font family"), familyField, familyList); - listPanel.add(familyPanel); - - JPanel sizePanel = createTextFieldAndListPanel(Localization.lang("Font size"), sizeField, sizeList); - listPanel.add(sizePanel); - - JPanel stylePanel = createTextFieldAndListPanel(Localization.lang("Font style"), styleField, styleList); - styleField.setEditable(false); - listPanel.add(stylePanel); - - familyList.setSelectedValue(font.getFamily(), true); - familyField.setText(font.getFamily()); - sizeList.setSelectedValue(String.valueOf(font.getSize()), true); - sizeField.setText(String.valueOf(font.getSize())); - styleList.setSelectedIndex(font.getStyle()); - styleField.setText(styleList.getSelectedValue()); - - familyList.addListSelectionListener(evt -> { - String family = familyList.getSelectedValue(); - if (family != null) { - familyField.setText(family); - } - updatePreview(); - }); - sizeList.addListSelectionListener(evt -> { - String size = sizeList.getSelectedValue(); - if (size != null) { - sizeField.setText(size); - } - updatePreview(); - }); - styleList.addListSelectionListener(evt -> { - String style = styleList.getSelectedValue(); - if (style != null) { - styleField.setText(style); - } - updatePreview(); - }); - - content.add(BorderLayout.NORTH, listPanel); - - /* -------------------------------------------------------- - | Experimental addition by Morten Alver. I want to | - | enable antialiasing in the preview field, since I'm | - | working on introducing this in the table view. | - -------------------------------------------------------- */ - preview = new JLabel(Localization.lang("Font preview")) { - @Override - public void paint(Graphics g) { - Graphics2D g2 = (Graphics2D) g; - g2.setRenderingHint - (RenderingHints.KEY_ANTIALIASING, - RenderingHints.VALUE_ANTIALIAS_ON); - super.paint(g2); - } - - }; - - preview.setBorder(new TitledBorder(Localization.lang("Font preview"))); - - updatePreview(); - - Dimension prefSize = preview.getPreferredSize(); - prefSize.height = 50; - preview.setPreferredSize(prefSize); - - content.add(BorderLayout.CENTER, preview); - - JPanel buttons = new JPanel(); - buttons.setLayout(new BoxLayout(buttons, BoxLayout.X_AXIS)); - buttons.setBorder(new EmptyBorder(12, 0, 0, 0)); - buttons.add(Box.createGlue()); - - JButton ok = new JButton(Localization.lang("OK")); - ok.addActionListener(e -> { - isOK = true; - dispose(); - }); - getRootPane().setDefaultButton(ok); - buttons.add(ok); - - buttons.add(Box.createHorizontalStrut(6)); - - JButton cancel = new JButton(Localization.lang("Cancel")); - cancel.addActionListener(e -> dispose()); - buttons.add(cancel); - - buttons.add(Box.createGlue()); - - content.add(BorderLayout.SOUTH, buttons); - - pack(); - setLocationRelativeTo(JOptionPane.getFrameForComponent(comp)); - setVisible(true); - } - - public Optional getSelectedFont() { - if (!isOK) { - return Optional.empty(); - } - - int size; - try { - size = Integer.parseInt(sizeField.getText()); - } catch (NumberFormatException e) { - size = 14; - } - - return Optional.of(new Font(familyField.getText(), styleList.getSelectedIndex(), size)); - } - - private static String[] getFontList() { - try { - String[] nameArray = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); - List nameList = new ArrayList<>(nameArray.length); - for (String fontName : nameArray) { - boolean hidden = false; - for (String hiddenName : FontSelectorDialog.HIDEFONTS) { - if (fontName.contains(hiddenName)) { - hidden = true; - break; - } - } - - if (!hidden) { - nameList.add(fontName); - } - } - String[] resultArray = new String[nameList.size()]; - return nameList.toArray(resultArray); - } catch (SecurityException | IllegalArgumentException ex) { - return new String[0]; - } - } - - private static JPanel createTextFieldAndListPanel(String labelString, JTextField textField, JList list) { - GridBagLayout layout = new GridBagLayout(); - JPanel panel = new JPanel(layout); - - GridBagConstraints cons = new GridBagConstraints(); - cons.gridx = cons.gridy = 0; - cons.gridwidth = cons.gridheight = 1; - cons.fill = GridBagConstraints.BOTH; - cons.weightx = 1.0f; - - JLabel label = new JLabel(labelString); - layout.setConstraints(label, cons); - panel.add(label); - - cons.gridy = 1; - Component vs = Box.createVerticalStrut(6); - layout.setConstraints(vs, cons); - panel.add(vs); - - cons.gridy = 2; - layout.setConstraints(textField, cons); - panel.add(textField); - - cons.gridy = 3; - vs = Box.createVerticalStrut(6); - layout.setConstraints(vs, cons); - panel.add(vs); - - cons.gridy = 4; - cons.gridheight = GridBagConstraints.REMAINDER; - cons.weighty = 1.0f; - JScrollPane scroller = new JScrollPane(list); - layout.setConstraints(scroller, cons); - panel.add(scroller); - - return panel; - } - - private void updatePreview() { - String family = familyField.getText(); - int size; - try { - size = Integer.parseInt(sizeField.getText()); - } catch (NumberFormatException e) { - size = 14; - } - int style = styleList.getSelectedIndex(); - preview.setFont(new Font(family, style, size)); - } -} diff --git a/src/main/java/org/jabref/gui/preftabs/GeneralTab.java b/src/main/java/org/jabref/gui/preftabs/GeneralTab.java index 0494758071d..705b35a7de5 100644 --- a/src/main/java/org/jabref/gui/preftabs/GeneralTab.java +++ b/src/main/java/org/jabref/gui/preftabs/GeneralTab.java @@ -19,6 +19,7 @@ import org.jabref.Globals; import org.jabref.gui.DialogService; import org.jabref.gui.help.HelpAction; +import org.jabref.gui.util.DefaultTaskExecutor; import org.jabref.logic.help.HelpFile; import org.jabref.logic.l10n.Encodings; import org.jabref.logic.l10n.Localization; @@ -207,9 +208,9 @@ public void storeSettings() { prefs.setShouldCollectTelemetry(shouldCollectTelemetry.isSelected()); if (prefs.getBoolean(JabRefPreferences.MEMORY_STICK_MODE) && !memoryStick.isSelected()) { - dialogService.showInformationDialogAndWait(Localization.lang("Memory stick mode"), + DefaultTaskExecutor.runInJavaFXThread(()->dialogService.showInformationDialogAndWait(Localization.lang("Memory stick mode"), Localization.lang("To disable the memory stick mode" - + " rename or remove the jabref.xml file in the same folder as JabRef.")); + + " rename or remove the jabref.xml file in the same folder as JabRef."))); } prefs.putBoolean(JabRefPreferences.MEMORY_STICK_MODE, memoryStick.isSelected()); prefs.putBoolean(JabRefPreferences.CONFIRM_DELETE, confirmDelete.isSelected()); @@ -230,10 +231,10 @@ public void storeSettings() { Globals.prefs.setLanguageDependentDefaultValues(); // Warn about restart needed: - dialogService.showWarningDialogAndWait(Localization.lang("Changed language settings"), + DefaultTaskExecutor.runInJavaFXThread(() -> dialogService.showWarningDialogAndWait(Localization.lang("Changed language settings"), Localization.lang("You have changed the language setting.") .concat(" ") - .concat(Localization.lang("You must restart JabRef for this to come into effect."))); + .concat(Localization.lang("You must restart JabRef for this to come into effect.")))); } } @@ -244,8 +245,8 @@ public boolean validateSettings() { DateTimeFormatter.ofPattern(timeStampFormat.getText()); } catch (IllegalArgumentException ex2) { - dialogService.showErrorDialogAndWait(Localization.lang("Invalid date format"), - Localization.lang("The chosen date format for new entries is not valid")); + DefaultTaskExecutor.runInJavaFXThread(() -> dialogService.showErrorDialogAndWait(Localization.lang("Invalid date format"), + Localization.lang("The chosen date format for new entries is not valid"))); return false; } diff --git a/src/main/java/org/jabref/gui/preftabs/NetworkTab.java b/src/main/java/org/jabref/gui/preftabs/NetworkTab.java index 8db58a1e39e..fbff70a1b18 100644 --- a/src/main/java/org/jabref/gui/preftabs/NetworkTab.java +++ b/src/main/java/org/jabref/gui/preftabs/NetworkTab.java @@ -12,6 +12,7 @@ import javax.swing.JTextField; import org.jabref.gui.DialogService; +import org.jabref.gui.util.DefaultTaskExecutor; import org.jabref.logic.l10n.Localization; import org.jabref.logic.net.ProxyPreferences; import org.jabref.logic.net.ProxyRegisterer; @@ -161,11 +162,11 @@ public boolean validateSettings() { if (!validSetting) { if (validAuthenticationSetting) { - dialogService.showErrorDialogAndWait(Localization.lang("Invalid setting"), - Localization.lang("Please specify both hostname and port")); + DefaultTaskExecutor.runInJavaFXThread(() -> dialogService.showErrorDialogAndWait(Localization.lang("Invalid setting"), + Localization.lang("Please specify both hostname and port"))); } else { - dialogService.showErrorDialogAndWait(Localization.lang("Invalid setting"), - Localization.lang("Please specify both username and password")); + DefaultTaskExecutor.runInJavaFXThread(() -> dialogService.showErrorDialogAndWait(Localization.lang("Invalid setting"), + Localization.lang("Please specify both username and password"))); } } diff --git a/src/main/java/org/jabref/gui/preftabs/PreferencesDialog.java b/src/main/java/org/jabref/gui/preftabs/PreferencesDialog.java index 75098d4a599..1980bf42a8b 100644 --- a/src/main/java/org/jabref/gui/preftabs/PreferencesDialog.java +++ b/src/main/java/org/jabref/gui/preftabs/PreferencesDialog.java @@ -27,7 +27,6 @@ import org.jabref.gui.JabRefDialog; import org.jabref.gui.JabRefFrame; import org.jabref.gui.keyboard.KeyBinder; -import org.jabref.gui.maintable.MainTable; import org.jabref.gui.util.DefaultTaskExecutor; import org.jabref.gui.util.FileDialogConfiguration; import org.jabref.logic.exporter.ExporterFactory; @@ -172,13 +171,13 @@ public PreferencesDialog(JabRefFrame parent) { prefs.importPreferences(fileName.get().toString()); updateAfterPreferenceChanges(); - frame.getDialogService().showWarningDialogAndWait(Localization.lang("Import preferences"), - Localization.lang("You must restart JabRef for this to come into effect.")); + DefaultTaskExecutor.runInJavaFXThread(() -> frame.getDialogService().showWarningDialogAndWait(Localization.lang("Import preferences"), + Localization.lang("You must restart JabRef for this to come into effect."))); this.dispose(); } catch (JabRefException ex) { LOGGER.warn(ex.getMessage(), ex); - frame.getDialogService().showErrorDialogAndWait(Localization.lang("Import preferences"), ex); + DefaultTaskExecutor.runInJavaFXThread(() -> frame.getDialogService().showErrorDialogAndWait(Localization.lang("Import preferences"), ex)); } } }); @@ -187,21 +186,21 @@ public PreferencesDialog(JabRefFrame parent) { e -> new PreferencesFilterDialog(new JabRefPreferencesFilter(prefs), null).setVisible(true)); resetPreferences.addActionListener(e -> { - boolean resetPreferencesClicked = frame.getDialogService().showConfirmationDialogAndWait(Localization.lang("Reset preferences"), + boolean resetPreferencesClicked = DefaultTaskExecutor.runInJavaFXThread(() -> frame.getDialogService().showConfirmationDialogAndWait(Localization.lang("Reset preferences"), Localization.lang("Are you sure you want to reset all settings to default values?"), - Localization.lang("Reset preferences"), Localization.lang("Cancel")); + Localization.lang("Reset preferences"), Localization.lang("Cancel"))); if (resetPreferencesClicked) { try { prefs.clear(); new SharedDatabasePreferences().clear(); - frame.getDialogService().showWarningDialogAndWait(Localization.lang("Reset preferences"), - Localization.lang("You must restart JabRef for this to come into effect.")); + DefaultTaskExecutor.runInJavaFXThread(() -> frame.getDialogService().showWarningDialogAndWait(Localization.lang("Reset preferences"), + Localization.lang("You must restart JabRef for this to come into effect."))); } catch (BackingStoreException ex) { LOGGER.warn(ex.getMessage(), ex); - frame.getDialogService().showErrorDialogAndWait(Localization.lang("Reset preferences"), ex); + DefaultTaskExecutor.runInJavaFXThread(() -> frame.getDialogService().showErrorDialogAndWait(Localization.lang("Reset preferences"), ex)); } updateAfterPreferenceChanges(); } @@ -248,7 +247,6 @@ private void storeAllSettings() { Globals.prefs.flush(); setVisible(false); - MainTable.updateRenderers(); GUIGlobals.updateEntryEditorColors(); frame.setupAllTables(); frame.output(Localization.lang("Preferences recorded.")); diff --git a/src/main/java/org/jabref/gui/preftabs/PreviewPrefsTab.java b/src/main/java/org/jabref/gui/preftabs/PreviewPrefsTab.java index 5eab6420a78..51eba82eb90 100644 --- a/src/main/java/org/jabref/gui/preftabs/PreviewPrefsTab.java +++ b/src/main/java/org/jabref/gui/preftabs/PreviewPrefsTab.java @@ -24,7 +24,6 @@ import org.jabref.JabRefGUI; import org.jabref.gui.BasePanel; import org.jabref.gui.DialogService; -import org.jabref.gui.FXDialogService; import org.jabref.gui.PreviewPanel; import org.jabref.gui.util.DefaultTaskExecutor; import org.jabref.logic.citationstyle.CitationStyle; @@ -125,7 +124,7 @@ private void setupLogic() { try { DefaultTaskExecutor.runInJavaFXThread(() -> { - PreviewPanel testPane = new PreviewPanel(null, null, Globals.getKeyPrefs(), Globals.prefs.getPreviewPreferences(), new FXDialogService()); + PreviewPanel testPane = new PreviewPanel(null, null, Globals.getKeyPrefs(), Globals.prefs.getPreviewPreferences(), dialogService); testPane.setFixedLayout(layout.getText()); testPane.setEntry(TestEntry.getTestEntry()); @@ -139,9 +138,9 @@ private void setupLogic() { } catch (StringIndexOutOfBoundsException exception) { LOGGER.warn("Parsing error.", exception); - dialogService.showErrorDialogAndWait(Localization.lang("Parsing error"), + DefaultTaskExecutor.runInJavaFXThread(()-> dialogService.showErrorDialogAndWait(Localization.lang("Parsing error"), Localization.lang("Parsing error") + ": " + Localization.lang("illegal backslash expression"), - exception); + exception)); } }); diff --git a/src/main/java/org/jabref/gui/preftabs/TableColumnsTab.java b/src/main/java/org/jabref/gui/preftabs/TableColumnsTab.java index 02aecc34061..03d493f268b 100644 --- a/src/main/java/org/jabref/gui/preftabs/TableColumnsTab.java +++ b/src/main/java/org/jabref/gui/preftabs/TableColumnsTab.java @@ -37,6 +37,7 @@ import org.jabref.gui.externalfiletype.ExternalFileType; import org.jabref.gui.externalfiletype.ExternalFileTypes; import org.jabref.gui.help.HelpAction; +import org.jabref.gui.util.DefaultTaskExecutor; import org.jabref.logic.help.HelpFile; import org.jabref.logic.l10n.Localization; import org.jabref.model.entry.BibtexSingleField; @@ -704,10 +705,10 @@ public void storeSettings() { (oldSyncKeyWords != newSyncKeyWords) || (oldWriteSpecialFields != newWriteSpecialFields); if (restartRequired) { - frame.getDialogService().showWarningDialogAndWait(Localization.lang("Changed special field settings"), + DefaultTaskExecutor.runInJavaFXThread(() -> frame.getDialogService().showWarningDialogAndWait(Localization.lang("Changed special field settings"), Localization.lang("You have changed settings for special fields.") .concat(" ") - .concat(Localization.lang("You must restart JabRef for this to come into effect."))); + .concat(Localization.lang("You must restart JabRef for this to come into effect.")))); } diff --git a/src/main/java/org/jabref/gui/renderer/CompleteRenderer.java b/src/main/java/org/jabref/gui/renderer/CompleteRenderer.java deleted file mode 100644 index 8ff7fab5d16..00000000000 --- a/src/main/java/org/jabref/gui/renderer/CompleteRenderer.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.jabref.gui.renderer; - -import java.awt.Color; - -public class CompleteRenderer extends GeneralRenderer { - - public CompleteRenderer(Color color) { - super(color); - } - - public void setNumber(int number) { - super.setValue(String.valueOf(number + 1)); - } - - @Override - protected void setValue(Object value) { - // do not support normal behaviour - } -} diff --git a/src/main/java/org/jabref/gui/renderer/IncompleteRenderer.java b/src/main/java/org/jabref/gui/renderer/IncompleteRenderer.java deleted file mode 100644 index d730eecff34..00000000000 --- a/src/main/java/org/jabref/gui/renderer/IncompleteRenderer.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.jabref.gui.renderer; - -import org.jabref.Globals; -import org.jabref.logic.l10n.Localization; -import org.jabref.preferences.JabRefPreferences; - -public class IncompleteRenderer extends GeneralRenderer { - - public IncompleteRenderer() { - super(Globals.prefs.getColor(JabRefPreferences.INCOMPLETE_ENTRY_BACKGROUND)); - } - - public void setNumber(int number) { - super.setValue(String.valueOf(number + 1)); - setToolTipText(Localization.lang("This entry is incomplete")); - } - - @Override - protected void setValue(Object value) { - // do not support normal behaviour - } -} diff --git a/src/main/java/org/jabref/gui/undo/UndoablePreambleChange.java b/src/main/java/org/jabref/gui/undo/UndoablePreambleChange.java index d7416aba252..1f8bb920ccc 100644 --- a/src/main/java/org/jabref/gui/undo/UndoablePreambleChange.java +++ b/src/main/java/org/jabref/gui/undo/UndoablePreambleChange.java @@ -1,6 +1,5 @@ package org.jabref.gui.undo; -import org.jabref.gui.BasePanel; import org.jabref.logic.l10n.Localization; import org.jabref.model.database.BibDatabase; @@ -14,15 +13,12 @@ public class UndoablePreambleChange extends AbstractUndoableJabRefEdit { private final BibDatabase base; private final String oldValue; private final String newValue; - private final BasePanel panel; - - public UndoablePreambleChange(BibDatabase base, BasePanel panel, + public UndoablePreambleChange(BibDatabase base, String oldValue, String newValue) { this.base = base; this.oldValue = oldValue; this.newValue = newValue; - this.panel = panel; } @Override @@ -38,8 +34,6 @@ public void undo() { // Revert the change. base.setPreamble(oldValue); - // If the preamble editor is open, update it. - panel.updatePreamble(); } @Override @@ -49,9 +43,6 @@ public void redo() { // Redo the change. base.setPreamble(newValue); - // If the preamble editor is open, update it. - panel.updatePreamble(); - } } diff --git a/src/main/java/org/jabref/gui/util/comparator/FirstColumnComparator.java b/src/main/java/org/jabref/gui/util/comparator/FirstColumnComparator.java deleted file mode 100644 index 4de71f4c530..00000000000 --- a/src/main/java/org/jabref/gui/util/comparator/FirstColumnComparator.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.jabref.gui.util.comparator; - -import java.util.Comparator; - -import org.jabref.logic.TypedBibEntry; -import org.jabref.model.database.BibDatabaseContext; -import org.jabref.model.entry.BibEntry; - -public class FirstColumnComparator implements Comparator { - - private final BibDatabaseContext database; - - public FirstColumnComparator(BibDatabaseContext database) { - this.database = database; - } - - @Override - public int compare(BibEntry e1, BibEntry e2) { - int score1 = 0; - int score2 = 0; - - TypedBibEntry typedEntry1 = new TypedBibEntry(e1, database); - TypedBibEntry typedEntry2 = new TypedBibEntry(e2, database); - if (typedEntry1.hasAllRequiredFields()) { - score1++; - } - - if (typedEntry2.hasAllRequiredFields()) { - score2++; - } - - return score1 - score2; - } - -} diff --git a/src/main/java/org/jabref/gui/util/comparator/RankingFieldComparator.java b/src/main/java/org/jabref/gui/util/comparator/RankingFieldComparator.java index 816544c1ff3..13790f1da4a 100644 --- a/src/main/java/org/jabref/gui/util/comparator/RankingFieldComparator.java +++ b/src/main/java/org/jabref/gui/util/comparator/RankingFieldComparator.java @@ -3,26 +3,20 @@ import java.util.Comparator; import java.util.Optional; -import org.jabref.model.entry.BibEntry; -import org.jabref.model.entry.specialfields.SpecialField; +import org.jabref.gui.specialfields.SpecialFieldValueViewModel; /** - * Comparator that handles the ranking icon column + * Comparator for rankings. * - * Based on IconComparator - * Only comparing ranking field - * inverse comparison of ranking as rank5 is higher than rank1 + * Inverse comparison of ranking as rank5 is higher than rank1 */ -public class RankingFieldComparator implements Comparator { +public class RankingFieldComparator implements Comparator> { @Override - public int compare(BibEntry e1, BibEntry e2) { - Optional val1 = e1.getField(SpecialField.RANKING.getFieldName()); - Optional val2 = e2.getField(SpecialField.RANKING.getFieldName()); + public int compare(Optional val1, Optional val2) { if (val1.isPresent()) { if (val2.isPresent()) { - // val1 is not null AND val2 is not null - int compareToRes = val1.get().compareTo(val2.get()); + int compareToRes = val1.get().getValue().compareTo(val2.get().getValue()); if (compareToRes == 0) { return 0; } else { diff --git a/src/main/java/org/jabref/logic/bibtex/FieldContentParser.java b/src/main/java/org/jabref/logic/bibtex/FieldContentParser.java index 43c05b1a2fd..e2c3b09223b 100644 --- a/src/main/java/org/jabref/logic/bibtex/FieldContentParser.java +++ b/src/main/java/org/jabref/logic/bibtex/FieldContentParser.java @@ -28,6 +28,7 @@ public FieldContentParser(FieldContentParserPreferences prefs) { multiLineFields = new HashSet<>(); // the following two are also coded in org.jabref.logic.bibtex.LatexFieldFormatter.format(String, String) multiLineFields.add(FieldName.ABSTRACT); + multiLineFields.add(FieldName.COMMENT); multiLineFields.add(FieldName.REVIEW); // the file field should not be formatted, therefore we treat it as a multi line field multiLineFields.addAll(prefs.getNonWrappableFields()); diff --git a/src/main/java/org/jabref/logic/exporter/SaveException.java b/src/main/java/org/jabref/logic/exporter/SaveException.java index e26ceec5973..88ef9693aed 100644 --- a/src/main/java/org/jabref/logic/exporter/SaveException.java +++ b/src/main/java/org/jabref/logic/exporter/SaveException.java @@ -24,6 +24,11 @@ public SaveException(String message) { entry = null; } + public SaveException(String message, Throwable exception) { + super(message, exception); + entry = null; + } + public SaveException(String message, String localizedMessage) { super(message); this.localizedMessage = localizedMessage; diff --git a/src/main/java/org/jabref/logic/l10n/Languages.java b/src/main/java/org/jabref/logic/l10n/Languages.java index 8098f4402f7..566e9216b5e 100644 --- a/src/main/java/org/jabref/logic/l10n/Languages.java +++ b/src/main/java/org/jabref/logic/l10n/Languages.java @@ -32,6 +32,7 @@ public class Languages { LANGUAGES.put("Turkish", "tr"); LANGUAGES.put("Vietnamese", "vi"); LANGUAGES.put("ελληνικά", "el"); + LANGUAGES.put("Tagalog/Filipino", "tl"); } private Languages() { diff --git a/src/main/java/org/jabref/logic/xmp/DublinCoreExtractor.java b/src/main/java/org/jabref/logic/xmp/DublinCoreExtractor.java index 50964ab256f..d18e48b1176 100644 --- a/src/main/java/org/jabref/logic/xmp/DublinCoreExtractor.java +++ b/src/main/java/org/jabref/logic/xmp/DublinCoreExtractor.java @@ -17,7 +17,6 @@ import org.jabref.model.entry.Month; import org.jabref.model.strings.StringUtil; -import com.microsoft.applicationinsights.agent.internal.common.StringUtils; import org.apache.xmpbox.DateConverter; import org.apache.xmpbox.schema.DublinCoreSchema; @@ -108,7 +107,7 @@ private void extractAbstract() { */ private void extractDOI() { String identifier = dcSchema.getIdentifier(); - if (!StringUtils.isNullOrEmpty(identifier)) { + if (!StringUtil.isNullOrEmpty(identifier)) { bibEntry.setField(FieldName.DOI, identifier); } } @@ -157,7 +156,7 @@ private void extractBibTexFields() { */ private void extractRights() { String rights = dcSchema.getRights(); - if (!StringUtils.isNullOrEmpty(rights)) { + if (!StringUtil.isNullOrEmpty(rights)) { bibEntry.setField("rights", rights); } } @@ -170,7 +169,7 @@ private void extractRights() { */ private void extractSource() { String source = dcSchema.getSource(); - if (!StringUtils.isNullOrEmpty(source)) { + if (!StringUtil.isNullOrEmpty(source)) { bibEntry.setField("source", source); } } @@ -210,7 +209,7 @@ private void extractType() { List types = dcSchema.getTypes(); if ((types != null) && !types.isEmpty()) { String type = types.get(0); - if (!StringUtils.isNullOrEmpty(type)) { + if (!StringUtil.isNullOrEmpty(type)) { bibEntry.setType(type); } } diff --git a/src/main/java/org/jabref/model/entry/Month.java b/src/main/java/org/jabref/model/entry/Month.java index 5c50e1fd877..ae06cae02c3 100644 --- a/src/main/java/org/jabref/model/entry/Month.java +++ b/src/main/java/org/jabref/model/entry/Month.java @@ -1,9 +1,15 @@ package org.jabref.model.entry; +import java.time.YearMonth; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; +import java.util.Locale; import java.util.Optional; import org.jabref.model.strings.StringUtil; +import org.apache.commons.lang3.StringUtils; + /** * Represents a Month of the Year. */ @@ -84,11 +90,17 @@ public static Optional parse(String value) { if (testString.length() > 3) { testString = testString.substring(0, 3); } + Optional month = Month.getMonthByShortName(testString); if (month.isPresent()) { return month; } + month = Month.parseGermanShortMonth(testString); + if (month.isPresent()) { + return month; + } + try { int number = Integer.parseInt(value); return Month.getMonthByNumber(number); @@ -97,6 +109,29 @@ public static Optional parse(String value) { } } + /** + * Parses a month having the string in German standard form such as + * "Oktober" or in German short form such as "Okt" + * + * @param value, + * a String that represents a month in German form + * @return the corresponding month instance, empty if input is not in German + * form + */ + private static Optional parseGermanShortMonth(String value) { + if ("Mae".equalsIgnoreCase(value) || "Maerz".equalsIgnoreCase(value) || "Mär".equalsIgnoreCase(value)) { + return Month.getMonthByNumber(3); + } + + try { + YearMonth yearMonth = YearMonth.parse("1969-" + StringUtils.capitalize(value), + DateTimeFormatter.ofPattern("yyyy-MMM", Locale.GERMAN)); + return Month.getMonthByNumber(yearMonth.getMonthValue()); + } catch (DateTimeParseException e) { + return Optional.empty(); + } + } + /** * Returns the name of a Month in a short (3-letter) format. (jan, feb, mar, ...) * diff --git a/src/main/java/org/jabref/preferences/JabRefPreferences.java b/src/main/java/org/jabref/preferences/JabRefPreferences.java index f8f918a41e3..f4fda131aee 100644 --- a/src/main/java/org/jabref/preferences/JabRefPreferences.java +++ b/src/main/java/org/jabref/preferences/JabRefPreferences.java @@ -201,33 +201,12 @@ public class JabRefPreferences implements PreferencesService { public static final String PREFER_URL_DOI = "preferUrlDoi"; public static final String URL_COLUMN = "urlColumn"; // Colors - public static final String TABLE_COLOR_CODES_ON = "tableColorCodesOn"; - public static final String TABLE_RESOLVED_COLOR_CODES_ON = "tableResolvedColorCodesOn"; - public static final String INCOMPLETE_ENTRY_BACKGROUND = "incompleteEntryBackground"; public static final String FIELD_EDITOR_TEXT_COLOR = "fieldEditorTextColor"; public static final String ACTIVE_FIELD_EDITOR_BACKGROUND_COLOR = "activeFieldEditorBackgroundColor"; public static final String INVALID_FIELD_BACKGROUND_COLOR = "invalidFieldBackgroundColor"; public static final String VALID_FIELD_BACKGROUND_COLOR = "validFieldBackgroundColor"; - public static final String MARKED_ENTRY_BACKGROUND5 = "markedEntryBackground5"; - public static final String MARKED_ENTRY_BACKGROUND4 = "markedEntryBackground4"; - public static final String MARKED_ENTRY_BACKGROUND3 = "markedEntryBackground3"; - public static final String MARKED_ENTRY_BACKGROUND2 = "markedEntryBackground2"; - public static final String MARKED_ENTRY_BACKGROUND1 = "markedEntryBackground1"; - public static final String MARKED_ENTRY_BACKGROUND0 = "markedEntryBackground0"; - public static final String VERY_GRAYED_OUT_TEXT = "veryGrayedOutText"; - public static final String VERY_GRAYED_OUT_BACKGROUND = "veryGrayedOutBackground"; - public static final String GRAYED_OUT_TEXT = "grayedOutText"; - public static final String GRAYED_OUT_BACKGROUND = "grayedOutBackground"; - public static final String GRID_COLOR = "gridColor"; - public static final String TABLE_TEXT = "tableText"; - public static final String TABLE_OPT_FIELD_BACKGROUND = "tableOptFieldBackground"; - public static final String TABLE_REQ_FIELD_BACKGROUND = "tableReqFieldBackground"; - public static final String TABLE_RESOLVED_FIELD_BACKGROUND = "tableResolvedFieldBackground"; - public static final String TABLE_BACKGROUND = "tableBackground"; public static final String ICON_ENABLED_COLOR = "iconEnabledColor"; public static final String ICON_DISABLED_COLOR = "iconDisabledColor"; - public static final String TABLE_SHOW_GRID = "tableShowGrid"; - public static final String TABLE_ROW_PADDING = "tableRowPadding"; public static final String MENU_FONT_SIZE = "menuFontSize"; public static final String OVERRIDE_DEFAULT_FONTS = "overrideDefaultFonts"; public static final String FONT_SIZE = "fontSize"; @@ -512,8 +491,6 @@ private JabRefPreferences() { defaults.put(WINDOW_MAXIMISED, Boolean.FALSE); defaults.put(AUTO_RESIZE_MODE, Boolean.TRUE); defaults.put(ENTRY_EDITOR_HEIGHT, 0.65); - defaults.put(TABLE_COLOR_CODES_ON, Boolean.FALSE); - defaults.put(TABLE_RESOLVED_COLOR_CODES_ON, Boolean.FALSE); defaults.put(NAMES_AS_IS, Boolean.FALSE); // "Show names unchanged" defaults.put(NAMES_FIRST_LAST, Boolean.FALSE); // "Show 'Firstname Lastname'" defaults.put(NAMES_NATBIB, Boolean.TRUE); // "Natbib style" @@ -615,25 +592,7 @@ private JabRefPreferences() { defaults.put(MENU_FONT_SIZE, UNSET_MENU_FONT_SIZE); defaults.put(ICON_SIZE_LARGE, 24); defaults.put(ICON_SIZE_SMALL, 16); - defaults.put(TABLE_ROW_PADDING, 9); - defaults.put(TABLE_SHOW_GRID, Boolean.FALSE); // Main table color settings: - defaults.put(TABLE_BACKGROUND, "255:255:255"); - defaults.put(TABLE_REQ_FIELD_BACKGROUND, "230:235:255"); - defaults.put(TABLE_OPT_FIELD_BACKGROUND, "230:255:230"); - defaults.put(TABLE_RESOLVED_FIELD_BACKGROUND, "240:240:240"); - defaults.put(TABLE_TEXT, "0:0:0"); - defaults.put(GRID_COLOR, "210:210:210"); - defaults.put(GRAYED_OUT_BACKGROUND, "210:210:210"); - defaults.put(GRAYED_OUT_TEXT, "40:40:40"); - defaults.put(VERY_GRAYED_OUT_BACKGROUND, "180:180:180"); - defaults.put(VERY_GRAYED_OUT_TEXT, "40:40:40"); - defaults.put(MARKED_ENTRY_BACKGROUND0, "255:255:180"); - defaults.put(MARKED_ENTRY_BACKGROUND1, "255:220:180"); - defaults.put(MARKED_ENTRY_BACKGROUND2, "255:180:160"); - defaults.put(MARKED_ENTRY_BACKGROUND3, "255:120:120"); - defaults.put(MARKED_ENTRY_BACKGROUND4, "255:75:75"); - defaults.put(MARKED_ENTRY_BACKGROUND5, "220:255:220"); defaults.put(VALID_FIELD_BACKGROUND_COLOR, "255:255:255"); defaults.put(INVALID_FIELD_BACKGROUND_COLOR, "255:0:0"); defaults.put(ACTIVE_FIELD_EDITOR_BACKGROUND_COLOR, "220:220:255"); @@ -643,8 +602,6 @@ private JabRefPreferences() { defaults.put(ICON_ENABLED_COLOR, "0:0:0"); defaults.put(ICON_DISABLED_COLOR, "200:200:200"); - defaults.put(INCOMPLETE_ENTRY_BACKGROUND, "250:175:175"); - defaults.put(URL_COLUMN, Boolean.TRUE); defaults.put(PREFER_URL_DOI, Boolean.FALSE); defaults.put(FILE_COLUMN, Boolean.TRUE); @@ -1782,7 +1739,6 @@ public ColumnPreferences getColumnPreferences() { public MainTablePreferences getMainTablePreferences() { return new MainTablePreferences( - getBoolean(TABLE_SHOW_GRID), getColumnPreferences(), getBoolean(AUTO_RESIZE_MODE)); } diff --git a/src/main/resources/l10n/JabRef_da.properties b/src/main/resources/l10n/JabRef_da.properties index 14c572510e3..3e969a02fa7 100644 --- a/src/main/resources/l10n/JabRef_da.properties +++ b/src/main/resources/l10n/JabRef_da.properties @@ -1576,6 +1576,8 @@ Existing\ file=Eksisterende fil + + diff --git a/src/main/resources/l10n/JabRef_de.properties b/src/main/resources/l10n/JabRef_de.properties index d395de8298b..9f423eba2f9 100644 --- a/src/main/resources/l10n/JabRef_de.properties +++ b/src/main/resources/l10n/JabRef_de.properties @@ -149,6 +149,7 @@ Broken\ link=Ungültiger Link Browse=Durchsuchen by=durch +The\ conflicting\ fields\ of\ these\ entries\ will\ be\ merged\ into\ the\ 'Comment'\ field.=Die in Konflikt stehenden Felder dieser Einträge werden im Feld "Comment" zusammengeführt. Cancel=Abbrechen @@ -211,6 +212,7 @@ Color\ for\ marking\ incomplete\ entries=Farbe zum Markieren unvollständiger Ei Column\ width=Spaltenbreite Command\ line\ id=Kommandozeilen ID +Comments=Kommentare Contained\ in=Enthalten in @@ -386,6 +388,7 @@ Edit\ entry=Eintrag bearbeiten Save\ file=Datei speichern Edit\ file\ type=Dateityp bearbeiten +Add\ group=Gruppe hinzufügen Edit\ group=Gruppe bearbeiten @@ -559,6 +562,7 @@ Get\ fulltext=Hole Volltext Gray\ out\ non-hits=Nicht-Treffer grau einfärben Groups=Gruppen +has/have\ both\ a\ 'Comment'\ and\ a\ 'Review'\ field.=hat/haben sowohl ein 'Comment' und ein 'Review' Feld. Have\ you\ chosen\ the\ correct\ package\ path?=Habe Sie den richtigen Klassenpfad gewählt? @@ -716,6 +720,7 @@ Memory\ stick\ mode=Memory Stick-Modus Menu\ and\ label\ font\ size=Schriftgröße in Menüs Merged\ external\ changes=Externe Änderungen eingefügt +Merge\ fields=Felder zusammenführen Messages=Mitteilungen @@ -993,6 +998,8 @@ Replace\ string=String ersetzen Replace\ with=Ersetzen durch +Replace\ Unicode\ ligatures=Unicode-Ligaturen ersetzen +Replaces\ Unicode\ ligatures\ with\ their\ expanded\ form=Unicode-Ligaturen durch ihre erweiterte Form ersetzen Replaced=Ersetzt\: @@ -1006,6 +1013,7 @@ Resolve\ strings\ for\ standard\ BibTeX\ fields\ only=Strings nur für Standard- resolved=davon aufgelöst Review=Überprüfung Review\ changes=Änderungen überprüfen +Review\ Field\ Migration=Review-Feld Migration Right=Rechts @@ -1095,8 +1103,10 @@ Show\ required\ fields=Benötigte Felder anzeigen Show\ URL/DOI\ column=URL/DOI-Spalte anzeigen +Show\ validation\ messages=Validierungsnachrichten anzeigen Simple\ HTML=Einfaches HTML +Since\ the\ 'Review'\ field\ was\ deprecated\ in\ JabRef\ 4.2,\ these\ two\ fields\ are\ about\ to\ be\ merged\ into\ the\ 'Comment'\ field.=Da das Feld 'Review' in JabRef 4.2 als veraltet gekennzeichnet wurde, werden die Inhalte der beiden Felder im Feld 'Comment' zusammengeführt. Size=Größe @@ -1730,6 +1740,7 @@ Unmarked\ all\ entries=Markierung für alle Einträge aufgehoben Unable\ to\ find\ the\ requested\ look\ and\ feel\ and\ thus\ the\ default\ one\ is\ used.=Look and feel konnte nicht gefunden werden, stattdessen wird der Standard verwendet. Opens\ JabRef's\ GitHub\ page=Öffnet JabRefs GitHub-Seite +Opens\ JabRef's\ Twitter\ page=Öffnet JabRefs Twitter-Seite Opens\ JabRef's\ Facebook\ page=Öffnet JabRefs Facebookseite Opens\ JabRef's\ blog=Öffnet JabRefs Blog Opens\ JabRef's\ website=Öffnet JabRefs Webseite @@ -1873,6 +1884,7 @@ value=Wert Show\ preferences=Zeige Einstellungen Save\ actions=Speicheraktionen Enable\ save\ actions=Speicheraktionen aktivieren +Convert\ to\ BibTeX\ format\ (for\ example,\ move\ the\ value\ of\ the\ 'journaltitle'\ field\ to\ 'journal')=Ins BibTeX-Format konvertieren (verschiebe beispielsweise den Wert des Felds 'journaltitle' in das Feld 'journal') Other\ fields=Andere Felder Show\ remaining\ fields=Zeige übrige Felder @@ -2332,5 +2344,12 @@ Could\ not\ retrieve\ entry\ data\ from\ '%0'.=Konnte Daten von '%0' nicht abruf Entry\ from\ %0\ could\ not\ be\ parsed.=Eintrag von %0 konnte nicht analysiert werden. Invalid\ identifier\:\ '%0'.=Ungültige Kennung\: "%0". This\ paper\ has\ been\ withdrawn.=Dieses Paper wurde zurückgezogen. +Finished\ writing\ XMP-metadata.=XMP-Metadaten schreiben abgeschlossen. empty\ BibTeX\ key=Leerer BibTeX-Key +Your\ Java\ Runtime\ Environment\ is\ located\ at\ %0.=Ihre Java Laufzeitumgebung befindet sich in %0. +Aux\ file=Aux-Datei +Group\ containing\ entries\ cited\ in\ a\ given\ TeX\ file=Gruppe mit Einträgen die in einer vorhanden Tex-Datei zitiert worden sind + +Any\ file=Beliebige Datei + diff --git a/src/main/resources/l10n/JabRef_el.properties b/src/main/resources/l10n/JabRef_el.properties index f6b6e36061d..0babcb69581 100644 --- a/src/main/resources/l10n/JabRef_el.properties +++ b/src/main/resources/l10n/JabRef_el.properties @@ -799,6 +799,8 @@ Connect=Σύνδεση + + diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index b6efc53008b..f4425058d57 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -702,6 +702,7 @@ Memory\ stick\ mode=Memory stick mode Menu\ and\ label\ font\ size=Menu and label font size Merged\ external\ changes=Merged external changes +Merge\ fields=Merge fields Messages=Messages @@ -2325,6 +2326,11 @@ empty\ BibTeX\ key=empty BibTeX key Your\ Java\ Runtime\ Environment\ is\ located\ at\ %0.=Your Java Runtime Environment is located at %0. Aux\ file=Aux file Group\ containing\ entries\ cited\ in\ a\ given\ TeX\ file=Group containing entries cited in a given TeX file + +Any\ file=Any file + +No\ linked\ files\ found\ for\ export.=No linked files found for export. + Delete\ Entry=Delete Entry Import\ &\ Export=Import & Export Look\ up\ document\ identifier=Look up document identifier @@ -2351,3 +2357,7 @@ Error\ pushing\ entries=Error pushing entries Undefined\ character\ format=Undefined character format Undefined\ paragraph\ format=Undefined paragraph format + +Any\ file=Any file + +No\ linked\ files\ found\ for\ export.=No linked files found for export. diff --git a/src/main/resources/l10n/JabRef_es.properties b/src/main/resources/l10n/JabRef_es.properties index 213de61369b..ebb660a52a1 100644 --- a/src/main/resources/l10n/JabRef_es.properties +++ b/src/main/resources/l10n/JabRef_es.properties @@ -210,6 +210,7 @@ Color\ for\ marking\ incomplete\ entries=Color para marcar entradas incompletas Column\ width=Ancho de columna Command\ line\ id=Id de línea de comando +Comments=Comentarios Contained\ in=Contenido en @@ -385,6 +386,7 @@ Edit\ entry=Editar entrada Save\ file=Editar enlace a archivo Edit\ file\ type=Editar tipo de archivo +Add\ group=Añadir grupo Edit\ group=Editar grupo @@ -422,6 +424,7 @@ Entry\ type\ names\ are\ not\ allowed\ to\ contain\ white\ space\ or\ the\ follo Entry\ types=Tipos de entrada +Error=Error Error\ exporting\ to\ clipboard=Error exportando al portapapeles Error\ occurred\ when\ parsing\ entry=Ocurrió un error al analizar la entrada @@ -496,6 +499,7 @@ Files\ opened=Archivos abiertos Filter=Filtro +Filter\ All=Filtrar todos Finished\ automatically\ setting\ external\ links.=Se ha finalizado la configuración automática de enlaces esternos. @@ -532,6 +536,7 @@ found\ in\ AUX\ file=encontrado en archivo AUX Full\ name=Nombre completo +General=General General\ fields=Generar campos @@ -743,6 +748,7 @@ nested\ AUX\ files=Archivos AUX anidados New=Nuevo +new=nuevo New\ BibTeX\ entry=Nueva entrada BibTeX @@ -977,6 +983,7 @@ Removed\ string=Cadena eliminada Renamed\ string=Cadena renombrada +Replace=Reemplazar Replace\ (regular\ expression)=Reemplazar (Expresión regular) @@ -1716,6 +1723,7 @@ Unmarked\ all\ entries=Desmarcar todas las entradas Unable\ to\ find\ the\ requested\ look\ and\ feel\ and\ thus\ the\ default\ one\ is\ used.=No se puede encontrar el aspecto solicitado, por lo que se usará el aspecto por defecto Opens\ JabRef's\ GitHub\ page=Abrir la página de JabRef en GitHub +Opens\ JabRef's\ Twitter\ page=Abrir la página de JabRef en Twitter Opens\ JabRef's\ Facebook\ page=Abrir Facebook de JabRef Opens\ JabRef's\ blog=Abrir el blog de JabRef Opens\ JabRef's\ website=Abrir el sitio web de JabRef @@ -1966,6 +1974,7 @@ Determined\ %0\ for\ %1\ entries=Se ha determinado %0 para %1 entradas Look\ up\ %0=Buscar %0 Looking\ up\ %0...\ -\ entry\ %1\ out\ of\ %2\ -\ found\ %3=Buscando %0 - Entrada %1 de %2 - encontrado %0 +Audio\ CD=CD de audio British\ patent=Patente británica British\ patent\ request=Solicitud de patente británica Candidate\ thesis=Tesis de Candidato @@ -2184,6 +2193,7 @@ Author=Autor Date=Fecha File\ annotations=Anotaciones de fichero Show\ file\ annotations=Mostrar anotaciones de fichero +Adobe\ Acrobat\ Reader=Adobe Acrobat Reader shared=compartido should\ contain\ an\ integer\ or\ a\ literal=debería contener un entero o un literal should\ have\ the\ first\ letter\ capitalized=debería tener la primera letra mayúscula @@ -2221,6 +2231,7 @@ Do\ you\ want\ to\ recover\ the\ library\ from\ the\ backup\ file?=¿Quiere recu Firstname\ Lastname=Nombre Apellido Recommended\ for\ %0=Recomendado para %0 +Show\ 'Related\ Articles'\ tab=Ver ficha de 'Artículos relacionados' This\ might\ be\ caused\ by\ reaching\ the\ traffic\ limitation\ of\ Google\ Scholar\ (see\ 'Help'\ for\ details).=Esto puede ser debido a alcanzar el límite de tráfico de GoogleScholar (vea la 'Ayuda' para más detalles) Could\ not\ open\ website.=No se puede abrir el sitio web @@ -2253,6 +2264,7 @@ Size\ of\ large\ icons=Tamaño de iconos grandes Size\ of\ small\ icons=Tamaño de iconos pequeños Default\ table\ font\ size=Tamaño de fuente por defecto para tabla Escape\ underscores=Escapar guiones bajos +Color=Color Please\ also\ add\ all\ steps\ to\ reproduce\ this\ issue,\ if\ possible.=Por favor, añada los pasos para reproducir el problema si fuera posible Fit\ width=Ajustar ancho Fit\ a\ single\ page=Ajustar a una página @@ -2273,10 +2285,23 @@ Don't\ share=No compartir Share\ anonymous\ statistics=Compartir estadísticas anónimas Telemetry\:\ Help\ make\ JabRef\ better=Telemetría\: Ayude a mejorar JabRef To\ improve\ the\ user\ experience,\ we\ would\ like\ to\ collect\ anonymous\ statistics\ on\ the\ features\ you\ use.\ We\ will\ only\ record\ what\ features\ you\ access\ and\ how\ often\ you\ do\ it.\ We\ will\ neither\ collect\ any\ personal\ data\ nor\ the\ content\ of\ bibliographic\ items.\ If\ you\ choose\ to\ allow\ data\ collection,\ you\ can\ later\ disable\ it\ via\ Options\ ->\ Preferences\ ->\ General.=Para mejorar la experiencia de usuario, nos gustaría recopilar estadísitcas anónimas sobre las funcionalidades de JabRef que usa. Sólo se registrará qué funcionalidades emplea y con qué frecuencia. No se recopilará ningún dato personal ni el contenido de los elementos bibliográficos. Si decide permitir la recopilación de datos, podrá deshabilitarlo posteriormente en Opciones -> Preferencias ->General +Names\ are\ not\ in\ the\ standard\ %0\ format.=Los nombres no tienen el formato estándar + +Delete\ the\ selected\ file\ permanently\ from\ disk,\ or\ just\ remove\ the\ file\ from\ the\ entry?\ Pressing\ Delete\ will\ delete\ the\ file\ permanently\ from\ disk.=¿Borrar el archivo seleccionado del disco duro o solamente quitarlo de la entrada? Presionar el botón de eliminara, borrará el archivo del disco duro permanentemente. +Delete\ '%0'=Borrar archivo '%0' +Delete\ from\ disk=Borrar del disco duro +Remove\ from\ entry=Quitar de la entrada +The\ group\ name\ contains\ the\ keyword\ separator\ "%0"\ and\ thus\ probably\ does\ not\ work\ as\ expected.=El nombre del grupo contiene el separador "%0" y es posible que no funcione como esperado. +There\ exists\ already\ a\ group\ with\ the\ same\ name.=Ya existe un grupo con el mismo nombre. + +Copy\ linked\ files\ to\ folder...=Copiando archivos enlazados a carpeta... +Copied\ file\ successfully=Archivos copiados con éxito +Copying\ files...=Copiando archivos... +Copying\ file\ %0\ of\ entry\ %1=Copiando archivo %0 de entrada %1 +Finished\ copying=Terminó de copiar +Could\ not\ copy\ file=No se pudo copiar el archivo +empty\ BibTeX\ key=vaciar clave BibTeX - -empty\ BibTeX\ key=vaciar clave BibTeX - diff --git a/src/main/resources/l10n/JabRef_fa.properties b/src/main/resources/l10n/JabRef_fa.properties index 6d621c33370..d00d259998c 100644 --- a/src/main/resources/l10n/JabRef_fa.properties +++ b/src/main/resources/l10n/JabRef_fa.properties @@ -722,6 +722,8 @@ Unabbreviate\ journal\ names=برداشتن مخفف نام ژورنال‌ها + + diff --git a/src/main/resources/l10n/JabRef_fr.properties b/src/main/resources/l10n/JabRef_fr.properties index c163683b578..cf10a0ae158 100644 --- a/src/main/resources/l10n/JabRef_fr.properties +++ b/src/main/resources/l10n/JabRef_fr.properties @@ -720,6 +720,7 @@ Memory\ stick\ mode=Mode clef mémoire Menu\ and\ label\ font\ size=Taille de police pour les menus et les champs Merged\ external\ changes=Fusionner les modifications externes +Merge\ fields=Fusionner les champs Messages=Messages @@ -2349,3 +2350,7 @@ Your\ Java\ Runtime\ Environment\ is\ located\ at\ %0.=Votre environnement d’e Aux\ file=Fichier aux Group\ containing\ entries\ cited\ in\ a\ given\ TeX\ file=Groupe contenant les entrées citées dans un fichier TeX spécifique +Any\ file=N’importe quel fichier + +No\ linked\ files\ found\ for\ export.=Aucun fichier lié trouvé pour l'exportation. + diff --git a/src/main/resources/l10n/JabRef_in.properties b/src/main/resources/l10n/JabRef_in.properties index 08fba6bcfa9..f41a221c28f 100644 --- a/src/main/resources/l10n/JabRef_in.properties +++ b/src/main/resources/l10n/JabRef_in.properties @@ -2333,3 +2333,5 @@ Invalid\ identifier\:\ '%0'.=Pengenal tidak valid\: ' % 0 '. This\ paper\ has\ been\ withdrawn.=Makalah ini telah ditarik. empty\ BibTeX\ key=kosongkan tombol BibTeX + + diff --git a/src/main/resources/l10n/JabRef_it.properties b/src/main/resources/l10n/JabRef_it.properties index 9ea5c66699d..67892000b1c 100644 --- a/src/main/resources/l10n/JabRef_it.properties +++ b/src/main/resources/l10n/JabRef_it.properties @@ -2296,3 +2296,5 @@ There\ exists\ already\ a\ group\ with\ the\ same\ name.=Esiste già almeno un g empty\ BibTeX\ key=chiave BibTeX vuota + + diff --git a/src/main/resources/l10n/JabRef_ja.properties b/src/main/resources/l10n/JabRef_ja.properties index 66f6e627da2..e35d500c7bd 100644 --- a/src/main/resources/l10n/JabRef_ja.properties +++ b/src/main/resources/l10n/JabRef_ja.properties @@ -720,6 +720,7 @@ Memory\ stick\ mode=メモリースティックモード Menu\ and\ label\ font\ size=メニューとラベルのフォント寸法 Merged\ external\ changes=外部からの変更を統合しました +Merge\ fields=フィールドをマージ Messages=メッセージ @@ -2349,3 +2350,6 @@ Your\ Java\ Runtime\ Environment\ is\ located\ at\ %0.=お使いのJava Runtime Aux\ file=auxファイル Group\ containing\ entries\ cited\ in\ a\ given\ TeX\ file=特定のTeXファイルでの引用項目を集めたグループ +Any\ file=任意のファイル + + diff --git a/src/main/resources/l10n/JabRef_nl.properties b/src/main/resources/l10n/JabRef_nl.properties index 332b676b58b..11659a4ae4e 100644 --- a/src/main/resources/l10n/JabRef_nl.properties +++ b/src/main/resources/l10n/JabRef_nl.properties @@ -1276,6 +1276,8 @@ Connect=Verbinden + + diff --git a/src/main/resources/l10n/JabRef_no.properties b/src/main/resources/l10n/JabRef_no.properties index 0e729abc017..849e5ccd195 100644 --- a/src/main/resources/l10n/JabRef_no.properties +++ b/src/main/resources/l10n/JabRef_no.properties @@ -1568,6 +1568,8 @@ Connect=Koble til + + diff --git a/src/main/resources/l10n/JabRef_pt_BR.properties b/src/main/resources/l10n/JabRef_pt_BR.properties index 1a449faa984..eab79f59392 100644 --- a/src/main/resources/l10n/JabRef_pt_BR.properties +++ b/src/main/resources/l10n/JabRef_pt_BR.properties @@ -1851,3 +1851,5 @@ Show\ document\ viewer=Mostrar visualizador de documentos + + diff --git a/src/main/resources/l10n/JabRef_ru.properties b/src/main/resources/l10n/JabRef_ru.properties index cec39ed82db..6849d5abb89 100644 --- a/src/main/resources/l10n/JabRef_ru.properties +++ b/src/main/resources/l10n/JabRef_ru.properties @@ -2124,3 +2124,5 @@ Show\ document\ viewer=Показать программу просмотра д + + diff --git a/src/main/resources/l10n/JabRef_sv.properties b/src/main/resources/l10n/JabRef_sv.properties index 4c6011b4f58..53aaf718655 100644 --- a/src/main/resources/l10n/JabRef_sv.properties +++ b/src/main/resources/l10n/JabRef_sv.properties @@ -2005,3 +2005,5 @@ Escape\ underscores=Maskera understreck + + diff --git a/src/main/resources/l10n/JabRef_tl.properties b/src/main/resources/l10n/JabRef_tl.properties new file mode 100644 index 00000000000..b72d1e4e59c --- /dev/null +++ b/src/main/resources/l10n/JabRef_tl.properties @@ -0,0 +1,2009 @@ +#X-Generator: crowdin.com +%0\ contains\ the\ regular\ expression\ %1=%0 ay naglalaman ng regular na ekspresyon%1 + +%0\ contains\ the\ term\ %1=%ay naglalaman ng mga term%1 + +%0\ doesn't\ contain\ the\ regular\ expression\ %1=%0 hindi ay nag lalaman ng regular na ekspresyon %1 + +%0\ doesn't\ contain\ the\ term\ %1=%0 hindi naglalaman ng termeno %1 + +%0\ export\ successful=%0 ang pag-export ay matagumpay + +%0\ matches\ the\ regular\ expression\ %1=%0 nag tugma sa regular na ekspresyon %1 + +%0\ matches\ the\ term\ %1=%0 tumugma sa termino %1 + += +Could\ not\ find\ file\ '%0'
linked\ from\ entry\ '%1'=Hindi makita ang file '%0'
nag-link mula sa entry '%1' + + + +=