Skip to content

Commit 27438b5

Browse files
committed
Regenerate the EMF models of org.eclipse.e4.ui.model.workbench
- Fix spelling mistakes in the Ecore model so they don't reappear in the generated code. - Change the GenModel compliance level to 21. - Configure the project-specific cleanup action to include instanceof cleanup which is not part of the `Eclipse [built-in]` profile so that the cleanup of the generated code includes that action.
1 parent fbad80e commit 27438b5

File tree

10 files changed

+241
-28
lines changed

10 files changed

+241
-28
lines changed

bundles/org.eclipse.e4.ui.model.workbench/.settings/org.eclipse.jdt.ui.prefs

Lines changed: 151 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
@@ -25,6 +175,7 @@ sp_cleanup.correct_indentation=true
25175
sp_cleanup.format_source_code=true
26176
sp_cleanup.format_source_code_changes_only=true
27177
sp_cleanup.insert_inferred_type_arguments=false
178+
sp_cleanup.instanceof=true
28179
sp_cleanup.make_local_variable_final=false
29180
sp_cleanup.make_parameters_final=false
30181
sp_cleanup.make_private_fields_final=false

bundles/org.eclipse.e4.ui.model.workbench/model/ModelFragment.genmodel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
modelPluginID="org.eclipse.e4.ui.model.workbench" modelName="ModelFragment" updateClasspath="false"
66
nonNLSMarkers="true" rootExtendsInterface="" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container"
77
suppressEMFTypes="true" suppressEMFMetaData="true" codeFormatting="true" testsDirectory=""
8-
importerID="org.eclipse.emf.importer.ecore" complianceLevel="8.0" copyrightFields="false"
8+
importerID="org.eclipse.emf.importer.ecore" complianceLevel="21.0" copyrightFields="false"
99
usedGenPackages="UIElements.genmodel#//application" interfaceNamePattern="M{0}"
1010
operationReflection="true" importOrganizing="true" cleanup="true">
1111
<foreignModel>ModelFragment.ecore</foreignModel>

