File: eclipse.gradle

package info (click to toggle)
jabref 3.8.2+ds-14
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 18,484 kB
  • sloc: java: 114,177; xml: 3,985; sh: 291; python: 283; perl: 200; ruby: 22; makefile: 8
file content (548 lines) | stat: -rw-r--r-- 42,772 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
apply plugin: "eclipse"

// ensure that source code is generated, otherwise class `BstLexer` cannot be found
tasks.eclipseClasspath.dependsOn "generateSource"

// workaround until https://github.com/gradle/gradle/issues/898 is resolved
eclipseJdt.doLast {
    File f = file('.settings/org.eclipse.core.resources.prefs')
    f.write('eclipse.preferences.version=1\n')
    f.append('encoding/<project>=UTF-8')
}

// add formatter and cleanup settings to Eclipse settings
// see http://stackoverflow.com/a/27461890/873282

tasks.cleanEclipse.doLast {
    delete("${project.projectDir}/.settings/org.eclipse.core.resources.prefs")
    delete("${project.projectDir}/.settings/org.eclipse.jdt.core.prefs")
    delete("${project.projectDir}/.settings/org.eclipse.jdt.ui.prefs")
}

// Currently, the eclipse task is not intelligent enough to replace generated lines:
// It just adds the lines.
// To avoid broken configurations, the existing configuration is deleted completely.
tasks.eclipse.dependsOn(cleanEclipse)

