From df1b82589946776182495f050674d2028c15ec7f Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Sat, 22 Jun 2024 13:20:19 +0200 Subject: [PATCH] Merge native org.eclipse.core.net fragments into host plug-in And fix problems/wranings that are stricter in the target plugin. --- .../org.eclipse.core.net.linux/.classpath | 7 - .../org.eclipse.core.net.linux/.project | 28 ---- .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.jdt.core.prefs | 15 -- .../.settings/org.eclipse.jdt.ui.prefs | 145 ----------------- .../META-INF/MANIFEST.MF | 12 -- .../org.eclipse.core.net.linux/about.html | 36 ----- .../build.properties | 20 --- .../forceQualifierUpdate.txt | 3 - .../fragment.properties | 15 -- .../org.eclipse.core.net.linux/pom.xml | 29 ---- .../org.eclipse.core.net.win32/.classpath | 7 - .../org.eclipse.core.net.win32/.project | 29 ---- .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.core.runtime.prefs | 2 - .../.settings/org.eclipse.jdt.core.prefs | 12 -- .../.settings/org.eclipse.jdt.ui.prefs | 147 ------------------ .../META-INF/MANIFEST.MF | 13 -- .../org.eclipse.core.net.win32/about.html | 36 ----- .../build.properties | 20 --- .../forceQualifierUpdate.txt | 3 - .../fragment.properties | 15 -- .../org.eclipse.core.net.win32/pom.xml | 28 ---- .../.settings/org.eclipse.jdt.core.prefs | 13 +- .../org.eclipse.core.net/META-INF/MANIFEST.MF | 4 + .../core/internal/net/ProxyManager.java | 13 +- .../proxy/linux/ProxyProviderLinux.java} | 6 +- .../internal/proxy/win32}/ProxyBypass.java | 2 +- .../proxy/win32}/ProxyProviderUtil.java | 2 +- .../proxy/win32/ProxyProviderWin32.java} | 115 +++++++------- .../proxy/win32}/StaticProxyConfig.java | 2 +- 31 files changed, 86 insertions(+), 697 deletions(-) delete mode 100644 team/bundles/org.eclipse.core.net.linux/.classpath delete mode 100644 team/bundles/org.eclipse.core.net.linux/.project delete mode 100644 team/bundles/org.eclipse.core.net.linux/.settings/org.eclipse.core.resources.prefs delete mode 100644 team/bundles/org.eclipse.core.net.linux/.settings/org.eclipse.jdt.core.prefs delete mode 100644 team/bundles/org.eclipse.core.net.linux/.settings/org.eclipse.jdt.ui.prefs delete mode 100644 team/bundles/org.eclipse.core.net.linux/META-INF/MANIFEST.MF delete mode 100644 team/bundles/org.eclipse.core.net.linux/about.html delete mode 100644 team/bundles/org.eclipse.core.net.linux/build.properties delete mode 100644 team/bundles/org.eclipse.core.net.linux/forceQualifierUpdate.txt delete mode 100644 team/bundles/org.eclipse.core.net.linux/fragment.properties delete mode 100644 team/bundles/org.eclipse.core.net.linux/pom.xml delete mode 100644 team/bundles/org.eclipse.core.net.win32/.classpath delete mode 100644 team/bundles/org.eclipse.core.net.win32/.project delete mode 100644 team/bundles/org.eclipse.core.net.win32/.settings/org.eclipse.core.resources.prefs delete mode 100644 team/bundles/org.eclipse.core.net.win32/.settings/org.eclipse.core.runtime.prefs delete mode 100644 team/bundles/org.eclipse.core.net.win32/.settings/org.eclipse.jdt.core.prefs delete mode 100644 team/bundles/org.eclipse.core.net.win32/.settings/org.eclipse.jdt.ui.prefs delete mode 100644 team/bundles/org.eclipse.core.net.win32/META-INF/MANIFEST.MF delete mode 100644 team/bundles/org.eclipse.core.net.win32/about.html delete mode 100644 team/bundles/org.eclipse.core.net.win32/build.properties delete mode 100644 team/bundles/org.eclipse.core.net.win32/forceQualifierUpdate.txt delete mode 100644 team/bundles/org.eclipse.core.net.win32/fragment.properties delete mode 100644 team/bundles/org.eclipse.core.net.win32/pom.xml rename team/bundles/{org.eclipse.core.net.linux/src/org/eclipse/core/net/ProxyProvider.java => org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/linux/ProxyProviderLinux.java} (98%) rename team/bundles/{org.eclipse.core.net.win32/src/org/eclipse/core/internal/net/proxy/win32/winhttp => org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/win32}/ProxyBypass.java (97%) rename team/bundles/{org.eclipse.core.net.win32/src/org/eclipse/core/internal/net/proxy/win32/winhttp => org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/win32}/ProxyProviderUtil.java (99%) rename team/bundles/{org.eclipse.core.net.win32/src/org/eclipse/core/net/ProxyProvider.java => org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/win32/ProxyProviderWin32.java} (84%) rename team/bundles/{org.eclipse.core.net.win32/src/org/eclipse/core/internal/net/proxy/win32/winhttp => org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/win32}/StaticProxyConfig.java (98%) diff --git a/team/bundles/org.eclipse.core.net.linux/.classpath b/team/bundles/org.eclipse.core.net.linux/.classpath deleted file mode 100644 index 81fe078c20c..00000000000 --- a/team/bundles/org.eclipse.core.net.linux/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/team/bundles/org.eclipse.core.net.linux/.project b/team/bundles/org.eclipse.core.net.linux/.project deleted file mode 100644 index 4cf8c2fd8bb..00000000000 --- a/team/bundles/org.eclipse.core.net.linux/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.core.net.linux - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/team/bundles/org.eclipse.core.net.linux/.settings/org.eclipse.core.resources.prefs b/team/bundles/org.eclipse.core.net.linux/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0203a..00000000000 --- a/team/bundles/org.eclipse.core.net.linux/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/team/bundles/org.eclipse.core.net.linux/.settings/org.eclipse.jdt.core.prefs b/team/bundles/org.eclipse.core.net.linux/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 9478cb16537..00000000000 --- a/team/bundles/org.eclipse.core.net.linux/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,15 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=17 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=17 diff --git a/team/bundles/org.eclipse.core.net.linux/.settings/org.eclipse.jdt.ui.prefs b/team/bundles/org.eclipse.core.net.linux/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index a92fd5fc450..00000000000 --- a/team/bundles/org.eclipse.core.net.linux/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,145 +0,0 @@ -eclipse.preferences.version=1 -editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true -sp_cleanup.add_all=false -sp_cleanup.add_default_serial_version_id=true -sp_cleanup.add_generated_serial_version_id=false -sp_cleanup.add_missing_annotations=true -sp_cleanup.add_missing_deprecated_annotations=true -sp_cleanup.add_missing_methods=false -sp_cleanup.add_missing_nls_tags=false -sp_cleanup.add_missing_override_annotations=true -sp_cleanup.add_missing_override_annotations_interface_methods=true -sp_cleanup.add_serial_version_id=false -sp_cleanup.also_simplify_lambda=true -sp_cleanup.always_use_blocks=true -sp_cleanup.always_use_parentheses_in_expressions=false -sp_cleanup.always_use_this_for_non_static_field_access=false -sp_cleanup.always_use_this_for_non_static_method_access=false -sp_cleanup.array_with_curly=false -sp_cleanup.arrays_fill=false -sp_cleanup.bitwise_conditional_expression=false -sp_cleanup.boolean_literal=false -sp_cleanup.boolean_value_rather_than_comparison=true -sp_cleanup.break_loop=false -sp_cleanup.collection_cloning=false -sp_cleanup.comparing_on_criteria=false -sp_cleanup.comparison_statement=false -sp_cleanup.controlflow_merge=false -sp_cleanup.convert_functional_interfaces=true -sp_cleanup.convert_to_enhanced_for_loop=true -sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true -sp_cleanup.convert_to_switch_expressions=false -sp_cleanup.correct_indentation=false -sp_cleanup.do_while_rather_than_while=false -sp_cleanup.double_negation=false -sp_cleanup.else_if=false -sp_cleanup.embedded_if=false -sp_cleanup.evaluate_nullable=false -sp_cleanup.extract_increment=false -sp_cleanup.format_source_code=true -sp_cleanup.format_source_code_changes_only=true -sp_cleanup.hash=false -sp_cleanup.if_condition=false -sp_cleanup.insert_inferred_type_arguments=false -sp_cleanup.instanceof=false -sp_cleanup.instanceof_keyword=false -sp_cleanup.invert_equals=false -sp_cleanup.join=false -sp_cleanup.lazy_logical_operator=false -sp_cleanup.make_local_variable_final=true -sp_cleanup.make_parameters_final=false -sp_cleanup.make_private_fields_final=true -sp_cleanup.make_type_abstract_if_missing_method=false -sp_cleanup.make_variable_declarations_final=false -sp_cleanup.map_cloning=false -sp_cleanup.merge_conditional_blocks=false -sp_cleanup.multi_catch=false -sp_cleanup.never_use_blocks=false -sp_cleanup.never_use_parentheses_in_expressions=true -sp_cleanup.no_string_creation=false -sp_cleanup.no_super=false -sp_cleanup.number_suffix=false -sp_cleanup.objects_equals=false -sp_cleanup.on_save_use_additional_actions=true -sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false -sp_cleanup.operand_factorization=false -sp_cleanup.organize_imports=true -sp_cleanup.overridden_assignment=false -sp_cleanup.overridden_assignment_move_decl=true -sp_cleanup.plain_replacement=false -sp_cleanup.precompile_regex=false -sp_cleanup.primitive_comparison=false -sp_cleanup.primitive_parsing=false -sp_cleanup.primitive_rather_than_wrapper=true -sp_cleanup.primitive_serialization=false -sp_cleanup.pull_out_if_from_if_else=false -sp_cleanup.pull_up_assignment=false -sp_cleanup.push_down_negation=false -sp_cleanup.qualify_static_field_accesses_with_declaring_class=false -sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_with_declaring_class=true -sp_cleanup.qualify_static_method_accesses_with_declaring_class=false -sp_cleanup.reduce_indentation=false -sp_cleanup.redundant_comparator=false -sp_cleanup.redundant_falling_through_block_end=false -sp_cleanup.remove_private_constructors=true -sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true -sp_cleanup.remove_trailing_whitespaces=true -sp_cleanup.remove_trailing_whitespaces_all=true -sp_cleanup.remove_trailing_whitespaces_ignore_empty=false -sp_cleanup.remove_unnecessary_array_creation=false -sp_cleanup.remove_unnecessary_casts=true -sp_cleanup.remove_unnecessary_nls_tags=true -sp_cleanup.remove_unused_imports=true -sp_cleanup.remove_unused_local_variables=false -sp_cleanup.remove_unused_method_parameters=false -sp_cleanup.remove_unused_private_fields=true -sp_cleanup.remove_unused_private_members=false -sp_cleanup.remove_unused_private_methods=true -sp_cleanup.remove_unused_private_types=true -sp_cleanup.replace_deprecated_calls=false -sp_cleanup.return_expression=false -sp_cleanup.simplify_lambda_expression_and_method_ref=true -sp_cleanup.single_used_field=false -sp_cleanup.sort_members=false -sp_cleanup.sort_members_all=false -sp_cleanup.standard_comparison=false -sp_cleanup.static_inner_class=false -sp_cleanup.strictly_equal_or_different=false -sp_cleanup.stringbuffer_to_stringbuilder=false -sp_cleanup.stringbuilder=false -sp_cleanup.stringbuilder_for_local_vars=true -sp_cleanup.stringconcat_stringbuffer_stringbuilder=false -sp_cleanup.stringconcat_to_textblock=false -sp_cleanup.substring=false -sp_cleanup.switch=false -sp_cleanup.system_property=false -sp_cleanup.system_property_boolean=false -sp_cleanup.system_property_file_encoding=false -sp_cleanup.system_property_file_separator=false -sp_cleanup.system_property_line_separator=false -sp_cleanup.system_property_path_separator=false -sp_cleanup.ternary_operator=false -sp_cleanup.try_with_resource=false -sp_cleanup.unlooped_while=false -sp_cleanup.unreachable_block=false -sp_cleanup.use_anonymous_class_creation=false -sp_cleanup.use_autoboxing=false -sp_cleanup.use_blocks=false -sp_cleanup.use_blocks_only_for_return_and_throw=false -sp_cleanup.use_directly_map_method=false -sp_cleanup.use_lambda=true -sp_cleanup.use_parentheses_in_expressions=false -sp_cleanup.use_string_is_blank=false -sp_cleanup.use_this_for_non_static_field_access=false -sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true -sp_cleanup.use_this_for_non_static_method_access=false -sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true -sp_cleanup.use_unboxing=false -sp_cleanup.use_var=false -sp_cleanup.useless_continue=false -sp_cleanup.useless_return=false -sp_cleanup.valueof_rather_than_instantiation=false diff --git a/team/bundles/org.eclipse.core.net.linux/META-INF/MANIFEST.MF b/team/bundles/org.eclipse.core.net.linux/META-INF/MANIFEST.MF deleted file mode 100644 index 23284ef060d..00000000000 --- a/team/bundles/org.eclipse.core.net.linux/META-INF/MANIFEST.MF +++ /dev/null @@ -1,12 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %fragmentName -Bundle-Vendor: %providerName -Bundle-Localization: fragment -Bundle-SymbolicName: org.eclipse.core.net.linux;singleton:=true -Bundle-Version: 1.1.200.qualifier -Fragment-Host: org.eclipse.core.net;bundle-version="1.1.0" -Eclipse-PlatformFilter: (osgi.os=linux) -Bundle-RequiredExecutionEnvironment: JavaSE-17 -Automatic-Module-Name: org.eclipse.core.net.linux -Require-Bundle: com.sun.jna diff --git a/team/bundles/org.eclipse.core.net.linux/about.html b/team/bundles/org.eclipse.core.net.linux/about.html deleted file mode 100644 index 164f781a8fd..00000000000 --- a/team/bundles/org.eclipse.core.net.linux/about.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - -About - - -

