diff --git a/tycho-apitools-plugin/src/main/java/org/eclipse/tycho/apitools/ApiAnalysis.java b/tycho-apitools-plugin/src/main/java/org/eclipse/tycho/apitools/ApiAnalysis.java index 942b500a44..4f5aebd540 100644 --- a/tycho-apitools-plugin/src/main/java/org/eclipse/tycho/apitools/ApiAnalysis.java +++ b/tycho-apitools-plugin/src/main/java/org/eclipse/tycho/apitools/ApiAnalysis.java @@ -273,6 +273,32 @@ private Map computeOutputJars(IProject project) throws CoreExcep for (String token : entry.getTokens()) { outputJars.put(token, key); } + } else if (name.startsWith(IBuildEntry.JAR_PREFIX)) { + // Actually each source. should have a corresponding output. but there + // are some cases where this is not true... lets cheat and look at the + // classpath instead... + String key = name.substring(IBuildEntry.JAR_PREFIX.length()); + IJavaProject javaProject = JavaCore.create(project); + if (javaProject != null) { + IClasspathEntry[] rawClasspath = javaProject.getRawClasspath(); + for (String token : entry.getTokens()) { + IPath srcPath = project.getFolder(token).getFullPath(); + for (IClasspathEntry classpathEntry : rawClasspath) { + if (classpathEntry.getEntryKind() == IClasspathEntry.CPE_SOURCE) { + IPath path = classpathEntry.getPath(); + if (srcPath.equals(path)) { + IPath outputLocation = classpathEntry.getOutputLocation(); + if (outputLocation == null) { + outputLocation = javaProject.getOutputLocation(); + } + IFolder folder = getProjectFolder(outputLocation); + String output = folder.getProjectRelativePath().toString(); + outputJars.putIfAbsent(output, key); + } + } + } + } + } } } } diff --git a/tycho-its/projects/api-tools/missing-bin/.mvn/extensions.xml b/tycho-its/projects/api-tools/missing-bin/.mvn/extensions.xml new file mode 100644 index 0000000000..79a6c51e8d --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/.mvn/extensions.xml @@ -0,0 +1,7 @@ + + + org.eclipse.tycho + tycho-build + ${tycho-version} + + diff --git a/tycho-its/projects/api-tools/missing-bin/.mvn/maven.config b/tycho-its/projects/api-tools/missing-bin/.mvn/maven.config new file mode 100644 index 0000000000..babb6c469f --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/.mvn/maven.config @@ -0,0 +1 @@ +-Dtycho-version=5.0.0-SNAPSHOT diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/.classpath b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/.classpath new file mode 100644 index 0000000000..81fe078c20 --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/.project b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/.project new file mode 100644 index 0000000000..1b62af1af1 --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/.project @@ -0,0 +1,39 @@ + + + org.eclipse.equinox.p2.ui + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.pde.api.tools.apiAnalysisBuilder + + + + + org.eclipse.pde.ds.core.builder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.api.tools.apiAnalysisNature + + diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.core.prefs b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..81c29d4466 --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,488 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=error +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +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.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.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.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000 +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=error +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=error +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=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private +org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +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 +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=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 +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=error +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error +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=enabled +org.eclipse.jdt.core.compiler.source=17 +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 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +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_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_conditional_expression_chain=0 +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_relational_operator=0 +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_shift_operator=0 +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 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=true +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=false +org.eclipse.jdt.core.formatter.comment.indent_tag_description=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +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_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=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_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 +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert +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 +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +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_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=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_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 +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +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 +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +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 +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.lineSplit=120 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +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=false +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_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_relational_operator=true +org.eclipse.jdt.core.formatter.wrap_before_shift_operator=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 +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.ui.prefs b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000..afe11a26eb --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=org.eclipse.jdt.ui.default.eclipse_profile +formatter_settings_version=16 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=; +org.eclipse.jdt.ui.ondemandthreshold=3 +org.eclipse.jdt.ui.staticondemandthreshold=3 +org.eclipse.jdt.ui.text.custom_code_templates= +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.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.convert_functional_interfaces=true +sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.make_local_variable_final=false +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.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +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=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=true +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_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=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.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=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 diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..66768064e5 --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF @@ -0,0 +1,46 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %bundleName +Bundle-SymbolicName: org.eclipse.equinox.p2.ui;singleton:=true +Bundle-Version: 2.9.0.qualifier +Bundle-Activator: org.eclipse.equinox.internal.p2.ui.ProvUIActivator +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Export-Package: org.eclipse.equinox.internal.p2.ui; + x-friends:="org.eclipse.equinox.p2.ui.admin, + org.eclipse.pde.ui, + org.eclipse.equinox.p2.ui.sdk, + org.eclipse.equinox.p2.ui.rcp, + org.eclipse.equinox.p2.ui.importexport, + org.eclipse.equinox.p2.ui.sdk.scheduler, + org.eclipse.equinox.p2.discovery, + org.eclipse.equinox.p2.ui.discovery", + org.eclipse.equinox.internal.p2.ui.actions;x-friends:="org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.ui.sdk.scheduler", + org.eclipse.equinox.internal.p2.ui.dialogs; + x-friends:="org.eclipse.equinox.p2.ui.admin, + org.eclipse.equinox.p2.ui.sdk.scheduler, + org.eclipse.equinox.p2.ui.sdk, + org.eclipse.pde.ui, + org.eclipse.equinox.p2.ui.importexport", + org.eclipse.equinox.internal.p2.ui.model; + x-friends:="org.eclipse.equinox.internal.p2.ui.analysis, + org.eclipse.equinox.p2.ui.admin, + org.eclipse.equinox.p2.ui.sdk.scheduler, + org.eclipse.equinox.p2.ui.sdk, + org.eclipse.equinox.p2.ui.importexport", + org.eclipse.equinox.p2.ui;version="2.6.0" +Require-Bundle: org.eclipse.ui;bundle-version="3.107.0", + org.eclipse.core.runtime;bundle-version="[3.0.0,4.0.0)" +Import-Package: org.eclipse.equinox.internal.p2.metadata, + org.eclipse.equinox.internal.provisional.p2.repository, + org.eclipse.equinox.p2.core;version="[2.7.0,3.0.0)", + org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)", + org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)", + org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)", + org.eclipse.equinox.p2.operations;version="[2.0.0,3.0.0)", + org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)", + org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)", + org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)" +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-17 +Automatic-Module-Name: org.eclipse.equinox.p2.ui diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/build.properties b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/build.properties new file mode 100644 index 0000000000..29e6d9c192 --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/build.properties @@ -0,0 +1,19 @@ +############################################################################### +# Copyright (c) 2007, 2010 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 = plugin.properties,\ + .,\ + META-INF/,\ + plugin.xml +source.. = src/ +# this is the missing one we want to test: output.. = bin/ \ No newline at end of file diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/plugin.properties b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/plugin.properties new file mode 100644 index 0000000000..4a76b50a68 --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/plugin.properties @@ -0,0 +1,22 @@ +############################################################################### +# Copyright (c) 2007, 2010 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 +############################################################################### +# +# Provisioning UI plugin resources +# +providerName = Eclipse.org - Equinox +bundleName=Equinox Provisioning UI Support +IU.general=General Information +IU.license=License Agreement +IU.copyright=Copyright + diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/plugin.xml b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/plugin.xml new file mode 100644 index 0000000000..87e8645fd2 --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/plugin.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvisioningOperationRunner.java b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvisioningOperationRunner.java new file mode 100644 index 0000000000..d9e6b81b68 --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvisioningOperationRunner.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 2007, 2018 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 + * Red Hat Inc. - Bug 460967 + *******************************************************************************/ +package org.eclipse.equinox.internal.p2.ui; + +/** + * Utility methods for running provisioning operations. Operations can either be + * run synchronously or in a job. When scheduled as a job, the operation + * determines whether the job is run in the background or in the UI. + * + * @since 3.4 + */ +public class ProvisioningOperationRunner { + +} diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/AcceptLicensesWizardPage.java b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/AcceptLicensesWizardPage.java new file mode 100644 index 0000000000..52a12bbb39 --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/AcceptLicensesWizardPage.java @@ -0,0 +1,323 @@ +/******************************************************************************* + * Copyright (c) 2007, 2018 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 + *******************************************************************************/ +package org.eclipse.equinox.p2.ui; + +import java.util.*; +import java.util.List; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.equinox.internal.p2.metadata.License; +import org.eclipse.equinox.p2.engine.IProvisioningPlan; +import org.eclipse.equinox.p2.metadata.IInstallableUnit; +import org.eclipse.equinox.p2.metadata.ILicense; +import org.eclipse.equinox.p2.operations.*; +import org.eclipse.equinox.p2.query.QueryUtil; +import org.eclipse.jface.viewers.*; +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.swt.custom.SashForm; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.*; + +/** + * AcceptLicensesWizardPage shows a list of the IU's that have licenses that + * have not been approved by the user, and allows the user to approve them. + * + * @since 2.0 + * @noextend This class is not intended to be subclassed by clients. + */ +public class AcceptLicensesWizardPage extends WizardPage { + + class IUWithLicenseParent { + IInstallableUnit iu; + ILicense license; + + IUWithLicenseParent(ILicense license, IInstallableUnit iu) { + this.license = license; + this.iu = iu; + } + } + + class LicenseContentProvider implements ITreeContentProvider { + @Override + public Object[] getChildren(Object parentElement) { + if (!(parentElement instanceof ILicense)) + return new Object[0]; + + if (licensesToIUs.containsKey(parentElement)) { + List iusWithLicense = licensesToIUs.get(parentElement); + IInstallableUnit[] ius = iusWithLicense.toArray(new IInstallableUnit[iusWithLicense.size()]); + IUWithLicenseParent[] children = new IUWithLicenseParent[ius.length]; + for (int i = 0; i < ius.length; i++) { + children[i] = new IUWithLicenseParent((ILicense) parentElement, ius[i]); + } + return children; + } + return null; + } + + @Override + public Object getParent(Object element) { + if (element instanceof IUWithLicenseParent) { + return ((IUWithLicenseParent) element).license; + } + return null; + } + + @Override + public boolean hasChildren(Object element) { + return licensesToIUs.containsKey(element); + } + + @Override + public Object[] getElements(Object inputElement) { + return licensesToIUs.keySet().toArray(); + } + + @Override + public void dispose() { + // Nothing to do + } + + @Override + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + // Nothing to do + } + } + + class LicenseLabelProvider extends LabelProvider { + @Override + public Image getImage(Object element) { + return null; + } + + @Override + public String getText(Object element) { + if (element instanceof License) { + return getFirstLine(((License) element).getBody()); + } else if (element instanceof IUWithLicenseParent) { + return getIUName(((IUWithLicenseParent) element).iu); + } else if (element instanceof IInstallableUnit) { + return getIUName((IInstallableUnit) element); + } + return ""; //$NON-NLS-1$ + } + + private String getFirstLine(String body) { + int i = body.indexOf('\n'); + int j = body.indexOf('\r'); + if (i > 0) { + if (j > 0) + return body.substring(0, i < j ? i : j); + return body.substring(0, i); + } else if (j > 0) { + return body.substring(0, j); + } + return body; + } + } + + TreeViewer iuViewer; + Text licenseTextBox; + Button acceptButton; + Button declineButton; + SashForm sashForm; + HashMap> licensesToIUs; // License -> IU Name + private LicenseManager manager; + + static String getIUName(IInstallableUnit iu) { + StringBuilder buf = new StringBuilder(); + String name = iu.getProperty(IInstallableUnit.PROP_NAME, null); + if (name != null) + buf.append(name); + else + buf.append(iu.getId()); + buf.append(" "); //$NON-NLS-1$ + buf.append(iu.getVersion().toString()); + return buf.toString(); + } + + /** + * Create a license acceptance page for showing licenses to the user. + * + * @param manager the license manager that should be used to check for already + * accepted licenses. May be null. + * @param ius the IInstallableUnits for which licenses should be checked + * @param operation the provisioning operation describing what changes are to + * take place on the profile + */ + public AcceptLicensesWizardPage(LicenseManager manager, IInstallableUnit[] ius, ProfileChangeOperation operation) { + super("AcceptLicenses"); //$NON-NLS-1$ + setTitle(""); + this.manager = manager; + update(ius, operation); + } + + @Override + public void createControl(Composite parent) { + } + + void handleSelectionChanged(IStructuredSelection selection) { + if (!selection.isEmpty()) { + Object selected = selection.getFirstElement(); + if (selected instanceof License) + licenseTextBox.setText(((License) selected).getBody()); + else if (selected instanceof IUWithLicenseParent) + licenseTextBox.setText(((IUWithLicenseParent) selected).license.getBody()); + } + } + + /** + * The wizard is finishing. Perform any necessary processing. + * + * @return true if the finish can proceed, false if it + * should not. + */ + public boolean performFinish() { + rememberAcceptedLicenses(); + return true; + } + + /** + * Return a boolean indicating whether there are licenses that must be accepted + * by the user. + * + * @return true if there are licenses that must be accepted, and + * false if there are no licenses that must be accepted. + */ + public boolean hasLicensesToAccept() { + return licensesToIUs != null && licensesToIUs.size() > 0; + } + + /** + * Update the current page to show the licenses that must be approved for the + * selected IUs and the provisioning plan. + * + * Clients using this page in conjunction with a {@link ProfileChangeOperation} + * should instead use + * {@link #update(IInstallableUnit[], ProfileChangeOperation)}. This method is + * intended for clients who are working with a low-level provisioning plan + * rather than an {@link InstallOperation} or {@link UpdateOperation}. + * + * @param theIUs the installable units to be installed for which licenses must + * be checked + * @param plan the provisioning plan that describes a resolved install + * operation + * + * @see #update(IInstallableUnit[], ProfileChangeOperation) + */ + + public void updateForPlan(IInstallableUnit[] theIUs, IProvisioningPlan plan) { + updateLicenses(theIUs, plan); + } + + private void updateLicenses(IInstallableUnit[] theIUs, IProvisioningPlan plan) { + if (theIUs == null) + licensesToIUs = new HashMap<>(); + else + findUnacceptedLicenses(theIUs, plan); + setDescription(); + setPageComplete(licensesToIUs.size() == 0); + if (getControl() != null) { + Composite parent = getControl().getParent(); + getControl().dispose(); + iuViewer = null; + sashForm = null; + createControl(parent); + parent.layout(true); + } + } + + /** + * Update the page for the specified IInstallableUnits and operation. + * + * @param theIUs the IInstallableUnits for which licenses should be checked + * @param operation the operation describing the pending profile change + */ + public void update(IInstallableUnit[] theIUs, ProfileChangeOperation operation) { + if (operation != null && operation.hasResolved()) { + int sev = operation.getResolutionResult().getSeverity(); + if (sev != IStatus.ERROR && sev != IStatus.CANCEL) { + updateLicenses(theIUs, operation.getProvisioningPlan()); + } else { + updateLicenses(new IInstallableUnit[0], null); + } + } + } + + private void findUnacceptedLicenses(IInstallableUnit[] selectedIUs, IProvisioningPlan plan) { + IInstallableUnit[] iusToCheck = selectedIUs; + if (plan != null) { + iusToCheck = plan.getAdditions().query(QueryUtil.createIUAnyQuery(), null).toArray(IInstallableUnit.class); + } + + // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=218532 + // Current metadata generation can result with a feature group IU and the + // feature jar IU + // having the same name and license. We will weed out duplicates if the license + // and name are both + // the same. + licensesToIUs = new HashMap<>();// map of License->ArrayList of IUs with that license + HashMap> namesSeen = new HashMap<>(); // map of License->HashSet of names with that + // license + for (IInstallableUnit iu : iusToCheck) { + for (ILicense license : iu.getLicenses(null)) { + if (manager != null && !manager.isAccepted(license)) { + String name = iu.getProperty(IInstallableUnit.PROP_NAME, null); + if (name == null) + name = iu.getId(); + // Have we already found this license? + if (licensesToIUs.containsKey(license)) { + HashSet names = namesSeen.get(license); + if (!names.contains(name)) { + names.add(name); + ((ArrayList) licensesToIUs.get(license)).add(iu); + } + } else { + ArrayList list = new ArrayList<>(1); + list.add(iu); + licensesToIUs.put(license, list); + HashSet names = new HashSet<>(1); + names.add(name); + namesSeen.put(license, names); + } + } + } + } + } + + private void rememberAcceptedLicenses() { + if (licensesToIUs == null || manager == null) + return; + for (ILicense license : licensesToIUs.keySet()) + manager.accept(license); + } + + private void setDescription() { + // No licenses but the page is open. Shouldn't happen, but just in case... + } + + /** + * Save any settings related to the current size and location of the wizard + * page. + */ + public void saveBoundsRelatedSettings() { + } + + @Override + public void setVisible(boolean visible) { + super.setVisible(visible); + if (visible && hasLicensesToAccept() && iuViewer != null) { + iuViewer.setSelection(new StructuredSelection(iuViewer.getTree().getItem(0).getData()), true); + } + } +} diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ICopyable.java b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ICopyable.java new file mode 100644 index 0000000000..8133760fe2 --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ICopyable.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright (c) 2009, 2010 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 + *******************************************************************************/ +package org.eclipse.equinox.p2.ui; + +import org.eclipse.swt.widgets.Control; + +/** + * ICopyable defines an interface for elements that provide + * copy support in a UI. The active control in the UI determines + * what should be copied. + * + * @since 2.0 + * @noimplement This interface is not intended to be implemented by clients. + */ +public interface ICopyable { + /** + * Copy text related to the active control to the clipboard. + * + * @param activeControl the active control + */ + public void copyToClipboard(Control activeControl); +} diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java new file mode 100644 index 0000000000..d2a9fb9505 --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java @@ -0,0 +1,104 @@ +/******************************************************************************* + * Copyright (c) 2008, 2020 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 + * Sonatype, Inc. - ongoing development + * Red Hat,Inc. - filter installed softwares + *******************************************************************************/ + +package org.eclipse.equinox.p2.ui; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.swt.widgets.*; +import org.eclipse.ui.about.InstallationPage; +import org.eclipse.ui.menus.AbstractContributionFactory; + +/** + * InstalledSoftwarePage displays a profile's IInstallableUnits in an + * Installation Page. Clients can use this class as the implementation class for + * an installationPages extension. + * + * @see InstallationPage + * + * @noextend This class is not intended to be subclassed by clients. + * @noinstantiate This class is not intended to be instantiated by clients. + * @since 2.0 + * + */ +public class InstalledSoftwarePage extends InstallationPage implements ICopyable { + + private static final int UPDATE_ID = IDialogConstants.CLIENT_ID; + private static final int UNINSTALL_ID = IDialogConstants.CLIENT_ID + 1; + private static final int PROPERTIES_ID = IDialogConstants.CLIENT_ID + 2; + private static final String BUTTON_ACTION = "org.eclipse.equinox.p2.ui.buttonAction"; //$NON-NLS-1$ + + AbstractContributionFactory factory; + Text detailsArea; + String profileId; + Button updateButton, uninstallButton, propertiesButton; + ProvisioningUI ui; + + @Override + public void createControl(Composite parent) { + } + + @Override + public void createPageButtons(Composite parent) { + } + + void updateDetailsArea() { + } + + void updateEnablement() { + } + + @Override + public void copyToClipboard(Control activeControl) { + } + + @Override + protected void buttonPressed(int buttonId) { + switch (buttonId) { + case UPDATE_ID: + ((Action) updateButton.getData(BUTTON_ACTION)).run(); + break; + case UNINSTALL_ID: + ((Action) uninstallButton.getData(BUTTON_ACTION)).run(); + break; + case PROPERTIES_ID: + ((Action) propertiesButton.getData(BUTTON_ACTION)).run(); + break; + default: + super.buttonPressed(buttonId); + break; + } + } + + ProvisioningUI getProvisioningUI() { + // if a UI has not been set then assume that the current default UI is the right + // thing + if (ui == null) + return ui = ProvisioningUI.getDefaultUI(); + return ui; + } + + /** + * Set the provisioning UI to use with this page + * + * @param value the provisioning ui to use + * @since 2.1 + */ + public void setProvisioningUI(ProvisioningUI value) { + ui = value; + } + +} diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LicenseManager.java b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LicenseManager.java new file mode 100644 index 0000000000..288290edf8 --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LicenseManager.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright (c) 2007, 2010 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 + *******************************************************************************/ +package org.eclipse.equinox.p2.ui; + +import org.eclipse.equinox.p2.metadata.ILicense; + +/** + * LicenseManager defines a service which records the licenses that have been + * accepted in the course of installing or updating software. It can be used to determine + * whether a particular license should be presented to a user for acceptance, and + * to record the user's decision. + * + * @since 2.0 + */ +public abstract class LicenseManager { + + /** + * Record the acceptance of the specified license. + * + * @param license the license to be accepted + * + * @return true if the license was recorded as accepted, false if + * it was not. + * + */ + public abstract boolean accept(ILicense license); + + /** + * Record the rejection of the specified license. + * + * @param license the license to be rejected + * + * @return true if the license was recorded as rejected, false if + * it was not. + * + */ + public abstract boolean reject(ILicense license); + + /** + * Return a boolean indicating whether a particular license has previously + * been accepted. + * + * @param license the license in question + * + * @return true if the license has previously been accepted, + * false if it has not been accepted before. + * + */ + public abstract boolean isAccepted(ILicense license); + + /** + * Return a boolean indicating whether any licenses have been + * accepted. + * + * @return true if accepted licenses have been recorded, + * false if there have been no licenses accepted. + + */ + public abstract boolean hasAcceptedLicenses(); +} diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java new file mode 100644 index 0000000000..36f5d7921a --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java @@ -0,0 +1,127 @@ +/******************************************************************************* + * Copyright (c) 2009,2011 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 + ******************************************************************************/ + +package org.eclipse.equinox.p2.ui; + +import org.eclipse.core.runtime.*; +import org.eclipse.equinox.p2.operations.ProvisioningJob; +import org.eclipse.ui.statushandlers.StatusManager; + +/** + * A job that loads a set of metadata repositories and caches the loaded + * repositories. This job can be used when repositories are loaded by a client + * who wishes to maintain (and pass along) the in-memory references to the + * repositories. For example, repositories can be loaded in the background and + * then passed to another component, thus ensuring that the repositories remain + * loaded in memory. + * + * @since 2.0 + * @noextend This class is not intended to be subclassed by clients. + */ +public class LoadMetadataRepositoryJob extends ProvisioningJob { + + /** + * An object representing the family of jobs that load repositories. + */ + public static final Object LOAD_FAMILY = new Object(); + + /** + * The key that should be used to set a property on a repository load job to + * indicate that authentication should be suppressed when loading the + * repositories. + */ + public static final QualifiedName SUPPRESS_AUTHENTICATION_JOB_MARKER = new QualifiedName("", + "SUPPRESS_AUTHENTICATION_REQUESTS"); //$NON-NLS-1$ + + /** + * The key that should be used to set a property on a repository load job to + * indicate that repository events triggered by this job should be suppressed so + * that clients will ignore all events related to the load. + */ + public static final QualifiedName SUPPRESS_REPOSITORY_EVENTS = new QualifiedName("", "SUPRESS_REPOSITORY_EVENTS"); //$NON-NLS-2$ + + /** + * The key that should be used to set a property on a repository load job to + * indicate that a wizard receiving this job needs to schedule it. In some + * cases, a load job is finished before invoking a wizard. In other cases, the + * job has not yet been scheduled so that listeners can be set up first. + */ + public static final QualifiedName WIZARD_CLIENT_SHOULD_SCHEDULE = new QualifiedName("", + "WIZARD_CLIENT_SHOULD_SCHEDULE"); //$NON-NLS-1$ + + /** + * The key that should be used to set a property on a repository load job to + * indicate that load errors should be accumulated into a single status rather + * than reported as they occur. + */ + public static final QualifiedName ACCUMULATE_LOAD_ERRORS = new QualifiedName("", "ACCUMULATE_LOAD_ERRORS"); //$NON-NLS-2$ + + private MultiStatus accumulatedStatus; + private ProvisioningUI ui; + + /** + * Create a job that loads the metadata repositories known by the specified + * RepositoryTracker. + * + * @param ui the ProvisioningUI providing the necessary services + */ + public LoadMetadataRepositoryJob(ProvisioningUI ui) { + super("", ui.getSession()); + this.ui = ui; + } + + @Override + public IStatus runModal(IProgressMonitor monitor) { + return Status.OK_STATUS; + } + + protected boolean shouldAccumulateFailures() { + return getProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS) != null; + } + + /** + * Report the accumulated status for repository load failures. If there has been + * no status accumulated, or if the job has been cancelled, do not report + * anything. Detailed errors have already been logged. + */ + public void reportAccumulatedStatus() { + IStatus status = getCurrentStatus(); + if (status.isOK() || status.getSeverity() == IStatus.CANCEL) + return; + + // If user is unaware of individual sites, nothing to report here. + if (!ui.getPolicy().getRepositoriesVisible()) + return; + StatusManager.getManager().handle(status, StatusManager.SHOW); + // Reset the accumulated status so that next time we only report the newly not + // found repos. + accumulatedStatus = null; + } + + private IStatus getCurrentStatus() { + if (accumulatedStatus != null) { + // If there is only missing repo to report, use the specific message rather than + // the generic. + if (accumulatedStatus.getChildren().length == 1) + return accumulatedStatus.getChildren()[0]; + return accumulatedStatus; + } + return Status.OK_STATUS; + } + + @Override + public boolean belongsTo(Object family) { + return family == LOAD_FAMILY; + } +} diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/Policy.java b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/Policy.java new file mode 100644 index 0000000000..e4eccabb6b --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/Policy.java @@ -0,0 +1,509 @@ +/******************************************************************************* + * Copyright (c) 2008, 2012 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 + * Ericsson AB (Hamdan Msheik) - Bug 396420 - Control Install dialog through preference customization + *******************************************************************************/ +package org.eclipse.equinox.p2.ui; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery; +import org.eclipse.equinox.p2.metadata.IInstallableUnit; +import org.eclipse.equinox.p2.operations.ProfileChangeOperation; +import org.eclipse.equinox.p2.query.IQuery; +import org.eclipse.equinox.p2.query.QueryUtil; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.widgets.Shell; + +/** + * The Policy class is used to specify application specific policies that should + * be used in the standard p2 UI class libraries. The default policy is acquired + * using the OSGi service model. + * + * Policy allows clients to specify things such as how repositories are + * manipulated in the standard wizards and dialogs, and how the repositories or + * the installation itself should be traversed when displaying content. + * + * In some cases, the Policy is used only to define a default value that can be + * overridden by user choice and subsequently stored in dialog settings. + * + * Client applications should ensure that their Policy is registered before any + * of the p2 UI objects access the default Policy. + * + * @since 2.0 + */ +public class Policy { + + /** + * A constant indicating that restart should be forced (without confirmation) + * immediately after completion of a provisioning operation. + * + */ + public static final int RESTART_POLICY_FORCE = 1; + + /** + * A constant indicating that the changes should be applied dynamically to the + * profile (without confirmation) immediately after completion of a provisioning + * operation. + */ + public static final int RESTART_POLICY_FORCE_APPLY = 2; + + /** + * A constant indicating that the user should be prompted to restart after + * completion of a provisioning operation. + */ + public static final int RESTART_POLICY_PROMPT = 3; + + /** + * A constant indicating that, where possible, the user should be given the + * option to restart or dynamically apply the changes after completion of a + * provisioning operation. + */ + public static final int RESTART_POLICY_PROMPT_RESTART_OR_APPLY = 4; + + /** + * A constant indicating that the user should be presented with an update wizard + * that shows a list of IUs that can be updated. Even when only one update is + * available, a list showing the single update will be used. This option is + * recommended when the user's view of the system is a set of component updates + * and the user is expected to have knowledge of the composition of the system. + * + * @since 2.1 + */ + public static final int UPDATE_STYLE_MULTIPLE_IUS = 1; + + /** + * A constant indicating that the user should be presented with an update wizard + * that shows detail about a single IU that can be updated. If more than one IU + * can be updated, the user will be shown a list; however, this option is + * recommended to be used only when the user's view of the system is a single + * application that can be updated, and only one IU is expected to be available + * for update. + * + * @since 2.1 + */ + public static final int UPDATE_STYLE_SINGLE_IUS = 2; + + private IQuery visibleAvailableIUQuery = QueryUtil.createIUGroupQuery(); + private IQuery visibleInstalledIUQuery = new UserVisibleRootQuery(); + private boolean groupByCategory = true; + private boolean allowDrilldown = true; + private boolean repositoriesVisible = true; + private boolean contactAllSites = true; + private boolean hideAlreadyInstalled = true; + private boolean showLatestVersionsOnly = true; + private int restartPolicy = RESTART_POLICY_PROMPT; + private String repoPrefPageId; + private String repoPrefPageName; + private boolean filterOnEnv = false; + private int updateWizardStyle = UPDATE_STYLE_MULTIPLE_IUS; + private Point wizardDetailsPreferredSize = null; + private boolean checkAgainstCurrentExecutionEnvironment; + + /** + * Answer a boolean indicating whether the caller should continue to work with + * the specified operation. This method is used when an operation has been + * resolved, but the UI may have further restrictions on continuing with it. + * + * @param operation the operation in question. It must already be resolved. + * @param shell the shell to use for any interaction with the user + * @return true if processing of the operation should continue, + * false if not. It is up to the implementor to report any + * errors to the user when answering false. + */ + public boolean continueWorkingWithOperation(ProfileChangeOperation operation, Shell shell) { + return true; + } + + /** + * Return a status that can be used to describe the failure to retrieve a + * profile. + * + * @return a status describing a failure to retrieve a profile, or + * null if there is no such status. + */ + public IStatus getNoProfileChosenStatus() { + return null; + } + + /** + * Return a query that can be used to obtain the IInstallableUnits that should + * be presented to the user from the software repositories. + * + * @return the query used to retrieve user visible available IUs + */ + public IQuery getVisibleAvailableIUQuery() { + return visibleAvailableIUQuery; + } + + /** + * Set the query that can be used to obtain the IInstallableUnits that should be + * presented to the user. + * + * @param query the query used to retrieve user visible available IUs + */ + public void setVisibleAvailableIUQuery(IQuery query) { + visibleAvailableIUQuery = query; + } + + /** + * Return a query that can be used to obtain the IInstallableUnits in the + * profile that should be presented to the user. + * + * @return the query used to retrieve user visible installed IUs + */ + public IQuery getVisibleInstalledIUQuery() { + return visibleInstalledIUQuery; + } + + /** + * Set the query that can be used to obtain the IInstallableUnits in the profile + * that should be presented to the user. + * + * @param query the query used to retrieve user visible installed IUs + */ + public void setVisibleInstalledIUQuery(IQuery query) { + visibleInstalledIUQuery = query; + } + + /** + * Get the restart policy that should be used when the provisioning UI + * determines that a restart is required. + * + * @return an integer constant describing the restart policy + * + * @see #RESTART_POLICY_FORCE + * @see #RESTART_POLICY_FORCE_APPLY + * @see #RESTART_POLICY_PROMPT + * @see #RESTART_POLICY_PROMPT_RESTART_OR_APPLY + */ + public int getRestartPolicy() { + return restartPolicy; + } + + /** + * Set the restart policy that should be used when the provisioning UI + * determines that a restart is required. + * + * @param restartPolicy an integer constant describing the restart policy + * + * @see #RESTART_POLICY_FORCE + * @see #RESTART_POLICY_FORCE_APPLY + * @see #RESTART_POLICY_PROMPT + * @see #RESTART_POLICY_PROMPT_RESTART_OR_APPLY + */ + public void setRestartPolicy(int restartPolicy) { + this.restartPolicy = restartPolicy; + } + + /** + * Return a boolean indicating whether the repositories should be visible to the + * user, such that the user can add, remove, and otherwise manipulate the + * software site list. + * + * @return true if repositories are visible to the end user, + * false if they are not. + */ + public boolean getRepositoriesVisible() { + return repositoriesVisible; + } + + /** + * Set a boolean indicating whether the repositories should be visible to the + * user, such that the user can add, remove, and otherwise manipulate the + * software site list. + * + * @param visible true if repositories are visible to the end user, + * false if they are not. + */ + public void setRepositoriesVisible(boolean visible) { + this.repositoriesVisible = visible; + } + + /** + * Return a boolean indicating whether only the latest versions of updates and + * available software should be shown to the user. + * + * @return true if only the latest versions are shown, + * false if all versions should be shown. + */ + public boolean getShowLatestVersionsOnly() { + return showLatestVersionsOnly; + } + + /** + * Set a boolean indicating whether only the latest versions of updates and + * available software should be shown to the user. + * + * @param showLatest true if only the latest versions are shown, + * false if all versions should be shown. + */ + public void setShowLatestVersionsOnly(boolean showLatest) { + this.showLatestVersionsOnly = showLatest; + } + + /** + * Return a boolean indicating whether the user should be allowed drill down + * from a visible update or installed item into the requirements. + * + * @return true if drilldown is allowed, false if it + * is not. + */ + public boolean getShowDrilldownRequirements() { + return allowDrilldown; + } + + /** + * Set a boolean indicating whether the user should be allowed drill down from a + * visible update or installed item into the requirements. + * + * @param drilldown true if drilldown is allowed, + * false if it is not. + */ + public void setShowDrilldownRequirements(boolean drilldown) { + this.allowDrilldown = drilldown; + } + + /** + * Return a boolean value indicating whether or not the list of available + * software should be filtered based on the environment settings of the profile. + * + * @return true if the results should be filtered and + * false otherwise. + * @since 2.1 + */ + public boolean getFilterOnEnv() { + return filterOnEnv; + } + + /** + * Set a boolean value indicating whether or not the list of available software + * should be filtered based on the environment settings of the profile. + * + * @param filterOnEnv true if the results should be filtered and + * false otherwise. + * @since 2.1 + */ + public void setFilterOnEnv(boolean filterOnEnv) { + this.filterOnEnv = filterOnEnv; + } + + /** + * Return a boolean indicating whether available software should be grouped by + * category. + * + * @return true if items should be grouped by category, + * false if categories should not be shown. + */ + public boolean getGroupByCategory() { + return groupByCategory; + } + + /** + * Set a boolean indicating whether available software should be grouped by + * category. + * + * @param group true if items should be grouped by category, + * false if categories should not be shown. + */ + public void setGroupByCategory(boolean group) { + this.groupByCategory = group; + } + + /** + * Get the id of the preference page that should be used to link to the software + * sites page. + * + * @return the preference page id, or null if there is no + * preference page id showing the software sites. + */ + public String getRepositoryPreferencePageId() { + return repoPrefPageId; + } + + /** + * Set the id of the preference page that should be used to link to the software + * sites page. + * + * @param id the preference page id, or null if there is no + * preference page id showing the software sites. + */ + + public void setRepositoryPreferencePageId(String id) { + this.repoPrefPageId = id; + } + + /** + * Get the localized name of the preference page that should be displayed in + * links to the software sites page. + * + * @return the preference page name, or null if there is no + * preference page. + */ + public String getRepositoryPreferencePageName() { + return repoPrefPageName; + } + + /** + * Set the localized name of the preference page that should be displayed in + * links to the software sites page. This name is ignored if no id is specified + * for the preference page. + * + * @param name the preference page name, or null if there is no + * preference page. + * + * @see Policy#setRepositoryPreferencePageId(String) + */ + + public void setRepositoryPreferencePageName(String name) { + this.repoPrefPageName = name; + } + + /** + * Get the update wizard style that should be used to determine what to show the + * user when updates are available. + * + * @return an integer constant describing the update wizard style + * + * @see #UPDATE_STYLE_SINGLE_IUS + * @see #UPDATE_STYLE_MULTIPLE_IUS + * + * @since 2.1 + */ + + public int getUpdateWizardStyle() { + return updateWizardStyle; + } + + /** + * Get the update wizard style that should be used to determine what to show the + * user when updates are available. + * + * @param updateWizardStyle an integer constant describing the update wizard + * style + * + * @see #UPDATE_STYLE_SINGLE_IUS + * @see #UPDATE_STYLE_MULTIPLE_IUS + * + * @since 2.1 + */ + + public void setUpdateWizardStyle(int updateWizardStyle) { + this.updateWizardStyle = updateWizardStyle; + } + + /** + * Get a point describing the preferred size of the details area shown in single + * IU update wizards. This value may be null, in which case the wizard may + * compute a default size. + * + * @return a Point describing the preferred size of the update wizard details + * area. + * + * @see #UPDATE_STYLE_SINGLE_IUS + * + * @since 2.1 + */ + + public Point getUpdateDetailsPreferredSize() { + return wizardDetailsPreferredSize; + } + + /** + * Set the preferred size of the details area shown in update wizards which + * notify the user of a single update. Clients can use this value to ensure that + * their product's branded update notifier is sized to fit the expected content. + * + * @param preferredSize a Point describing the preferred size + * + * @see #UPDATE_STYLE_SINGLE_IUS + * + * @since 2.1 + */ + + public void setUpdateDetailsPreferredSize(Point preferredSize) { + this.wizardDetailsPreferredSize = preferredSize; + } + + /** + * Get a boolean value indicating whether to contact all sites. + * + * @return true true if all sites need to be contacted, + * false otherwise. + * + * @since 2.3 + */ + public boolean getContactAllSites() { + return this.contactAllSites; + } + + /** + * Set a boolean indicating whether all sites need to be contacted. + * + * @param contactAll true if all sites need to be contacted, + * false otherwise. + * + * @since 2.3 + */ + public void setContactAllSites(boolean contactAll) { + this.contactAllSites = contactAll; + } + + /** + * Get a boolean value indicating whether to hide already installed units. + * + * @return true if already installed units are to be hidden, + * false otherwise. + * + * @since 2.3 + */ + public boolean getHideAlreadyInstalled() { + return this.hideAlreadyInstalled; + } + + /** + * Set a boolean indicating whether to hide already installed units. + * + * @param hide true if already installed units need to be hidden, + * false otherwise. + * + * @since 2.3 + */ + public void setHideAlreadyInstalled(boolean hide) { + this.hideAlreadyInstalled = hide; + } + + /** + * Get a boolean value indicating whether the provisioning operation should + * check compatibility with current execution environment + * + * @return true if operation should check compatibility with + * current execution environment, false otherwise. + * + * @since 2.6 + */ + public boolean getCheckAgainstCurrentExecutionEnvironment() { + return this.checkAgainstCurrentExecutionEnvironment; + } + + /** + * Set a boolean indicating whether the provisioning operation should check + * compatibility with current execution environment. + * + * @param check true if operation should check compatibility with + * current execution environment, false otherwise. + * + * @since 2.6 + */ + public void setCheckAgainstCurrentExecutionEnvironment(boolean check) { + this.checkAgainstCurrentExecutionEnvironment = check; + } +} diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java new file mode 100644 index 0000000000..d918ccebd3 --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java @@ -0,0 +1,403 @@ +/******************************************************************************* + * Copyright (c) 2009, 2018 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 + * Sonatype, Inc. - ongoing development + * Red Hat Inc. - Bug 460967 + ******************************************************************************/ + +package org.eclipse.equinox.p2.ui; + +import java.net.URI; +import java.util.Collection; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.equinox.internal.p2.ui.ProvisioningOperationRunner; +import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent; +import org.eclipse.equinox.p2.core.ProvisionException; +import org.eclipse.equinox.p2.engine.ProvisioningContext; +import org.eclipse.equinox.p2.metadata.IInstallableUnit; +import org.eclipse.equinox.p2.operations.*; +import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository; +import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository; +import org.eclipse.swt.widgets.Shell; + +/** + * ProvisioningUI defines the provisioning session, UI policy, and related + * services for a provisioning UI. + * + * @since 2.0 + */ +public class ProvisioningUI { + + /** + * Return the default ProvisioningUI. + * + * @return the default Provisioning UI. + */ + public static ProvisioningUI getDefaultUI() { + return null; + } + + private Policy policy; + private ProvisioningSession session; + private String profileId; + + /** + * Creates a new instance of the provisioning user interface. + * + * @param session The current provisioning session + * @param profileId The profile that this user interface is operating on + * @param policy The user interface policy settings to use + */ + public ProvisioningUI(ProvisioningSession session, String profileId, Policy policy) { + } + + /** + * Return the UI policy used for this instance of the UI. + * + * @return the UI policy, must not be null + */ + public Policy getPolicy() { + return policy; + } + + /** + * Return the provisioning session that should be used to obtain provisioning + * services. + * + * @return the provisioning session, must not be null + */ + public ProvisioningSession getSession() { + return session; + } + + /** + * Return the license manager that should be used to remember accepted user + * licenses. + * + * @return the license manager. May be null if licenses are not to + * be remembered. + */ + public LicenseManager getLicenseManager() { + return null; + } + + /** + * Return the repository tracker that should be used to add, remove, and track + * the statuses of known repositories. + * + * @return the repository tracker, must not be null + */ + public RepositoryTracker getRepositoryTracker() { + return session.getProvisioningAgent().getService(RepositoryTracker.class); + } + + /** + * Return the profile id that should be assumed for this ProvisioningUI if no + * other id is otherwise specified. Some UI classes are assigned a profile id, + * while others are not. For those classes that are not assigned a current + * profile id, this id can be used to obtain one. + * + * @return a profile id + */ + public String getProfileId() { + return profileId; + } + + /** + * Return an install operation that describes installing the specified + * IInstallableUnits from the provided list of repositories. + * + * @param iusToInstall the IInstallableUnits to be installed + * @param repositories the repositories to use for the operation + * @return the install operation + */ + public InstallOperation getInstallOperation(Collection iusToInstall, URI[] repositories) { + InstallOperation op = new InstallOperation(getSession(), iusToInstall); + op.setProfileId(getProfileId()); + op.setProvisioningContext(makeProvisioningContext(repositories)); + return op; + } + + /** + * Return an update operation that describes updating the specified + * IInstallableUnits from the provided list of repositories. + * + * @param iusToUpdate the IInstallableUnits to be updated + * @param repositories the repositories to use for the operation + * @return the update operation + */ + public UpdateOperation getUpdateOperation(Collection iusToUpdate, URI[] repositories) { + UpdateOperation op = new UpdateOperation(getSession(), iusToUpdate); + op.setProfileId(getProfileId()); + op.setProvisioningContext(makeProvisioningContext(repositories)); + return op; + } + + /** + * Return an uninstall operation that describes uninstalling the specified + * IInstallableUnits, using the supplied repositories to replace any metadata + * that must be retrieved for the uninstall. + * + * @param iusToUninstall the IInstallableUnits to be installed + * @param repositories the repositories to use for the operation + * @return the uninstall operation + */ + public UninstallOperation getUninstallOperation(Collection iusToUninstall, URI[] repositories) { + UninstallOperation op = new UninstallOperation(getSession(), iusToUninstall); + op.setProfileId(getProfileId()); + op.setProvisioningContext(makeProvisioningContext(repositories)); + return op; + } + + private ProvisioningContext makeProvisioningContext(URI[] repos) { + if (repos != null) { + ProvisioningContext context = new ProvisioningContext(getSession().getProvisioningAgent()); + context.setMetadataRepositories(repos); + context.setArtifactRepositories(repos); + return context; + } + // look everywhere + return new ProvisioningContext(getSession().getProvisioningAgent()); + } + + /** + * Open an install wizard for installing the specified IInstallableUnits + * + * @param initialSelections the IInstallableUnits that should be selected when + * the wizard opens. May be null. + * @param operation the operation describing the proposed install. If + * this operation is not null, then a + * wizard showing only the IInstallableUnits described + * in the operation will be shown. If the operation is + * null, then a wizard allowing the user + * to browse the repositories will be opened. + * @param job a repository load job that is loading or has already + * loaded the repositories. Can be used to pass along + * an in-memory repository reference to the wizard. + * + * @return the wizard return code + */ + public int openInstallWizard(Collection initialSelections, InstallOperation operation, + LoadMetadataRepositoryJob job) { + return openInstallWizard(initialSelections, operation, null, job); + } + + /** + * Open an install wizard for installing the specified IInstallableUnits and + * remediationOperation. + * + * @param initialSelections the IInstallableUnits that should be selected + * when the wizard opens. May be null. + * @param operation the operation describing the proposed install. If + * this operation is not null, then a + * wizard showing only the IInstallableUnits + * described in the operation will be shown. If the + * operation is null, then a wizard + * allowing the user to browse the repositories will + * be opened. + * @param remediationOperation the alternate operations if the proposed update + * failed. May be null. + * @param job a repository load job that is loading or has + * already loaded the repositories. Can be used to + * pass along an in-memory repository reference to + * the wizard. + * + * @return the wizard return code + * @see RemediationOperation + * @since 2.3 + */ + public int openInstallWizard(Collection initialSelections, InstallOperation operation, + RemediationOperation remediationOperation, LoadMetadataRepositoryJob job) { + return 0; + } + + /** + * Open an update wizard for the specified update operation. + * + * @param skipSelectionsPage true if the selection page should be + * skipped so that the user is viewing the resolution + * results. false if the update selection + * page should be shown first. + * @param operation the operation describing the proposed update. Must + * not be null. + * @param job a repository load job that is loading or has + * already loaded the repositories. Can be used to + * pass along an in-memory repository reference to the + * wizard. + * + * @return the wizard return code + */ + public int openUpdateWizard(boolean skipSelectionsPage, UpdateOperation operation, LoadMetadataRepositoryJob job) { + return openUpdateWizard(skipSelectionsPage, operation, null, job); + + } + + /** + * Open an update wizard for the specified update operation and + * remediationOperation. + * + * @param skipSelectionsPage true if the selection page should be + * skipped so that the user is viewing the + * resolution results. false if the + * update selection page should be shown first. + * @param operation the operation describing the proposed update. + * Must not be null. + * @param remediationOperation the alternate operations if the proposed update + * failed. May be null. + * @param job a repository load job that is loading or has + * already loaded the repositories. Can be used to + * pass along an in-memory repository reference to + * the wizard. + * + * @return the wizard return code + * @since 2.3 + */ + public int openUpdateWizard(boolean skipSelectionsPage, UpdateOperation operation, + RemediationOperation remediationOperation, LoadMetadataRepositoryJob job) { + return 0; + + } + + /** + * Open an uninstall wizard for the specified uninstall operation. + * + * @param initialSelections the IInstallableUnits that should be selected when + * the wizard opens. May be null. + * @param operation the operation describing the proposed uninstall. + * Must not be null. + * @param job a repository load job that is loading or has already + * loaded the repositories. Can be used to pass along + * an in-memory repository reference to the wizard. + * + * @return the wizard return code + */ + public int openUninstallWizard(Collection initialSelections, UninstallOperation operation, + LoadMetadataRepositoryJob job) { + return 0; + } + + /** + * Open a UI that allows the user to manipulate the repositories. + * + * @param shell the shell that should parent the UI + */ + public void manipulateRepositories(Shell shell) { + } + + /** + * Schedule a job to execute the supplied ProvisioningOperation. + * + * @param job The operation to execute + * @param errorStyle the flags passed to the StatusManager for error reporting + */ + public void schedule(final ProvisioningJob job, final int errorStyle) { + } + + /** + * Manage the supplied job as a provisioning operation. This will allow the + * ProvisioningUI to be aware that a provisioning job is running, as well as + * manage the restart behavior for the job. + * + * @param job the job to be managed + * @param jobRestartPolicy an integer constant specifying whether the supplied + * job should cause a restart of the system. The UI + * Policy's restart policy is used in conjunction with + * this constant to determine what actually occurs when + * a job completes. + * + * @see ProvisioningJob#RESTART_NONE + * @see ProvisioningJob#RESTART_ONLY + * @see ProvisioningJob#RESTART_OR_APPLY + */ + public void manageJob(Job job, final int jobRestartPolicy) { + } + + /** + * Return a boolean indicating whether the receiver has scheduled any operations + * for the profile under management. + * + * @return true if other provisioning operations have been + * scheduled, false if there are no operations scheduled. + */ + public boolean hasScheduledOperations() { + return getSession().hasScheduledOperationsFor(profileId); + } + + /** + * This method is for automated testing only. + * + * @return the provisioning operation that can suppress restart for automated + * testing. + * @noreference This method is not intended to be referenced by clients. + */ + public ProvisioningOperationRunner getOperationRunner() { + return null; + } + + /** + * Signal that a repository operation is about to begin. This allows clients to + * ignore intermediate events until the operation is completed. Callers are + * responsible for ensuring that a corresponding operation ending event is + * signaled. + */ + public void signalRepositoryOperationStart() { + } + + /** + * Signal that a repository operation has completed. + * + * @param event a {@link RepositoryEvent} that describes the overall operation. + * May be null, which indicates that there was no + * single event that can describe the operation. + * @param update true if the event should be reflected in the UI, + * false if it should be ignored. + */ + public void signalRepositoryOperationComplete(RepositoryEvent event, boolean update) { + } + + /** + * Load the specified metadata repository, signaling a repository operation + * start event before loading, and a repository operation complete event after + * loading. + * + * @param location the location of the repository + * @param notify true if the UI should be updated as a result of + * the load, false if it should not + * @param monitor the progress monitor to be used + * @return the repository + * @throws ProvisionException if the repository could not be loaded + */ + + public IMetadataRepository loadMetadataRepository(URI location, boolean notify, IProgressMonitor monitor) + throws ProvisionException { + IMetadataRepository repo = null; + return repo; + } + + /** + * Load the specified artifact repository, signaling a repository operation + * start event before loading, and a repository operation complete event after + * loading. + * + * @param location the location of the repository + * @param update true if the UI should be updated as a result of + * the load, false if it should not + * @param monitor the progress monitor to be used + * @return the repository + * @throws ProvisionException if the repository could not be loaded + */ + public IArtifactRepository loadArtifactRepository(URI location, boolean update, IProgressMonitor monitor) + throws ProvisionException { + return null; + } +} diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java new file mode 100644 index 0000000000..2aa1e5ae04 --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java @@ -0,0 +1,92 @@ +/******************************************************************************* + * Copyright (c) 2007, 2018 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 + * Ericsson AB (Pascal Rapicault) - bug 398539 + *******************************************************************************/ +package org.eclipse.equinox.p2.ui; + +import org.eclipse.jface.preference.PreferencePage; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPreferencePage; + +/** + * Page that allows users to update, add, remove, import, and export + * repositories. This page can be hosted inside a preference dialog or inside + * its own dialog. + * + * When hosting this page inside a non-preference dialog, some of the dialog + * methods will likely have to call page methods. The following snippet shows + * how to host this page inside a TitleAreaDialog. + * + *
+ * TitleAreaDialog dialog = new TitleAreaDialog(shell) {
+ *
+ * 	RepositoryManipulationPage page;
+ *
+ * 	protected Control createDialogArea(Composite parent) {
+ * 		page = new RepositoryManipulationPage();
+ * 		page.setProvisioningUI(ProvisioningUI.getDefaultUI());
+ * 		page.createControl(parent);
+ * 		this.setTitle("Software Sites");
+ * 		this.setMessage("The enabled sites will be searched for software.  Disabled sites are ignored.");
+ * 		return page.getControl();
+ * 	}
+ *
+ * 	protected void okPressed() {
+ * 		if (page.performOk())
+ * 			super.okPressed();
+ * 	}
+ *
+ * 	protected void cancelPressed() {
+ * 		if (page.performCancel())
+ * 			super.cancelPressed();
+ * 	}
+ * };
+ * dialog.open();
+ * 
+ * + * @noextend This class is not intended to be subclassed by clients. + * + * @since 2.0 + */ +public class RepositoryManipulationPage extends PreferencePage implements IWorkbenchPreferencePage, ICopyable { + + @Override + public void copyToClipboard(Control activeControl) { + // TODO Auto-generated method stub + + } + + @Override + public void init(IWorkbench workbench) { + // TODO Auto-generated method stub + + } + + @Override + protected Control createContents(Composite parent) { + // TODO Auto-generated method stub + return null; + } + + /** + * Set the provisioning UI that provides the session, policy, and other services + * for the UI. This method must be called before the contents are created or it + * will have no effect. + * + * @param ui the provisioning UI to use for this page. + */ + public void setProvisioningUI(ProvisioningUI ui) { + } +} diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RevertProfilePage.java b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RevertProfilePage.java new file mode 100644 index 0000000000..ae241846be --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RevertProfilePage.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2007, 2018 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 + *******************************************************************************/ +package org.eclipse.equinox.p2.ui; + +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.ui.about.InstallationPage; + +/** + * RevertProfilePage displays a profile's configuration history in an + * Installation Page. Clients can use this class as the implementation class for + * an installationPages extension. + * + * @see InstallationPage + * + * @noextend This class is not intended to be subclassed by clients. + * @noinstantiate This class is not intended to be instantiated by clients. + * @since 2.0 + * + */ +public class RevertProfilePage extends InstallationPage implements ICopyable { + + /** + * Set the provisioning UI to use with this page + * + * @param value the provisioning ui to use + * @since 2.1 + */ + public void setProvisioningUI(ProvisioningUI value) { + } + + @Override + public void createControl(Composite parent) { + // TODO Auto-generated method stub + + } + + @Override + public void copyToClipboard(Control activeControl) { + // TODO Auto-generated method stub + + } +} diff --git a/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/package.html b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/package.html new file mode 100644 index 0000000000..ae652c5d04 --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/package.html @@ -0,0 +1,38 @@ + + + + + + + Package-level Javadoc + + +Provides provisioning user interface classes that can be used for assembling +a provisioning UI. +

+Package Specification

+

+This package consists of several kinds of classes:

+
    +
  • ProvisioningUI is the hub of the UI. It is used to access the underlying +provisioning session and its services, as well as all services registered by the UI. +It also provides utility methods that allow clients to create provisioning operations +or launch provisioning wizards. +
  • +
  • Policy defines those aspects of the provisioning UI that can be configured +by clients. +
  • +
  • LicenseManager describes a service which accepts or rejects +licenses and remembers the accepted licenses. Clients should register +an implementation of LicenseManager in order to remember the +licenses. +
  • +
  • Various pages define reusable pages that can be hosted inside wizards +and dialogs. In general, the pages are meant to be contributed by extension point. +In some cases, direct instantiation of the pages is permitted. See the individual page +javadoc for usage. +
  • +
+@since 2.0 + + diff --git a/tycho-its/projects/api-tools/missing-bin/pom.xml b/tycho-its/projects/api-tools/missing-bin/pom.xml new file mode 100644 index 0000000000..0850a97c4b --- /dev/null +++ b/tycho-its/projects/api-tools/missing-bin/pom.xml @@ -0,0 +1,60 @@ + + + 4.0.0 + org.eclipse.tycho.tycho-its + apitools-parent + 0.0.1-SNAPSHOT + pom + + org.eclipse.equinox.p2.ui + + + 5.0.0-SNAPSHOT + https://download.eclipse.org/releases/2023-09/ + https://download.eclipse.org/eclipse/updates/4.29/R-4.29-202309031000/ + + + + platform + ${target-platform} + p2 + + + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho-version} + true + + + org.eclipse.tycho + tycho-apitools-plugin + ${tycho-version} + + + + baseline + ${baselineRepo} + + + + + + generate + + generate + + + + analyse + + verify + + + + + + + \ No newline at end of file diff --git a/tycho-its/repositories/api-tools/artifacts.xml b/tycho-its/repositories/api-tools/artifacts.xml index cfecdd6bf6..a5e050e8e6 100644 --- a/tycho-its/repositories/api-tools/artifacts.xml +++ b/tycho-its/repositories/api-tools/artifacts.xml @@ -52,5 +52,19 @@ + + + + + + + + + + + + + + diff --git a/tycho-its/repositories/api-tools/content.xml b/tycho-its/repositories/api-tools/content.xml index 05ef0ea318..c9568f90e2 100644 --- a/tycho-its/repositories/api-tools/content.xml +++ b/tycho-its/repositories/api-tools/content.xml @@ -134,36 +134,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -179,6 +149,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bundle-SymbolicName: org.eclipse.equinox.p2.ui;singleton:=true Bundle-Version: 2.8.100.v20230728-2010 + + + + diff --git a/tycho-its/repositories/api-tools/plugins/org.eclipse.equinox.p2.ui_2.8.100.v20230728-2010.jar b/tycho-its/repositories/api-tools/plugins/org.eclipse.equinox.p2.ui_2.8.100.v20230728-2010.jar new file mode 100644 index 0000000000..761fbcfd94 Binary files /dev/null and b/tycho-its/repositories/api-tools/plugins/org.eclipse.equinox.p2.ui_2.8.100.v20230728-2010.jar differ diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/apitools/ApiToolsTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/apitools/ApiToolsTest.java index fc10af4bf7..e8a9bfe127 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/apitools/ApiToolsTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/apitools/ApiToolsTest.java @@ -106,4 +106,22 @@ public void testEmbeddedJars() throws Exception { verifier.executeGoals(List.of("clean", "verify")); verifier.verifyErrorFreeLog(); } + + /** + * This test an api compare where there are missing bin entry for the main + * source, the expectation is that everything works and no API errors are + * reported, in case of problems some invalid API error are reported similar to + * "The type org.eclipse.equinox.p2.ui.RevertProfilePage has been removed from + * org.eclipse.equinox.p2.ui" + * + * @throws Exception + */ + @Test + public void testNoBin() throws Exception { + Verifier verifier = getVerifier("api-tools/missing-bin", true, true); + File repo = ResourceUtil.resolveTestResource("repositories/api-tools"); + verifier.addCliOption("-DbaselineRepo=" + repo.toURI()); + verifier.executeGoals(List.of("clean", "verify")); + verifier.verifyErrorFreeLog(); + } }