tasks.eclipse.doFirst {
    File jdt_core_prefs = file("${project.projectDir}/.settings/org.eclipse.jdt.core.prefs")
    // existence check doesn't work as gradle generates the file on its own
    /* following entries are not written as they are generated by gradle:
            org.eclipse.jdt.core.compiler.debug.lineNumber=generate
            org.eclipse.jdt.core.compiler.debug.localVariable=generate
            org.eclipse.jdt.core.compiler.debug.sourceFile=generate
            org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
            org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
            org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
            org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
    */
    jdt_core_prefs.append('''
        org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
        org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
        org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
        org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
        org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
        org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
        org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
        org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
        org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
        org.eclipse.jdt.core.compiler.problem.deadCode=warning
        org.eclipse.jdt.core.compiler.problem.deprecation=warning
        org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
        org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
        org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
        org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
        org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
        org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
        org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
        org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
        org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
        org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
        org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
        org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
        org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
        org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
        org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
        org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
        org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
        org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
        org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
        org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
        org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
        org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
        org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
        org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
        org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
        org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
        org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
        org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
        org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
        org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
        org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
        org.eclipse.jdt.core.compiler.problem.nullReference=warning
        org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
        org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
        org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
        org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
        org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
        org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
        org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
        org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
        org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
        org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
        org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
        org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
        org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
        org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
        org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
        org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=ignore
        org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
        org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
        org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
        org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
        org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
        org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
        org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
        org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
        org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
        org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
        org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
        org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
        org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
        org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
        org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
        org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
        org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
        org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
        org.eclipse.jdt.core.compiler.problem.unusedImport=warning
        org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
        org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
        org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
        org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
        org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=disabled
        org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
        org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
        org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
        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=16
        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.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.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_between_type_declarations=1
        org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
        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.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.comment.clear_blank_lines_in_block_comment=false
        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=120
        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.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=false
        org.eclipse.jdt.core.formatter.indentation.size=4
        org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=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.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_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.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.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_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_semicolon_in_try_resources=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_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_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.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_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.insert_space_before_opening_bracket_in_array_allocation_expression=do not 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.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.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=120
        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.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.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter
        '''. stripIndent())

    File jdt_ui_prefs = file("${project.projectDir}/.settings/org.eclipse.jdt.ui.prefs")
    if (jdt_ui_prefs.exists()) {
        logger.warn("UI preferences already exist and will not be overridden. Use task 'cleanEclipse' first.")
    } else {
        jdt_ui_prefs.append('''
            cleanup.add_default_serial_version_id=true
            cleanup.add_generated_serial_version_id=false
            cleanup.add_missing_annotations=true
            cleanup.add_missing_deprecated_annotations=true
            cleanup.add_missing_methods=false
            cleanup.add_missing_nls_tags=false
            cleanup.add_missing_override_annotations=true
            cleanup.add_missing_override_annotations_interface_methods=true
            cleanup.add_serial_version_id=false
            cleanup.always_use_blocks=true
            cleanup.always_use_parentheses_in_expressions=true
            cleanup.always_use_this_for_non_static_field_access=false
            cleanup.always_use_this_for_non_static_method_access=false
            cleanup.convert_functional_interfaces=false
            cleanup.convert_to_enhanced_for_loop=false
            cleanup.correct_indentation=true
            cleanup.format_source_code=true
            cleanup.format_source_code_changes_only=false
            cleanup.insert_inferred_type_arguments=false
            cleanup.make_local_variable_final=false
            cleanup.make_parameters_final=false
            cleanup.make_private_fields_final=true
            cleanup.make_type_abstract_if_missing_method=false
            cleanup.make_variable_declarations_final=true
            cleanup.never_use_blocks=false
            cleanup.never_use_parentheses_in_expressions=false
            cleanup.organize_imports=false
            cleanup.qualify_static_field_accesses_with_declaring_class=true
            cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=false
            cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=false
            cleanup.qualify_static_member_accesses_with_declaring_class=false
            cleanup.qualify_static_method_accesses_with_declaring_class=false
            cleanup.remove_private_constructors=true
            cleanup.remove_redundant_type_arguments=true
            cleanup.remove_trailing_whitespaces=true
            cleanup.remove_trailing_whitespaces_all=true
            cleanup.remove_trailing_whitespaces_ignore_empty=false
            cleanup.remove_unnecessary_casts=true
            cleanup.remove_unnecessary_nls_tags=true
            cleanup.remove_unused_imports=true
            cleanup.remove_unused_local_variables=false
            cleanup.remove_unused_private_fields=true
            cleanup.remove_unused_private_members=false
            cleanup.remove_unused_private_methods=true
            cleanup.remove_unused_private_types=true
            cleanup.sort_members=false
            cleanup.sort_members_all=true
            cleanup.use_anonymous_class_creation=false
            cleanup.use_blocks=true
            cleanup.use_blocks_only_for_return_and_throw=false
            cleanup.use_lambda=true
            cleanup.use_parentheses_in_expressions=true
            cleanup.use_this_for_non_static_field_access=false
            cleanup.use_this_for_non_static_field_access_only_if_necessary=false
            cleanup.use_this_for_non_static_method_access=false
            cleanup.use_this_for_non_static_method_access_only_if_necessary=false
            cleanup.use_type_arguments=false
            cleanup_profile=_JabRef
            cleanup_settings_version=2
            eclipse.preferences.version=1
            editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
            formatter_profile=_JabRef
            formatter_settings_version=12
            org.eclipse.jdt.ui.ignorelowercasenames=true
            org.eclipse.jdt.ui.importorder=java;javax;net.sf.jabref;org.jabref;;\\#;
            org.eclipse.jdt.ui.ondemandthreshold=99
            org.eclipse.jdt.ui.staticondemandthreshold=99
            sp_cleanup.add_default_serial_version_id=true
            sp_cleanup.add_generated_serial_version_id=false
            sp_cleanup.add_missing_annotations=true
            sp_cleanup.add_missing_deprecated_annotations=true
            sp_cleanup.add_missing_methods=false
            sp_cleanup.add_missing_nls_tags=false
            sp_cleanup.add_missing_override_annotations=true
            sp_cleanup.add_missing_override_annotations_interface_methods=true
            sp_cleanup.add_serial_version_id=false
            sp_cleanup.always_use_blocks=true
            sp_cleanup.always_use_parentheses_in_expressions=true
            sp_cleanup.always_use_this_for_non_static_field_access=false
            sp_cleanup.always_use_this_for_non_static_method_access=false
            sp_cleanup.convert_functional_interfaces=false
            sp_cleanup.convert_to_enhanced_for_loop=false
            sp_cleanup.correct_indentation=false
            sp_cleanup.format_source_code=true
            sp_cleanup.format_source_code_changes_only=true
            sp_cleanup.insert_inferred_type_arguments=false
            sp_cleanup.make_local_variable_final=false
            sp_cleanup.make_parameters_final=false
            sp_cleanup.make_private_fields_final=true
            sp_cleanup.make_type_abstract_if_missing_method=false
            sp_cleanup.make_variable_declarations_final=true
            sp_cleanup.never_use_blocks=false
            sp_cleanup.never_use_parentheses_in_expressions=false
            sp_cleanup.on_save_use_additional_actions=true
            sp_cleanup.organize_imports=false
            sp_cleanup.qualify_static_field_accesses_with_declaring_class=true
            sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=false
            sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=false
            sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
            sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
            sp_cleanup.remove_private_constructors=true
            sp_cleanup.remove_redundant_type_arguments=true
            sp_cleanup.remove_trailing_whitespaces=true
            sp_cleanup.remove_trailing_whitespaces_all=true
            sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
            sp_cleanup.remove_unnecessary_casts=true
            sp_cleanup.remove_unnecessary_nls_tags=true
            sp_cleanup.remove_unused_imports=true
            sp_cleanup.remove_unused_local_variables=false
            sp_cleanup.remove_unused_private_fields=true
            sp_cleanup.remove_unused_private_members=false
            sp_cleanup.remove_unused_private_methods=true
            sp_cleanup.remove_unused_private_types=true
            sp_cleanup.sort_members=false
            sp_cleanup.sort_members_all=true
            sp_cleanup.use_anonymous_class_creation=false
            sp_cleanup.use_blocks=true
            sp_cleanup.use_blocks_only_for_return_and_throw=false
            sp_cleanup.use_lambda=true
            sp_cleanup.use_parentheses_in_expressions=true
            sp_cleanup.use_this_for_non_static_field_access=false
            sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false
            sp_cleanup.use_this_for_non_static_method_access=false
            sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=false
            sp_cleanup.use_type_arguments=false
            '''. stripIndent())
    }
}