From 39f7d7629fc9929a2af33bc6daf181b398bc770f Mon Sep 17 00:00:00 2001 From: Fr Jeremy Krieg Date: Sat, 21 Oct 2023 00:07:54 +1030 Subject: [PATCH 1/2] [bnd.pde] Add LaunchToBndrun utility Signed-off-by: Fr Jeremy Krieg --- biz.aQute.bnd.pde/.classpath | 12 + biz.aQute.bnd.pde/.gitignore | 3 + biz.aQute.bnd.pde/.project | 23 + .../org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.core.runtime.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 517 ++++++++++++++++++ .../.settings/org.eclipse.jdt.ui.prefs | 148 +++++ biz.aQute.bnd.pde/bnd.bnd | 22 + .../bnd/pde/launch2bndrun/LaunchToBndrun.java | 200 +++++++ .../bnd/pde/launch2bndrun/package-info.java | 4 + .../test/test/LaunchToBndrunTest.java | 159 ++++++ biz.aQute.bnd.pde/testresources/simple.launch | 58 ++ 12 files changed, 1150 insertions(+) create mode 100644 biz.aQute.bnd.pde/.classpath create mode 100644 biz.aQute.bnd.pde/.gitignore create mode 100644 biz.aQute.bnd.pde/.project create mode 100644 biz.aQute.bnd.pde/.settings/org.eclipse.core.resources.prefs create mode 100644 biz.aQute.bnd.pde/.settings/org.eclipse.core.runtime.prefs create mode 100644 biz.aQute.bnd.pde/.settings/org.eclipse.jdt.core.prefs create mode 100644 biz.aQute.bnd.pde/.settings/org.eclipse.jdt.ui.prefs create mode 100644 biz.aQute.bnd.pde/bnd.bnd create mode 100644 biz.aQute.bnd.pde/src/biz/aQute/bnd/pde/launch2bndrun/LaunchToBndrun.java create mode 100644 biz.aQute.bnd.pde/src/biz/aQute/bnd/pde/launch2bndrun/package-info.java create mode 100644 biz.aQute.bnd.pde/test/test/LaunchToBndrunTest.java create mode 100644 biz.aQute.bnd.pde/testresources/simple.launch diff --git a/biz.aQute.bnd.pde/.classpath b/biz.aQute.bnd.pde/.classpath new file mode 100644 index 0000000000..b987a021ac --- /dev/null +++ b/biz.aQute.bnd.pde/.classpath @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/biz.aQute.bnd.pde/.gitignore b/biz.aQute.bnd.pde/.gitignore new file mode 100644 index 0000000000..5e92567988 --- /dev/null +++ b/biz.aQute.bnd.pde/.gitignore @@ -0,0 +1,3 @@ +/bin/ +/generated/ +/bin_test/ diff --git a/biz.aQute.bnd.pde/.project b/biz.aQute.bnd.pde/.project new file mode 100644 index 0000000000..062f9a9b15 --- /dev/null +++ b/biz.aQute.bnd.pde/.project @@ -0,0 +1,23 @@ + + + biz.aQute.bnd.pde + + + + + + org.eclipse.jdt.core.javabuilder + + + + + bndtools.core.bndbuilder + + + + + + org.eclipse.jdt.core.javanature + bndtools.core.bndnature + + diff --git a/biz.aQute.bnd.pde/.settings/org.eclipse.core.resources.prefs b/biz.aQute.bnd.pde/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..99f26c0203 --- /dev/null +++ b/biz.aQute.bnd.pde/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/biz.aQute.bnd.pde/.settings/org.eclipse.core.runtime.prefs b/biz.aQute.bnd.pde/.settings/org.eclipse.core.runtime.prefs new file mode 100644 index 0000000000..5a0ad22d2a --- /dev/null +++ b/biz.aQute.bnd.pde/.settings/org.eclipse.core.runtime.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +line.separator=\n diff --git a/biz.aQute.bnd.pde/.settings/org.eclipse.jdt.core.prefs b/biz.aQute.bnd.pde/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..67fac37c88 --- /dev/null +++ b/biz.aQute.bnd.pde/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,517 @@ +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.recreateModifiedClassFileInOutputFolder=ignore +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.mainOnlyProjectHasTestOnlyDependency=error +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +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=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +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=warning +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=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +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=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +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=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +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=ignore +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=warning +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +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=ignore +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=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +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=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore +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=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled +org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,NORMAL +org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME +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=true +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_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=17 +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=81 +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=false +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false +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=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +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=1 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1 +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=true +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=true +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=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=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=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=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=do not 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=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=do not 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_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=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=do not 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_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not 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=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=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_if_empty +org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_if_empty +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_if_empty +org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_if_empty +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_if_empty +org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_if_empty +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_if_empty +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=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_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/biz.aQute.bnd.pde/.settings/org.eclipse.jdt.ui.prefs b/biz.aQute.bnd.pde/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000..b67dd052ad --- /dev/null +++ b/biz.aQute.bnd.pde/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,148 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=true +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=true +cleanup.convert_to_enhanced_for_loop=true +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.lazy_logical_operator=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.merge_conditional_blocks=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.number_suffix=true +cleanup.objects_equals=true +cleanup.organize_imports=false +cleanup.precompile_regex=true +cleanup.push_down_negation=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=true +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=true +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=true +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.simplify_lambda_expression_and_method_ref=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false +cleanup.use_blocks=false +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=true +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup_profile=_bnd +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_bnd +formatter_settings_version=16 +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=false +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=99 +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=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=true +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=false +sp_cleanup.qualify_static_member_accesses_with_declaring_class=true +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=false +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=true +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 +sp_cleanup.use_type_arguments=false diff --git a/biz.aQute.bnd.pde/bnd.bnd b/biz.aQute.bnd.pde/bnd.bnd new file mode 100644 index 0000000000..67ec5d64b3 --- /dev/null +++ b/biz.aQute.bnd.pde/bnd.bnd @@ -0,0 +1,22 @@ +# Set javac settings from JDT prefs +-include: ${workspace}/cnf/includes/jdt.bnd + +-buildpath: \ + aQute.libg,\ + biz.aQute.bndlib;version=snapshot,\ + osgi.annotation + +-conditionalpackage:\ + aQute.lib.*,\ + aQute.libg.* + +-testpath: \ + ${junit},\ + org.eclipse.osgi,\ + biz.aQute.bnd.util,\ + slf4j.api,\ + slf4j.simple + +-builderignore: testresources + +Export-Package: biz.aQute.bnd.pde.launch2bndrun \ No newline at end of file diff --git a/biz.aQute.bnd.pde/src/biz/aQute/bnd/pde/launch2bndrun/LaunchToBndrun.java b/biz.aQute.bnd.pde/src/biz/aQute/bnd/pde/launch2bndrun/LaunchToBndrun.java new file mode 100644 index 0000000000..af82904c2f --- /dev/null +++ b/biz.aQute.bnd.pde/src/biz/aQute/bnd/pde/launch2bndrun/LaunchToBndrun.java @@ -0,0 +1,200 @@ +package biz.aQute.bnd.pde.launch2bndrun; + +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathExpressionException; +import javax.xml.xpath.XPathFactory; + +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import aQute.bnd.build.model.BndEditModel; +import aQute.bnd.build.model.EE; +import aQute.bnd.build.model.clauses.VersionedClause; +import aQute.bnd.header.Attrs; +import aQute.bnd.osgi.Constants; +import aQute.bnd.properties.IDocument; +import aQute.lib.io.IO; + +public class LaunchToBndrun { + + VersionedClause framework; + List bundles = new ArrayList<>(); + List bundlesDecorator = new ArrayList<>(); + + BndEditModel model; + IDocument doc; + + public LaunchToBndrun(int defaultStartLevel, InputStream is) throws Exception { + this.doc = new aQute.bnd.properties.Document(""); + + try { + DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder builder = builderFactory.newDocumentBuilder(); + Document xmlDocument = builder.parse(is); + + XPath xPath = XPathFactory.newInstance() + .newXPath(); + String expression; + NodeList nodeList; + + expression = "/launchConfiguration"; + Node node = (Node) xPath.compile(expression) + .evaluate(xmlDocument, XPathConstants.NODE); + + if (node == null) { + throw new IllegalArgumentException("No root found"); + } + + // Workspace bundles first + expression = "/launchConfiguration/setAttribute[@key='selected_workspace_bundles']/setEntry"; + nodeList = (NodeList) xPath.compile(expression) + .evaluate(xmlDocument, XPathConstants.NODESET); + for (int i = 0; i < nodeList.getLength(); i++) { + node = nodeList.item(i); + String value = node.getAttributes() + .getNamedItem("value") + .getNodeValue(); + launchBundleToVersionedClause(value, true); + } + expression = "/launchConfiguration/setAttribute[@key='selected_target_bundles']/setEntry"; + nodeList = (NodeList) xPath.compile(expression) + .evaluate(xmlDocument, XPathConstants.NODESET); + for (int i = 0; i < nodeList.getLength(); i++) { + node = nodeList.item(i); + String value = node.getAttributes() + .getNamedItem("value") + .getNodeValue(); + launchBundleToVersionedClause(value, false); + } + expression = "/launchConfiguration/stringAttribute[@key='org.eclipse.jdt.launching.VM_ARGUMENTS']/@value"; + String vmArgs = (String) xPath.compile(expression) + .evaluate(xmlDocument, XPathConstants.STRING); + + // TODO: quote params with commas? + model = new BndEditModel(); + model.setRunVMArgs(Stream.of(vmArgs.split("\\s+")) + .filter(x -> !x.startsWith("-D")) + .collect(Collectors.joining(", "))); + model.setRunProperties(Stream.of(vmArgs.split("\\s+")) + .filter(x -> x.startsWith("-D")) + .map(x -> x.substring(2) + .split("=")) + .collect(Collectors.toMap(x -> x[0], x -> x[1]))); + if (framework != null) { + model.setRunFw(framework.toString()); + } + model.setRunBundles(bundles); + Attrs attrs = new Attrs(); + attrs.put(Constants.RUNBUNDLES_STARTLEVEL_ATTRIBUTE, String.valueOf(defaultStartLevel)); + VersionedClause defaultRunLevel = new VersionedClause("*", attrs); + bundlesDecorator.add(defaultRunLevel); + model.setRunBundlesDecorator(bundlesDecorator); + + expression = "/launchConfiguration/stringAttribute[@key='org.eclipse.jdt.launching.PROGRAM_ARGUMENTS']/@value"; + String programArgs = (String) xPath.compile(expression) + .evaluate(xmlDocument, XPathConstants.STRING); + model.setRunProgramArgs(Stream.of(programArgs.split("\\s+")) + .collect(Collectors.joining(", "))); + + expression = "/launchConfiguration/stringAttribute[@key='org.eclipse.jdt.launching.JRE_CONTAINER']/@value"; + String jre = (String) xPath.compile(expression) + .evaluate(xmlDocument, XPathConstants.STRING); + + Pattern p = Pattern.compile("StandardVMType/([^/]*)$"); + Matcher m = p.matcher(jre); + if (m.find()) { + model.setEE(EE.parse(m.group(1))); + } + model.saveChangesTo(doc); + } catch (XPathExpressionException e) { + // This should never happen as our expressions are all constants + throw new RuntimeException("Internal error", e); + } + } + + public BndEditModel getModel() { + return model; + } + + public IDocument getDoc() { + return doc; + } + + public String getContents() { + return getDoc().get(); + } + + public void writeTo(Path file) throws UnsupportedEncodingException, IOException { + Files.write(file, getContents().getBytes("utf-8")); + } + + void launchBundleToVersionedClause(String bundle, boolean ws) { + + int index = bundle.indexOf('@'); + + String bundleVersion = index < 0 ? bundle : bundle.substring(0, index); + + int versionIndex = bundleVersion.indexOf('*'); + + String bsn = versionIndex < 0 ? bundleVersion : bundleVersion.substring(0, versionIndex); + + VersionedClause vc = new VersionedClause(bsn); + if (versionIndex > 0) { + final String versionRange = bundleVersion.substring(versionIndex + 1); + vc.setVersionRange("[" + versionRange + "," + versionRange + "]"); + } else if (ws) { + vc.setVersionRange("snapshot"); + } + if (index > 0) { + String runlevelInfo = bundle.substring(index + 1); + String[] bits = runlevelInfo.split(":"); + switch (bits[0]) { + case "-1" : + framework = vc; + break; + case "default" : + bundles.add(vc); + break; + default : + VersionedClause decorator = vc.clone(); + Attrs attrs = decorator.getAttribs(); + attrs.remove(Constants.VERSION_ATTRIBUTE); + attrs.put(Constants.RUNBUNDLES_STARTLEVEL_ATTRIBUTE, bits[0]); + bundlesDecorator.add(decorator); + bundles.add(vc); + break; + } + } else { + bundles.add(vc); + } + } + + public static void main(String[] args) { + Path path = Path + .of("C:\\Users\\fr.jeremy\\git\\idempiere\\org.adempiere.server-feature\\server.product.launch"); + LaunchToBndrun bndrun; + try { + bndrun = new LaunchToBndrun(4, IO.stream(path)); + System.err.println("bndrun: " + bndrun.getContents()); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } +} diff --git a/biz.aQute.bnd.pde/src/biz/aQute/bnd/pde/launch2bndrun/package-info.java b/biz.aQute.bnd.pde/src/biz/aQute/bnd/pde/launch2bndrun/package-info.java new file mode 100644 index 0000000000..e204e14cdb --- /dev/null +++ b/biz.aQute.bnd.pde/src/biz/aQute/bnd/pde/launch2bndrun/package-info.java @@ -0,0 +1,4 @@ +@Version("1.0.0") +package biz.aQute.bnd.pde.launch2bndrun; + +import org.osgi.annotation.versioning.Version; diff --git a/biz.aQute.bnd.pde/test/test/LaunchToBndrunTest.java b/biz.aQute.bnd.pde/test/test/LaunchToBndrunTest.java new file mode 100644 index 0000000000..ea422bf56c --- /dev/null +++ b/biz.aQute.bnd.pde/test/test/LaunchToBndrunTest.java @@ -0,0 +1,159 @@ +package test; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatCode; + +import java.nio.file.Path; +import java.util.List; + +import org.assertj.core.api.SoftAssertions; +import org.assertj.core.api.junit.jupiter.InjectSoftAssertions; +import org.assertj.core.api.junit.jupiter.SoftAssertionsExtension; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; + +import aQute.bnd.build.model.BndEditModel; +import aQute.bnd.build.model.EE; +import aQute.bnd.build.model.clauses.VersionedClause; +import aQute.bnd.header.Attrs; +import aQute.bnd.osgi.Constants; +import aQute.bnd.properties.IDocument; +import aQute.lib.io.IO; +import biz.aQute.bnd.pde.launch2bndrun.LaunchToBndrun; + +@ExtendWith(SoftAssertionsExtension.class) +public class LaunchToBndrunTest { + + @InjectSoftAssertions + SoftAssertions softly; + + @ParameterizedTest + @ValueSource(ints = { + 1, 4, 10, 20 + }) + void defaultStartLevel(int startLevel) throws Exception { + LaunchToBndrun lbr = new LaunchToBndrun(startLevel, IO.stream(Path.of("testresources/simple.launch"))); + + BndEditModel model = lbr.getModel(); + + List startlevels = model.getRunBundlesDecorator(); + + assertThat(startlevels).as("size") + .hasSizeGreaterThan(0); + + VersionedClause last = startlevels.get(startlevels.size() - 1); + + assertThat(last.getName()).as("name") + .isEqualTo("*"); + List startlevelAttr = last.getListAttrib(Constants.RUNBUNDLES_STARTLEVEL_ATTRIBUTE); + assertThat(startlevelAttr).as("attr") + .hasSize(1) + .contains("" + startLevel); + } + + @Test + void emptyFile_throwsExeption() throws Exception { + assertThatCode(() -> new LaunchToBndrun(0, IO.stream(""))).isInstanceOf(Exception.class); + } + + @Test + void nonLaunchXML_throwsParseException() throws Exception { + final String xml = """ + + + """.trim(); + assertThatCode(() -> new LaunchToBndrun(0, IO.stream(xml))).hasMessageContaining("launchConfiguration"); + } + + static VersionedClause vc(String bsn) { + return new VersionedClause(bsn); + } + + static VersionedClause vcs(String bsn) { + return vcRaw(bsn, "snapshot"); + } + + static VersionedClause vc(String bsn, String version) { + return vcRaw(bsn, "[" + version + "," + version + "]"); + } + + static VersionedClause vcsl(String bsn, int startlevel) { + Attrs attrs = new Attrs(); + attrs.put(Constants.RUNBUNDLES_STARTLEVEL_ATTRIBUTE, startlevel + ""); + return new VersionedClause(bsn, attrs); + } + + static VersionedClause vcRaw(String bsn, String versionRange) { + Attrs attrs = new Attrs(); + attrs.put(Constants.VERSION_ATTRIBUTE, versionRange); + return new VersionedClause(bsn, attrs); + } + + @Test + void loadsSimpleLaunch() throws Exception { + final LaunchToBndrun lbr = new LaunchToBndrun(4, IO.stream(Path.of("testresources/simple.launch"))); + runChecks(lbr.getModel()); + } + + @Test + void savesSimpleLaunch() throws Exception { + final LaunchToBndrun lbr = new LaunchToBndrun(4, IO.stream(Path.of("testresources/simple.launch"))); + + IDocument doc = new aQute.bnd.properties.Document(lbr.getContents()); + runChecks(new BndEditModel(doc)); + } + + @Test + void contents_comesFromDoc() throws Exception { + final LaunchToBndrun lbr = new LaunchToBndrun(4, IO.stream(Path.of("testresources/simple.launch"))); + + softly.assertThat(lbr.getContents()) + .isEqualTo(lbr.getDoc() + .get()); + } + + void runChecks(BndEditModel model) { + + List runBundles = model + .getRunBundles(); + + //@formatter:off + softly.assertThat(runBundles).containsExactly( + vcs("my.bundle.one"), + vcs("my.bundle.two"), + vc("my.versioned.bundle", "1.2.3"), + vc("bcpg", "1.69.0"), + vc("com.sun.xml", "1.2.18.v202109010034"), + vc("slf4j.api", "1.7.30"), + vc("slf4j.jcl"), + vc("stax2-api") + ); + //@formatter:on + + softly.assertThat(model.getRunBundlesDecorator()) + .as("runbundles+") + .containsExactly(vcsl("my.bundle.two", 32), vcsl("bcpg", 1), vcsl("slf4j.jcl", 6), vcsl("*", 4)); + + softly.assertThat(model.getRunVMArgs()) + .as("vmargs") + .isEqualTo("--param1, --param2=something-other"); + softly.assertThat(model.getRunProperties()) + .as("runproperties") + .containsEntry("prop1", "one") + .containsEntry("prop2", "something,else"); + + softly.assertThat(model.getRunProgramArgs()) + .as("programargs") + .isEqualTo("-arg1, a, -arg2, b, -consoleLog, -console"); + + softly.assertThat(model.getRunFw()) + .as("runfw") + .isEqualTo("my.framework.bundle"); + + softly.assertThat(model.getEE()) + .as("ee") + .isEqualTo(EE.JavaSE_11); + } +} diff --git a/biz.aQute.bnd.pde/testresources/simple.launch b/biz.aQute.bnd.pde/testresources/simple.launch new file mode 100644 index 0000000000..9502adf321 --- /dev/null +++ b/biz.aQute.bnd.pde/testresources/simple.launch @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From ab19e48172ccb93dfb46e7d857b8b466fe4078cc Mon Sep 17 00:00:00 2001 From: Fr Jeremy Krieg Date: Sat, 21 Oct 2023 01:43:38 +1030 Subject: [PATCH 2/2] [bndtools] Create menu interface for LaunchToBndrun Signed-off-by: Fr Jeremy Krieg --- bndtools.core.services/bnd.bnd | 10 +- .../launchtobndrun/LaunchToBndrunAction.java | 66 ++++++++++ bndtools.core/_plugin.xml | 16 +++ .../bndtools.cocoa.macosx.aarch64.bndrun | 1 + .../bndtools.cocoa.macosx.x86_64.bndrun | 1 + .../bndtools.gtk.linux.x86_64.bndrun | 1 + bndtools.core/bndtools.shared.latest.bndrun | 122 ++++++++++++++++++ bndtools.core/bndtools.win32.x86_64.bndrun | 1 + 8 files changed, 216 insertions(+), 2 deletions(-) create mode 100644 bndtools.core.services/src/org/bndtools/pde/launchtobndrun/LaunchToBndrunAction.java create mode 100644 bndtools.core/bndtools.shared.latest.bndrun diff --git a/bndtools.core.services/bnd.bnd b/bndtools.core.services/bnd.bnd index dc260a8ba5..7d3a870e16 100644 --- a/bndtools.core.services/bnd.bnd +++ b/bndtools.core.services/bnd.bnd @@ -12,7 +12,8 @@ Import-Package: \ # Bundle Content -includepackage: \ - org.bndtools.core.editors.quickfix + org.bndtools.core.editors.quickfix,\ + org.bndtools.pde.launchtobndrun -conditionalpackage: \ aQute.lib.*,\ @@ -36,4 +37,9 @@ Import-Package: \ org.eclipse.swt.cocoa.macosx.x86_64,\ org.eclipse.jface.text,\ org.osgi.service.component.annotations;version='1.3.0',\ - slf4j.api + slf4j.api,\ + org.eclipse.jface,\ + org.eclipse.core.commands,\ + org.eclipse.ui.ide,\ + org.eclipse.ui.workbench,\ + biz.aQute.bnd.pde diff --git a/bndtools.core.services/src/org/bndtools/pde/launchtobndrun/LaunchToBndrunAction.java b/bndtools.core.services/src/org/bndtools/pde/launchtobndrun/LaunchToBndrunAction.java new file mode 100644 index 0000000000..9fa0d95239 --- /dev/null +++ b/bndtools.core.services/src/org/bndtools/pde/launchtobndrun/LaunchToBndrunAction.java @@ -0,0 +1,66 @@ +package org.bndtools.pde.launchtobndrun; + +import java.util.Iterator; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.Path; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.ui.IObjectActionDelegate; +import org.eclipse.ui.IWorkbenchPart; +import org.osgi.service.component.annotations.Component; + +import aQute.lib.io.IO; +import biz.aQute.bnd.pde.launch2bndrun.LaunchToBndrun; + +@Component +public class LaunchToBndrunAction implements IObjectActionDelegate { + + IFile[] selected; + + @Override + public void run(IAction action) { + if (selected == null) { + return; + } + IFile s = selected[0]; + + try { + LaunchToBndrun lbr = new LaunchToBndrun(5, s.getContents()); + String name = s.getName() + .replaceAll("\\.launch$", ".bndrun"); + + IFile f = s.getParent() + .getFile(new Path(name)); + f.create(IO.stream(lbr.getDoc() + .get()), true, null); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + @Override + public void selectionChanged(IAction action, ISelection selection) { + if (selection == null || !(selection instanceof StructuredSelection)) { + selected = null; + return; + } + StructuredSelection ss = (StructuredSelection) selection; + selected = new IFile[ss.size()]; + int n = 0; + for (@SuppressWarnings("unchecked") + Iterator i = ss.iterator(); i.hasNext();) { + selected[n++] = i.next(); + } + } + + @Override + public void setActivePart(IAction action, IWorkbenchPart targetPart) { + // TODO Auto-generated method stub + + } + +} diff --git a/bndtools.core/_plugin.xml b/bndtools.core/_plugin.xml index 0b2e939518..0d19543825 100644 --- a/bndtools.core/_plugin.xml +++ b/bndtools.core/_plugin.xml @@ -882,6 +882,22 @@ + + + + + diff --git a/bndtools.core/bndtools.cocoa.macosx.aarch64.bndrun b/bndtools.core/bndtools.cocoa.macosx.aarch64.bndrun index f038254aad..79b8de34bd 100644 --- a/bndtools.core/bndtools.cocoa.macosx.aarch64.bndrun +++ b/bndtools.core/bndtools.cocoa.macosx.aarch64.bndrun @@ -29,6 +29,7 @@ -runbundles: \ biz.aQute.bnd.embedded-repo;version=snapshot,\ biz.aQute.bnd.maven;version=snapshot,\ + biz.aQute.bnd.pde;version=snapshot,\ biz.aQute.bnd.util;version=snapshot,\ biz.aQute.bndlib;version=snapshot,\ biz.aQute.repository;version=snapshot,\ diff --git a/bndtools.core/bndtools.cocoa.macosx.x86_64.bndrun b/bndtools.core/bndtools.cocoa.macosx.x86_64.bndrun index 479b82db99..808ad906bb 100644 --- a/bndtools.core/bndtools.cocoa.macosx.x86_64.bndrun +++ b/bndtools.core/bndtools.cocoa.macosx.x86_64.bndrun @@ -29,6 +29,7 @@ -runbundles: \ biz.aQute.bnd.embedded-repo;version=snapshot,\ biz.aQute.bnd.maven;version=snapshot,\ + biz.aQute.bnd.pde;version=snapshot,\ biz.aQute.bnd.util;version=snapshot,\ biz.aQute.bndlib;version=snapshot,\ biz.aQute.repository;version=snapshot,\ diff --git a/bndtools.core/bndtools.gtk.linux.x86_64.bndrun b/bndtools.core/bndtools.gtk.linux.x86_64.bndrun index 9b6f225c0e..42995a234d 100644 --- a/bndtools.core/bndtools.gtk.linux.x86_64.bndrun +++ b/bndtools.core/bndtools.gtk.linux.x86_64.bndrun @@ -28,6 +28,7 @@ -runbundles: \ biz.aQute.bnd.embedded-repo;version=snapshot,\ biz.aQute.bnd.maven;version=snapshot,\ + biz.aQute.bnd.pde;version=snapshot,\ biz.aQute.bnd.util;version=snapshot,\ biz.aQute.bndlib;version=snapshot,\ biz.aQute.repository;version=snapshot,\ diff --git a/bndtools.core/bndtools.shared.latest.bndrun b/bndtools.core/bndtools.shared.latest.bndrun new file mode 100644 index 0000000000..43e9c32a34 --- /dev/null +++ b/bndtools.core/bndtools.shared.latest.bndrun @@ -0,0 +1,122 @@ +# This run file contains all the cross-platform bundle and settings to run Bndtools. + +# Do not run this, use the platform-specific bndrun files (which "-include" this) + +-runfw: org.eclipse.osgi;version='[3.18.500.v20230801-1826,3.18.500.v20230801-1826]' + +-runvm: \ + -Xmx2g, \ + -ea + +-runpath: \ + ch.qos.logback.classic,\ + ch.qos.logback.core,\ + org.apache.felix.logback,\ + slf4j.api + +-runproperties: \ + eclipse.application=org.eclipse.ui.ide.workbench,\ + eclipse.consoleLog=,\ + eclipse.home.location=${fileuri;${.}/../bndtools.test/workspace},\ + eclipse.launcher=bndtools.core,\ + eclipse.product=org.eclipse.sdk.ide,\ + osgi.console=,\ + osgi.instance.area.default=../bndtools.test/workspace,\ + org.osgi.framework.bootdelegation='javax.net,javax.management,javax.net.ssl',\ + logback.configurationFile=${fileuri;${.}/logback.xml} + +# Keep sorted so that we can diff +-runrequires: \ + bnd.identity;id='biz.aQute.bnd.embedded-repo',\ + bnd.identity;id='bndtools.api',\ + bnd.identity;id='bndtools.builder',\ + bnd.identity;id='bndtools.core',\ + bnd.identity;id='bndtools.core.services',\ + bnd.identity;id='bndtools.jareditor',\ + bnd.identity;id='bndtools.m2e',\ + bnd.identity;id='bndtools.m2e.debug.fragment',\ + bnd.identity;id='bndtools.pde',\ + bnd.identity;id='bndtools.release',\ + bnd.identity;id='com.google.guava',\ + bnd.identity;id='javax.annotation',\ + bnd.identity;id='org.apache.ant',\ + bnd.identity;id='org.apache.felix.gogo.command',\ + bnd.identity;id='org.apache.felix.gogo.runtime',\ + bnd.identity;id='org.apache.felix.gogo.shell',\ + bnd.identity;id='org.bndtools.applaunch',\ + bnd.identity;id='org.bndtools.headless.build.manager',\ + bnd.identity;id='org.bndtools.headless.build.plugin.ant',\ + bnd.identity;id='org.bndtools.headless.build.plugin.gradle',\ + bnd.identity;id='org.bndtools.launch',\ + bnd.identity;id='org.bndtools.remoteinstall',\ + bnd.identity;id='org.bndtools.templates.template',\ + bnd.identity;id='org.bndtools.templating',\ + bnd.identity;id='org.bndtools.templating.gitrepo',\ + bnd.identity;id='org.bndtools.versioncontrol.ignores.manager',\ + bnd.identity;id='org.bndtools.versioncontrol.ignores.plugin.git',\ + bnd.identity;id='org.eclipse.ant.core',\ + bnd.identity;id='org.eclipse.ant.ui',\ + bnd.identity;id='org.eclipse.emf.ant',\ + bnd.identity;id='org.eclipse.emf.codegen.ecore.ui',\ + bnd.identity;id='org.eclipse.emf.codegen.ui',\ + bnd.identity;id='org.eclipse.emf.common.ui',\ + bnd.identity;id='org.eclipse.emf.databinding',\ + bnd.identity;id='org.eclipse.emf.databinding.edit',\ + bnd.identity;id='org.eclipse.emf.edit.ui',\ + bnd.identity;id='org.eclipse.emf.exporter',\ + bnd.identity;id='org.eclipse.emf.importer',\ + bnd.identity;id='org.eclipse.emf.importer.ecore',\ + bnd.identity;id='org.eclipse.emf.importer.java',\ + bnd.identity;id='org.eclipse.core.databinding.beans',\ + bnd.identity;id='org.eclipse.core.filesystem',\ + bnd.identity;id='org.eclipse.e4.tools.services',\ + bnd.identity;id='org.eclipse.egit.ui',\ + bnd.identity;id='org.eclipse.equinox.console',\ + bnd.identity;id='org.eclipse.equinox.event',\ + bnd.identity;id='org.eclipse.jdt.annotation',\ + bnd.identity;id='org.eclipse.m2e.binaryproject.ui',\ + bnd.identity;id='org.eclipse.m2e.discovery',\ + bnd.identity;id='org.eclipse.m2e.editor',\ + bnd.identity;id='org.eclipse.m2e.jdt.ui',\ + bnd.identity;id='org.eclipse.m2e.profiles.core',\ + bnd.identity;id='org.eclipse.m2e.profiles.ui',\ + bnd.identity;id='org.eclipse.m2e.refactoring',\ + bnd.identity;id='org.eclipse.m2e.scm',\ + bnd.identity;id='org.eclipse.m2e.sourcelookup.ui',\ + bnd.identity;id='org.eclipse.osgi.compatibility.state',\ + bnd.identity;id='org.eclipse.pde.build',\ + bnd.identity;id='org.eclipse.pde.core',\ + bnd.identity;id='org.eclipse.pde.genericeditor.extension',\ + bnd.identity;id='org.eclipse.pde.launching',\ + bnd.identity;id='org.eclipse.pde.runtime',\ + bnd.identity;id='org.eclipse.pde.ua.core',\ + bnd.identity;id='org.eclipse.pde.ua.ui',\ + bnd.identity;id='org.eclipse.pde.ui',\ + bnd.identity;id='org.eclipse.sdk',\ + bnd.identity;id='org.eclipse.ui.browser',\ + bnd.identity;id='org.eclipse.ui.console',\ + bnd.identity;id='org.eclipse.ui.ide',\ + bnd.identity;id='org.eclipse.ui.ide.application',\ + bnd.identity;id='junit-platform-commons';version='${range;[===,==+);${junit.platform.eclipse.version}}',\ + bnd.identity;id='junit-platform-engine';version='${range;[===,==+);${junit.platform.eclipse.version}}',\ + bnd.identity;id='junit-platform-launcher';version='${range;[===,==+);${junit.platform.eclipse.version}}' + +-runblacklist: \ + bnd.identity;id='biz.aQute.bnd.annotation',\ + bnd.identity;id='biz.aQute.bnd.transform',\ + bnd.identity;id='biz.aQute.junit',\ + bnd.identity;id='org.apache.felix.scr';version='[0,2.1.16)',\ + bnd.identity;id='osgi.*',\ + bnd.identity;id='org.osgi.*.annotations' + +-runrepos: \ + "Workspace",\ + "Maven Central",\ + "Eclipse 4.29 (2023-09)" + +-runee: JavaSE-17 + +# This will help us keep -runbundles sorted +-runstartlevel: \ + order=sortbynameversion,\ + begin=-1 diff --git a/bndtools.core/bndtools.win32.x86_64.bndrun b/bndtools.core/bndtools.win32.x86_64.bndrun index 3100d7c7dd..0829dc3f9d 100644 --- a/bndtools.core/bndtools.win32.x86_64.bndrun +++ b/bndtools.core/bndtools.win32.x86_64.bndrun @@ -27,6 +27,7 @@ -runbundles: \ biz.aQute.bnd.embedded-repo;version=snapshot,\ biz.aQute.bnd.maven;version=snapshot,\ + biz.aQute.bnd.pde;version=snapshot,\ biz.aQute.bnd.util;version=snapshot,\ biz.aQute.bndlib;version=snapshot,\ biz.aQute.repository;version=snapshot,\