Skip to content

Commit 5e62200

Browse files
authored
Provide an example of extending CMake project type in Core Build (#1052)
In issue #1000 a lot of the work is on exposing a better API to ISVs. This new project serves these purposes: - Ensure the exposed API works in practice - Example for ISVs to use if they want to extend CMake - Provide an in-tree example of the API in use, so future editors of CDT have better chance of understanding *why* items are done as they are.
1 parent 978eea5 commit 5e62200

28 files changed

+1382
-0
lines changed

NewAndNoteworthy/CDT-12.0.md

+8
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ Starting in CDT 12, the Terminal will now default to UTF-8.
6363

6464
# API Changes, current and planned
6565

66+
## CMake Support easier for extenders and ISVs
67+
68+
Improvements to the API for CMake has made it easier to extend and specialize CMake for ISVs.
69+
A fully worked example demonstrating the support is now provided in the CDT source in [org.eclipse.cdt.cmake.example](https://github.com/eclipse-cdt/cdt/tree/main/cmake/org.eclipse.cdt.cmake.example).
70+
This example demonstrates the API, and how to contribute a new project wizard to make such a project.
71+
72+
<p align="center"><img src="images/CDT-12.0-cmake-example-project-for-isvs.png"></p>
73+
6674
## Breaking API changes
6775

6876
Please see [CHANGELOG-API](CHANGELOG-API.md) for details on the breaking API changes in this release as well as future planned API changes.
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
4+
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
5+
<classpathentry kind="src" path="src"/>
6+
<classpathentry kind="output" path="bin"/>
7+
</classpath>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>org.eclipse.cdt.cmake.example</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.pde.ManifestBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.pde.SchemaBuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
</buildSpec>
24+
<natures>
25+
<nature>org.eclipse.pde.PluginNature</nature>
26+
<nature>org.eclipse.jdt.core.javanature</nature>
27+
</natures>
28+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8

cmake/org.eclipse.cdt.cmake.example/.settings/org.eclipse.jdt.core.prefs

+486
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=warning
3+
org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
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.always_use_blocks=true
12+
cleanup.always_use_parentheses_in_expressions=false
13+
cleanup.always_use_this_for_non_static_field_access=false
14+
cleanup.always_use_this_for_non_static_method_access=false
15+
cleanup.array_with_curly=false
16+
cleanup.arrays_fill=false
17+
cleanup.bitwise_conditional_expression=false
18+
cleanup.boolean_literal=false
19+
cleanup.boolean_value_rather_than_comparison=false
20+
cleanup.break_loop=false
21+
cleanup.collection_cloning=false
22+
cleanup.comparing_on_criteria=false
23+
cleanup.comparison_statement=false
24+
cleanup.controlflow_merge=false
25+
cleanup.convert_functional_interfaces=false
26+
cleanup.convert_to_enhanced_for_loop=false
27+
cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true
28+
cleanup.convert_to_switch_expressions=false
29+
cleanup.correct_indentation=false
30+
cleanup.do_while_rather_than_while=true
31+
cleanup.double_negation=false
32+
cleanup.else_if=false
33+
cleanup.embedded_if=false
34+
cleanup.evaluate_nullable=false
35+
cleanup.extract_increment=false
36+
cleanup.format_source_code=true
37+
cleanup.format_source_code_changes_only=false
38+
cleanup.hash=false
39+
cleanup.if_condition=false
40+
cleanup.insert_inferred_type_arguments=false
41+
cleanup.instanceof=false
42+
cleanup.instanceof_keyword=false
43+
cleanup.invert_equals=false
44+
cleanup.join=false
45+
cleanup.lazy_logical_operator=false
46+
cleanup.make_local_variable_final=true
47+
cleanup.make_parameters_final=false
48+
cleanup.make_private_fields_final=true
49+
cleanup.make_type_abstract_if_missing_method=false
50+
cleanup.make_variable_declarations_final=false
51+
cleanup.map_cloning=false
52+
cleanup.merge_conditional_blocks=false
53+
cleanup.multi_catch=false
54+
cleanup.never_use_blocks=false
55+
cleanup.never_use_parentheses_in_expressions=true
56+
cleanup.no_string_creation=false
57+
cleanup.no_super=false
58+
cleanup.number_suffix=false
59+
cleanup.objects_equals=false
60+
cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false
61+
cleanup.operand_factorization=false
62+
cleanup.organize_imports=true
63+
cleanup.overridden_assignment=false
64+
cleanup.plain_replacement=false
65+
cleanup.precompile_regex=false
66+
cleanup.primitive_comparison=false
67+
cleanup.primitive_parsing=false
68+
cleanup.primitive_rather_than_wrapper=false
69+
cleanup.primitive_serialization=false
70+
cleanup.pull_out_if_from_if_else=false
71+
cleanup.pull_up_assignment=false
72+
cleanup.push_down_negation=false
73+
cleanup.qualify_static_field_accesses_with_declaring_class=false
74+
cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
75+
cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
76+
cleanup.qualify_static_member_accesses_with_declaring_class=false
77+
cleanup.qualify_static_method_accesses_with_declaring_class=false
78+
cleanup.reduce_indentation=false
79+
cleanup.redundant_comparator=false
80+
cleanup.redundant_falling_through_block_end=false
81+
cleanup.remove_private_constructors=true
82+
cleanup.remove_redundant_modifiers=false
83+
cleanup.remove_redundant_semicolons=true
84+
cleanup.remove_redundant_type_arguments=true
85+
cleanup.remove_trailing_whitespaces=true
86+
cleanup.remove_trailing_whitespaces_all=true
87+
cleanup.remove_trailing_whitespaces_ignore_empty=false
88+
cleanup.remove_unnecessary_array_creation=false
89+
cleanup.remove_unnecessary_casts=true
90+
cleanup.remove_unnecessary_nls_tags=false
91+
cleanup.remove_unused_imports=true
92+
cleanup.remove_unused_local_variables=false
93+
cleanup.remove_unused_method_parameters=false
94+
cleanup.remove_unused_private_fields=true
95+
cleanup.remove_unused_private_members=false
96+
cleanup.remove_unused_private_methods=true
97+
cleanup.remove_unused_private_types=true
98+
cleanup.return_expression=false
99+
cleanup.simplify_lambda_expression_and_method_ref=false
100+
cleanup.single_used_field=false
101+
cleanup.sort_members=false
102+
cleanup.sort_members_all=false
103+
cleanup.standard_comparison=false
104+
cleanup.static_inner_class=false
105+
cleanup.strictly_equal_or_different=false
106+
cleanup.stringbuffer_to_stringbuilder=false
107+
cleanup.stringbuilder=false
108+
cleanup.stringbuilder_for_local_vars=true
109+
cleanup.stringconcat_to_textblock=false
110+
cleanup.substring=false
111+
cleanup.switch=false
112+
cleanup.system_property=false
113+
cleanup.system_property_boolean=false
114+
cleanup.system_property_file_encoding=false
115+
cleanup.system_property_file_separator=false
116+
cleanup.system_property_line_separator=false
117+
cleanup.system_property_path_separator=false
118+
cleanup.ternary_operator=false
119+
cleanup.try_with_resource=false
120+
cleanup.unlooped_while=false
121+
cleanup.unreachable_block=false
122+
cleanup.use_anonymous_class_creation=false
123+
cleanup.use_autoboxing=false
124+
cleanup.use_blocks=false
125+
cleanup.use_blocks_only_for_return_and_throw=false
126+
cleanup.use_directly_map_method=false
127+
cleanup.use_lambda=true
128+
cleanup.use_parentheses_in_expressions=false
129+
cleanup.use_string_is_blank=false
130+
cleanup.use_this_for_non_static_field_access=false
131+
cleanup.use_this_for_non_static_field_access_only_if_necessary=true
132+
cleanup.use_this_for_non_static_method_access=false
133+
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
134+
cleanup.use_unboxing=false
135+
cleanup.use_var=false
136+
cleanup.useless_continue=false
137+
cleanup.useless_return=false
138+
cleanup.valueof_rather_than_instantiation=false
139+
cleanup_profile=_CDT
140+
cleanup_settings_version=2
141+
eclipse.preferences.version=1
142+
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
143+
formatter_profile=_CDT
144+
formatter_settings_version=14
145+
internal.default.compliance=user
146+
org.eclipse.jdt.ui.exception.name=e
147+
org.eclipse.jdt.ui.gettersetter.use.is=true
148+
org.eclipse.jdt.ui.ignorelowercasenames=true
149+
org.eclipse.jdt.ui.importorder=java;javax;org;com;
150+
org.eclipse.jdt.ui.keywordthis=false
151+
org.eclipse.jdt.ui.ondemandthreshold=1000
152+
org.eclipse.jdt.ui.overrideannotation=true
153+
org.eclipse.jdt.ui.staticondemandthreshold=1000
154+
org.eclipse.jdt.ui.text.custom_code_templates=
155+
sp_cleanup.add_default_serial_version_id=true
156+
sp_cleanup.add_generated_serial_version_id=false
157+
sp_cleanup.add_missing_annotations=true
158+
sp_cleanup.add_missing_deprecated_annotations=true
159+
sp_cleanup.add_missing_methods=false
160+
sp_cleanup.add_missing_nls_tags=false
161+
sp_cleanup.add_missing_override_annotations=true
162+
sp_cleanup.add_missing_override_annotations_interface_methods=true
163+
sp_cleanup.add_serial_version_id=false
164+
sp_cleanup.always_use_blocks=true
165+
sp_cleanup.always_use_parentheses_in_expressions=false
166+
sp_cleanup.always_use_this_for_non_static_field_access=false
167+
sp_cleanup.always_use_this_for_non_static_method_access=false
168+
sp_cleanup.convert_functional_interfaces=false
169+
sp_cleanup.convert_to_enhanced_for_loop=false
170+
sp_cleanup.correct_indentation=false
171+
sp_cleanup.format_source_code=true
172+
sp_cleanup.format_source_code_changes_only=false
173+
sp_cleanup.insert_inferred_type_arguments=false
174+
sp_cleanup.make_local_variable_final=true
175+
sp_cleanup.make_parameters_final=false
176+
sp_cleanup.make_private_fields_final=true
177+
sp_cleanup.make_type_abstract_if_missing_method=false
178+
sp_cleanup.make_variable_declarations_final=false
179+
sp_cleanup.never_use_blocks=false
180+
sp_cleanup.never_use_parentheses_in_expressions=true
181+
sp_cleanup.on_save_use_additional_actions=true
182+
sp_cleanup.organize_imports=true
183+
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
184+
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
185+
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
186+
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
187+
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
188+
sp_cleanup.remove_private_constructors=true
189+
sp_cleanup.remove_redundant_modifiers=false
190+
sp_cleanup.remove_redundant_semicolons=true
191+
sp_cleanup.remove_redundant_type_arguments=true
192+
sp_cleanup.remove_trailing_whitespaces=true
193+
sp_cleanup.remove_trailing_whitespaces_all=true
194+
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
195+
sp_cleanup.remove_unnecessary_casts=true
196+
sp_cleanup.remove_unnecessary_nls_tags=false
197+
sp_cleanup.remove_unused_imports=true
198+
sp_cleanup.remove_unused_local_variables=false
199+
sp_cleanup.remove_unused_private_fields=true
200+
sp_cleanup.remove_unused_private_members=false
201+
sp_cleanup.remove_unused_private_methods=true
202+
sp_cleanup.remove_unused_private_types=true
203+
sp_cleanup.sort_members=false
204+
sp_cleanup.sort_members_all=false
205+
sp_cleanup.use_anonymous_class_creation=false
206+
sp_cleanup.use_blocks=false
207+
sp_cleanup.use_blocks_only_for_return_and_throw=false
208+
sp_cleanup.use_lambda=true
209+
sp_cleanup.use_parentheses_in_expressions=false
210+
sp_cleanup.use_this_for_non_static_field_access=false
211+
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
212+
sp_cleanup.use_this_for_non_static_method_access=false
213+
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

0 commit comments

Comments
 (0)