About This Content

- -

November 30, 2017

-

License

- -

- The Eclipse Foundation makes available all content in this plug-in - ("Content"). Unless otherwise indicated below, the Content - is provided to you under the terms and conditions of the Eclipse - Public License Version 2.0 ("EPL"). A copy of the EPL is - available at http://www.eclipse.org/legal/epl-2.0. - For purposes of the EPL, "Program" will mean the Content. -

- -

- If you did not receive this Content directly from the Eclipse - Foundation, the Content is being redistributed by another party - ("Redistributor") and different terms and conditions may - apply to your use of any object code in the Content. Check the - Redistributor's license that was provided with the Content. If no such - 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 http://www.eclipse.org. -

- - - \ No newline at end of file diff --git a/team/bundles/org.eclipse.core.net.linux/build.properties b/team/bundles/org.eclipse.core.net.linux/build.properties deleted file mode 100644 index 6614e3beff5..00000000000 --- a/team/bundles/org.eclipse.core.net.linux/build.properties +++ /dev/null @@ -1,20 +0,0 @@ -############################################################################### -# Copyright (c) 2021 Red Hat Inc. and others. -# -# 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: -# Red Hat Inc. - initial API and implementation -############################################################################### -bin.includes = fragment.properties,\ - .,\ - META-INF/,\ - about.html -src.includes = about.html -source.. = src/ -output.. = bin/ diff --git a/team/bundles/org.eclipse.core.net.linux/forceQualifierUpdate.txt b/team/bundles/org.eclipse.core.net.linux/forceQualifierUpdate.txt deleted file mode 100644 index 017bc991db1..00000000000 --- a/team/bundles/org.eclipse.core.net.linux/forceQualifierUpdate.txt +++ /dev/null @@ -1,3 +0,0 @@ -# To force a version qualifier update add the bug here -https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/1184 -https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/1659 \ No newline at end of file diff --git a/team/bundles/org.eclipse.core.net.linux/fragment.properties b/team/bundles/org.eclipse.core.net.linux/fragment.properties deleted file mode 100644 index cbcfcd73945..00000000000 --- a/team/bundles/org.eclipse.core.net.linux/fragment.properties +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################### -# Copyright (c) 2021 Red Hat Inc. and others. -# -# 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: -# Red Hat Inc. - initial API and implementation -############################################################################### -fragmentName = Proxy for Linux -providerName = Eclipse.org diff --git a/team/bundles/org.eclipse.core.net.linux/pom.xml b/team/bundles/org.eclipse.core.net.linux/pom.xml deleted file mode 100644 index 53221bd5b33..00000000000 --- a/team/bundles/org.eclipse.core.net.linux/pom.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - 4.0.0 - - org.eclipse.platform - eclipse.platform.team - 4.33.0-SNAPSHOT - ../../ - - org.eclipse.core.net.linux - 1.1.200-SNAPSHOT - eclipse-plugin - - - true - - - diff --git a/team/bundles/org.eclipse.core.net.win32/.classpath b/team/bundles/org.eclipse.core.net.win32/.classpath deleted file mode 100644 index 81fe078c20c..00000000000 --- a/team/bundles/org.eclipse.core.net.win32/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/team/bundles/org.eclipse.core.net.win32/.project b/team/bundles/org.eclipse.core.net.win32/.project deleted file mode 100644 index d57569ddcc9..00000000000 --- a/team/bundles/org.eclipse.core.net.win32/.project +++ /dev/null @@ -1,29 +0,0 @@ - - - org.eclipse.core.net.win32 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - - diff --git a/team/bundles/org.eclipse.core.net.win32/.settings/org.eclipse.core.resources.prefs b/team/bundles/org.eclipse.core.net.win32/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0203a..00000000000 --- a/team/bundles/org.eclipse.core.net.win32/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/team/bundles/org.eclipse.core.net.win32/.settings/org.eclipse.core.runtime.prefs b/team/bundles/org.eclipse.core.net.win32/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 5a0ad22d2a7..00000000000 --- a/team/bundles/org.eclipse.core.net.win32/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -line.separator=\n diff --git a/team/bundles/org.eclipse.core.net.win32/.settings/org.eclipse.jdt.core.prefs b/team/bundles/org.eclipse.core.net.win32/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 6558ab78fc4..00000000000 --- a/team/bundles/org.eclipse.core.net.win32/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=17 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=17 diff --git a/team/bundles/org.eclipse.core.net.win32/.settings/org.eclipse.jdt.ui.prefs b/team/bundles/org.eclipse.core.net.win32/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 81f11511252..00000000000 --- a/team/bundles/org.eclipse.core.net.win32/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,147 +0,0 @@ -eclipse.preferences.version=1 -editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true -org.eclipse.jdt.ui.ondemandthreshold=99 -org.eclipse.jdt.ui.staticondemandthreshold=99 -sp_cleanup.add_all=false -sp_cleanup.add_default_serial_version_id=true -sp_cleanup.add_generated_serial_version_id=false -sp_cleanup.add_missing_annotations=true -sp_cleanup.add_missing_deprecated_annotations=true -sp_cleanup.add_missing_methods=false -sp_cleanup.add_missing_nls_tags=false -sp_cleanup.add_missing_override_annotations=true -sp_cleanup.add_missing_override_annotations_interface_methods=true -sp_cleanup.add_serial_version_id=false -sp_cleanup.also_simplify_lambda=true -sp_cleanup.always_use_blocks=true -sp_cleanup.always_use_parentheses_in_expressions=false -sp_cleanup.always_use_this_for_non_static_field_access=false -sp_cleanup.always_use_this_for_non_static_method_access=false -sp_cleanup.array_with_curly=false -sp_cleanup.arrays_fill=false -sp_cleanup.bitwise_conditional_expression=false -sp_cleanup.boolean_literal=false -sp_cleanup.boolean_value_rather_than_comparison=true -sp_cleanup.break_loop=false -sp_cleanup.collection_cloning=false -sp_cleanup.comparing_on_criteria=false -sp_cleanup.comparison_statement=false -sp_cleanup.controlflow_merge=false -sp_cleanup.convert_functional_interfaces=true -sp_cleanup.convert_to_enhanced_for_loop=true -sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true -sp_cleanup.convert_to_switch_expressions=false -sp_cleanup.correct_indentation=false -sp_cleanup.do_while_rather_than_while=false -sp_cleanup.double_negation=false -sp_cleanup.else_if=false -sp_cleanup.embedded_if=false -sp_cleanup.evaluate_nullable=false -sp_cleanup.extract_increment=false -sp_cleanup.format_source_code=true -sp_cleanup.format_source_code_changes_only=true -sp_cleanup.hash=false -sp_cleanup.if_condition=false -sp_cleanup.insert_inferred_type_arguments=false -sp_cleanup.instanceof=false -sp_cleanup.instanceof_keyword=false -sp_cleanup.invert_equals=false -sp_cleanup.join=false -sp_cleanup.lazy_logical_operator=false -sp_cleanup.make_local_variable_final=true -sp_cleanup.make_parameters_final=false -sp_cleanup.make_private_fields_final=true -sp_cleanup.make_type_abstract_if_missing_method=false -sp_cleanup.make_variable_declarations_final=false -sp_cleanup.map_cloning=false -sp_cleanup.merge_conditional_blocks=false -sp_cleanup.multi_catch=false -sp_cleanup.never_use_blocks=false -sp_cleanup.never_use_parentheses_in_expressions=true -sp_cleanup.no_string_creation=false -sp_cleanup.no_super=false -sp_cleanup.number_suffix=false -sp_cleanup.objects_equals=false -sp_cleanup.on_save_use_additional_actions=true -sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false -sp_cleanup.operand_factorization=false -sp_cleanup.organize_imports=true -sp_cleanup.overridden_assignment=false -sp_cleanup.overridden_assignment_move_decl=true -sp_cleanup.plain_replacement=false -sp_cleanup.precompile_regex=false -sp_cleanup.primitive_comparison=false -sp_cleanup.primitive_parsing=false -sp_cleanup.primitive_rather_than_wrapper=true -sp_cleanup.primitive_serialization=false -sp_cleanup.pull_out_if_from_if_else=false -sp_cleanup.pull_up_assignment=false -sp_cleanup.push_down_negation=false -sp_cleanup.qualify_static_field_accesses_with_declaring_class=false -sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_with_declaring_class=true -sp_cleanup.qualify_static_method_accesses_with_declaring_class=false -sp_cleanup.reduce_indentation=false -sp_cleanup.redundant_comparator=false -sp_cleanup.redundant_falling_through_block_end=false -sp_cleanup.remove_private_constructors=true -sp_cleanup.remove_redundant_modifiers=false -sp_cleanup.remove_redundant_semicolons=true -sp_cleanup.remove_redundant_type_arguments=true -sp_cleanup.remove_trailing_whitespaces=true -sp_cleanup.remove_trailing_whitespaces_all=true -sp_cleanup.remove_trailing_whitespaces_ignore_empty=false -sp_cleanup.remove_unnecessary_array_creation=false -sp_cleanup.remove_unnecessary_casts=true -sp_cleanup.remove_unnecessary_nls_tags=true -sp_cleanup.remove_unused_imports=true -sp_cleanup.remove_unused_local_variables=false -sp_cleanup.remove_unused_method_parameters=false -sp_cleanup.remove_unused_private_fields=true -sp_cleanup.remove_unused_private_members=false -sp_cleanup.remove_unused_private_methods=true -sp_cleanup.remove_unused_private_types=true -sp_cleanup.replace_deprecated_calls=false -sp_cleanup.return_expression=false -sp_cleanup.simplify_lambda_expression_and_method_ref=true -sp_cleanup.single_used_field=false -sp_cleanup.sort_members=false -sp_cleanup.sort_members_all=false -sp_cleanup.standard_comparison=false -sp_cleanup.static_inner_class=false -sp_cleanup.strictly_equal_or_different=false -sp_cleanup.stringbuffer_to_stringbuilder=false -sp_cleanup.stringbuilder=false -sp_cleanup.stringbuilder_for_local_vars=true -sp_cleanup.stringconcat_stringbuffer_stringbuilder=false -sp_cleanup.stringconcat_to_textblock=false -sp_cleanup.substring=false -sp_cleanup.switch=false -sp_cleanup.system_property=false -sp_cleanup.system_property_boolean=false -sp_cleanup.system_property_file_encoding=false -sp_cleanup.system_property_file_separator=false -sp_cleanup.system_property_line_separator=false -sp_cleanup.system_property_path_separator=false -sp_cleanup.ternary_operator=false -sp_cleanup.try_with_resource=false -sp_cleanup.unlooped_while=false -sp_cleanup.unreachable_block=false -sp_cleanup.use_anonymous_class_creation=false -sp_cleanup.use_autoboxing=false -sp_cleanup.use_blocks=false -sp_cleanup.use_blocks_only_for_return_and_throw=false -sp_cleanup.use_directly_map_method=false -sp_cleanup.use_lambda=true -sp_cleanup.use_parentheses_in_expressions=false -sp_cleanup.use_string_is_blank=false -sp_cleanup.use_this_for_non_static_field_access=false -sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true -sp_cleanup.use_this_for_non_static_method_access=false -sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true -sp_cleanup.use_unboxing=false -sp_cleanup.use_var=false -sp_cleanup.useless_continue=false -sp_cleanup.useless_return=false -sp_cleanup.valueof_rather_than_instantiation=false diff --git a/team/bundles/org.eclipse.core.net.win32/META-INF/MANIFEST.MF b/team/bundles/org.eclipse.core.net.win32/META-INF/MANIFEST.MF deleted file mode 100644 index ec29dec02da..00000000000 --- a/team/bundles/org.eclipse.core.net.win32/META-INF/MANIFEST.MF +++ /dev/null @@ -1,13 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %fragmentName -Bundle-Vendor: %providerName -Bundle-Localization: fragment -Bundle-SymbolicName: org.eclipse.core.net.win32;singleton:=true -Bundle-Version: 1.1.400.qualifier -Fragment-Host: org.eclipse.core.net;bundle-version="1.1.0" -Eclipse-PlatformFilter: (osgi.os=win32) -Bundle-RequiredExecutionEnvironment: JavaSE-17 -Automatic-Module-Name: org.eclipse.core.net.win32 -Require-Bundle: com.sun.jna, - com.sun.jna.platform diff --git a/team/bundles/org.eclipse.core.net.win32/about.html b/team/bundles/org.eclipse.core.net.win32/about.html deleted file mode 100644 index 164f781a8fd..00000000000 --- a/team/bundles/org.eclipse.core.net.win32/about.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - -About - - -