bundles/org.eclipse.e4.ui.model.workbench/model/UIElements.ecore

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,18 @@
6767
</eStructuralFeatures>
6868
<eStructuralFeatures xsi:type="ecore:EAttribute" name="tags" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
6969
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
70-
<details key="documentation" value="&lt;p>&#xD;&#xA;Tags are a list of Strings that are persistent parts of the UI Model. They can be used to 'refine' a particular&#xD;&#xA;model element, supplying extra 'meta' information. These tags interact with the CSS engine so that it's&#xD;&#xA;possible to write CSS specific to a particular tag. The platform currently uses this mechanism to cause the&#xD;&#xA;color change in the stack comtaining the currently active part&#xD;&#xA;&lt;/p>"/>
70+
<details key="documentation" value="&lt;p>&#xA;Tags are a list of Strings that are persistent parts of the UI Model. They can be used to 'refine' a particular&#xA;model element, supplying extra 'meta' information. These tags interact with the CSS engine so that it's&#xA;possible to write CSS specific to a particular tag. The platform currently uses this mechanism to cause the&#xA;color change in the stack containing the currently active part&#xA;&lt;/p>"/>
7171
</eAnnotations>
7272
</eStructuralFeatures>
7373
<eStructuralFeatures xsi:type="ecore:EAttribute" name="contributorURI" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
7474
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
75-
<details key="documentation" value="&lt;p>&#xD;&#xA;This field is used to track the bundle (if any) from which the UI element was&#xD;&#xA;derived in order to faciliate its removal should the bundle go away or be updated.&#xD;&#xA;&lt;/p>"/>
75+
<details key="documentation" value="&lt;p>&#xA;This field is used to track the bundle (if any) from which the UI element was&#xA;derived in order to facilitate its removal should the bundle go away or be updated.&#xA;&lt;/p>"/>
7676
</eAnnotations>
7777
</eStructuralFeatures>
7878
<eStructuralFeatures xsi:type="ecore:EReference" name="transientData" upperBound="-1"
7979
eType="#//StringToObjectMap" transient="true" containment="true">
8080
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
81-
<details key="documentation" value="&lt;p>&#xD;&#xA;This is a String to Object map into which any desired runtime information realted to a particular element&#xD;&#xA;may be stored. It is &lt;i>not&lt;/i> persisted across sessions so it is not necessary that the 'values' be&#xD;&#xA;serializable.&#xD;&#xA;&lt;/p>"/>
81+
<details key="documentation" value="&lt;p>&#xA;This is a String to Object map into which any desired runtime information related to a particular element&#xA;may be stored. It is &lt;i>not&lt;/i> persisted across sessions so it is not necessary that the 'values' be&#xA;serializable.&#xA;&lt;/p>"/>
8282
</eAnnotations>
8383
</eStructuralFeatures>
8484
</eClassifiers>
@@ -418,7 +418,7 @@
418418
<eStructuralFeatures xsi:type="ecore:EAttribute" name="toBeRendered" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
419419
defaultValueLiteral="true">
420420
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
421-
<details key="documentation" value="&lt;p>&#xD;&#xA;This field controls whether the given UIElement should be displayed within&#xD;&#xA;the application. Note that due to lazy loading it is possible to have this field&#xD;&#xA;set to true but to not have actually rendered the element itself (it does show up&#xD;&#xA;as a tab on the appropiate stack but will only be rendered when that tab is&#xD;&#xA;selected.&#xD;&#xA;&lt;/p>"/>
421+
<details key="documentation" value="&lt;p>&#xA;This field controls whether the given UIElement should be displayed within&#xA;the application. Note that due to lazy loading it is possible to have this field&#xA;set to true but to not have actually rendered the element itself (it does show up&#xA;as a tab on the appropriate stack but will only be rendered when that tab is&#xA;selected.&#xA;&lt;/p>"/>
422422
</eAnnotations>
423423
</eStructuralFeatures>
424424
<eStructuralFeatures xsi:type="ecore:EAttribute" name="onTop" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
@@ -429,7 +429,7 @@
429429
<eStructuralFeatures xsi:type="ecore:EAttribute" name="visible" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
430430
defaultValueLiteral="true">
431431
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
432-
<details key="documentation" value="&lt;p>&#xD;&#xA;This field determines whether or not the given UIElement appears in the presentation&#xD;&#xA;or whether it should be 'cached' for specialized use. Under normal circumstances&#xD;&#xA;this flag should always be 'true'.&#xD;&#xA;&lt;/p>&lt;p>&#xD;&#xA;The MinMaxAddon uses this flag for example when a stack becomes minimized. By&#xD;&#xA;setting the flag to false the stack's widget is cleanly removed from the UI but&#xD;&#xA;is still 'rendered'. Once the widget has been cached the minimized stack can then&#xD;&#xA;display the widget using its own technques.&#xD;&#xA;&lt;/p>"/>
432+
<details key="documentation" value="&lt;p>&#xA;This field determines whether or not the given UIElement appears in the presentation&#xA;or whether it should be 'cached' for specialized use. Under normal circumstances&#xA;this flag should always be 'true'.&#xA;&lt;/p>&lt;p>&#xA;The MinMaxAddon uses this flag for example when a stack becomes minimized. By&#xA;setting the flag to false the stack's widget is cleanly removed from the UI but&#xA;is still 'rendered'. Once the widget has been cached the minimized stack can then&#xA;display the widget using its own techniques.&#xA;&lt;/p>"/>
433433
</eAnnotations>
434434
</eStructuralFeatures>
435435
<eStructuralFeatures xsi:type="ecore:EReference" name="parent" eOpposite="#//ui/ElementContainer/children">
@@ -442,13 +442,13 @@
442442
</eStructuralFeatures>
443443
<eStructuralFeatures xsi:type="ecore:EAttribute" name="containerData" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
444444
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
445-
<details key="documentation" value="&lt;p>&#xD;&#xA;This is a persistend field that may be used by the &lt;b>parent&lt;/b> element's renderer&#xD;&#xA;to maintain any data that it needs to control the container. For example this is where&#xD;&#xA;the SashRenderer stores the 'weight' of a particular element.&#xD;&#xA;&lt;/p> &lt;p>&#xD;&#xA;&lt;b>NOTE:&lt;/b> This field is effectively deprecated in favor of the parent renderer&#xD;&#xA;simply adding a new keyed value to the UIElement's 'persistentData' map.&#xD;&#xA;&lt;/p>"/>
445+
<details key="documentation" value="&lt;p>&#xA;This is a persistent field that may be used by the &lt;b>parent&lt;/b> element's renderer&#xA;to maintain any data that it needs to control the container. For example this is where&#xA;the SashRenderer stores the 'weight' of a particular element.&#xA;&lt;/p> &lt;p>&#xA;&lt;b>NOTE:&lt;/b> This field is effectively deprecated in favor of the parent renderer&#xA;simply adding a new keyed value to the UIElement's 'persistentData' map.&#xA;&lt;/p>"/>
446446
</eAnnotations>
447447
</eStructuralFeatures>
448448
<eStructuralFeatures xsi:type="ecore:EReference" name="curSharedRef" eType="#//ui/advanced/Placeholder"
449449
transient="true" derived="true">
450450
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
451-
<details key="documentation" value="&lt;p>&#xD;&#xA;This is a transient (i.e. non-persisted) field which is used in conjunction with&#xD;&#xA;MPlaceholders which are used to share elements actoss multiple perspectives. This&#xD;&#xA;field will point back to the MPlaceholder (if any) currently hosting this one.&#xD;&#xA;&lt;/p>"/>
451+
<details key="documentation" value="&lt;p>&#xA;This is a transient (i.e. non-persisted) field which is used in conjunction with&#xA;MPlaceholders which are used to share elements across multiple perspectives. This&#xA;field will point back to the MPlaceholder (if any) currently hosting this one.&#xA;&lt;/p>"/>
452452
</eAnnotations>
453453
</eStructuralFeatures>
454454
<eStructuralFeatures xsi:type="ecore:EReference" name="visibleWhen" eType="#//ui/Expression"

