Skip to content

Commit 9f2714d

Browse files
committed
Regenerate persistence model with cleanups, including pattern instanceof
#1974
1 parent a4dec45 commit 9f2714d

File tree

3 files changed

+154
-4
lines changed

3 files changed

+154
-4
lines changed

e4tools/bundles/org.eclipse.e4.tools.persistence/.settings/org.eclipse.jdt.ui.prefs

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,153 @@
1+
cleanup.add_all=false
2+
cleanup.add_default_serial_version_id=true
3+
cleanup.add_generated_serial_version_id=false
4+
cleanup.add_missing_annotations=true
5+
cleanup.add_missing_deprecated_annotations=true
6+
cleanup.add_missing_methods=false
7+
cleanup.add_missing_nls_tags=false
8+
cleanup.add_missing_override_annotations=true
9+
cleanup.add_missing_override_annotations_interface_methods=true
10+
cleanup.add_serial_version_id=false
11+
cleanup.also_simplify_lambda=true
12+
cleanup.always_use_blocks=true
13+
cleanup.always_use_parentheses_in_expressions=false
14+
cleanup.always_use_this_for_non_static_field_access=false
15+
cleanup.always_use_this_for_non_static_method_access=false
16+
cleanup.array_with_curly=false
17+
cleanup.arrays_fill=false
18+
cleanup.bitwise_conditional_expression=false
19+
cleanup.boolean_literal=false
20+
cleanup.boolean_value_rather_than_comparison=true
21+
cleanup.break_loop=false
22+
cleanup.collection_cloning=false
23+
cleanup.comparing_on_criteria=false
24+
cleanup.comparison_statement=false
25+
cleanup.controlflow_merge=false
26+
cleanup.convert_functional_interfaces=false
27+
cleanup.convert_to_enhanced_for_loop=true
28+
cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true
29+
cleanup.convert_to_switch_expressions=false
30+
cleanup.correct_indentation=false
31+
cleanup.do_while_rather_than_while=true
32+
cleanup.double_negation=false
33+
cleanup.else_if=false
34+
cleanup.embedded_if=false
35+
cleanup.evaluate_nullable=false
36+
cleanup.extract_increment=false
37+
cleanup.format_source_code=false
38+
cleanup.format_source_code_changes_only=false
39+
cleanup.hash=false
40+
cleanup.if_condition=false
41+
cleanup.insert_inferred_type_arguments=false
42+
cleanup.instanceof=true
43+
cleanup.instanceof_keyword=false
44+
cleanup.invert_equals=false
45+
cleanup.join=false
46+
cleanup.lazy_logical_operator=false
47+
cleanup.make_local_variable_final=true
48+
cleanup.make_parameters_final=false
49+
cleanup.make_private_fields_final=true
50+
cleanup.make_type_abstract_if_missing_method=false
51+
cleanup.make_variable_declarations_final=false
52+
cleanup.map_cloning=false
53+
cleanup.merge_conditional_blocks=false
54+
cleanup.multi_catch=false
55+
cleanup.never_use_blocks=false
56+
cleanup.never_use_parentheses_in_expressions=true
57+
cleanup.no_string_creation=false
58+
cleanup.no_super=false
59+
cleanup.number_suffix=false
60+
cleanup.objects_equals=false
61+
cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true
62+
cleanup.operand_factorization=false
63+
cleanup.organize_imports=true
64+
cleanup.overridden_assignment=false
65+
cleanup.overridden_assignment_move_decl=true
66+
cleanup.plain_replacement=false
67+
cleanup.precompile_regex=false
68+
cleanup.primitive_comparison=false
69+
cleanup.primitive_parsing=false
70+
cleanup.primitive_rather_than_wrapper=true
71+
cleanup.primitive_serialization=false
72+
cleanup.pull_out_if_from_if_else=false
73+
cleanup.pull_up_assignment=false
74+
cleanup.push_down_negation=false
75+
cleanup.qualify_static_field_accesses_with_declaring_class=false
76+
cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
77+
cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
78+
cleanup.qualify_static_member_accesses_with_declaring_class=true
79+
cleanup.qualify_static_method_accesses_with_declaring_class=false
80+
cleanup.reduce_indentation=false
81+
cleanup.redundant_comparator=false
82+
cleanup.redundant_falling_through_block_end=false
83+
cleanup.remove_private_constructors=true
84+
cleanup.remove_redundant_modifiers=false
85+
cleanup.remove_redundant_semicolons=true
86+
cleanup.remove_redundant_type_arguments=true
87+
cleanup.remove_trailing_whitespaces=true
88+
cleanup.remove_trailing_whitespaces_all=true
89+
cleanup.remove_trailing_whitespaces_ignore_empty=false
90+
cleanup.remove_unnecessary_array_creation=false
91+
cleanup.remove_unnecessary_casts=true
92+
cleanup.remove_unnecessary_nls_tags=true
93+
cleanup.remove_unnecessary_suppress_warnings=false
94+
cleanup.remove_unused_imports=true
95+
cleanup.remove_unused_local_variables=false
96+
cleanup.remove_unused_method_parameters=false
97+
cleanup.remove_unused_private_fields=true
98+
cleanup.remove_unused_private_members=false
99+
cleanup.remove_unused_private_methods=true
100+
cleanup.remove_unused_private_types=true
101+
cleanup.replace_deprecated_calls=false
102+
cleanup.replace_deprecated_fields=false
103+
cleanup.return_expression=false
104+
cleanup.simplify_boolean_if_else=false
105+
cleanup.simplify_lambda_expression_and_method_ref=false
106+
cleanup.single_used_field=false
107+
cleanup.sort_members=false
108+
cleanup.sort_members_all=false
109+
cleanup.standard_comparison=false
110+
cleanup.static_inner_class=false
111+
cleanup.strictly_equal_or_different=false
112+
cleanup.stringbuffer_to_stringbuilder=false
113+
cleanup.stringbuilder=false
114+
cleanup.stringbuilder_for_local_vars=true
115+
cleanup.stringconcat_stringbuffer_stringbuilder=false
116+
cleanup.stringconcat_to_textblock=false
117+
cleanup.substring=false
118+
cleanup.switch=false
119+
cleanup.switch_for_instanceof_pattern=false
120+
cleanup.system_property=false
121+
cleanup.system_property_boolean=false
122+
cleanup.system_property_file_encoding=false
123+
cleanup.system_property_file_separator=false
124+
cleanup.system_property_javaspecversion=false
125+
cleanup.system_property_javaversion=false
126+
cleanup.system_property_line_separator=false
127+
cleanup.system_property_path_separator=false
128+
cleanup.ternary_operator=false
129+
cleanup.try_with_resource=false
130+
cleanup.unlooped_while=false
131+
cleanup.unreachable_block=false
132+
cleanup.use_anonymous_class_creation=false
133+
cleanup.use_autoboxing=false
134+
cleanup.use_blocks=true
135+
cleanup.use_blocks_only_for_return_and_throw=false
136+
cleanup.use_directly_map_method=false
137+
cleanup.use_lambda=true
138+
cleanup.use_parentheses_in_expressions=false
139+
cleanup.use_string_is_blank=false
140+
cleanup.use_this_for_non_static_field_access=false
141+
cleanup.use_this_for_non_static_field_access_only_if_necessary=true
142+
cleanup.use_this_for_non_static_method_access=false
143+
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
144+
cleanup.use_unboxing=false
145+
cleanup.use_var=false
146+
cleanup.useless_continue=false
147+
cleanup.useless_return=false
148+
cleanup.valueof_rather_than_instantiation=false
149+
cleanup_profile=_Eclipse [built-in] custom
150+
cleanup_settings_version=2
1151
eclipse.preferences.version=1
2152
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
3153
formatter_profile=org.eclipse.jdt.ui.default.eclipse_profile