About This Content

- -

November 30, 2017

-

License

- -

- The Eclipse Foundation makes available all content in this plug-in - ("Content"). Unless otherwise indicated below, the Content - is provided to you under the terms and conditions of the Eclipse - Public License Version 2.0 ("EPL"). A copy of the EPL is - available at http://www.eclipse.org/legal/epl-2.0. - For purposes of the EPL, "Program" will mean the Content. -

- -

- If you did not receive this Content directly from the Eclipse - Foundation, the Content is being redistributed by another party - ("Redistributor") and different terms and conditions may - apply to your use of any object code in the Content. Check the - Redistributor's license that was provided with the Content. If no such - 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 http://www.eclipse.org. -

- - - \ No newline at end of file diff --git a/team/bundles/org.eclipse.core.net.win32/build.properties b/team/bundles/org.eclipse.core.net.win32/build.properties deleted file mode 100644 index 5651f24eab5..00000000000 --- a/team/bundles/org.eclipse.core.net.win32/build.properties +++ /dev/null @@ -1,20 +0,0 @@ -############################################################################### -# Copyright (c) 2009, 2022 IBM Corporation and others. -# -# 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: -# IBM Corporation - initial API and implementation -############################################################################### -bin.includes = fragment.properties,\ - .,\ - about.html,\ - META-INF/ -src.includes = about.html -source.. = src/ -output.. = bin/ diff --git a/team/bundles/org.eclipse.core.net.win32/forceQualifierUpdate.txt b/team/bundles/org.eclipse.core.net.win32/forceQualifierUpdate.txt deleted file mode 100644 index 017bc991db1..00000000000 --- a/team/bundles/org.eclipse.core.net.win32/forceQualifierUpdate.txt +++ /dev/null @@ -1,3 +0,0 @@ -# To force a version qualifier update add the bug here -https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/1184 -https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/1659 \ No newline at end of file diff --git a/team/bundles/org.eclipse.core.net.win32/fragment.properties b/team/bundles/org.eclipse.core.net.win32/fragment.properties deleted file mode 100644 index ff4e4defc05..00000000000 --- a/team/bundles/org.eclipse.core.net.win32/fragment.properties +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################### -# Copyright (c) 2009 IBM Corporation and others. -# -# 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: -# IBM Corporation - initial API and implementation -############################################################################### -fragmentName = Proxy for Windows -providerName = Eclipse.org diff --git a/team/bundles/org.eclipse.core.net.win32/pom.xml b/team/bundles/org.eclipse.core.net.win32/pom.xml deleted file mode 100644 index 5868a6f4614..00000000000 --- a/team/bundles/org.eclipse.core.net.win32/pom.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - 4.0.0 - - org.eclipse.platform - eclipse.platform.team - 4.33.0-SNAPSHOT - ../../ - - org.eclipse.core.net.win32 - 1.1.400-SNAPSHOT - eclipse-plugin - - - true - - - diff --git a/team/bundles/org.eclipse.core.net/.settings/org.eclipse.jdt.core.prefs b/team/bundles/org.eclipse.core.net/.settings/org.eclipse.jdt.core.prefs index 084539ca857..5fbdf798765 100644 --- a/team/bundles/org.eclipse.core.net/.settings/org.eclipse.jdt.core.prefs +++ b/team/bundles/org.eclipse.core.net/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,5 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning org.eclipse.jdt.core.builder.invalidClasspath=abort @@ -13,9 +14,12 @@ org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonN org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.notowning=org.eclipse.jdt.annotation.NotOwning org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.annotation.owning=org.eclipse.jdt.annotation.Owning +org.eclipse.jdt.core.compiler.annotation.resourceanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 @@ -26,6 +30,8 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=error @@ -48,8 +54,10 @@ org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompatibleOwningContract=warning org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error +org.eclipse.jdt.core.compiler.problem.insufficientResourceAnalysis=warning org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled @@ -99,8 +107,10 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=error +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning @@ -113,6 +123,7 @@ org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled @@ -126,7 +137,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameter=warning org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error +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=error diff --git a/team/bundles/org.eclipse.core.net/META-INF/MANIFEST.MF b/team/bundles/org.eclipse.core.net/META-INF/MANIFEST.MF index 829bc99ef85..c39a6d6193d 100644 --- a/team/bundles/org.eclipse.core.net/META-INF/MANIFEST.MF +++ b/team/bundles/org.eclipse.core.net/META-INF/MANIFEST.MF @@ -16,3 +16,7 @@ Export-Package: org.eclipse.core.internal.net;x-friends:="org.eclipse.ui.net", org.eclipse.core.net.proxy Bundle-RequiredExecutionEnvironment: JavaSE-17 Automatic-Module-Name: org.eclipse.core.net +Import-Package: com.sun.jna;version="[5.14.0,6.0.0)", + com.sun.jna.platform.win32;version="[5.14.0,6.0.0)", + com.sun.jna.ptr;version="[5.14.0,6.0.0)", + com.sun.jna.win32;version="[5.14.0,6.0.0)" diff --git a/team/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyManager.java b/team/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyManager.java index 8c0a053cb94..8326234e71b 100644 --- a/team/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyManager.java +++ b/team/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyManager.java @@ -21,6 +21,8 @@ import java.util.List; import java.util.Properties; +import org.eclipse.core.net.internal.proxy.linux.ProxyProviderLinux; +import org.eclipse.core.net.internal.proxy.win32.ProxyProviderWin32; import org.eclipse.core.net.proxy.IProxyChangeEvent; import org.eclipse.core.net.proxy.IProxyChangeListener; import org.eclipse.core.net.proxy.IProxyData; @@ -36,6 +38,7 @@ import org.eclipse.core.runtime.SafeRunner; import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener; import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent; +import org.eclipse.osgi.service.environment.Constants; import org.eclipse.osgi.util.NLS; import org.osgi.service.prefs.BackingStoreException; import org.osgi.service.prefs.Preferences; @@ -62,10 +65,12 @@ public class ProxyManager implements IProxyService, IPreferenceChangeListener { private ProxyManager() { try { - nativeProxyProvider = (AbstractProxyProvider) Class.forName( - "org.eclipse.core.net.ProxyProvider").getDeclaredConstructor().newInstance(); //$NON-NLS-1$ - } catch (ClassNotFoundException e) { - // no class found + String os = System.getProperty("osgi.os"); //$NON-NLS-1$ + nativeProxyProvider = switch (os) { + case Constants.OS_LINUX -> new ProxyProviderLinux(); + case Constants.OS_WIN32 -> new ProxyProviderWin32(); + default -> null; + }; } catch (Exception e) { Activator.logInfo("Problems occured during the proxy provider initialization.", e); //$NON-NLS-1$ } diff --git a/team/bundles/org.eclipse.core.net.linux/src/org/eclipse/core/net/ProxyProvider.java b/team/bundles/org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/linux/ProxyProviderLinux.java similarity index 98% rename from team/bundles/org.eclipse.core.net.linux/src/org/eclipse/core/net/ProxyProvider.java rename to team/bundles/org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/linux/ProxyProviderLinux.java index c2993586cfc..606dc8a91ad 100644 --- a/team/bundles/org.eclipse.core.net.linux/src/org/eclipse/core/net/ProxyProvider.java +++ b/team/bundles/org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/linux/ProxyProviderLinux.java @@ -11,7 +11,7 @@ * Contributors: * Red Hat Inc. - initial API and implementation *******************************************************************************/ -package org.eclipse.core.net; +package org.eclipse.core.net.internal.proxy.linux; import java.io.IOException; import java.net.URI; @@ -38,7 +38,7 @@ * @author jjohnstn * */ -public class ProxyProvider extends AbstractProxyProvider { +public class ProxyProviderLinux extends AbstractProxyProvider { private static LibGio fLibGio; @@ -62,7 +62,7 @@ public class ProxyProvider extends AbstractProxyProvider { } } - public ProxyProvider() { + public ProxyProviderLinux() { // no initialization required } diff --git a/team/bundles/org.eclipse.core.net.win32/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyBypass.java b/team/bundles/org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/win32/ProxyBypass.java similarity index 97% rename from team/bundles/org.eclipse.core.net.win32/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyBypass.java rename to team/bundles/org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/win32/ProxyBypass.java index cdf03eeb652..3369c3f2bec 100644 --- a/team/bundles/org.eclipse.core.net.win32/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyBypass.java +++ b/team/bundles/org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/win32/ProxyBypass.java @@ -12,7 +12,7 @@ * compeople AG (Stefan Liebig) - initial API and implementation * IBM Corporation - Add proxy providers layer on the top of ProxyManager (bug 255616) *******************************************************************************/ -package org.eclipse.core.internal.net.proxy.win32.winhttp; +package org.eclipse.core.net.internal.proxy.win32; import java.net.URI; diff --git a/team/bundles/org.eclipse.core.net.win32/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyProviderUtil.java b/team/bundles/org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/win32/ProxyProviderUtil.java similarity index 99% rename from team/bundles/org.eclipse.core.net.win32/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyProviderUtil.java rename to team/bundles/org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/win32/ProxyProviderUtil.java index 421c2b86089..b64311fe7ba 100644 --- a/team/bundles/org.eclipse.core.net.win32/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyProviderUtil.java +++ b/team/bundles/org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/win32/ProxyProviderUtil.java @@ -13,7 +13,7 @@ * IBM Corporation - bug 246072 - adding IProxyData.source support * IBM Corporation - Add proxy providers layer on the top of ProxyManager (bug 255616) *******************************************************************************/ -package org.eclipse.core.internal.net.proxy.win32.winhttp; +package org.eclipse.core.net.internal.proxy.win32; import java.net.URI; import java.util.ArrayList; diff --git a/team/bundles/org.eclipse.core.net.win32/src/org/eclipse/core/net/ProxyProvider.java b/team/bundles/org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/win32/ProxyProviderWin32.java similarity index 84% rename from team/bundles/org.eclipse.core.net.win32/src/org/eclipse/core/net/ProxyProvider.java rename to team/bundles/org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/win32/ProxyProviderWin32.java index 0a6a86ba97d..a435b49a2fb 100644 --- a/team/bundles/org.eclipse.core.net.win32/src/org/eclipse/core/net/ProxyProvider.java +++ b/team/bundles/org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/win32/ProxyProviderWin32.java @@ -11,7 +11,7 @@ * Contributors: * Rolf Theunissen - initial API and implementation *******************************************************************************/ -package org.eclipse.core.net; +package org.eclipse.core.net.internal.proxy.win32; import java.net.URI; import java.util.ArrayList; @@ -22,9 +22,6 @@ import org.eclipse.core.internal.net.Policy; import org.eclipse.core.internal.net.ProxyData; import org.eclipse.core.internal.net.StringUtil; -import org.eclipse.core.internal.net.proxy.win32.winhttp.ProxyBypass; -import org.eclipse.core.internal.net.proxy.win32.winhttp.ProxyProviderUtil; -import org.eclipse.core.internal.net.proxy.win32.winhttp.StaticProxyConfig; import org.eclipse.core.net.proxy.IProxyData; import com.sun.jna.LastErrorException; @@ -48,10 +45,10 @@ * * @see "http://msdn2.microsoft.com/en-us/library/aa382925(VS.85).aspx" */ -public class ProxyProvider extends AbstractProxyProvider { +public class ProxyProviderWin32 extends AbstractProxyProvider { - private static final String LIBRARY_NAME = "winhttp"; - private static final String USER_AGENT = "WinHttpProxyProvider"; + private static final String LIBRARY_NAME = "winhttp"; //$NON-NLS-1$ + private static final String USER_AGENT = "WinHttpProxyProvider"; //$NON-NLS-1$ private static final ProxyData[] EMPTY_PROXIES = new ProxyData[0]; private static WinHttp fWinHttp; @@ -70,18 +67,18 @@ public class ProxyProvider extends AbstractProxyProvider { fWinHttp = Native.load(LIBRARY_NAME, WinHttp.class, W32APIOptions.UNICODE_OPTIONS); fWinHttp = (WinHttp) Native.synchronizedLibrary(fWinHttp); if (Policy.DEBUG_SYSTEM_PROVIDERS) { - Policy.debug("Loaded library " + System.mapLibraryName(LIBRARY_NAME)); + Policy.debug("Loaded library " + System.mapLibraryName(LIBRARY_NAME)); //$NON-NLS-1$ } isWinHttpLoaded = true; } catch (UnsatisfiedLinkError e) { if (Policy.DEBUG_SYSTEM_PROVIDERS) { - Policy.debug("Could not load library " + System.mapLibraryName(LIBRARY_NAME)); + Policy.debug("Could not load library " + System.mapLibraryName(LIBRARY_NAME)); //$NON-NLS-1$ } - Activator.logError("Problem during initializing system proxy configuration.", e); + Activator.logError("Problem during initializing system proxy configuration.", e); //$NON-NLS-1$ } } - public ProxyProvider() { + public ProxyProviderWin32() { if (isWinHttpLoaded) { initialize(); } @@ -91,9 +88,9 @@ public ProxyProvider() { public IProxyData[] select(URI uri) { IProxyData[] proxies = getSystemProxyInfo(uri); if (Policy.DEBUG) { - Policy.debug("WindowsProxyProvider#select result for [" + uri + "]"); + Policy.debug("WindowsProxyProvider#select result for [" + uri + "]"); //$NON-NLS-1$ //$NON-NLS-2$ for (IProxyData proxy : proxies) { - System.out.println(" " + proxy); + System.out.println(" " + proxy); //$NON-NLS-1$ } } return proxies; @@ -103,7 +100,7 @@ protected IProxyData[] getSystemProxyInfo(URI uri) { WinHttp.WinHttpCurrentUserIEProxyConfig proxyConfig = getProxyConfig(); if (proxyConfig == null) { if (Policy.DEBUG_SYSTEM_PROVIDERS) { - Policy.debug("Error getting proxy configuration"); + Policy.debug("Error getting proxy configuration"); //$NON-NLS-1$ } return EMPTY_PROXIES; } @@ -120,7 +117,7 @@ protected IProxyData[] getSystemProxyInfo(URI uri) { // WPAD: Web Proxy Auto-Discovery configuration if (proxyConfig.fAutoDetect) { if (Policy.DEBUG_SYSTEM_PROVIDERS) { - Policy.debug("Dynamic proxy configuration using WPAD"); + Policy.debug("Dynamic proxy configuration using WPAD"); //$NON-NLS-1$ } autoProxyOptions.dwFlags = WinHttp.AUTOPROXY_AUTO_DETECT; autoProxyOptions.dwAutoDetectFlags = WinHttp.AUTO_DETECT_TYPE_DHCP | WinHttp.AUTO_DETECT_TYPE_DNS_A; @@ -129,7 +126,7 @@ protected IProxyData[] getSystemProxyInfo(URI uri) { // When both WPAD and PAC are set, WinHTTP tries PAC only after WPAD failed if (proxyConfig.lpszAutoConfigUrl != null) { if (Policy.DEBUG_SYSTEM_PROVIDERS) { - Policy.debug("Dynamic proxy configuration using PAC url"); + Policy.debug("Dynamic proxy configuration using PAC url"); //$NON-NLS-1$ } autoProxyOptions.dwFlags |= WinHttp.AUTOPROXY_CONFIG_URL; autoProxyOptions.lpszAutoConfigUrl = proxyConfig.getAutoConfigUrl(); @@ -139,8 +136,8 @@ protected IProxyData[] getSystemProxyInfo(URI uri) { try { getProxyForUrl(hHttpSession, uri.toString(), autoProxyOptions, proxyInfo); if (Policy.DEBUG_SYSTEM_PROVIDERS) { - Policy.debug("Dynamic proxy configuration returned: Proxy '" + proxyInfo.getProxy() - + "'; ProxyByPass '" + proxyInfo.getProxyBypass() + "';"); + Policy.debug("Dynamic proxy configuration returned: Proxy '" + proxyInfo.getProxy() //$NON-NLS-1$ + + "'; ProxyByPass '" + proxyInfo.getProxyBypass() + "';"); //$NON-NLS-1$ //$NON-NLS-2$ } ProxyBypass proxyBypass = new ProxyBypass(proxyInfo.getProxyBypass()); @@ -152,7 +149,7 @@ protected IProxyData[] getSystemProxyInfo(URI uri) { // WPAD/PAC errors are intermittent, they can disappear when network // configuration changes. Ignore errors, continue to static configuration. if (Policy.DEBUG_SYSTEM_PROVIDERS) { - Policy.debug("Dynamic proxy configuration returned error: " + formatMessage(e.getErrorCode())); + Policy.debug("Dynamic proxy configuration returned error: " + formatMessage(e.getErrorCode())); //$NON-NLS-1$ } } finally { proxyInfo.free(); @@ -162,8 +159,8 @@ protected IProxyData[] getSystemProxyInfo(URI uri) { // Static configuration if (proxyConfig.lpszProxy != null) { if (Policy.DEBUG_SYSTEM_PROVIDERS) { - Policy.debug("Static proxy configuration: Proxy '" + proxyConfig.getProxy() + "'; ProxyByPass '" - + proxyConfig.getProxyBypass() + "';"); + Policy.debug("Static proxy configuration: Proxy '" + proxyConfig.getProxy() + "'; ProxyByPass '" //$NON-NLS-1$//$NON-NLS-2$ + + proxyConfig.getProxyBypass() + "';"); //$NON-NLS-1$ } StaticProxyConfig staticProxyConfig = getStaticConfig(proxyConfig.getProxy(), proxyConfig.getProxyBypass()); @@ -175,7 +172,7 @@ protected IProxyData[] getSystemProxyInfo(URI uri) { // Default configuration direct connection if (Policy.DEBUG_SYSTEM_PROVIDERS) { - Policy.debug("No proxy configuration"); + Policy.debug("No proxy configuration"); //$NON-NLS-1$ } return EMPTY_PROXIES; @@ -189,7 +186,7 @@ protected IProxyData[] getProxyData() { WinHttp.WinHttpCurrentUserIEProxyConfig proxyConfig = getProxyConfig(); if (proxyConfig == null) { if (Policy.DEBUG_SYSTEM_PROVIDERS) { - Policy.debug("Error getting proxy configuration"); + Policy.debug("Error getting proxy configuration"); //$NON-NLS-1$ } return EMPTY_PROXIES; } @@ -198,28 +195,27 @@ protected IProxyData[] getProxyData() { if (isWinHttpInitialized && (proxyConfig.fAutoDetect || proxyConfig.lpszAutoConfigUrl != null)) { // Dynamic configuration if (Policy.DEBUG_SYSTEM_PROVIDERS) { - Policy.debug("Dynamic proxy configuration"); + Policy.debug("Dynamic proxy configuration"); //$NON-NLS-1$ } - ProxyData data = new ProxyData(IProxyData.HTTP_PROXY_TYPE, "", -1, false, "WINDOWS_IE"); + ProxyData data = new ProxyData(IProxyData.HTTP_PROXY_TYPE, "", -1, false, "WINDOWS_IE"); //$NON-NLS-1$//$NON-NLS-2$ data.setDynamic(true); return new IProxyData[] { data }; - } else { - // Static Configuration - if (Policy.DEBUG_SYSTEM_PROVIDERS) { - Policy.debug("Static proxy configuration"); - } - if (proxyConfig.lpszProxy != null) { - StaticProxyConfig staticProxyConfig = getStaticConfig(proxyConfig.getProxy(), - proxyConfig.getProxyBypass()); - return staticProxyConfig.getProxyData(); - } + } + // Static Configuration + if (Policy.DEBUG_SYSTEM_PROVIDERS) { + Policy.debug("Static proxy configuration"); //$NON-NLS-1$ + } + if (proxyConfig.lpszProxy != null) { + StaticProxyConfig staticProxyConfig = getStaticConfig(proxyConfig.getProxy(), + proxyConfig.getProxyBypass()); + return staticProxyConfig.getProxyData(); } } finally { proxyConfig.free(); } // Default configuration direct connection if (Policy.DEBUG_SYSTEM_PROVIDERS) { - Policy.debug("No proxy configuration"); + Policy.debug("No proxy configuration"); //$NON-NLS-1$ } return EMPTY_PROXIES; } @@ -236,13 +232,13 @@ protected String[] getNonProxiedHosts() { if (isWinHttpInitialized && (proxyConfig.fAutoDetect || proxyConfig.lpszAutoConfigUrl != null)) { // Dynamic configuration if (Policy.DEBUG_SYSTEM_PROVIDERS) { - Policy.debug("Dynamic proxy configuration"); + Policy.debug("Dynamic proxy configuration"); //$NON-NLS-1$ } return null; } else if (proxyConfig.lpszProxy != null) { // Static configuration if (Policy.DEBUG_SYSTEM_PROVIDERS) { - Policy.debug("Static proxy configuration"); + Policy.debug("Static proxy configuration"); //$NON-NLS-1$ } StaticProxyConfig staticProxyConfig = getStaticConfig(proxyConfig.getProxy(), proxyConfig.getProxyBypass()); @@ -252,7 +248,7 @@ protected String[] getNonProxiedHosts() { proxyConfig.free(); } if (Policy.DEBUG_SYSTEM_PROVIDERS) { - Policy.debug("No proxy configuration"); + Policy.debug("No proxy configuration"); //$NON-NLS-1$ } return null; } @@ -264,7 +260,7 @@ private void initialize() { isWinHttpInitialized = true; } catch (LastErrorException e) { isWinHttpInitialized = false; - Activator.logError("Problem during initializing WinHTTP session:" + formatMessage(e.getErrorCode()), null); + Activator.logError("Problem during initializing WinHTTP session:" + formatMessage(e.getErrorCode()), null); //$NON-NLS-1$ } } @@ -277,7 +273,7 @@ private WinHttp.WinHttpCurrentUserIEProxyConfig getProxyConfig() { return proxyConfig; } catch (LastErrorException e) { proxyConfig.free(); - Activator.logError("Problem during loading proxy configuration: " + formatMessage(e.getErrorCode()), + Activator.logError("Problem during loading proxy configuration: " + formatMessage(e.getErrorCode()), //$NON-NLS-1$ null); } } @@ -424,32 +420,31 @@ private static String formatMessage(int code) { HMODULE hmodule = Kernel32.INSTANCE.GetModuleHandle(System.mapLibraryName(LIBRARY_NAME)); if (hmodule == null) { - return "Error code " + code + "; No error message due to failure of 'GetModuleHandle(" - + System.mapLibraryName(LIBRARY_NAME) + ")'."; - } else { - PointerByReference msgBuf = new PointerByReference(); - int size = Kernel32.INSTANCE.FormatMessage( - WinBase.FORMAT_MESSAGE_ALLOCATE_BUFFER | WinBase.FORMAT_MESSAGE_FROM_HMODULE - | WinBase.FORMAT_MESSAGE_IGNORE_INSERTS, - hmodule.getPointer(), code, WinNT.LANG_USER_DEFAULT, msgBuf, 0, null); - if (size == 0) { - return "Error code " + code + "; No error message due to error " + Native.getLastError(); - } + return "Error code " + code + "; No error message due to failure of 'GetModuleHandle(" //$NON-NLS-1$//$NON-NLS-2$ + + System.mapLibraryName(LIBRARY_NAME) + ")'."; //$NON-NLS-1$ + } + PointerByReference msgBuf = new PointerByReference(); + int size = Kernel32.INSTANCE.FormatMessage( + WinBase.FORMAT_MESSAGE_ALLOCATE_BUFFER | WinBase.FORMAT_MESSAGE_FROM_HMODULE + | WinBase.FORMAT_MESSAGE_IGNORE_INSERTS, + hmodule.getPointer(), code, WinNT.LANG_USER_DEFAULT, msgBuf, 0, null); + if (size == 0) { + return "Error code " + code + "; No error message due to error " + Native.getLastError(); //$NON-NLS-1$ //$NON-NLS-2$ + } - Pointer ptr = msgBuf.getValue(); - try { - String str = ptr.getWideString(0); - return str.trim(); - } finally { - Kernel32Util.freeLocalMemory(ptr); - } + Pointer ptr = msgBuf.getValue(); + try { + String str = ptr.getWideString(0); + return str.trim(); + } finally { + Kernel32Util.freeLocalMemory(ptr); } } try { return Kernel32Util.formatMessage(code); } catch (LastErrorException e) { - return "Error code " + code + "; No error message due to error " + e.getErrorCode(); + return "Error code " + code + "; No error message due to error " + e.getErrorCode(); //$NON-NLS-1$ //$NON-NLS-2$ } } diff --git a/team/bundles/org.eclipse.core.net.win32/src/org/eclipse/core/internal/net/proxy/win32/winhttp/StaticProxyConfig.java b/team/bundles/org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/win32/StaticProxyConfig.java similarity index 98% rename from team/bundles/org.eclipse.core.net.win32/src/org/eclipse/core/internal/net/proxy/win32/winhttp/StaticProxyConfig.java rename to team/bundles/org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/win32/StaticProxyConfig.java index 73db239a4dc..1c65592fc2b 100644 --- a/team/bundles/org.eclipse.core.net.win32/src/org/eclipse/core/internal/net/proxy/win32/winhttp/StaticProxyConfig.java +++ b/team/bundles/org.eclipse.core.net/src/org/eclipse/core/net/internal/proxy/win32/StaticProxyConfig.java @@ -13,7 +13,7 @@ * IBM Corporation - handling URI without a scheme by select(URI, List) (bug 246065) * IBM Corporation - Add proxy providers layer on the top of ProxyManager (bug 255616) *******************************************************************************/ -package org.eclipse.core.internal.net.proxy.win32.winhttp; +package org.eclipse.core.net.internal.proxy.win32; import java.net.URI; import java.util.ArrayList;