bundles/org.eclipse.e4.ui.model.workbench/model/UIElements.genmodel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
updateClasspath="false" nonNLSMarkers="true" rootExtendsInterface="" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container"
77
suppressEMFTypes="true" suppressEMFMetaData="true" featureMapWrapperInternalInterface=""
88
codeFormatting="true" testsDirectory="" importerID="org.eclipse.emf.importer.ecore"
9-
complianceLevel="8.0" copyrightFields="false" interfaceNamePattern="M{0}" operationReflection="true"
9+
complianceLevel="21.0" copyrightFields="false" interfaceNamePattern="M{0}" operationReflection="true"
1010
importOrganizing="true" cleanup="true">
1111
<foreignModel>UIElements.ecore</foreignModel>
1212
<genPackages prefix="Application" basePackage="org.eclipse.e4.ui.model" disposableProviderFactory="true"

bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/basic/impl/PartImpl.java

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,8 +1334,9 @@ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTarg
13341334

13351335
/**
13361336
* <!-- begin-user-doc -->
1337+
* If the method {@link #toStringGen()} below changes, please ensure that this is updated.
13371338
* <!-- end-user-doc -->
1338-
* @generated
1339+
* @generated NOT
13391340
*/
13401341
@Override
13411342
public String toString() {
@@ -1382,4 +1383,41 @@ public String toString() {
13821383
return result.toString();
13831384
}
13841385

1385-
} //PartImpl
1386+
/**
1387+
* <!-- begin-user-doc -->
1388+
* If the method below changes, please ensure that {@link #toString()} is updated.
1389+
* <!-- end-user-doc -->
1390+
* @generated
1391+
*/
1392+
@Override
1393+
public String toStringGen() {
1394+
if (eIsProxy()) {
1395+
return super.toString();
1396+
}
1397+
1398+
StringBuilder result = new StringBuilder(super.toString());
1399+
result.append(" (contributionURI: "); //$NON-NLS-1$
1400+
result.append(contributionURI);
1401+
result.append(", object: "); //$NON-NLS-1$
1402+
result.append(object);
1403+
result.append(", context: "); //$NON-NLS-1$
1404+
result.append(context);
1405+
result.append(", variables: "); //$NON-NLS-1$
1406+
result.append(variables);
1407+
result.append(", label: "); //$NON-NLS-1$
1408+
result.append(label);
1409+
result.append(", iconURI: "); //$NON-NLS-1$
1410+
result.append(iconURI);
1411+
result.append(", tooltip: "); //$NON-NLS-1$
1412+
result.append(tooltip);
1413+
result.append(", dirty: "); //$NON-NLS-1$
1414+
result.append(dirty);
1415+
result.append(", closeable: "); //$NON-NLS-1$
1416+
result.append(closeable);
1417+
result.append(", description: "); //$NON-NLS-1$
1418+
result.append(description);
1419+
result.append(')');
1420+
return result.toString();
1421+
}
1422+
1423+
} // PartImpl

bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/basic/impl/WindowImpl.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,29 +1428,25 @@ public String toString() {
14281428
result.append(", x: "); //$NON-NLS-1$
14291429
if (xESet) {
14301430
result.append(x);
1431-
}
1432-
else {
1431+
} else {
14331432
result.append("<unset>"); //$NON-NLS-1$
14341433
}
14351434
result.append(", y: "); //$NON-NLS-1$
14361435
if (yESet) {
14371436
result.append(y);
1438-
}
1439-
else {
1437+
} else {
14401438
result.append("<unset>"); //$NON-NLS-1$
14411439
}
14421440
result.append(", width: "); //$NON-NLS-1$
14431441
if (widthESet) {
14441442
result.append(width);
1445-
}
1446-
else {
1443+
} else {
14471444
result.append("<unset>"); //$NON-NLS-1$
14481445
}
14491446
result.append(", height: "); //$NON-NLS-1$
14501447
if (heightESet) {
14511448
result.append(height);
1452-
}
1453-
else {
1449+
} else {
14541450
result.append("<unset>"); //$NON-NLS-1$
14551451
}
14561452
result.append(')');

0 commit comments

Comments
 (0)