Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'windows')
-rw-r--r--windows/org.eclipse.cdt.msw-feature/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--windows/org.eclipse.cdt.msw-feature/feature.properties2
-rw-r--r--windows/org.eclipse.cdt.msw-feature/feature.xml17
-rw-r--r--windows/org.eclipse.cdt.msw.build.tests/.classpath2
-rw-r--r--windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.jdt.core.prefs38
-rw-r--r--windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.jdt.launching.prefs3
-rw-r--r--windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.jdt.ui.prefs80
-rw-r--r--windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.pde.prefs2
-rw-r--r--windows/org.eclipse.cdt.msw.build.tests/META-INF/MANIFEST.MF7
-rw-r--r--windows/org.eclipse.cdt.msw.build.tests/about.html14
-rw-r--r--windows/org.eclipse.cdt.msw.build.tests/build.properties5
-rw-r--r--windows/org.eclipse.cdt.msw.build.tests/plugin.properties14
-rw-r--r--windows/org.eclipse.cdt.msw.build.tests/src/org/eclipse/cdt/internal/msw/build/tests/MSVCBuildCommandParserTests.java7
-rw-r--r--windows/org.eclipse.cdt.msw.build/.classpath4
-rw-r--r--windows/org.eclipse.cdt.msw.build/.project6
-rw-r--r--windows/org.eclipse.cdt.msw.build/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--windows/org.eclipse.cdt.msw.build/.settings/org.eclipse.jdt.core.prefs38
-rw-r--r--windows/org.eclipse.cdt.msw.build/.settings/org.eclipse.jdt.ui.prefs80
-rw-r--r--windows/org.eclipse.cdt.msw.build/META-INF/MANIFEST.MF8
-rw-r--r--windows/org.eclipse.cdt.msw.build/about.html14
-rw-r--r--windows/org.eclipse.cdt.msw.build/about.ini24
-rw-r--r--windows/org.eclipse.cdt.msw.build/about.mappings9
-rw-r--r--windows/org.eclipse.cdt.msw.build/about.properties32
-rw-r--r--windows/org.eclipse.cdt.msw.build/build.properties7
-rw-r--r--windows/org.eclipse.cdt.msw.build/cdt_logo_icon32.pngbin0 -> 1885 bytes
-rw-r--r--windows/org.eclipse.cdt.msw.build/plugin.properties4
-rw-r--r--windows/org.eclipse.cdt.msw.build/plugin.xml12
-rw-r--r--windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/IVSVersionConstants.java19
-rw-r--r--windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/MSVCToolChainInfo.java49
-rw-r--r--windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/ProcessOutputUtil.java43
-rw-r--r--windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/VSInstallation.java93
-rw-r--r--windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/VSInstallationRegistry.java61
-rw-r--r--windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/VSVersionNumber.java62
-rw-r--r--windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/core/ClangClBuiltinSpecsDetector.java30
-rw-r--r--windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/Activator.java2
-rw-r--r--windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/WinEnvironmentVariableSupplier.java119
-rw-r--r--windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/core/MSVCBuildCommandParser.java105
-rw-r--r--windows/pom.xml12
39 files changed, 873 insertions, 157 deletions
diff --git a/windows/org.eclipse.cdt.msw-feature/.settings/org.eclipse.core.resources.prefs b/windows/org.eclipse.cdt.msw-feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 00000000000..99f26c0203a
--- /dev/null
+++ b/windows/org.eclipse.cdt.msw-feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/windows/org.eclipse.cdt.msw-feature/feature.properties b/windows/org.eclipse.cdt.msw-feature/feature.properties
index 029c3420ba3..88815012758 100644
--- a/windows/org.eclipse.cdt.msw-feature/feature.properties
+++ b/windows/org.eclipse.cdt.msw-feature/feature.properties
@@ -19,7 +19,7 @@
# This file should be translated.
# "featureName" property - name of the feature
-featureName=C/C++ Visual C++ Support
+featureName=C/C++ Visual C++ Support (experimental)
# "providerName" property - name of the company that provides the feature
providerName=Eclipse CDT
diff --git a/windows/org.eclipse.cdt.msw-feature/feature.xml b/windows/org.eclipse.cdt.msw-feature/feature.xml
index f6485b91333..ec631b81fbc 100644
--- a/windows/org.eclipse.cdt.msw-feature/feature.xml
+++ b/windows/org.eclipse.cdt.msw-feature/feature.xml
@@ -1,9 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2010, 2021 Contributors to the Eclipse Foundation
+
+ This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+-->
<feature
id="org.eclipse.cdt.msw"
- label="C/C++ Visual C++ Support"
- version="9.9.0.qualifier"
- provider-name="Eclipse CDT"
+ label="%featureName"
+ version="10.7.0.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.cdt.msw.build"
license-feature="org.eclipse.license"
license-feature-version="0.0.0">
diff --git a/windows/org.eclipse.cdt.msw.build.tests/.classpath b/windows/org.eclipse.cdt.msw.build.tests/.classpath
index 3e5654f17eb..a42a828e04a 100644
--- a/windows/org.eclipse.cdt.msw.build.tests/.classpath
+++ b/windows/org.eclipse.cdt.msw.build.tests/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src">
<attributes>
diff --git a/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.core.resources.prefs b/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 00000000000..99f26c0203a
--- /dev/null
+++ b/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.jdt.core.prefs b/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.jdt.core.prefs
index ad05599159f..5b1c443114d 100644
--- a/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.jdt.core.prefs
@@ -30,9 +30,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -49,6 +49,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
@@ -107,6 +108,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=igno
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@@ -144,13 +146,14 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false
org.eclipse.jdt.core.formatter.align_with_spaces=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
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=16
@@ -158,21 +161,24 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c
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_bitwise_operator=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_module_statements=16
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
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=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
@@ -264,11 +270,12 @@ 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_additive_operator=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_bitwise_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not 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
@@ -299,6 +306,8 @@ 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_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=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
@@ -323,13 +332,17 @@ 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_relational_operator=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_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=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_bitwise_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
@@ -377,6 +390,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do no
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_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=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
@@ -413,9 +428,12 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser
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_relational_operator=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_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=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
@@ -454,10 +472,14 @@ org.eclipse.jdt.core.formatter.tabulation.char=tab
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_additive_operator=true
org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.jdt.launching.prefs b/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.jdt.launching.prefs
new file mode 100644
index 00000000000..f8a131b56e0
--- /dev/null
+++ b/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.jdt.launching.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=warning
+org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.jdt.ui.prefs b/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.jdt.ui.prefs
index e44576346c4..d35ba9b5231 100644
--- a/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.jdt.ui.prefs
+++ b/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -1,3 +1,4 @@
+cleanup.add_all=false
cleanup.add_default_serial_version_id=true
cleanup.add_generated_serial_version_id=false
cleanup.add_missing_annotations=true
@@ -11,25 +12,72 @@ cleanup.always_use_blocks=true
cleanup.always_use_parentheses_in_expressions=false
cleanup.always_use_this_for_non_static_field_access=false
cleanup.always_use_this_for_non_static_method_access=false
+cleanup.array_with_curly=false
+cleanup.arrays_fill=false
+cleanup.bitwise_conditional_expression=false
+cleanup.boolean_literal=false
+cleanup.boolean_value_rather_than_comparison=false
+cleanup.break_loop=false
+cleanup.collection_cloning=false
+cleanup.comparing_on_criteria=false
+cleanup.comparison_statement=false
+cleanup.controlflow_merge=false
cleanup.convert_functional_interfaces=false
cleanup.convert_to_enhanced_for_loop=false
+cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true
+cleanup.convert_to_switch_expressions=false
cleanup.correct_indentation=false
+cleanup.do_while_rather_than_while=true
+cleanup.double_negation=false
+cleanup.else_if=false
+cleanup.embedded_if=false
+cleanup.evaluate_nullable=false
+cleanup.extract_increment=false
cleanup.format_source_code=true
cleanup.format_source_code_changes_only=false
+cleanup.hash=false
+cleanup.if_condition=false
cleanup.insert_inferred_type_arguments=false
+cleanup.instanceof=false
+cleanup.instanceof_keyword=false
+cleanup.invert_equals=false
+cleanup.join=false
+cleanup.lazy_logical_operator=false
cleanup.make_local_variable_final=true
cleanup.make_parameters_final=false
cleanup.make_private_fields_final=true
cleanup.make_type_abstract_if_missing_method=false
cleanup.make_variable_declarations_final=false
+cleanup.map_cloning=false
+cleanup.merge_conditional_blocks=false
+cleanup.multi_catch=false
cleanup.never_use_blocks=false
cleanup.never_use_parentheses_in_expressions=true
+cleanup.no_string_creation=false
+cleanup.no_super=false
+cleanup.number_suffix=false
+cleanup.objects_equals=false
+cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false
+cleanup.operand_factorization=false
cleanup.organize_imports=true
+cleanup.overridden_assignment=false
+cleanup.plain_replacement=false
+cleanup.precompile_regex=false
+cleanup.primitive_comparison=false
+cleanup.primitive_parsing=false
+cleanup.primitive_rather_than_wrapper=false
+cleanup.primitive_serialization=false
+cleanup.pull_out_if_from_if_else=false
+cleanup.pull_up_assignment=false
+cleanup.push_down_negation=false
cleanup.qualify_static_field_accesses_with_declaring_class=false
cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
cleanup.qualify_static_member_accesses_with_declaring_class=false
cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.reduce_indentation=false
+cleanup.redundant_comparator=false
+cleanup.redundant_falling_through_block_end=false
cleanup.remove_private_constructors=true
cleanup.remove_redundant_modifiers=false
cleanup.remove_redundant_semicolons=true
@@ -37,25 +85,57 @@ 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_array_creation=false
cleanup.remove_unnecessary_casts=true
cleanup.remove_unnecessary_nls_tags=false
cleanup.remove_unused_imports=true
cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_method_parameters=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.return_expression=false
+cleanup.simplify_lambda_expression_and_method_ref=false
+cleanup.single_used_field=false
cleanup.sort_members=false
cleanup.sort_members_all=false
+cleanup.standard_comparison=false
+cleanup.static_inner_class=false
+cleanup.strictly_equal_or_different=false
+cleanup.stringbuffer_to_stringbuilder=false
+cleanup.stringbuilder=false
+cleanup.stringbuilder_for_local_vars=true
+cleanup.stringconcat_to_textblock=false
+cleanup.substring=false
+cleanup.switch=false
+cleanup.system_property=false
+cleanup.system_property_boolean=false
+cleanup.system_property_file_encoding=false
+cleanup.system_property_file_separator=false
+cleanup.system_property_line_separator=false
+cleanup.system_property_path_separator=false
+cleanup.ternary_operator=false
+cleanup.try_with_resource=false
+cleanup.unlooped_while=false
+cleanup.unreachable_block=false
cleanup.use_anonymous_class_creation=false
+cleanup.use_autoboxing=false
cleanup.use_blocks=false
cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_directly_map_method=false
cleanup.use_lambda=true
cleanup.use_parentheses_in_expressions=false
+cleanup.use_string_is_blank=false
cleanup.use_this_for_non_static_field_access=false
cleanup.use_this_for_non_static_field_access_only_if_necessary=true
cleanup.use_this_for_non_static_method_access=false
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_unboxing=false
+cleanup.use_var=false
+cleanup.useless_continue=false
+cleanup.useless_return=false
+cleanup.valueof_rather_than_instantiation=false
cleanup_profile=_CDT
cleanup_settings_version=2
eclipse.preferences.version=1
diff --git a/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.pde.prefs b/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.pde.prefs
index d2dc703ba9e..51a63ec9988 100644
--- a/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.pde.prefs
+++ b/windows/org.eclipse.cdt.msw.build.tests/.settings/org.eclipse.pde.prefs
@@ -19,7 +19,7 @@ compilers.p.missing-version-import-package=2
compilers.p.missing-version-require-bundle=2
compilers.p.no-required-att=0
compilers.p.no.automatic.module=1
-compilers.p.not-externalized-att=1
+compilers.p.not-externalized-att=2
compilers.p.service.component.without.lazyactivation=1
compilers.p.unknown-attribute=1
compilers.p.unknown-class=1
diff --git a/windows/org.eclipse.cdt.msw.build.tests/META-INF/MANIFEST.MF b/windows/org.eclipse.cdt.msw.build.tests/META-INF/MANIFEST.MF
index 3b37214829d..9e7fd218125 100644
--- a/windows/org.eclipse.cdt.msw.build.tests/META-INF/MANIFEST.MF
+++ b/windows/org.eclipse.cdt.msw.build.tests/META-INF/MANIFEST.MF
@@ -1,11 +1,11 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: MSVC Build Integration Plug-in Tests
+Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.msw.build.tests
Bundle-Version: 1.0.0.qualifier
-Bundle-Vendor: Eclipse CDT
+Bundle-Vendor: %providerName
Automatic-Module-Name: org.eclipse.cdt.msw.build.tests
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.15.0",
org.eclipse.core.resources;bundle-version="3.13.0",
org.eclipse.cdt.core;bundle-version="6.8.0",
@@ -14,3 +14,4 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.15.0",
org.junit,
org.eclipse.cdt.msw.build
Export-Package: org.eclipse.cdt.internal.msw.build.tests;x-internal:=true
+Bundle-Localization: plugin
diff --git a/windows/org.eclipse.cdt.msw.build.tests/about.html b/windows/org.eclipse.cdt.msw.build.tests/about.html
index 164f781a8fd..b3134865230 100644
--- a/windows/org.eclipse.cdt.msw.build.tests/about.html
+++ b/windows/org.eclipse.cdt.msw.build.tests/about.html
@@ -1,10 +1,11 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
+
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>About</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <title>About</title>
</head>
+
<body lang="EN-US">
<h2>About This Content</h2>
@@ -16,7 +17,7 @@
(&quot;Content&quot;). Unless otherwise indicated below, the Content
is provided to you under the terms and conditions of the Eclipse
Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is
- available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
+ available at <a href="https://www.eclipse.org/legal/epl-2.0">https://www.eclipse.org/legal/epl-2.0</a>.
For purposes of the EPL, &quot;Program&quot; will mean the Content.
</p>
@@ -29,8 +30,9 @@
license exists, contact the Redistributor. Unless otherwise indicated
below, the terms and conditions of the EPL still apply to any source
code in the Content and such source code may be obtained at <a
- href="http://www.eclipse.org/">http://www.eclipse.org</a>.
+ href="https://www.eclipse.org/">https://www.eclipse.org</a>.
</p>
</body>
+
</html> \ No newline at end of file
diff --git a/windows/org.eclipse.cdt.msw.build.tests/build.properties b/windows/org.eclipse.cdt.msw.build.tests/build.properties
index 34d2e4d2dad..86cda4414f3 100644
--- a/windows/org.eclipse.cdt.msw.build.tests/build.properties
+++ b/windows/org.eclipse.cdt.msw.build.tests/build.properties
@@ -1,4 +1,7 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .
+ plugin.properties,\
+ .,\
+ about.html
+src.includes = about.html
diff --git a/windows/org.eclipse.cdt.msw.build.tests/plugin.properties b/windows/org.eclipse.cdt.msw.build.tests/plugin.properties
new file mode 100644
index 00000000000..5374456e6ab
--- /dev/null
+++ b/windows/org.eclipse.cdt.msw.build.tests/plugin.properties
@@ -0,0 +1,14 @@
+##################################################################################
+# Copyright (c) 2020 Torbjörn Svensson and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License 2.0 which accompanies this distribution, and is
+# available at https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Torbjörn Svensson - initial API and implementation
+##################################################################################
+
+pluginName = MSVC Build Integration Plug-in Tests
+providerName = Eclipse CDT
diff --git a/windows/org.eclipse.cdt.msw.build.tests/src/org/eclipse/cdt/internal/msw/build/tests/MSVCBuildCommandParserTests.java b/windows/org.eclipse.cdt.msw.build.tests/src/org/eclipse/cdt/internal/msw/build/tests/MSVCBuildCommandParserTests.java
index b0fd474150b..87e86fed4b1 100644
--- a/windows/org.eclipse.cdt.msw.build.tests/src/org/eclipse/cdt/internal/msw/build/tests/MSVCBuildCommandParserTests.java
+++ b/windows/org.eclipse.cdt.msw.build.tests/src/org/eclipse/cdt/internal/msw/build/tests/MSVCBuildCommandParserTests.java
@@ -231,7 +231,7 @@ public class MSVCBuildCommandParserTests {
}
/**
- * Parse /imsvc (clang-cl)
+ * Parse /imsvc, /clang:isystem (clang-cl)
*/
@Test
public void testCIncludePathEntry_ClangCLSystemIncludePaths() throws Exception {
@@ -252,7 +252,8 @@ public class MSVCBuildCommandParserTests {
parser.startup(cfgDescription, null);
parser.processLine("cl" + " /imsvcC:\\path0 " + " /imsvc C:\\path1 " + " /imsvc\"C:\\path with spaces\""
+ " /imsvc\"C:\\backslash at end\\\\\"" + " /imsvc\"..\\..\\relative\""
- + " /imsvc\"..\\..\\relative with spaces\"" + " file.cpp");
+ + " /imsvc\"..\\..\\relative with spaces\"" + " /clang:-isystemC:\\path2 "
+ + " /clang:-isystem\"C:\\path with spaces2\"" + " file.cpp");
parser.shutdown();
// check populated entries
@@ -273,6 +274,8 @@ public class MSVCBuildCommandParserTests {
assertEquals(
new CIncludePathEntry(project.getLocation().removeLastSegments(2).append("relative with spaces"), 0),
entries.get(5));
+ assertEquals(new CIncludePathEntry("C:/path2", 0), entries.get(6));
+ assertEquals(new CIncludePathEntry("C:/path with spaces2", 0), entries.get(7));
}
/**
diff --git a/windows/org.eclipse.cdt.msw.build/.classpath b/windows/org.eclipse.cdt.msw.build/.classpath
index 22f30643cba..e801ebfb468 100644
--- a/windows/org.eclipse.cdt.msw.build/.classpath
+++ b/windows/org.eclipse.cdt.msw.build/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/windows/org.eclipse.cdt.msw.build/.project b/windows/org.eclipse.cdt.msw.build/.project
index e97910dcff7..e159b8c2d70 100644
--- a/windows/org.eclipse.cdt.msw.build/.project
+++ b/windows/org.eclipse.cdt.msw.build/.project
@@ -20,9 +20,15 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
</natures>
</projectDescription>
diff --git a/windows/org.eclipse.cdt.msw.build/.settings/org.eclipse.core.resources.prefs b/windows/org.eclipse.cdt.msw.build/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 00000000000..99f26c0203a
--- /dev/null
+++ b/windows/org.eclipse.cdt.msw.build/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/windows/org.eclipse.cdt.msw.build/.settings/org.eclipse.jdt.core.prefs b/windows/org.eclipse.cdt.msw.build/.settings/org.eclipse.jdt.core.prefs
index 2b6ecff8a01..e3a8104f9ca 100644
--- a/windows/org.eclipse.cdt.msw.build/.settings/org.eclipse.jdt.core.prefs
+++ b/windows/org.eclipse.cdt.msw.build/.settings/org.eclipse.jdt.core.prefs
@@ -30,9 +30,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -49,6 +49,7 @@ 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.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
@@ -107,6 +108,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=igno
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@@ -144,13 +146,14 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false
org.eclipse.jdt.core.formatter.align_with_spaces=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
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=16
@@ -158,21 +161,24 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c
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_bitwise_operator=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_module_statements=16
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
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=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
@@ -264,11 +270,12 @@ 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_additive_operator=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_bitwise_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not 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
@@ -299,6 +306,8 @@ 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_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=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
@@ -323,13 +332,17 @@ 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_relational_operator=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_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=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_bitwise_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
@@ -377,6 +390,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do no
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_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=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
@@ -413,9 +428,12 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser
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_relational_operator=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_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=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
@@ -454,10 +472,14 @@ org.eclipse.jdt.core.formatter.tabulation.char=tab
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_additive_operator=true
org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/windows/org.eclipse.cdt.msw.build/.settings/org.eclipse.jdt.ui.prefs b/windows/org.eclipse.cdt.msw.build/.settings/org.eclipse.jdt.ui.prefs
index e44576346c4..d35ba9b5231 100644
--- a/windows/org.eclipse.cdt.msw.build/.settings/org.eclipse.jdt.ui.prefs
+++ b/windows/org.eclipse.cdt.msw.build/.settings/org.eclipse.jdt.ui.prefs
@@ -1,3 +1,4 @@
+cleanup.add_all=false
cleanup.add_default_serial_version_id=true
cleanup.add_generated_serial_version_id=false
cleanup.add_missing_annotations=true
@@ -11,25 +12,72 @@ cleanup.always_use_blocks=true
cleanup.always_use_parentheses_in_expressions=false
cleanup.always_use_this_for_non_static_field_access=false
cleanup.always_use_this_for_non_static_method_access=false
+cleanup.array_with_curly=false
+cleanup.arrays_fill=false
+cleanup.bitwise_conditional_expression=false
+cleanup.boolean_literal=false
+cleanup.boolean_value_rather_than_comparison=false
+cleanup.break_loop=false
+cleanup.collection_cloning=false
+cleanup.comparing_on_criteria=false
+cleanup.comparison_statement=false
+cleanup.controlflow_merge=false
cleanup.convert_functional_interfaces=false
cleanup.convert_to_enhanced_for_loop=false
+cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true
+cleanup.convert_to_switch_expressions=false
cleanup.correct_indentation=false
+cleanup.do_while_rather_than_while=true
+cleanup.double_negation=false
+cleanup.else_if=false
+cleanup.embedded_if=false
+cleanup.evaluate_nullable=false
+cleanup.extract_increment=false
cleanup.format_source_code=true
cleanup.format_source_code_changes_only=false
+cleanup.hash=false
+cleanup.if_condition=false
cleanup.insert_inferred_type_arguments=false
+cleanup.instanceof=false
+cleanup.instanceof_keyword=false
+cleanup.invert_equals=false
+cleanup.join=false
+cleanup.lazy_logical_operator=false
cleanup.make_local_variable_final=true
cleanup.make_parameters_final=false
cleanup.make_private_fields_final=true
cleanup.make_type_abstract_if_missing_method=false
cleanup.make_variable_declarations_final=false
+cleanup.map_cloning=false
+cleanup.merge_conditional_blocks=false
+cleanup.multi_catch=false
cleanup.never_use_blocks=false
cleanup.never_use_parentheses_in_expressions=true
+cleanup.no_string_creation=false
+cleanup.no_super=false
+cleanup.number_suffix=false
+cleanup.objects_equals=false
+cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false
+cleanup.operand_factorization=false
cleanup.organize_imports=true
+cleanup.overridden_assignment=false
+cleanup.plain_replacement=false
+cleanup.precompile_regex=false
+cleanup.primitive_comparison=false
+cleanup.primitive_parsing=false
+cleanup.primitive_rather_than_wrapper=false
+cleanup.primitive_serialization=false
+cleanup.pull_out_if_from_if_else=false
+cleanup.pull_up_assignment=false
+cleanup.push_down_negation=false
cleanup.qualify_static_field_accesses_with_declaring_class=false
cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
cleanup.qualify_static_member_accesses_with_declaring_class=false
cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.reduce_indentation=false
+cleanup.redundant_comparator=false
+cleanup.redundant_falling_through_block_end=false
cleanup.remove_private_constructors=true
cleanup.remove_redundant_modifiers=false
cleanup.remove_redundant_semicolons=true
@@ -37,25 +85,57 @@ 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_array_creation=false
cleanup.remove_unnecessary_casts=true
cleanup.remove_unnecessary_nls_tags=false
cleanup.remove_unused_imports=true
cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_method_parameters=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.return_expression=false
+cleanup.simplify_lambda_expression_and_method_ref=false
+cleanup.single_used_field=false
cleanup.sort_members=false
cleanup.sort_members_all=false
+cleanup.standard_comparison=false
+cleanup.static_inner_class=false
+cleanup.strictly_equal_or_different=false
+cleanup.stringbuffer_to_stringbuilder=false
+cleanup.stringbuilder=false
+cleanup.stringbuilder_for_local_vars=true
+cleanup.stringconcat_to_textblock=false
+cleanup.substring=false
+cleanup.switch=false
+cleanup.system_property=false
+cleanup.system_property_boolean=false
+cleanup.system_property_file_encoding=false
+cleanup.system_property_file_separator=false
+cleanup.system_property_line_separator=false
+cleanup.system_property_path_separator=false
+cleanup.ternary_operator=false
+cleanup.try_with_resource=false
+cleanup.unlooped_while=false
+cleanup.unreachable_block=false
cleanup.use_anonymous_class_creation=false
+cleanup.use_autoboxing=false
cleanup.use_blocks=false
cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_directly_map_method=false
cleanup.use_lambda=true
cleanup.use_parentheses_in_expressions=false
+cleanup.use_string_is_blank=false
cleanup.use_this_for_non_static_field_access=false
cleanup.use_this_for_non_static_field_access_only_if_necessary=true
cleanup.use_this_for_non_static_method_access=false
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_unboxing=false
+cleanup.use_var=false
+cleanup.useless_continue=false
+cleanup.useless_return=false
+cleanup.valueof_rather_than_instantiation=false
cleanup_profile=_CDT
cleanup_settings_version=2
eclipse.preferences.version=1
diff --git a/windows/org.eclipse.cdt.msw.build/META-INF/MANIFEST.MF b/windows/org.eclipse.cdt.msw.build/META-INF/MANIFEST.MF
index 29d8525b775..a5d24401dc0 100644
--- a/windows/org.eclipse.cdt.msw.build/META-INF/MANIFEST.MF
+++ b/windows/org.eclipse.cdt.msw.build/META-INF/MANIFEST.MF
@@ -1,8 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: MSVC Build Integration Plug-in
+Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.msw.build;singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.2.400.qualifier
Bundle-Activator: org.eclipse.cdt.msw.build.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
@@ -14,8 +14,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.swt,
org.eclipse.jface
Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-Vendor: Eclipse CDT
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Bundle-Vendor: %providerName
Automatic-Module-Name: org.eclipse.cdt.msw.build
Export-Package: org.eclipse.cdt.msw.build,
org.eclipse.cdt.msw.build.core
diff --git a/windows/org.eclipse.cdt.msw.build/about.html b/windows/org.eclipse.cdt.msw.build/about.html
index 164f781a8fd..b3134865230 100644
--- a/windows/org.eclipse.cdt.msw.build/about.html
+++ b/windows/org.eclipse.cdt.msw.build/about.html
@@ -1,10 +1,11 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
+
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>About</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <title>About</title>
</head>
+
<body lang="EN-US">
<h2>About This Content</h2>
@@ -16,7 +17,7 @@
(&quot;Content&quot;). Unless otherwise indicated below, the Content
is provided to you under the terms and conditions of the Eclipse
Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is
- available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
+ available at <a href="https://www.eclipse.org/legal/epl-2.0">https://www.eclipse.org/legal/epl-2.0</a>.
For purposes of the EPL, &quot;Program&quot; will mean the Content.
</p>
@@ -29,8 +30,9 @@
license exists, contact the Redistributor. Unless otherwise indicated
below, the terms and conditions of the EPL still apply to any source
code in the Content and such source code may be obtained at <a
- href="http://www.eclipse.org/">http://www.eclipse.org</a>.
+ href="https://www.eclipse.org/">https://www.eclipse.org</a>.
</p>
</body>
+
</html> \ No newline at end of file
diff --git a/windows/org.eclipse.cdt.msw.build/about.ini b/windows/org.eclipse.cdt.msw.build/about.ini
new file mode 100644
index 00000000000..e07a7bb377e
--- /dev/null
+++ b/windows/org.eclipse.cdt.msw.build/about.ini
@@ -0,0 +1,24 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=cdt_logo_icon32.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/windows/org.eclipse.cdt.msw.build/about.mappings b/windows/org.eclipse.cdt.msw.build/about.mappings
new file mode 100644
index 00000000000..936a8039c3e
--- /dev/null
+++ b/windows/org.eclipse.cdt.msw.build/about.mappings
@@ -0,0 +1,9 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+# The following should contain the build version.
+# e.g. "0=20200106-1728"
+# This value will be added automatically via the build scripts
+0=${buildId}
diff --git a/windows/org.eclipse.cdt.msw.build/about.properties b/windows/org.eclipse.cdt.msw.build/about.properties
new file mode 100644
index 00000000000..8f5399d4a66
--- /dev/null
+++ b/windows/org.eclipse.cdt.msw.build/about.properties
@@ -0,0 +1,32 @@
+###############################################################################
+# Copyright (c) 2007, 2022 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+# NOTE TO TRANSLATOR: Please do not translate the featureVersion variable.
+
+
+blurb=C/C++ Visual C++ Support (experimental)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) 2007, 2022 Contributors to the Eclipse Foundation
+\n\
+See the NOTICE file(s) distributed with this work for additional\n\
+information regarding copyright ownership.\n\
+\n\
+Visit http://www.eclipse.org/cdt
diff --git a/windows/org.eclipse.cdt.msw.build/build.properties b/windows/org.eclipse.cdt.msw.build/build.properties
index aa2825b4b2b..3f3efd6d32b 100644
--- a/windows/org.eclipse.cdt.msw.build/build.properties
+++ b/windows/org.eclipse.cdt.msw.build/build.properties
@@ -5,4 +5,9 @@ bin.includes = META-INF/,\
plugin.properties,\
plugin.xml,\
about.html,\
- icons/
+ icons/,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ cdt_logo_icon32.png
+src.includes = about.html
diff --git a/windows/org.eclipse.cdt.msw.build/cdt_logo_icon32.png b/windows/org.eclipse.cdt.msw.build/cdt_logo_icon32.png
new file mode 100644
index 00000000000..470ca81b327
--- /dev/null
+++ b/windows/org.eclipse.cdt.msw.build/cdt_logo_icon32.png
Binary files differ
diff --git a/windows/org.eclipse.cdt.msw.build/plugin.properties b/windows/org.eclipse.cdt.msw.build/plugin.properties
index c1e4cfe0a14..f4bbed266a6 100644
--- a/windows/org.eclipse.cdt.msw.build/plugin.properties
+++ b/windows/org.eclipse.cdt.msw.build/plugin.properties
@@ -1,3 +1,6 @@
+pluginName = MSVC Build Integration Plug-in
+providerName = Eclipse CDT
+
toolchain.name=Microsoft Visual C++
compiler.name.abstract=Abstract Compiler
@@ -11,3 +14,4 @@ config.debug=Debug
config.release=Release
MSVCOutputParser.name = MSVC Build Output Parser
+ClangCLBuiltinSpecsDetector.name = Clang-cl Built-in Compiler Settings \ No newline at end of file
diff --git a/windows/org.eclipse.cdt.msw.build/plugin.xml b/windows/org.eclipse.cdt.msw.build/plugin.xml
index 1476eaa756e..c8e8d75b575 100644
--- a/windows/org.eclipse.cdt.msw.build/plugin.xml
+++ b/windows/org.eclipse.cdt.msw.build/plugin.xml
@@ -762,4 +762,16 @@
prefer-non-shared="true">
</provider>
</extension>
+ <extension
+ point="org.eclipse.cdt.core.LanguageSettingsProvider">
+ <provider
+ class="org.eclipse.cdt.internal.msw.build.core.ClangClBuiltinSpecsDetector"
+ id="org.eclipse.cdt.msw.build.core.ClangCLBuiltinSpecsDetector"
+ name="%ClangCLBuiltinSpecsDetector.name"
+ parameter="${COMMAND} ${FLAGS} -E /clang:-P -v /clang:-dD &quot;${INPUTS}&quot;"
+ prefer-non-shared="true">
+ <language-scope id="org.eclipse.cdt.core.gcc"/>
+ <language-scope id="org.eclipse.cdt.core.g++"/>
+ </provider>
+ </extension>
</plugin>
diff --git a/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/IVSVersionConstants.java b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/IVSVersionConstants.java
new file mode 100644
index 00000000000..1c4ae2f3f9e
--- /dev/null
+++ b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/IVSVersionConstants.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Marc-Andre Laperle.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.cdt.internal.msw.build;
+
+/**
+ * Constants related to Visual Studio versions.
+ */
+interface IVSVersionConstants {
+ VSVersionNumber VS2017_BASE_VER = new VSVersionNumber(15);
+ VSVersionNumber VS2019_BASE_VER = new VSVersionNumber(16);
+} \ No newline at end of file
diff --git a/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/MSVCToolChainInfo.java b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/MSVCToolChainInfo.java
new file mode 100644
index 00000000000..6516b5bd7c2
--- /dev/null
+++ b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/MSVCToolChainInfo.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Marc-Andre Laperle.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.cdt.internal.msw.build;
+
+/**
+ * Basic information about a MSVC toolchain as found under a VS installation.
+ * More information could be added here in order to support users selecting a specific
+ * toolchain (architecture, etc).
+ */
+public class MSVCToolChainInfo {
+ private String fPathEnvVar;
+ private String fIncludeEnvVar;
+ private String fLibEnvVar;
+
+ MSVCToolChainInfo(String pathEnvVar, String includeEnvVar, String libEnvVar) {
+ fPathEnvVar = pathEnvVar;
+ fIncludeEnvVar = includeEnvVar;
+ fLibEnvVar = libEnvVar;
+ }
+
+ /**
+ * @return The PATH environment variable containing paths needed for this toolchain. Delimited with ';' for multiple paths.
+ */
+ public String getPathEnvVar() {
+ return fPathEnvVar;
+ }
+
+ /**
+ * @return The INCLUDE environment variable containing paths needed for this toolchain. Delimited with ';' for multiple paths.
+ */
+ public String getIncludeEnvVar() {
+ return fIncludeEnvVar;
+ }
+
+ /**
+ * @return The LIB environment variable containing paths needed for this toolchain. Delimited with ';' for multiple paths.
+ */
+ public String getLibEnvVar() {
+ return fLibEnvVar;
+ }
+} \ No newline at end of file
diff --git a/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/ProcessOutputUtil.java b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/ProcessOutputUtil.java
new file mode 100644
index 00000000000..0cce6f5b3a4
--- /dev/null
+++ b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/ProcessOutputUtil.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Marc-Andre Laperle.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.cdt.internal.msw.build;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Simple util for getting output out of a command. Only meant to be used in a few places to help detect things in the environment.
+ */
+final class ProcessOutputUtil {
+
+ static String[] getAllOutputFromCommand(String... command) {
+ try {
+ Process p = new ProcessBuilder(command).start();
+ List<String> lines = new ArrayList<>();
+ try (BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()))) {
+ String line = input.readLine();
+ while (line != null) {
+ lines.add(line);
+ line = input.readLine();
+ }
+ }
+ return lines.toArray(new String[0]);
+ } catch (IOException e) {
+ // Since this is mostly used to detect the presence of things in the environment,
+ // if anything goes wrong we just return null and we will fallback to undetected VS/MSVC.
+ }
+
+ return null;
+ }
+}
diff --git a/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/VSInstallation.java b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/VSInstallation.java
new file mode 100644
index 00000000000..456bfa0c744
--- /dev/null
+++ b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/VSInstallation.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Marc-Andre Laperle.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.cdt.internal.msw.build;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.regex.Pattern;
+
+/**
+ * Information about a single Visual Studio installation (paths, toolchains, etc).
+ */
+public class VSInstallation {
+ private String fLocation;
+ private List<MSVCToolChainInfo> fToolChains = null;
+
+ VSInstallation(String location) {
+ super();
+ this.fLocation = location;
+ }
+
+ // Return a non-null String if there is a single non-empty line in the output of the command, null otherwise.
+ private static String getSingleLineOutputFromCommand(String... command) {
+ String allOutput[] = ProcessOutputUtil.getAllOutputFromCommand(command);
+ if (allOutput == null || allOutput.length != 1 || allOutput[0].isEmpty()) {
+ return null;
+ }
+ return allOutput[0];
+ }
+
+ private void detectToolchains() {
+ fToolChains = new ArrayList<>();
+
+ String vcVarsLocation = fLocation + "\\VC\\Auxiliary\\Build\\vcvarsall.bat"; //$NON-NLS-1$
+ //TODO: Support more toolchains/architectures (host and target) when we start giving the choice to the user.
+ final String arch = "amd64"; //$NON-NLS-1$
+ String vcVarsLocationCommands = "\"" + vcVarsLocation + "\" " + arch; //$NON-NLS-1$ //$NON-NLS-2$
+ String includeEnvVar = getSingleLineOutputFromCommand("cmd", "/v", "/c", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "\"" + vcVarsLocationCommands + " > nul && echo !INCLUDE!\""); //$NON-NLS-1$ //$NON-NLS-2$
+ if (includeEnvVar == null) {
+ return;
+ }
+
+ String libEnvVar = getSingleLineOutputFromCommand("cmd", "/v", "/c", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "\"" + vcVarsLocationCommands + " > nul && echo !LIB!\""); //$NON-NLS-1$//$NON-NLS-2$
+ if (libEnvVar == null) {
+ return;
+ }
+
+ // Get the normal PATH variable before calling vcvars then we'll extract the ones added by vcvars.
+ String normalPathVar = getSingleLineOutputFromCommand("cmd", "/c", "echo %PATH%"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+ if (normalPathVar == null) {
+ return;
+ }
+
+ // In case PATH is not defined at all (quite unlikely!)
+ if (normalPathVar.equals("%PATH%")) { //$NON-NLS-1$
+ normalPathVar = ""; //$NON-NLS-1$
+ }
+
+ String vcEnvPath = getSingleLineOutputFromCommand("cmd", "/v", "/c", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "\"" + vcVarsLocationCommands + " > nul && echo !PATH!\""); //$NON-NLS-1$//$NON-NLS-2$
+ if (vcEnvPath == null) {
+ return;
+ }
+
+ // Vcvars can put the user environment in the middle of its PATH values, not before of after.
+ String vcEnvPathOnly = vcEnvPath.replaceFirst(Pattern.quote(normalPathVar), ""); //$NON-NLS-1$
+ if (vcEnvPathOnly.isEmpty())
+ return;
+
+ fToolChains.add(new MSVCToolChainInfo(vcEnvPathOnly, includeEnvVar, libEnvVar));
+ }
+
+ /**
+ * @return Get all toolchains bundled with this installation of VS.
+ */
+ public List<MSVCToolChainInfo> getToolchains() {
+ if (fToolChains == null) {
+ detectToolchains();
+ }
+
+ return Collections.unmodifiableList(fToolChains);
+ }
+} \ No newline at end of file
diff --git a/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/VSInstallationRegistry.java b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/VSInstallationRegistry.java
new file mode 100644
index 00000000000..ae7f4c0957d
--- /dev/null
+++ b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/VSInstallationRegistry.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Marc-Andre Laperle.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.cdt.internal.msw.build;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.NavigableMap;
+import java.util.TreeMap;
+
+/**
+ * Stores information about different Visual Studio installations detected on the system (paths, toolchains, etc).
+ */
+public class VSInstallationRegistry {
+ private static TreeMap<VSVersionNumber, VSInstallation> fVsInstallations;
+
+ /**
+ * @return Get all VS installations, ordered by ascending version numbers.
+ */
+ public static NavigableMap<VSVersionNumber, VSInstallation> getVsInstallations() {
+ if (fVsInstallations == null)
+ detectVSInstallations();
+
+ return Collections.unmodifiableNavigableMap(fVsInstallations);
+ }
+
+ private static void detectVSInstallations() {
+ fVsInstallations = new TreeMap<>();
+ // We are opting-in which versions to detect instead of trying to detect even unknown ones in order
+ // to allow proper testing for a new version before exposing it to users.
+ Arrays.asList(IVSVersionConstants.VS2017_BASE_VER, IVSVersionConstants.VS2019_BASE_VER).forEach(version -> {
+ VSInstallation insllation = detectVSInstallation(version);
+ if (insllation != null)
+ fVsInstallations.put(version, insllation);
+ });
+ }
+
+ private static VSInstallation detectVSInstallation(VSVersionNumber baseVersion) {
+ VSVersionNumber upperBound = new VSVersionNumber(baseVersion.get(0) + 1);
+ // E.g. [15,16) for 15 inclusive to 16 exclusive.
+ String versionFilterRange = "[" + baseVersion.toString() + "," + upperBound + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ String vsInstallationLocation[] = ProcessOutputUtil.getAllOutputFromCommand("cmd", "/c", //$NON-NLS-1$//$NON-NLS-2$
+ "\"\"%ProgramFiles(x86)%\\Microsoft Visual Studio\\Installer\\vswhere.exe\"\"", //$NON-NLS-1$
+ "-version", versionFilterRange, "-property", "installationPath"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (vsInstallationLocation == null || vsInstallationLocation.length == 0
+ || vsInstallationLocation[0].isEmpty()) {
+ return null;
+ }
+
+ // We only support one installation per base (major) version for now.
+ // Supporting multiple is a bit of a niche case left to be determined if useful.
+ return new VSInstallation(vsInstallationLocation[0]);
+ }
+}
diff --git a/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/VSVersionNumber.java b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/VSVersionNumber.java
new file mode 100644
index 00000000000..84aa13082cf
--- /dev/null
+++ b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/VSVersionNumber.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Marc-Andre Laperle.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.cdt.internal.msw.build;
+
+/**
+ * A VS version number (Integer tuple).
+ */
+public class VSVersionNumber implements Comparable<VSVersionNumber> {
+ private Integer[] fIntegers;
+
+ VSVersionNumber(Integer... integers) {
+ fIntegers = integers;
+ }
+
+ @Override
+ public int compareTo(VSVersionNumber o) {
+ for (int i = 0; i < fIntegers.length; i++) {
+ if (i >= o.fIntegers.length) {
+ // All numbers are the same up to now but the other tuple
+ // has less
+ return 1;
+ }
+
+ int compareTo = fIntegers[i].compareTo(o.fIntegers[i]);
+ if (compareTo != 0) {
+ return compareTo;
+ }
+ }
+
+ // All numbers are the same up to now but this tuple has less than
+ // the other
+ if (fIntegers.length < o.fIntegers.length) {
+ return -1;
+ }
+
+ return 0;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < fIntegers.length; i++) {
+ sb.append(fIntegers[i]);
+ if (i != fIntegers.length - 1) {
+ sb.append("."); //$NON-NLS-1$
+ }
+ }
+ return sb.toString();
+ }
+
+ Integer get(int index) {
+ return fIntegers[index];
+ }
+} \ No newline at end of file
diff --git a/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/core/ClangClBuiltinSpecsDetector.java b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/core/ClangClBuiltinSpecsDetector.java
new file mode 100644
index 00000000000..da228061f6f
--- /dev/null
+++ b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/internal/msw/build/core/ClangClBuiltinSpecsDetector.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Marc-Andre Laperle.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.cdt.internal.msw.build.core;
+
+import org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector;
+
+/**
+ * Language settings provider to detect built-in compiler settings for the Clang-cl compiler.
+ */
+public class ClangClBuiltinSpecsDetector extends GCCBuiltinSpecsDetector {
+
+ // This ID is mostly used for the global provider case to get the compiler command from the toolchain
+ // which will be wrong here (cl instead of clang-cl), although less wrong than GCC. We would need a dedicated
+ // Clang-cl toolchain to make the global case work.
+ // But it will correctly display whether or not the associated toolchain (MSVC) is installed and supported, instead of checking GCC.
+ private static final String TOOLCHAIN_ID = "org.eclipse.cdt.msvc.toolchain.base"; //$NON-NLS-1$
+
+ @Override
+ public String getToolchainId() {
+ return TOOLCHAIN_ID;
+ }
+}
diff --git a/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/Activator.java b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/Activator.java
index b57feb32dfb..505572a3d0f 100644
--- a/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/Activator.java
+++ b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/Activator.java
@@ -19,7 +19,7 @@ import org.osgi.framework.BundleContext;
public class Activator extends Plugin {
// The plug-in ID
- public static final String PLUGIN_ID = "net.sf.wascana.msvc.build";
+ public static final String PLUGIN_ID = "org.eclipse.cdt.msw.build"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
diff --git a/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/WinEnvironmentVariableSupplier.java b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/WinEnvironmentVariableSupplier.java
index 7ec9e358730..7f9a7c44b28 100644
--- a/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/WinEnvironmentVariableSupplier.java
+++ b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/WinEnvironmentVariableSupplier.java
@@ -10,18 +10,23 @@
*******************************************************************************/
package org.eclipse.cdt.msw.build;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
+import java.util.stream.Collectors;
+import org.eclipse.cdt.internal.msw.build.MSVCToolChainInfo;
+import org.eclipse.cdt.internal.msw.build.VSInstallation;
+import org.eclipse.cdt.internal.msw.build.VSInstallationRegistry;
+import org.eclipse.cdt.internal.msw.build.VSVersionNumber;
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
import org.eclipse.cdt.managedbuilder.core.IManagedProject;
import org.eclipse.cdt.managedbuilder.envvar.IBuildEnvironmentVariable;
import org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier;
import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider;
import org.eclipse.cdt.managedbuilder.envvar.IProjectEnvironmentVariableSupplier;
-import org.eclipse.cdt.utils.WindowsRegistry;
+import org.eclipse.cdt.utils.envvar.EnvVarOperationProcessor;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -31,10 +36,7 @@ import org.eclipse.core.runtime.Path;
*/
public class WinEnvironmentVariableSupplier
implements IConfigurationEnvironmentVariableSupplier, IProjectEnvironmentVariableSupplier {
-
private static Map<String, IBuildEnvironmentVariable> envvars;
- private static String sdkDir;
- private static String vcDir;
private static class WindowsBuildEnvironmentVariable implements IBuildEnvironmentVariable {
@@ -50,7 +52,7 @@ public class WinEnvironmentVariableSupplier
@Override
public String getDelimiter() {
- return ";";
+ return ";"; //$NON-NLS-1$
}
@Override
@@ -97,52 +99,15 @@ public class WinEnvironmentVariableSupplier
return envvars.values().toArray(new IBuildEnvironmentVariable[envvars.size()]);
}
- private static String getSoftwareKey(WindowsRegistry reg, String subkey, String name) {
- String value = reg.getLocalMachineValue("SOFTWARE\\" + subkey, name);
- // Visual Studio is a 32 bit application so on Windows 64 the keys will be in Wow6432Node
- if (value == null) {
- value = reg.getLocalMachineValue("SOFTWARE\\Wow6432Node\\" + subkey, name);
- }
- return value;
- }
-
- // Current support is for Windows SDK 8.0 with Visual C++ 11.0
- // or Windows SDK 7.1 with Visual C++ 10.0
- // or Windows SDK 7.0 with Visual C++ 9.0
- private static String getSDKDir() {
- WindowsRegistry reg = WindowsRegistry.getRegistry();
- String sdkDir = getSoftwareKey(reg, "Microsoft\\Microsoft SDKs\\Windows\\v8.0", "InstallationFolder");
- if (sdkDir != null)
- return sdkDir;
- sdkDir = getSoftwareKey(reg, "Microsoft\\Microsoft SDKs\\Windows\\v7.1", "InstallationFolder");
- if (sdkDir != null)
- return sdkDir;
- return getSoftwareKey(reg, "Microsoft SDKs\\Windows\\v7.0", "InstallationFolder");
- }
-
- private static String getVCDir() {
- WindowsRegistry reg = WindowsRegistry.getRegistry();
- String vcDir = getSoftwareKey(reg, "Microsoft\\VisualStudio\\SxS\\VC7", "11.0");
- if (vcDir != null)
- return vcDir;
- vcDir = getSoftwareKey(reg, "Microsoft\\VisualStudio\\SxS\\VC7", "10.0");
- if (vcDir != null)
- return vcDir;
- return getSoftwareKey(reg, "Microsoft\\VisualStudio\\SxS\\VC7", "9.0");
- }
-
public static IPath[] getIncludePath() {
- // Include paths
- List<IPath> includePaths = new ArrayList<>();
- if (sdkDir != null) {
- includePaths.add(new Path(sdkDir.concat("Include")));
- includePaths.add(new Path(sdkDir.concat("Include\\gl")));
- }
-
- if (vcDir != null) {
- includePaths.add(new Path(vcDir.concat("Include")));
- }
- return includePaths.toArray(new IPath[0]);
+ if (envvars == null)
+ return new IPath[0];
+
+ IBuildEnvironmentVariable var = envvars.get("INCLUDE"); //$NON-NLS-1$
+ if (var == null)
+ return new IPath[0];
+ return EnvVarOperationProcessor.convertToList(var.getValue(), var.getDelimiter()).stream()
+ .map(val -> Path.fromOSString(val)).collect(Collectors.toList()).toArray(new IPath[0]);
}
private static void addvar(IBuildEnvironmentVariable var) {
@@ -154,46 +119,22 @@ public class WinEnvironmentVariableSupplier
return;
envvars = new HashMap<>();
- // The SDK Location
- sdkDir = getSDKDir();
- vcDir = getVCDir();
-
- if (sdkDir == null && vcDir == null) {
- return;
+ Entry<VSVersionNumber, VSInstallation> vsInstallationEntry = VSInstallationRegistry.getVsInstallations()
+ .lastEntry();
+ if (vsInstallationEntry != null) {
+ List<MSVCToolChainInfo> toolchains = vsInstallationEntry.getValue().getToolchains();
+ if (toolchains.size() != 0) {
+ //TODO: Support more toolchains/architectures (host and target) when we start giving the choice to the user.
+ MSVCToolChainInfo toolChainInfo = toolchains.get(0);
+ addvar(new WindowsBuildEnvironmentVariable("INCLUDE", toolChainInfo.getIncludeEnvVar(), //$NON-NLS-1$
+ IBuildEnvironmentVariable.ENVVAR_PREPEND));
+ addvar(new WindowsBuildEnvironmentVariable("PATH", toolChainInfo.getPathEnvVar(), //$NON-NLS-1$
+ IBuildEnvironmentVariable.ENVVAR_PREPEND));
+ addvar(new WindowsBuildEnvironmentVariable("LIB", toolChainInfo.getLibEnvVar(), //$NON-NLS-1$
+ IBuildEnvironmentVariable.ENVVAR_PREPEND));
+ }
}
- // INCLUDE
- StringBuilder buff = new StringBuilder();
- IPath includePaths[] = getIncludePath();
- for (IPath path : includePaths) {
- buff.append(path.toOSString()).append(';');
- }
- addvar(new WindowsBuildEnvironmentVariable("INCLUDE", buff.toString(),
- IBuildEnvironmentVariable.ENVVAR_PREPEND));
-
- // LIB
- buff = new StringBuilder();
- if (vcDir != null)
- buff.append(vcDir).append("Lib;");
- if (sdkDir != null) {
- buff.append(sdkDir).append("Lib;");
- buff.append(sdkDir).append("Lib\\win8\\um\\x86;");
- }
-
- addvar(new WindowsBuildEnvironmentVariable("LIB", buff.toString(), IBuildEnvironmentVariable.ENVVAR_PREPEND));
-
- // PATH
- buff = new StringBuilder();
- if (vcDir != null) {
- buff.append(vcDir).append("..\\Common7\\IDE;");
- buff.append(vcDir).append("..\\Common7\\Tools;");
- buff.append(vcDir).append("Bin;");
- buff.append(vcDir).append("vcpackages;");
- }
- if (sdkDir != null) {
- buff.append(sdkDir).append("Bin;");
- }
- addvar(new WindowsBuildEnvironmentVariable("PATH", buff.toString(), IBuildEnvironmentVariable.ENVVAR_PREPEND));
}
}
diff --git a/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/core/MSVCBuildCommandParser.java b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/core/MSVCBuildCommandParser.java
index 50d2a814f33..6b63ed8b70e 100644
--- a/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/core/MSVCBuildCommandParser.java
+++ b/windows/org.eclipse.cdt.msw.build/src/org/eclipse/cdt/msw/build/core/MSVCBuildCommandParser.java
@@ -11,6 +11,8 @@
package org.eclipse.cdt.msw.build.core;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -26,11 +28,20 @@ import org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuildC
*/
public class MSVCBuildCommandParser extends AbstractBuildCommandParser implements ILanguageSettingsEditableProvider {
+ private static final String DOUBLE_BACKSLASH = "\\\\"; //$NON-NLS-1$
+ private static final Pattern DOUBLE_BACKSLASH_PATTERN = Pattern.compile(Pattern.quote(DOUBLE_BACKSLASH));
+ private static final String BACKSLASH_REPLACEMENT_STRING = "\\\\"; //$NON-NLS-1$
+ private static final String BACKSLASH_QUOTE = "\\\""; //$NON-NLS-1$
+ private static final Pattern BACKSLASH_QUOTE_PATTERN = Pattern.compile(Pattern.quote(BACKSLASH_QUOTE));
+ private static final String QUOTE_REPLACEMENT_STRING = "\""; //$NON-NLS-1$
+
private static String unescapeString(String value) {
// There are probably many other things to unescape but these are the most
// common.
- value = value.replaceAll("\\\\\\\\", "\\\\"); //$NON-NLS-1$//$NON-NLS-2$
- value = value.replaceAll("\\\\\"", "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ if (value.contains(DOUBLE_BACKSLASH))
+ value = DOUBLE_BACKSLASH_PATTERN.matcher(value).replaceAll(BACKSLASH_REPLACEMENT_STRING);
+ if (value.contains(BACKSLASH_QUOTE))
+ value = BACKSLASH_QUOTE_PATTERN.matcher(value).replaceAll(QUOTE_REPLACEMENT_STRING);
return value;
}
@@ -70,26 +81,28 @@ public class MSVCBuildCommandParser extends AbstractBuildCommandParser implement
}
}
- // TODO: Should these be considered "built-in" entries (ICSettingEntry.BUILTIN)?
- private static class ClangCLMSVCSystemPathOptionParser extends IncludePathOptionParser {
+ @SuppressWarnings("nls")
+ static final AbstractOptionParser[] includeOptionParsers = {
+ new MSVCIncludePathOptionParser("(-|/)I\\s*\"(.*)\"", "$2"),
+ new MSVCIncludePathOptionParser("(-|/)I\\s*([^\\s\"]*)", "$2"), };
- public ClangCLMSVCSystemPathOptionParser(String pattern, String nameExpression) {
- super(pattern, nameExpression);
- }
+ @SuppressWarnings("nls")
+ static final AbstractOptionParser[] forceIncludeOptionParsers = {
+ new MSVCForceIncludePathOptionParser("(-|/)FI\\s*\"(.*)\"", "$2"),
+ new MSVCForceIncludePathOptionParser("(-|/)FI\\s*([^\\s\"]*)", "$2"), };
- @Override
- public ICLanguageSettingEntry createEntry(String name, String value, int flag) {
- return super.createEntry(name, unescapeString(value), flag);
- }
- }
+ @SuppressWarnings("nls")
+ static final AbstractOptionParser[] msvcIncludeOptionParsers = {
+ new MSVCIncludePathOptionParser("(-|/)imsvc\\s*\"(.*)\"", "$2"),
+ new MSVCIncludePathOptionParser("(-|/)imsvc\\s*([^\\s\"]*)", "$2"), };
@SuppressWarnings("nls")
- static final AbstractOptionParser[] optionParsers = { new MSVCIncludePathOptionParser("(-|/)I\\s*\"(.*)\"", "$2"),
- new MSVCIncludePathOptionParser("(-|/)I\\s*([^\\s\"]*)", "$2"),
- new MSVCForceIncludePathOptionParser("(-|/)FI\\s*\"(.*)\"", "$2"),
- new MSVCForceIncludePathOptionParser("(-|/)FI\\s*([^\\s\"]*)", "$2"),
- new ClangCLMSVCSystemPathOptionParser("(-|/)imsvc\\s*\"(.*)\"", "$2"),
- new ClangCLMSVCSystemPathOptionParser("(-|/)imsvc\\s*([^\\s\"]*)", "$2"),
+ static final AbstractOptionParser[] clangISystemIncludeOptionParsers = {
+ new MSVCIncludePathOptionParser("(-|/)clang:-isystem\"(.*)\"", "$2"),
+ new MSVCIncludePathOptionParser("(-|/)clang:-isystem([^\\s\"]*)", "$2"), };
+
+ @SuppressWarnings("nls")
+ static final AbstractOptionParser[] defineOptionParsers = {
// /D "FOO=bar"
new MSVCMacroOptionParser("(-|/)D\\s*\"([^=]+)=(.*)\"", "$2", "$3"),
// /D FOO="bar"
@@ -99,12 +112,29 @@ public class MSVCBuildCommandParser extends AbstractBuildCommandParser implement
// /D FOO
new MSVCMacroOptionParser("(-|/)D\\s*([^\\s=\"]+)", "$2", "1"),
// /D"FOO"
- new MSVCMacroOptionParser("(-|/)D\\s*\"([^\\s=\"]+)\"", "$2", "1"),
+ new MSVCMacroOptionParser("(-|/)D\\s*\"([^\\s=\"]+)\"", "$2", "1"), };
+
+ @SuppressWarnings("nls")
+ static final AbstractOptionParser[] undefineOptionParsers = {
// /U FOO
new MacroOptionParser("(-|/)U\\s*([^\\s=\"]+)", "$2", ICSettingEntry.UNDEFINED),
// /U "FOO"
new MacroOptionParser("(-|/)U\\s*\"(.*?)\"", "$2", ICSettingEntry.UNDEFINED) };
+ static final AbstractOptionParser[] emptyParsers = new AbstractOptionParser[0];
+
+ static final AbstractOptionParser[] optionParsers;
+ static {
+ List<AbstractOptionParser> parsers = new ArrayList<>(Arrays.asList(includeOptionParsers));
+ Collections.addAll(parsers, defineOptionParsers);
+ Collections.addAll(parsers, msvcIncludeOptionParsers);
+ Collections.addAll(parsers, clangISystemIncludeOptionParsers);
+ Collections.addAll(parsers, forceIncludeOptionParsers);
+ Collections.addAll(parsers, undefineOptionParsers);
+
+ optionParsers = parsers.toArray(new AbstractOptionParser[0]);
+ }
+
/**
* "foo" or "C:\foo\\"
*
@@ -138,6 +168,43 @@ public class MSVCBuildCommandParser extends AbstractBuildCommandParser implement
return optionParsers;
}
+ @SuppressWarnings("nls")
+ @Override
+ protected AbstractOptionParser[] getOptionParsers(String optionToParse) {
+ if (optionToParse.length() <= 1) {
+ return emptyParsers;
+ }
+
+ // Skip - or /, we know it's there with the OPTIONS_PATTERN
+ String optionName = optionToParse.substring(1);
+
+ if (optionName.startsWith("I")) {
+ return includeOptionParsers;
+ }
+
+ if (optionName.startsWith("D")) {
+ return defineOptionParsers;
+ }
+
+ if (optionName.startsWith("imsvc")) {
+ return msvcIncludeOptionParsers;
+ }
+
+ if (optionName.startsWith("clang")) {
+ return clangISystemIncludeOptionParsers;
+ }
+
+ if (optionName.startsWith("FI")) {
+ return forceIncludeOptionParsers;
+ }
+
+ if (optionName.startsWith("U")) {
+ return undefineOptionParsers;
+ }
+
+ return emptyParsers;
+ }
+
@Override
public MSVCBuildCommandParser cloneShallow() throws CloneNotSupportedException {
return (MSVCBuildCommandParser) super.cloneShallow();
diff --git a/windows/pom.xml b/windows/pom.xml
index 69384d8ed73..0fc0cd59d03 100644
--- a/windows/pom.xml
+++ b/windows/pom.xml
@@ -1,4 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2017, 2021 Contributors to the Eclipse Foundation
+
+ This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License 2.0
+ which accompanies this distribution, and is available at
+ https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+-->
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
@@ -7,7 +17,7 @@
<parent>
<groupId>org.eclipse.cdt</groupId>
<artifactId>cdt-parent</artifactId>
- <version>9.9.0-SNAPSHOT</version>
+ <version>10.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.cdt.windows-parent</artifactId>

Back to the top