e4tools/bundles/org.eclipse.e4.tools.persistence/model/persistence.genmodel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
modelPluginID="org.eclipse.e4.tools.persistence" modelName="Persistence" editPluginClass="org.eclipse.e4.tools.persistence.provider.PersistenceEditPlugin"
66
editorPluginClass="org.eclipse.e4.tools.persistence.presentation.PersistenceEditorPlugin"
77
updateClasspath="false" nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
8-
codeFormatting="true" commentFormatting="true" testsDirectory="" testSuiteClass="org.eclipse.e4.tools.internal.persistence.tests.PersistenceAllTests"
9-
importerID="org.eclipse.emf.importer.ecore" complianceLevel="11.0" copyrightFields="false"
8+
codeFormatting="true" testsDirectory="" testSuiteClass="org.eclipse.e4.tools.internal.persistence.tests.PersistenceAllTests"
9+
importerID="org.eclipse.emf.importer.ecore" complianceLevel="21.0" copyrightFields="false"
1010
editPluginID="org.eclipse.e4.tools.persistence.edit" editorPluginID="org.eclipse.e4.tools.persistence.edit"
1111
usedGenPackages="../../org.eclipse.e4.ui.model.workbench/model/UIElements.genmodel#//application"
1212
interfaceNamePattern="I{0}" classNamePattern="{0}" operationReflection="true"

e4tools/bundles/org.eclipse.e4.tools.persistence/src/org/eclipse/e4/tools/internal/persistence/impl/PersistencePackage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ public static IPersistencePackage init() {
9292

9393
// Obtain or create and register package
9494
Object registeredPersistencePackage = EPackage.Registry.INSTANCE.get(eNS_URI);
95-
PersistencePackage thePersistencePackage = registeredPersistencePackage instanceof PersistencePackage
96-
? (PersistencePackage) registeredPersistencePackage
95+
PersistencePackage thePersistencePackage = registeredPersistencePackage instanceof PersistencePackage p
96+
? p
9797
: new PersistencePackage();
9898

9999
isInited = true;

0 commit comments

Comments
 (0)