diff --git a/.gitmodules b/.gitmodules index 5971f1ef2a4a8c7052f9426185f48cdbb63b6bd5..ac46925eb1987978008571062fda3d7957c1b5c8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,11 +25,11 @@ [submodule "org.fortiss.tooling.spiderchart.ui/.settings"] path = org.fortiss.tooling.spiderchart.ui/.settings url = https://git.fortiss.org/af3/plugin-settings.git -[submodule "org.fortiss.tooling.variability/.settings"] - path = org.fortiss.tooling.variability/.settings +[submodule "org.fortiss.tooling.ext.variability/.settings"] + path = org.fortiss.tooling.ext.variability/.settings url = https://git.fortiss.org/af3/plugin-settings.git -[submodule "org.fortiss.tooling.variability.ui/.settings"] - path = org.fortiss.tooling.variability.ui/.settings +[submodule "org.fortiss.tooling.ext.variability.ui/.settings"] + path = org.fortiss.tooling.ext.variability.ui/.settings url = https://git.fortiss.org/af3/plugin-settings.git [submodule "org.fortiss.variability/.settings"] path = org.fortiss.variability/.settings diff --git a/org.fortiss.tooling.ext.variability.ui/.settings b/org.fortiss.tooling.ext.variability.ui/.settings new file mode 160000 index 0000000000000000000000000000000000000000..310d1c04f28f6252d5a02dd8fde1b76ae4a4da51 --- /dev/null +++ b/org.fortiss.tooling.ext.variability.ui/.settings @@ -0,0 +1 @@ +Subproject commit 310d1c04f28f6252d5a02dd8fde1b76ae4a4da51 diff --git a/org.fortiss.tooling.ext.variability.ui/.settings/org.eclipse.core.resources.prefs b/org.fortiss.tooling.ext.variability.ui/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 5a3a92d374fcdd33930d6a2ef52d40bc973bae71..0000000000000000000000000000000000000000 --- a/org.fortiss.tooling.ext.variability.ui/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/<project>=US-ASCII diff --git a/org.fortiss.tooling.ext.variability.ui/.settings/org.eclipse.jdt.core.prefs b/org.fortiss.tooling.ext.variability.ui/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 57418cf340eceb0c1f15c9eb3d0f6cea2fb2e3ab..0000000000000000000000000000000000000000 --- a/org.fortiss.tooling.ext.variability.ui/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,366 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.doc.comment.support=enabled -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=warning -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=warning -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.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=warning -org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning -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.nullReference=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning -org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -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.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedParameter=warning -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=11 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=48 -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=16 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=48 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.formatter.alignment_for_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=16 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=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_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_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.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.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.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert -org.eclipse.jdt.core.formatter.comment.line_length=100 -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=@CodeFormatterOff -org.eclipse.jdt.core.formatter.enabling_tag=@CodeFormatterOn -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_field=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=do not 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_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=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=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_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_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=do not 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_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_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_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_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_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=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_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_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=do not 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=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=do not 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=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=do not 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_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_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=false -org.eclipse.jdt.core.formatter.join_wrapped_lines=true -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_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=100 -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.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_binary_operator=false -org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=false -org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/org.fortiss.tooling.ext.variability.ui/.settings/org.eclipse.jdt.ui.prefs b/org.fortiss.tooling.ext.variability.ui/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 8c3a03f520d68ea220efb3a77a80d424d2bf7973..0000000000000000000000000000000000000000 --- a/org.fortiss.tooling.ext.variability.ui/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,58 +0,0 @@ -eclipse.preferences.version=1 -editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true -formatter_profile=_fortiss -formatter_settings_version=12 -org.eclipse.jdt.ui.javadoc=true -org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/** Returns ${bare_field_name}. */</template><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/** Sets ${bare_field_name}. */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*-------------------------------------------------------------------------+\n| Copyright ${year} fortiss GmbH |\n| |\n| Licensed under the Apache License, Version 2.0 (the "License"); |\n| you may not use this file except in compliance with the License. |\n| You may obtain a copy of the License at |\n| |\n| http\://www.apache.org/licenses/LICENSE-2.0 |\n| |\n| Unless required by applicable law or agreed to in writing, software |\n| distributed under the License is distributed on an "AS IS" BASIS, |\n| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |\n| See the License for the specific language governing permissions and |\n| limitations under the License. |\n+--------------------------------------------------------------------------*/</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * \n * @author ${user}\n*/</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">\n/** */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/** {@inheritDoc} */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-JSDoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></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_to_enhanced_for_loop=false -sp_cleanup.correct_indentation=false -sp_cleanup.format_source_code=true -sp_cleanup.format_source_code_changes_only=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=true -sp_cleanup.never_use_blocks=false -sp_cleanup.never_use_parentheses_in_expressions=true -sp_cleanup.on_save_use_additional_actions=false -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_trailing_whitespaces=false -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=false -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_blocks=false -sp_cleanup.use_blocks_only_for_return_and_throw=false -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/org.fortiss.tooling.ext.variability.ui/.settings/org.eclipse.m2e.core.prefs b/org.fortiss.tooling.ext.variability.ui/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb2389f85fe6381425d29f0a9866fb65..0000000000000000000000000000000000000000 --- a/org.fortiss.tooling.ext.variability.ui/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/org.fortiss.tooling.ext.variability/.settings b/org.fortiss.tooling.ext.variability/.settings new file mode 160000 index 0000000000000000000000000000000000000000..310d1c04f28f6252d5a02dd8fde1b76ae4a4da51 --- /dev/null +++ b/org.fortiss.tooling.ext.variability/.settings @@ -0,0 +1 @@ +Subproject commit 310d1c04f28f6252d5a02dd8fde1b76ae4a4da51 diff --git a/org.fortiss.tooling.ext.variability/.settings/org.eclipse.core.resources.prefs b/org.fortiss.tooling.ext.variability/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 5a3a92d374fcdd33930d6a2ef52d40bc973bae71..0000000000000000000000000000000000000000 --- a/org.fortiss.tooling.ext.variability/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/<project>=US-ASCII diff --git a/org.fortiss.tooling.ext.variability/.settings/org.eclipse.jdt.core.prefs b/org.fortiss.tooling.ext.variability/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 57418cf340eceb0c1f15c9eb3d0f6cea2fb2e3ab..0000000000000000000000000000000000000000 --- a/org.fortiss.tooling.ext.variability/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,366 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.doc.comment.support=enabled -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=warning -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=warning -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.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=warning -org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning -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.nullReference=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning -org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -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.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedParameter=warning -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=11 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=48 -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=16 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=48 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.formatter.alignment_for_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=16 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=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_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_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.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.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.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert -org.eclipse.jdt.core.formatter.comment.line_length=100 -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=@CodeFormatterOff -org.eclipse.jdt.core.formatter.enabling_tag=@CodeFormatterOn -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_field=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=do not 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_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=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=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_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_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=do not 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_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_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_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_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_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=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_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_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=do not 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=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=do not 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=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=do not 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_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_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=false -org.eclipse.jdt.core.formatter.join_wrapped_lines=true -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_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=100 -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.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_binary_operator=false -org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=false -org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/org.fortiss.tooling.ext.variability/.settings/org.eclipse.jdt.ui.prefs b/org.fortiss.tooling.ext.variability/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 8c3a03f520d68ea220efb3a77a80d424d2bf7973..0000000000000000000000000000000000000000 --- a/org.fortiss.tooling.ext.variability/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,58 +0,0 @@ -eclipse.preferences.version=1 -editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true -formatter_profile=_fortiss -formatter_settings_version=12 -org.eclipse.jdt.ui.javadoc=true -org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/** Returns ${bare_field_name}. */</template><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/** Sets ${bare_field_name}. */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*-------------------------------------------------------------------------+\n| Copyright ${year} fortiss GmbH |\n| |\n| Licensed under the Apache License, Version 2.0 (the "License"); |\n| you may not use this file except in compliance with the License. |\n| You may obtain a copy of the License at |\n| |\n| http\://www.apache.org/licenses/LICENSE-2.0 |\n| |\n| Unless required by applicable law or agreed to in writing, software |\n| distributed under the License is distributed on an "AS IS" BASIS, |\n| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |\n| See the License for the specific language governing permissions and |\n| limitations under the License. |\n+--------------------------------------------------------------------------*/</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * \n * @author ${user}\n*/</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">\n/** */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/** {@inheritDoc} */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-JSDoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></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_to_enhanced_for_loop=false -sp_cleanup.correct_indentation=false -sp_cleanup.format_source_code=true -sp_cleanup.format_source_code_changes_only=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=true -sp_cleanup.never_use_blocks=false -sp_cleanup.never_use_parentheses_in_expressions=true -sp_cleanup.on_save_use_additional_actions=false -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_trailing_whitespaces=false -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=false -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_blocks=false -sp_cleanup.use_blocks_only_for_return_and_throw=false -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/org.fortiss.tooling.ext.variability/.settings/org.eclipse.m2e.core.prefs b/org.fortiss.tooling.ext.variability/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb2389f85fe6381425d29f0a9866fb65..0000000000000000000000000000000000000000 --- a/org.fortiss.tooling.ext.variability/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/org.fortiss.tooling.ext.variability/META-INF/MANIFEST.MF b/org.fortiss.tooling.ext.variability/META-INF/MANIFEST.MF index 59664f7cb8c5819ef86ce389aadafa3c7ce93ca6..b73966ac773afb8df7714dfd41c8809e1a22be11 100644 --- a/org.fortiss.tooling.ext.variability/META-INF/MANIFEST.MF +++ b/org.fortiss.tooling.ext.variability/META-INF/MANIFEST.MF @@ -11,9 +11,11 @@ Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Bundle-Activator: org.fortiss.tooling.ext.variability.ToolingVariabilityActivator Require-Bundle: org.fortiss.variability;visibility:=reexport, - org.fortiss.tooling.base -Export-Package: org.fortiss.tooling.ext.variability.model, - org.fortiss.tooling.ext.variability.service, - org.fortiss.tooling.ext.variability.util, + org.fortiss.tooling.base, + com.microsoft.z3 +Export-Package: org.fortiss.tooling.ext.variability.analysis, + org.fortiss.tooling.ext.variability.model, org.fortiss.tooling.ext.variability.model.impl, - org.fortiss.tooling.ext.variability.model.util + org.fortiss.tooling.ext.variability.model.util, + org.fortiss.tooling.ext.variability.service, + org.fortiss.tooling.ext.variability.util diff --git a/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/analysis/.ratings b/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/analysis/.ratings new file mode 100644 index 0000000000000000000000000000000000000000..db7c40539a3d146d022bbcc38e87b205566491f0 --- /dev/null +++ b/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/analysis/.ratings @@ -0,0 +1,2 @@ +OptimizedProductLineAnalysisBase.java 35a40c860cc8a9774a894600935c1ae89a5681a0 GREEN +OptimizedProductLineTranslation.java 415361dd35a04db219b06a1e40079452d7079b34 GREEN diff --git a/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/analysis/OptimizedProductLineAnalysisBase.java b/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/analysis/OptimizedProductLineAnalysisBase.java new file mode 100644 index 0000000000000000000000000000000000000000..35a40c860cc8a9774a894600935c1ae89a5681a0 --- /dev/null +++ b/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/analysis/OptimizedProductLineAnalysisBase.java @@ -0,0 +1,32 @@ +/*-------------------------------------------------------------------------+ +| Copyright 2022 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.tooling.ext.variability.analysis; + +import org.eclipse.emf.ecore.EObject; +import org.fortiss.variability.analysis.GenericProductLineAnalysis; + +/** + * Base class for all tooling kernel based product-line analyzes. + * + * @author bayha + */ +public abstract class OptimizedProductLineAnalysisBase extends GenericProductLineAnalysis { + + /** Constructor. */ + public OptimizedProductLineAnalysisBase(EObject model) { + super(model, new OptimizedProductLineTranslation()); + } +} diff --git a/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/analysis/OptimizedProductLineTranslation.java b/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/analysis/OptimizedProductLineTranslation.java new file mode 100644 index 0000000000000000000000000000000000000000..415361dd35a04db219b06a1e40079452d7079b34 --- /dev/null +++ b/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/analysis/OptimizedProductLineTranslation.java @@ -0,0 +1,116 @@ +/*-------------------------------------------------------------------------+ +| Copyright 2023 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.tooling.ext.variability.analysis; + +import static org.eclipse.emf.ecore.util.EcoreUtil.copy; +import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickFirstInstanceOf; +import static org.fortiss.variability.model.VariabilityModelElementFactory.createAndPC; + +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.fortiss.tooling.base.model.element.IModelElement; +import org.fortiss.tooling.base.model.element.IModelElementSpecification; +import org.fortiss.tooling.ext.variability.model.OptionalVariationPointSpecification; +import org.fortiss.tooling.ext.variability.service.IDependingElementProviderService; +import org.fortiss.variability.analysis.EMFProductLineTranslation; +import org.fortiss.variability.model.presence.AndPC; +import org.fortiss.variability.model.presence.PresenceCondition; +import org.fortiss.variability.model.presence.PresenceConditionTerm; + +/** + * Product-line translation with adaptation for different presence condition location in the tooling + * kernel. + * + * @author bayha + */ +public class OptimizedProductLineTranslation extends EMFProductLineTranslation { + + /** {@inheritDoc} */ + @Override + protected PresenceConditionTerm getLocalPresenceCondition(EObject model) { + if(model instanceof IModelElement) { + + List<IModelElementSpecification> specifications = + ((IModelElement)model).getSpecifications(); + + OptionalVariationPointSpecification varSpec = + pickFirstInstanceOf(OptionalVariationPointSpecification.class, specifications); + + if(varSpec == null) { + return null; + } + + PresenceCondition presenceCondition = varSpec.getPresenceCondition(); + + if(presenceCondition == null) { + return null; + } + + return presenceCondition.resolveToFeatureLiterals(); + } + + return null; + } + + /** {@inheritDoc} */ + @Override + protected void collectEObject(EObject eo, EClass cls, PresenceConditionTerm pc) { + class2TranslatedEObjects.add(cls, eo); + + collectPresenceCondition(eo, pc); + + // Also collect depending elements for the tooling kernel implementation. + List<EObject> dependingElements = + IDependingElementProviderService.getInstance().getDependingElements(eo); + for(EObject depObj : dependingElements) { + PresenceConditionTerm depObjPC = getLocalPresenceCondition(depObj); + + if(depObjPC != null) { + depObjPC = createAndPC(copy(depObjPC), copy(pc), ""); + } else { + depObjPC = pc; + } + + collectEObject(depObj, getTranslatedClass(depObj.eClass()), depObjPC); + } + } + + /** + * Accumulates the given presence condition by conjugating it. This is necessary in case an + * element "inherits" more than one presence conditions due to dependencies from other elements. + */ + private PresenceConditionTerm collectPresenceCondition(EObject eObject, + PresenceConditionTerm pc) { + PresenceConditionTerm oldPC = object2presenceCondition.get(eObject); + + if(oldPC != null) { + if(pc != null) { + AndPC newPC = createAndPC(copy(oldPC), copy(pc), ""); + + object2presenceCondition.put(eObject, newPC); + return newPC; + } + + object2presenceCondition.put(eObject, oldPC); + return oldPC; + } + + object2presenceCondition.put(eObject, pc); + return pc; + } +} diff --git a/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/util/.ratings b/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/util/.ratings index 546de7555f0ebe5275ecefb11f3e1c24fa54eba6..5960c0ee342c20db17056db7bc602a0b49f98d91 100644 --- a/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/util/.ratings +++ b/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/util/.ratings @@ -1 +1 @@ -VariabilityUtils.java fcaa561bdbe6bd9d6fff4312086a6c97177301f8 GREEN +VariabilityUtils.java 2fbc63a2ce3cdc8055c4a25f6b78e19b8208c117 GREEN diff --git a/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/util/VariabilityUtils.java b/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/util/VariabilityUtils.java index fcaa561bdbe6bd9d6fff4312086a6c97177301f8..2fbc63a2ce3cdc8055c4a25f6b78e19b8208c117 100644 --- a/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/util/VariabilityUtils.java +++ b/org.fortiss.tooling.ext.variability/src/org/fortiss/tooling/ext/variability/util/VariabilityUtils.java @@ -20,6 +20,7 @@ import static org.fortiss.tooling.kernel.utils.EcoreUtils.getFirstChildWithType; import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickFirstInstanceOf; import static org.fortiss.variability.util.VariabilityUtils.FEATURE_LITERAL_LEGAL_CHAR_REGEX; import static org.fortiss.variability.util.VariabilityUtils.PRESENCE_CONDITIONS_KEYWORDS; +import static org.fortiss.variability.model.VariabilityModelElementFactory.createAndPC; import org.eclipse.emf.ecore.EObject; import org.fortiss.tooling.base.model.element.IModelElement; @@ -28,6 +29,7 @@ import org.fortiss.tooling.ext.variability.model.OptionalVariationPointSpecifica import org.fortiss.tooling.kernel.service.ICommandStackService; import org.fortiss.variability.model.features.AbstractFeatureModel; import org.fortiss.variability.model.presence.PresenceCondition; +import org.fortiss.variability.model.presence.PresenceConditionTerm; import org.fortiss.variability.presence.compiler.PresenceConditionCompiler; /** @@ -95,13 +97,18 @@ public class VariabilityUtils { * condition. I.e. whether it is actually really optional. * * @param elem - * The {@link IModelElement} to be checked. + * The {@link EObject} to be checked. * * @return 'true' if elem contains a {@link PresenceCondition}, 'false' * otherwise. */ - public static boolean hasPresenceCondition(IModelElement elem) { - return getPresenceCondition(elem) != null; + public static boolean hasPresenceCondition(EObject elem) { + // Only IModelElements may have PCs + if(!(elem instanceof IModelElement)) { + return false; + } + + return getPresenceCondition((IModelElement)elem) != null; } /** @@ -199,4 +206,38 @@ public class VariabilityUtils { return true; } + + /** + * Calculates a self contained presence condition of the given {@link EObject} which takes into + * account all variability of parent objects in the containment hierarchy. + * + * @param elem + * The {@link EObject} object for which to calculate a global + * {@link PresenceConditionTerm}. + * @return A {@link PresenceConditionTerm} which expresses the presence condition including + * constraints of all parents; 'null' if there is no restriction. + */ + public static PresenceConditionTerm calculateGlobalPresenceCondition(EObject elem) { + EObject parent = elem.eContainer(); + PresenceConditionTerm parentPC = null; + + if(parent != null) { + parentPC = calculateGlobalPresenceCondition(parent); + } + + PresenceConditionTerm rest = null; + if(hasPresenceCondition(elem)) { + // Here, DEFAULT literals need to be resolved. + rest = getPresenceCondition((IModelElement)elem).resolveToFeatureLiterals(); + } + + if(parentPC != null) { + if(rest != null) { + return createAndPC(parentPC, rest, ""); + } + return parentPC; + } + + return rest; + } } diff --git a/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/internal/.ratings b/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/internal/.ratings index 47adba827d5c28212dc3ce96cf08e5762b4c7a17..3815c093e3f6488a99988164bc14ee3bea072cbf 100644 --- a/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/internal/.ratings +++ b/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/internal/.ratings @@ -1,6 +1,6 @@ ActionService.java e29126b5947c9fd2f1d82bb87001b9d0ead50c3b GREEN ContextMenuService.java 752ecb95721c4ff31583095bdb06b71ef28c4dcf GREEN -MarkerService.java 0bfe2c67638db4e506ea5dc7680765f2a8d632e1 GREEN +MarkerService.java 5cc84f9c1e9811100fad92c0abfa934613173c06 GREEN ModelEditorBindingService.java f304addb514cd2de443997e0b52cef7a3a9897bf GREEN ModelElementHandlerService.java 34adeef844bf98c69f1b9a7252f34d0a2b741b54 GREEN NavigatorService.java 1d773dde3791ddf7051616fe249558e7e307757d GREEN diff --git a/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/internal/MarkerService.java b/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/internal/MarkerService.java index 0bfe2c67638db4e506ea5dc7680765f2a8d632e1..5cc84f9c1e9811100fad92c0abfa934613173c06 100644 --- a/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/internal/MarkerService.java +++ b/org.fortiss.tooling.kernel.ui/src/org/fortiss/tooling/kernel/ui/internal/MarkerService.java @@ -181,6 +181,16 @@ public class MarkerService implements IMarkerService, IPersistencyServiceListene IConstraintCheckerService ccs = IConstraintCheckerService.getInstance(); List<IConstraintViolation<? extends EObject>> checkResult = ccs.performAllConstraintChecksRecursively(rootModelElement); + + ccs.performAllAsynchronousConstraintChecksRecursively(rootModelElement, violations -> { + synchronized(violationCache) { + CacheEntry entry = getCacheEntry(element); + entry.addNewViolations(violations); + } + + updateUI.schedule(); + }); + synchronized(violationCache) { CacheEntry entry = getCacheEntry(element); entry.updateCacheEntries(checkResult); @@ -279,6 +289,12 @@ public class MarkerService implements IMarkerService, IPersistencyServiceListene updateCacheEntries(List<IConstraintViolation<? extends EObject>> newViolations) { clearCachedLists(); // update cache entries + addNewViolations(newViolations); + } + + /** Add the given violations to the cache entry. */ + public synchronized void + addNewViolations(List<IConstraintViolation<? extends EObject>> newViolations) { for(IConstraintViolation<? extends EObject> violation : newViolations) { getCachedList(violation.getSource()).add(violation); } diff --git a/org.fortiss.tooling.kernel/src/org/fortiss/tooling/kernel/internal/.ratings b/org.fortiss.tooling.kernel/src/org/fortiss/tooling/kernel/internal/.ratings index f96feef16f57e0193a0c6c6a76223b4e1a5c5126..57cbc6d69e555b5b11839130f4a4fa4986dff14c 100644 --- a/org.fortiss.tooling.kernel/src/org/fortiss/tooling/kernel/internal/.ratings +++ b/org.fortiss.tooling.kernel/src/org/fortiss/tooling/kernel/internal/.ratings @@ -1,7 +1,7 @@ CommandLineInterfaceService.java 6b5c94c52702f773c60b181eff52204ab379b248 GREEN CommandStackService.java 957bda69b5feb91f002aed4d25ed334e92801e7e GREEN ConnectionCompositorService.java 5a52f8a3e88c167ae6909c3d9eb3fb4706177e8b GREEN -ConstraintCheckerService.java df7b4e8c99e8895e14ff45a96cc85ef8403a8658 GREEN +ConstraintCheckerService.java 590cd592008139586f98911ecb675449a5b3c8e1 GREEN DummyTopLevelElement.java 21807bbdafec2e0ef28f0ee9090218f90bd73aee GREEN ElementCompositorService.java b1924b5b349118a70149cfac5b48544897d26e9e GREEN LoggingService.java da784259f7b456b54bf75c41ec268f64919ce78d GREEN diff --git a/org.fortiss.tooling.kernel/src/org/fortiss/tooling/kernel/internal/ConstraintCheckerService.java b/org.fortiss.tooling.kernel/src/org/fortiss/tooling/kernel/internal/ConstraintCheckerService.java index df7b4e8c99e8895e14ff45a96cc85ef8403a8658..590cd592008139586f98911ecb675449a5b3c8e1 100644 --- a/org.fortiss.tooling.kernel/src/org/fortiss/tooling/kernel/internal/ConstraintCheckerService.java +++ b/org.fortiss.tooling.kernel/src/org/fortiss/tooling/kernel/internal/ConstraintCheckerService.java @@ -17,14 +17,23 @@ package org.fortiss.tooling.kernel.internal; import static java.util.Collections.emptyList; import static java.util.Collections.unmodifiableMap; +import static org.conqat.lib.commons.reflect.ReflectionUtils.performNearestClassLookup; +import static org.eclipse.core.runtime.Status.OK_STATUS; +import static org.eclipse.core.runtime.jobs.Job.RUNNING; import static org.fortiss.tooling.kernel.utils.EcoreUtils.getFirstParentWithType; import java.util.ArrayList; import java.util.Collections; +import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; +import java.util.Map; +import java.util.function.Consumer; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.jobs.Job; import org.eclipse.emf.ecore.EObject; import org.fortiss.tooling.kernel.extension.IConstraintChecker; import org.fortiss.tooling.kernel.extension.data.IConstraintViolation; @@ -32,6 +41,7 @@ import org.fortiss.tooling.kernel.introspection.IIntrospectionDetailsItem; import org.fortiss.tooling.kernel.introspection.IIntrospectionItem; import org.fortiss.tooling.kernel.introspection.IIntrospectiveKernelService; import org.fortiss.tooling.kernel.introspection.items.ConstraintCheckerKISSDetailsItem; +import org.fortiss.tooling.kernel.model.INamedElement; import org.fortiss.tooling.kernel.service.IConstraintCheckerService; import org.fortiss.tooling.kernel.service.IKernelIntrospectionSystemService; import org.fortiss.tooling.kernel.service.base.EObjectAwareServiceBase; @@ -46,6 +56,18 @@ public class ConstraintCheckerService extends EObjectAwareServiceBase<IConstrain /** The singleton instance. */ private static final ConstraintCheckerService INSTANCE = new ConstraintCheckerService(); + /** Map of all classes to the respective registered asynchronous constraint checkers. */ + Map<Class<?>, List<IConstraintChecker<EObject>>> asynchronousConstraintCheckers = + new HashMap<Class<?>, List<IConstraintChecker<EObject>>>(); + + /** Maps all constraint checkers to their identifier. */ + Map<IConstraintChecker<? extends EObject>, String> asynchronousCheckIdentifiers = + new HashMap<IConstraintChecker<? extends EObject>, String>(); + + /** Maps all constraint checkers to the last started Job, each. */ + Map<IConstraintChecker<? extends EObject>, Map<EObject, Job>> asynchronousCheckerJobs = + new HashMap<IConstraintChecker<? extends EObject>, Map<EObject, Job>>(); + /** Returns singleton instance of the service. */ public static ConstraintCheckerService getInstance() { return INSTANCE; @@ -155,6 +177,69 @@ public class ConstraintCheckerService extends EObjectAwareServiceBase<IConstrain } } + /** {@inheritDoc} */ + @Override + public void performAllAsynchronousConstraintChecksRecursively(EObject modelElement, + Consumer<List<IConstraintViolation<? extends EObject>>> addMarkers) { + performAllAsynchronousConstraintChecks(modelElement, addMarkers); + + for(Iterator<EObject> iter = modelElement.eAllContents(); iter.hasNext();) { + performAllAsynchronousConstraintChecks(iter.next(), addMarkers); + } + } + + /** {@inheritDoc} */ + @Override + public void performAllAsynchronousConstraintChecks(EObject modelElement, + Consumer<List<IConstraintViolation<? extends EObject>>> addMarkers) { + List<IConstraintChecker<EObject>> asyncHandlers = + performNearestClassLookup(modelElement.getClass(), asynchronousConstraintCheckers); + + if(asyncHandlers == null) { + return; + } + + for(IConstraintChecker<EObject> checker : asyncHandlers) { + Map<EObject, Job> jobs = asynchronousCheckerJobs.get(checker); + if(jobs == null) { + jobs = new HashMap<EObject, Job>(); + asynchronousCheckerJobs.put(checker, jobs); + } + Job checkerJob = jobs.get(modelElement); + if(checkerJob != null && checkerJob.getState() == RUNNING) { + checkerJob.cancel(); + } + + String checkerIdentifier = asynchronousCheckIdentifiers.get(checker); + if(checkerIdentifier == null) { + checkerIdentifier = "Asynchronous Model Constraint Check"; + } + + String modelIdentifier = ""; + if(modelElement instanceof INamedElement) { + modelIdentifier = " on " + ((INamedElement)modelElement).getName(); + } + + checkerJob = new Job(checkerIdentifier + modelIdentifier) { + + @Override + protected IStatus run(IProgressMonitor monitor) { + List<IConstraintViolation<? extends EObject>> results = + new ArrayList<IConstraintViolation<? extends EObject>>(); + results.addAll(checker.apply(modelElement)); + + addMarkers.accept(results); + + return OK_STATUS; + } + }; + jobs.put(modelElement, checkerJob); + + checkerJob.setUser(false); + checkerJob.schedule(); + } + } + /** {@inheritDoc} */ @Override public List<IConstraintChecker<? extends EObject>> @@ -204,4 +289,26 @@ public class ConstraintCheckerService extends EObjectAwareServiceBase<IConstrain public IIntrospectionDetailsItem getDetailsItem() { return new ConstraintCheckerKISSDetailsItem(unmodifiableMap(handlerMap)); } + + /** {@inheritDoc} */ + @SuppressWarnings("unchecked") + @Override + public <T extends EObject> void registerAsynchronousConstraintChecker( + IConstraintChecker<T> checker, Class<T> modelElementClass, String checkerName) { + if(checker == null) { + return; + } + + List<IConstraintChecker<EObject>> checkers = + asynchronousConstraintCheckers.get(modelElementClass); + + if(checkers == null) { + checkers = new ArrayList<IConstraintChecker<EObject>>(); + asynchronousConstraintCheckers.put(modelElementClass, checkers); + } + + checkers.add((IConstraintChecker<EObject>)checker); + + asynchronousCheckIdentifiers.put(checker, checkerName); + } } diff --git a/org.fortiss.tooling.kernel/src/org/fortiss/tooling/kernel/service/.ratings b/org.fortiss.tooling.kernel/src/org/fortiss/tooling/kernel/service/.ratings index 3697f4effdd95c8570df4d662566f770759e3143..d17caaf3af946ec53a99cd5e8b525a515c88c3ca 100644 --- a/org.fortiss.tooling.kernel/src/org/fortiss/tooling/kernel/service/.ratings +++ b/org.fortiss.tooling.kernel/src/org/fortiss/tooling/kernel/service/.ratings @@ -1,7 +1,7 @@ ICommandLineInterfaceService.java c3e3ba08b2a1b8125b43abd1c29b7dc0a0be2b80 GREEN ICommandStackService.java 678dcd1a6ab435ed0870fa2a9ec48ce47f25a187 GREEN IConnectionCompositorService.java 0cdf4568b2cd3e95ea195df90a84699eff36442b GREEN -IConstraintCheckerService.java dc04965ac0265f77cb846f472d76620fb05a491a GREEN +IConstraintCheckerService.java 7fdce90a3b6df1ebba709f8382a1c37d0cffb2e3 GREEN IEclipseResourceStorageService.java b1155ca15cd9474d4d533d6cb2725e8a22040ec9 GREEN IElementCompositorService.java acd462ec15f3bcc247b544b46ceebee971fe1408 GREEN IKernelIntrospectionSystemService.java 7005c3acb4c6f978729d93279c595765e94e38eb GREEN diff --git a/org.fortiss.tooling.kernel/src/org/fortiss/tooling/kernel/service/IConstraintCheckerService.java b/org.fortiss.tooling.kernel/src/org/fortiss/tooling/kernel/service/IConstraintCheckerService.java index dc04965ac0265f77cb846f472d76620fb05a491a..7fdce90a3b6df1ebba709f8382a1c37d0cffb2e3 100644 --- a/org.fortiss.tooling.kernel/src/org/fortiss/tooling/kernel/service/IConstraintCheckerService.java +++ b/org.fortiss.tooling.kernel/src/org/fortiss/tooling/kernel/service/IConstraintCheckerService.java @@ -16,6 +16,7 @@ package org.fortiss.tooling.kernel.service; import java.util.List; +import java.util.function.Consumer; import org.eclipse.emf.ecore.EObject; import org.fortiss.tooling.kernel.extension.IConstraintChecker; @@ -47,6 +48,32 @@ public interface IConstraintCheckerService { List<IConstraintViolation<? extends EObject>> performAllConstraintChecksRecursively(EObject modelElement); + /** + * Performs all registered asynchronous constraint checks for the given {@link EObject} and all + * its + * contained child elements. + * + * @param modelElement + * The {@link EObject} for which all checks shall be performed recursively. + * @param addMarkers + * A {@link Consumer} to receive all constraint violations from the asynchronous + * checks. + */ + void performAllAsynchronousConstraintChecksRecursively(EObject modelElement, + Consumer<List<IConstraintViolation<? extends EObject>>> addMarkers); + + /** + * Performs all registered asynchronous constraint checks for the given {@link EObject}. + * + * @param modelElement + * The {@link EObject} for which all checks shall be performed. + * @param addMarkers + * A {@link Consumer} to receive all constraint violations from the asynchronous + * checks. + */ + void performAllAsynchronousConstraintChecks(EObject modelElement, + Consumer<List<IConstraintViolation<? extends EObject>>> addMarkers); + /** * Performs all constraint checks only on the given model element and * returns the check results. @@ -70,4 +97,8 @@ public interface IConstraintCheckerService { * checks will be skipped. */ void registerTypeAsExcludedParentForConstraintChecks(Class<? extends EObject> clazz); + + /** Registers the given checker to be run asynchronously in the service. */ + <T extends EObject> void registerAsynchronousConstraintChecker(IConstraintChecker<T> checker, + Class<T> modelElementClass, String checkerName); } diff --git a/org.fortiss.variability/.settings b/org.fortiss.variability/.settings new file mode 160000 index 0000000000000000000000000000000000000000..310d1c04f28f6252d5a02dd8fde1b76ae4a4da51 --- /dev/null +++ b/org.fortiss.variability/.settings @@ -0,0 +1 @@ +Subproject commit 310d1c04f28f6252d5a02dd8fde1b76ae4a4da51 diff --git a/org.fortiss.variability/.settings/org.eclipse.core.resources.prefs b/org.fortiss.variability/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index fa5701cdf98256d596aa6ddf0fdfa5c0a5c0f567..0000000000000000000000000000000000000000 --- a/org.fortiss.variability/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/org/fortiss/variability/util/FeatureModelTransformationUtils.java=UTF-8 -encoding/<project>=US-ASCII diff --git a/org.fortiss.variability/.settings/org.eclipse.jdt.core.prefs b/org.fortiss.variability/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 57418cf340eceb0c1f15c9eb3d0f6cea2fb2e3ab..0000000000000000000000000000000000000000 --- a/org.fortiss.variability/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,366 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.doc.comment.support=enabled -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=warning -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=warning -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.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=warning -org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning -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.nullReference=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning -org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -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.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedParameter=warning -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=11 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=48 -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=16 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=48 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.formatter.alignment_for_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=16 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=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_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_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.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.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.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert -org.eclipse.jdt.core.formatter.comment.line_length=100 -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=@CodeFormatterOff -org.eclipse.jdt.core.formatter.enabling_tag=@CodeFormatterOn -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_field=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=do not 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_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=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=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_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_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=do not 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_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_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_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_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_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=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_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_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=do not 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=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=do not 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=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=do not 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_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_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=false -org.eclipse.jdt.core.formatter.join_wrapped_lines=true -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_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=100 -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.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_binary_operator=false -org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=false -org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/org.fortiss.variability/.settings/org.eclipse.jdt.ui.prefs b/org.fortiss.variability/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 8c3a03f520d68ea220efb3a77a80d424d2bf7973..0000000000000000000000000000000000000000 --- a/org.fortiss.variability/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,58 +0,0 @@ -eclipse.preferences.version=1 -editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true -formatter_profile=_fortiss -formatter_settings_version=12 -org.eclipse.jdt.ui.javadoc=true -org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/** Returns ${bare_field_name}. */</template><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/** Sets ${bare_field_name}. */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*-------------------------------------------------------------------------+\n| Copyright ${year} fortiss GmbH |\n| |\n| Licensed under the Apache License, Version 2.0 (the "License"); |\n| you may not use this file except in compliance with the License. |\n| You may obtain a copy of the License at |\n| |\n| http\://www.apache.org/licenses/LICENSE-2.0 |\n| |\n| Unless required by applicable law or agreed to in writing, software |\n| distributed under the License is distributed on an "AS IS" BASIS, |\n| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |\n| See the License for the specific language governing permissions and |\n| limitations under the License. |\n+--------------------------------------------------------------------------*/</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * \n * @author ${user}\n*/</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">\n/** */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/** {@inheritDoc} */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-JSDoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></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_to_enhanced_for_loop=false -sp_cleanup.correct_indentation=false -sp_cleanup.format_source_code=true -sp_cleanup.format_source_code_changes_only=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=true -sp_cleanup.never_use_blocks=false -sp_cleanup.never_use_parentheses_in_expressions=true -sp_cleanup.on_save_use_additional_actions=false -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_trailing_whitespaces=false -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=false -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_blocks=false -sp_cleanup.use_blocks_only_for_return_and_throw=false -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/org.fortiss.variability/.settings/org.eclipse.m2e.core.prefs b/org.fortiss.variability/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1cb2389f85fe6381425d29f0a9866fb65..0000000000000000000000000000000000000000 --- a/org.fortiss.variability/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/org.fortiss.variability/META-INF/MANIFEST.MF b/org.fortiss.variability/META-INF/MANIFEST.MF index 031b4ee41a511ace92f1c63b598bcc4afeddc44e..f4584ed8c0efe073bdd7300c7f987262d67f029c 100644 --- a/org.fortiss.variability/META-INF/MANIFEST.MF +++ b/org.fortiss.variability/META-INF/MANIFEST.MF @@ -16,6 +16,7 @@ Export-Package: org.antlr.v4.runtime, org.antlr.v4.runtime.tree, org.antlr.v4.runtime.tree.pattern, org.antlr.v4.runtime.tree.xpath, + org.fortiss.variability.analysis, org.fortiss.variability.bind, org.fortiss.variability.model, org.fortiss.variability.model.base, diff --git a/org.fortiss.variability/model/.ratings b/org.fortiss.variability/model/.ratings index 1084062ce56174e47a977b1e4fc34c9eb3ae7eed..d8e8f03ac85015ed3bbd689ca5cda3aff0926ace 100644 --- a/org.fortiss.variability/model/.ratings +++ b/org.fortiss.variability/model/.ratings @@ -1 +1 @@ -variability.ecore 3e85a6aa197bd9a4900f1d3236a2c5e576e7a645 GREEN +variability.ecore 46e8f19e62bf23c1897ad71d15ed830f01cd1ce9 GREEN diff --git a/org.fortiss.variability/model/variability.ecore b/org.fortiss.variability/model/variability.ecore index 3e85a6aa197bd9a4900f1d3236a2c5e576e7a645..46e8f19e62bf23c1897ad71d15ed830f01cd1ce9 100644 --- a/org.fortiss.variability/model/variability.ecore +++ b/org.fortiss.variability/model/variability.ecore @@ -344,6 +344,12 @@ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <details key="documentation" value="Literal to be used in a PresenceConditionTerm. These are the propositions in a propositional logic formula."/> </eAnnotations> + <eOperations name="resolveToFeatureLiterals" eType="#//presence/PresenceConditionTerm"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="{@inheritDoc}"/> + <details key="body" value="return org.fortiss.variability.model.VariabilityStaticImpl.resolveToFeatureLiterals(this);"/> + </eAnnotations> + </eOperations> <eStructuralFeatures xsi:type="ecore:EReference" name="literalReference" eType="#//presence/ILiteralReferencable"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <details key="documentation" value="Reference to an referable element. This can be Features but also other model elements."/> @@ -355,6 +361,11 @@ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <details key="documentation" value="Base interface for all elements that can be used as literals in a presence condition."/> </eAnnotations> + <eOperations name="resolveToFeatureLiterals" eType="#//presence/PresenceConditionTerm"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="Translates all literals in this presence condition which are not features already, to their respective feature combination."/> + </eAnnotations> + </eOperations> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="DefaultPC" eSuperTypes="#//presence/PresenceCondition"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> @@ -389,11 +400,23 @@ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <details key="documentation" value="PresenceCondition with two operands and a disjunctive operator."/> </eAnnotations> + <eOperations name="resolveToFeatureLiterals" eType="#//presence/PresenceConditionTerm"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="{@inheritDoc}"/> + <details key="body" value="return org.fortiss.variability.model.VariabilityStaticImpl.resolveToFeatureLiterals(this);"/> + </eAnnotations> + </eOperations> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="AndPC" eSuperTypes="#//presence/BinaryOperatorPC"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <details key="documentation" value="PresenceCondition with two operands and a conjunctive operator."/> </eAnnotations> + <eOperations name="resolveToFeatureLiterals" eType="#//presence/PresenceConditionTerm"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="{@inheritDoc}"/> + <details key="body" value="return org.fortiss.variability.model.VariabilityStaticImpl.resolveToFeatureLiterals(this);"/> + </eAnnotations> + </eOperations> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="UnaryOperatorPC" abstract="true" eSuperTypes="#//presence/PresenceConditionTerm"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> @@ -410,6 +433,12 @@ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <details key="documentation" value="Negated PresenceCondition."/> </eAnnotations> + <eOperations name="resolveToFeatureLiterals" eType="#//presence/PresenceConditionTerm"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="{@inheritDoc}"/> + <details key="body" value="return org.fortiss.variability.model.VariabilityStaticImpl.resolveToFeatureLiterals(this);"/> + </eAnnotations> + </eOperations> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="IEvaluationContext" abstract="true" interface="true"> diff --git a/org.fortiss.variability/model/variability.genmodel b/org.fortiss.variability/model/variability.genmodel index 58ee3f6194ca308ca08ed466bb00a323ae703e4a..1a59ec6e14367bbdfcd641a6bba50fab18796472 100644 --- a/org.fortiss.variability/model/variability.genmodel +++ b/org.fortiss.variability/model/variability.genmodel @@ -127,8 +127,12 @@ <genClasses ecoreClass="variability.ecore#//presence/LiteralPC"> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference variability.ecore#//presence/LiteralPC/literalReference"/> + <genOperations ecoreOperation="variability.ecore#//presence/LiteralPC/resolveToFeatureLiterals" + body="return org.fortiss.variability.model.VariabilityStaticImpl.resolveToFeatureLiterals(this);"/> + </genClasses> + <genClasses image="false" ecoreClass="variability.ecore#//presence/ILiteralReferencable"> + <genOperations ecoreOperation="variability.ecore#//presence/ILiteralReferencable/resolveToFeatureLiterals"/> </genClasses> - <genClasses image="false" ecoreClass="variability.ecore#//presence/ILiteralReferencable"/> <genClasses ecoreClass="variability.ecore#//presence/DefaultPC"> <genOperations ecoreOperation="variability.ecore#//presence/DefaultPC/getStringRepresentation" body="return "DEFAULT";"/> @@ -141,11 +145,15 @@ <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <details key="body" value="return org.fortiss.variability.model.VariabilityStaticImpl.evaluateOrPC(this, context);"/> </genAnnotations> + <genOperations ecoreOperation="variability.ecore#//presence/OrPC/resolveToFeatureLiterals" + body="return org.fortiss.variability.model.VariabilityStaticImpl.resolveToFeatureLiterals(this);"/> </genClasses> <genClasses ecoreClass="variability.ecore#//presence/AndPC"> <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <details key="body" value="return org.fortiss.variability.model.VariabilityStaticImpl.evaluateAndPC(this, context);"/> </genAnnotations> + <genOperations ecoreOperation="variability.ecore#//presence/AndPC/resolveToFeatureLiterals" + body="return org.fortiss.variability.model.VariabilityStaticImpl.resolveToFeatureLiterals(this);"/> </genClasses> <genClasses image="false" ecoreClass="variability.ecore#//presence/UnaryOperatorPC"> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference variability.ecore#//presence/UnaryOperatorPC/operand"/> @@ -154,6 +162,8 @@ <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <details key="body" value="return org.fortiss.variability.model.VariabilityStaticImpl.evaluateNotPC(this, context);"/> </genAnnotations> + <genOperations ecoreOperation="variability.ecore#//presence/NotPC/resolveToFeatureLiterals" + body="return org.fortiss.variability.model.VariabilityStaticImpl.resolveToFeatureLiterals(this);"/> </genClasses> <genClasses image="false" ecoreClass="variability.ecore#//presence/IEvaluationContext"/> <genClasses image="false" ecoreClass="variability.ecore#//presence/ICompleteEvaluationContext"> diff --git a/org.fortiss.variability/src/org/fortiss/variability/analysis/.ratings b/org.fortiss.variability/src/org/fortiss/variability/analysis/.ratings new file mode 100644 index 0000000000000000000000000000000000000000..5a84c1085464db88a29fa63a8d7f5fa9201f5a39 --- /dev/null +++ b/org.fortiss.variability/src/org/fortiss/variability/analysis/.ratings @@ -0,0 +1,8 @@ +BucketSetMap.java 665a28c80a9693b9b9e31b7ebe59f2de4195d56c GREEN +DualKeyMap.java 75fbe85a54e5a655aaf67108ae004f98ed2879d8 GREEN +EMFProductLineTranslation.java b590fbf053c21d9e6b0ee6d0818779e4adb1fe0b GREEN +GenericProductLineAnalysis.java 1026cd6d7d0286c0f2402c5918d83cf7dc84407b GREEN +IProductLineConstraint.java 1b0e1231cc578a6e7e544441ac33533b4feafeb1 GREEN +IProductLineTranslation.java 733dae03e2baae237b6f0b33f0dd618a4f47cf73 GREEN +ProductLineConstraintBase.java 04097c7c31367fdd11a054ba2b259a0535a313f4 GREEN +ProductLineConstraintViolation.java 2a2bd9341e0b8f407ad9b4c663b507bd10d083ea GREEN diff --git a/org.fortiss.variability/src/org/fortiss/variability/analysis/BucketSetMap.java b/org.fortiss.variability/src/org/fortiss/variability/analysis/BucketSetMap.java new file mode 100644 index 0000000000000000000000000000000000000000..665a28c80a9693b9b9e31b7ebe59f2de4195d56c --- /dev/null +++ b/org.fortiss.variability/src/org/fortiss/variability/analysis/BucketSetMap.java @@ -0,0 +1,68 @@ +/*-------------------------------------------------------------------------+ +| Copyright 2022 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.variability.analysis; + +import static java.util.Collections.emptySet; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +/** + * {@link Map} implementation which maps a key to a {@link Set} of values. + * + * @author bayha + */ +public class BucketSetMap<K, V> extends HashMap<K, Set<V>> { + /** ISerializable */ + private static final long serialVersionUID = 312480465506162554L; + + /** + * Adds a given value to the set for the given key. + * + * @param key + * The key for which an additional value shall be added. + * @param value + * The additional value that shall be added. + * + * @return The new set of values for the given key. + */ + public Set<V> add(K key, V value) { + Set<V> set = super.get(key); + + if(set == null) { + set = new HashSet<V>(); + this.put(key, set); + } + + set.add(value); + + return set; + } + + /** {@inheritDoc} */ + @Override + public Set<V> get(Object key) { + Set<V> ret = super.get(key); + + if(ret == null) { + return emptySet(); + } + + return ret; + } +} diff --git a/org.fortiss.variability/src/org/fortiss/variability/analysis/DualKeyMap.java b/org.fortiss.variability/src/org/fortiss/variability/analysis/DualKeyMap.java new file mode 100644 index 0000000000000000000000000000000000000000..75fbe85a54e5a655aaf67108ae004f98ed2879d8 --- /dev/null +++ b/org.fortiss.variability/src/org/fortiss/variability/analysis/DualKeyMap.java @@ -0,0 +1,70 @@ +/*-------------------------------------------------------------------------+ +| Copyright 2022 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.variability.analysis; + +import java.util.HashMap; +import java.util.Map; + +/** + * A map which uses a combination of two keys to identify all values. + * + * @author bayha + */ +public class DualKeyMap<K1, K2, V> { + /** Internally used map of maps. */ + private Map<K1, Map<K2, V>> internalMap = new HashMap<K1, Map<K2, V>>(); + + /** + * Retrieves the value for the given combination of keys. + * + * @param key1 + * The first part of the key. + * @param key2 + * The second part of the key. + * + * @return The value which is identified by the given combination of the two keys. + */ + public V get(K1 key1, K2 key2) { + Map<K2, V> map = internalMap.get(key1); + if(map != null) { + return map.get(key2); + } + return null; + } + + /** + * Adds the given value for the given combination of keys. + * + * @param key1 + * The first part of the key. + * @param key2 + * The second part of the key. + * @param value + * The value to be associated with the given combination of keys. + * + * @return The previous value associated with the given combination of keys, or null if there + * was no mapping. + */ + public V put(K1 key1, K2 key2, V value) { + Map<K2, V> map = internalMap.get(key1); + if(map == null) { + map = new HashMap<K2, V>(); + internalMap.put(key1, map); + } + + return map.put(key2, value); + } +} diff --git a/org.fortiss.variability/src/org/fortiss/variability/analysis/EMFProductLineTranslation.java b/org.fortiss.variability/src/org/fortiss/variability/analysis/EMFProductLineTranslation.java new file mode 100644 index 0000000000000000000000000000000000000000..b590fbf053c21d9e6b0ee6d0818779e4adb1fe0b --- /dev/null +++ b/org.fortiss.variability/src/org/fortiss/variability/analysis/EMFProductLineTranslation.java @@ -0,0 +1,1047 @@ +package org.fortiss.variability.analysis; + +import static java.util.stream.Collectors.toList; +import static org.eclipse.emf.ecore.util.EcoreUtil.copy; +import static org.fortiss.variability.model.VariabilityModelElementFactory.createAndPC; +import static org.fortiss.variability.util.VariabilityUtilsInternal.getChildrenWithType; +import static org.fortiss.variability.util.VariabilityUtilsInternal.logError; +import static org.fortiss.variability.util.VariabilityUtilsInternal.logInfo; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EEnumLiteral; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.fortiss.variability.model.IAlternative; +import org.fortiss.variability.model.IOptionalVariationPoint; +import org.fortiss.variability.model.features.AbstractAlternativeFeature; +import org.fortiss.variability.model.features.AbstractCompositionalFeature; +import org.fortiss.variability.model.features.AbstractCrossFeatureConstraint; +import org.fortiss.variability.model.features.AbstractFeature; +import org.fortiss.variability.model.features.AbstractFeatureModel; +import org.fortiss.variability.model.presence.AndPC; +import org.fortiss.variability.model.presence.DefaultPC; +import org.fortiss.variability.model.presence.ILiteralReferencable; +import org.fortiss.variability.model.presence.LiteralPC; +import org.fortiss.variability.model.presence.NotPC; +import org.fortiss.variability.model.presence.OrPC; +import org.fortiss.variability.model.presence.PresenceCondition; +import org.fortiss.variability.model.presence.PresenceConditionTerm; + +import com.microsoft.z3.BoolExpr; +import com.microsoft.z3.BoolSort; +import com.microsoft.z3.Context; +import com.microsoft.z3.EnumSort; +import com.microsoft.z3.Expr; +import com.microsoft.z3.FuncDecl; +import com.microsoft.z3.IntSort; +import com.microsoft.z3.SeqExpr; +import com.microsoft.z3.SeqSort; +import com.microsoft.z3.Solver; +import com.microsoft.z3.Sort; +import com.microsoft.z3.StringSymbol; +import com.microsoft.z3.Symbol; + +/** + * Base class that implements the translation of EMF based model product-lines to SMT in order to + * perform product-line analysis via constraint lifting. + * + * Note that this implementation does only support {@link EObject}s as model elements. + * + * @author bayha + */ +public class EMFProductLineTranslation implements IProductLineTranslation { + + /** Prefix to be displayed as prefix to all logging messages from the translation. */ + private static final String LOG_PREFIX = "[EMF product-line translation]: "; + + /* Configuration related fields */ + /** Flag that specifies whether the optimization to only translate optional parts is enabled. */ + private boolean isIslandOptimizationEnabled = false; + + /** + * The number of non-variable elements that are connected to a variable element to be translated + * in case the "island optimization" is enabled. + */ + private int islandOptimizationStepNum = 0; + + /** The set to specify all {@link EClass} to be translated by this translation. */ + private Set<EClass> translatedClasses; + /** The set to specify all {@link EReference} to be translated by this translation. */ + private Set<EReference> translatedReferences; + /** The set to specify all {@link EAttribute} to be translated by this translation. */ + private Set<EAttribute> translatedAttributes; + + /* Solver related fields */ + /** {@link Context} to capture the translated model. */ + private Context ctx; + + /** List of all translated assertions for the model. */ + private List<BoolExpr> modelAssertions; + /** List of all assertions for the feature model. */ + private List<BoolExpr> featureModelAssertions; + /** List of all assertions which encode the presence conditions. */ + private List<BoolExpr> presenceConditionAssertions; + /** List of all assertions which encode the constraints. */ + private List<BoolExpr> constraintAssertions; + + /* Meta-model related fields */ + /** Z3 sort for base type integer. */ + private IntSort intSort; + /** Z3 sort for base type string. */ + private SeqSort<?> stringSort; + /** Z3 sort for base type boolean. */ + private BoolSort boolSort; + + /** Mapping of EDataTypes (e.g. EInt) to their translated Z3 type. */ + private Map<EDataType, Sort> eDataType2Sort; + /** Mapping for classes to their respective Z3 type. */ + private Map<EClass, EnumSort<?>> eClass2z3Sort; + + /** Mapping of enumeration literals to the translated Z3 expression. */ + private Map<Enum<?>, Expr<?>> eLiteral2Expr; + /** Mapping of classes to their respective z3 expression for 'null' */ + private Map<EClass, Expr<?>> eClass2NullElement; + /** Mapping of enumerations to their respective z3 expression for 'null' */ + private Map<EEnum, Expr<?>> eEnum2NullElement; + + /** + * The mapping of translated {@link EReference}s to the type that will be used for translation. + * This type might be different from the references original type in case only a subtype is + * specified for translation. + */ + private Map<EReference, EClass> reference2TranslatedEClass; + + /** Mapping of attributes to their translated Z3 function. */ + private DualKeyMap<EAttribute, EClass, FuncDecl<?>> eAttribute2FunDecl; + /** Mapping of references to their translated Z3 function. */ + private DualKeyMap<EReference, EClass, FuncDecl<?>> eReference2FunDecl; + + /* Model related fields */ + /** The mapping of translated {@link EClass} to the objects that have been collected. */ + protected BucketSetMap<EClass, EObject> class2TranslatedEObjects; + + /** + * Mapping of objects with types to their translated Z3 expressions. The second key EClass is + * necessary as an object is translated for all classes specified in 'translatedClasses'). + */ + private DualKeyMap<EObject, EClass, Expr<?>> eObject2z3Expr; + + /** + * The mapping from Z3 {@link Expr} back to the respective {@link EObject} to be used for + * interpreting solver results. + */ + private Map<Expr<?>, EObject> z3Expr2EObject; + + /** + * Maps {@link EObject}s to all incoming references with their source objects each. + * + * The following example EObjects and EReferences... + * srcObj1 --ref1--> trgObj1 <--ref1-- srcObj2 + * + * ...will be contained here as: + * trgObj1 -> ( ref1 -> {srcObj1, srcObj2}) + * + */ + private Map<EObject, BucketSetMap<EReference, EObject>> eObject2referencingEObjects; + + /* Variability related fields */ + /** The {@link AbstractFeatureModel} collected by this translation */ + private AbstractFeatureModel featureModel; + /** Mapping of features to corresponding Z3 {@link BoolExpr}. */ + private Map<AbstractFeature, BoolExpr> feature2BoolExpr; + + /** The mapping of translated {@link EObject}s to global {@link PresenceCondition}s. */ + protected Map<EObject, PresenceConditionTerm> object2presenceCondition; + + /** Mapping of classes to the selection function for this type. */ + private Map<EClass, FuncDecl<?>> eClass2SelectionFunction; + + /** Constructor. */ + public EMFProductLineTranslation() { + // Fields which should not change between individual translations are initialized only once. + translatedClasses = new HashSet<EClass>(); + translatedReferences = new HashSet<EReference>(); + translatedAttributes = new HashSet<EAttribute>(); + } + + /** Initialization of analysis and base types. */ + private void initialize() { + ctx = new Context(); + + class2TranslatedEObjects = new BucketSetMap<EClass, EObject>(); + object2presenceCondition = new HashMap<EObject, PresenceConditionTerm>(); + reference2TranslatedEClass = new HashMap<EReference, EClass>(); + modelAssertions = new ArrayList<BoolExpr>(); + featureModelAssertions = new ArrayList<BoolExpr>(); + presenceConditionAssertions = new ArrayList<BoolExpr>(); + constraintAssertions = new ArrayList<BoolExpr>(); + eDataType2Sort = new HashMap<EDataType, Sort>(); + eClass2z3Sort = new HashMap<EClass, EnumSort<?>>(); + eLiteral2Expr = new HashMap<Enum<?>, Expr<?>>(); + eClass2NullElement = new HashMap<EClass, Expr<?>>(); + eEnum2NullElement = new HashMap<EEnum, Expr<?>>(); + eClass2SelectionFunction = new HashMap<EClass, FuncDecl<?>>(); + feature2BoolExpr = new HashMap<AbstractFeature, BoolExpr>(); + eAttribute2FunDecl = new DualKeyMap<EAttribute, EClass, FuncDecl<?>>(); + eReference2FunDecl = new DualKeyMap<EReference, EClass, FuncDecl<?>>(); + eObject2z3Expr = new DualKeyMap<EObject, EClass, Expr<?>>(); + z3Expr2EObject = new HashMap<Expr<?>, EObject>(); + + eObject2referencingEObjects = new HashMap<EObject, BucketSetMap<EReference, EObject>>() { + /** ISerializable */ + private static final long serialVersionUID = -4436109358184535028L; + + /** {@inheritDoc} */ + @Override + public BucketSetMap<EReference, EObject> get(Object key1) { + BucketSetMap<EReference, EObject> retMap = super.get(key1); + + // In case the bucket map does not yet exist, it is initialized, here. + if(retMap == null) { + retMap = new BucketSetMap<EReference, EObject>(); + super.put((EObject)key1, retMap); + } + + return retMap; + } + }; + + // Initialize model independent base types. + intSort = ctx.mkIntSort(); + stringSort = ctx.mkStringSort(); + boolSort = ctx.mkBoolSort(); + + eDataType2Sort.put(EcorePackage.Literals.EINT, intSort); + eDataType2Sort.put(EcorePackage.Literals.ESTRING, stringSort); + eDataType2Sort.put(EcorePackage.Literals.EBOOLEAN, boolSort); + } + + /** {@inheritDoc} */ + @Override + public final void translateModel(EObject model) { + // Initialize and reset local fields. + initialize(); + + // Reference types need to be collected first, since they are required by optimizations. + collectReferenceTypes(); + collectTranslatedObjects(model, null); + + if(isIslandOptimizationEnabled) { + collectReferencedIslandObjects(); + } + + // Metamodel translation. + translateClassesMetamodel(); + translateAttributesAndReferencesMetamodel(); + + // Model translation. + translateObjects(); + + // Translate variability. + translateFeatureModel(); + translatePresenceConditions(); + } + + /** Check and determine which types can be used to encode the translated relations. */ + private void collectReferenceTypes() { + for(EReference ref : translatedReferences) { + EClass refType = ref.getEReferenceType(); + + // Check if reference type is translated or is a subclass of a translated class. + EClass translatedRefType = getTranslatedClass(refType); + if(translatedRefType != null) { + reference2TranslatedEClass.put(ref, translatedRefType); + } else { + // Attempt to find a translated class which is a sub-class. + for(EClass ecls : translatedClasses) { + if(refType.isSuperTypeOf(ecls)) { + reference2TranslatedEClass.put(ref, ecls); + + logInfo(LOG_PREFIX + "The reference \"" + ref.getName() + "\" of type " + + refType.getName() + + " is supposed to be translated for a product-line analysis. Since this type is not specified to be translated, the translated sub-class " + + ecls.getName() + " will be used."); + } + } + // Check if any super type was found. + if(reference2TranslatedEClass.get(ref) == null) { + String errMsg = LOG_PREFIX + "ERefernce \"" + ref.getName() + "\" is of type " + + ref.getEReferenceType().getName() + " which is not translated."; + + logError(errMsg); + + throw new RuntimeException(errMsg); + } + } + } + } + + /** Recursively collect all objects which shall be translated. */ + private void collectTranslatedObjects(EObject model, PresenceConditionTerm parentCondition) { + if(model instanceof AbstractFeatureModel) { + featureModel = (AbstractFeatureModel)model; + + return; + } + + EClass modelClass = model.eClass(); + PresenceConditionTerm pc = getLocalPresenceCondition(model); + + if(pc == null) { + pc = copy(parentCondition); + } else { + if(parentCondition != null) + pc = createAndPC(copy(pc), copy(parentCondition), ""); + } + + EClass translatedClass = getTranslatedClass(modelClass); + if(translatedClass != null) { + // For the island optimization, only optional objects are translated. + if(isIslandOptimizationEnabled) { + if(pc != null) { + collectEObject(model, translatedClass, pc); + } + } else { + collectEObject(model, translatedClass, pc); + } + } + + // For the island optimization, all references (also non-variable) need to be collected. + if(isIslandOptimizationEnabled) { + collectIncomingReferences(model); + } + + for(EObject child : model.eContents()) { + collectTranslatedObjects(child, pc); + } + } + + /** Collect one EObject to be translated. */ + protected void collectEObject(EObject eo, EClass cls, PresenceConditionTerm pc) { + class2TranslatedEObjects.add(cls, eo); + + object2presenceCondition.put(eo, pc); + } + + /** Collect the incoming references for all targets referenced by refSource. */ + private void collectIncomingReferences(EObject refSource) { + for(EReference ref : refSource.eClass().getEAllReferences()) { + if(translatedReferences.contains(ref)) { + EObject refTarget = (EObject)refSource.eGet(ref); + BucketSetMap<EReference, EObject> referencingObj = + eObject2referencingEObjects.get(refTarget); + referencingObj.add(ref, refSource); + } + } + } + + /** + * Collects all objects which are referenced from optional objects for the "island + * optimization". + */ + private void collectReferencedIslandObjects() { + for(EClass trgEcls : translatedClasses) { + Set<EObject> trgObjs = new HashSet<EObject>(); + trgObjs.addAll(class2TranslatedEObjects.get(trgEcls)); + for(EObject trgObj : trgObjs) { + collectTranslatedReferences(trgObj, islandOptimizationStepNum); + } + } + } + + /** Collect all references which shall be translated for the "island optimization". */ + private void collectTranslatedReferences(EObject model, int remainingSteps) { + if(remainingSteps <= 0) { + return; + } + + // Collect outgoing references. + for(EReference ref : model.eClass().getEAllReferences()) { + if(translatedReferences.contains(ref)) { + EObject refObj = (EObject)model.eGet(ref); + EClass refClass = reference2TranslatedEClass.get(ref); + class2TranslatedEObjects.add(refClass, refObj); + + collectTranslatedReferences(refObj, remainingSteps - 1); + } + } + + // Collect incoming references. + BucketSetMap<EReference, EObject> incomingReferences = + eObject2referencingEObjects.get(model); + for(EReference ref : incomingReferences.keySet()) { + for(EObject srcObj : incomingReferences.get(ref)) { + EClass srcObjTransClass = getTranslatedClass(srcObj.eClass()); + if(srcObjTransClass != null) { + class2TranslatedEObjects.add(srcObjTransClass, srcObj); + + collectTranslatedReferences(srcObj, remainingSteps - 1); + } + } + } + } + + /** Translates all presence conditions to Z3. */ + private void translatePresenceConditions() { + for(EClass ec : translatedClasses) { + EnumSort<?> ecSort = eClass2z3Sort.get(ec); + FuncDecl<?> selFun = ctx.mkFuncDecl("SELECTED_" + ec.getName(), ecSort, boolSort); + eClass2SelectionFunction.put(ec, selFun); + + for(EObject eo : class2TranslatedEObjects.get(ec)) { + BoolExpr eoSelection; + + final PresenceConditionTerm globalPC = object2presenceCondition.get(eo); + if(globalPC != null) { + eoSelection = translatePresenceCondition(globalPC); + } else { + eoSelection = ctx.mkTrue(); + } + + Expr<?> eoExpr = eObject2z3Expr.get(eo, ec); + presenceConditionAssertions.add(ctx.mkEq(ctx.mkApp(selFun, eoExpr), eoSelection)); + } + } + } + + /** Translates a given {@link PresenceCondition} to Z3. */ + private BoolExpr translatePresenceCondition(PresenceCondition pc) { + if(pc == null) { + return null; + } + + if(pc instanceof LiteralPC) { + ILiteralReferencable literal = ((LiteralPC)pc).getLiteralReference(); + if(literal == null || literal.getName().length() == 0) { + // Illegal literals are translated as true. + return ctx.mkTrue(); + } + return feature2BoolExpr.get(literal); + } + + if(pc instanceof DefaultPC) { + return translatePresenceCondition(pc.resolveToFeatureLiterals()); + } + + if(pc instanceof OrPC) { + PresenceConditionTerm op1 = ((OrPC)pc).getOperand1(); + PresenceConditionTerm op2 = ((OrPC)pc).getOperand2(); + return ctx.mkOr(translatePresenceCondition(op1), translatePresenceCondition(op2)); + } + + if(pc instanceof AndPC) { + PresenceConditionTerm op1 = ((AndPC)pc).getOperand1(); + PresenceConditionTerm op2 = ((AndPC)pc).getOperand2(); + return ctx.mkAnd(translatePresenceCondition(op1), translatePresenceCondition(op2)); + } + + if(pc instanceof NotPC) { + return ctx.mkNot(translatePresenceCondition(((NotPC)pc).getOperand())); + } + + logError(LOG_PREFIX + "Unknown PresenceCondition: " + pc); + return null; + } + + /** Translates the feature model to Z3. */ + private void translateFeatureModel() { + if(featureModel == null) { + return; + } + + BoolExpr fmExpr = ctx.mkBoolConst("FEATURE_" + featureModel.getName()); + feature2BoolExpr.put(featureModel, fmExpr); + + featureModelAssertions.add(fmExpr); + + // Translate all features (including alternatives). + for(AbstractFeature f : getChildrenWithType(featureModel, AbstractFeature.class)) { + String name = f.getName(); + String constName = "FEATURE_" + name; + final BoolExpr fExpr = ctx.mkBoolConst(constName.replaceAll("@", "AT")); + feature2BoolExpr.put(f, fExpr); + + // If f is child of another feature, the selection criteria have to be encoded. + final EObject fContainer = f.eContainer(); + if(fContainer instanceof AbstractFeature) { + AbstractFeature parentF = (AbstractFeature)fContainer; + final BoolExpr parentExpr = feature2BoolExpr.get(parentF); + + if(f.isOptional()) { + featureModelAssertions.add(ctx.mkImplies(fExpr, parentExpr)); + } else { + if(fContainer instanceof AbstractCompositionalFeature) { + featureModelAssertions.add(ctx.mkImplies(parentExpr, fExpr)); + } + } + } + } + + // For alternatives also translate the alternative selection criteria. + for(AbstractAlternativeFeature af : getChildrenWithType(featureModel, + AbstractAlternativeFeature.class)) { + BoolExpr afExpr = feature2BoolExpr.get(af); + EList<AbstractFeature> as = af.getAlternatives(); + + featureModelAssertions.add( + ctx.mkImplies(afExpr, ctx.mkOr(as.stream().map(alt -> feature2BoolExpr.get(alt)) + .collect(toList()).toArray(new BoolExpr[0])))); + + for(AbstractFeature a : as) { + BoolExpr aExpr = feature2BoolExpr.get(a); + featureModelAssertions.add(ctx.mkImplies(aExpr, afExpr)); + featureModelAssertions.add(ctx.mkImplies(aExpr, + ctx.mkAnd(as.stream().filter(alt -> alt != a) + .map(alt -> ctx.mkNot(feature2BoolExpr.get(alt))).collect(toList()) + .toArray(new BoolExpr[0])))); + } + } + + // Translate all constraints. + for(AbstractCrossFeatureConstraint c : getChildrenWithType(featureModel, + AbstractCrossFeatureConstraint.class)) { + AbstractFeature target = c.getTarget(); + AbstractFeature source = (AbstractFeature)c.eContainer(); + + BoolExpr srcExpr = feature2BoolExpr.get(source); + BoolExpr trgExpr = feature2BoolExpr.get(target); + + switch(c.getType()) { + case REQUIRES: + featureModelAssertions.add(ctx.mkImplies(srcExpr, trgExpr)); + break; + case EXCLUDES: + featureModelAssertions.add(ctx.mkImplies(srcExpr, ctx.mkNot(trgExpr))); + break; + default: // Suggestions are not translated. + } + } + } + + /** Translates all objects in the model. */ + private void translateObjects() { + // Translate objects by class. + for(EClass ec : translatedClasses) { + Set<EObject> objs = class2TranslatedEObjects.get(ec); + + EList<EAttribute> attributes = ec.getEAllAttributes(); + for(EAttribute ea : attributes) { + if(translatedAttributes.contains(ea)) { + FuncDecl<?> attFunc = eAttribute2FunDecl.get(ea, ec); + + for(EObject eo : objs) { + Expr<?> attVal = translateAttributeValue(eo, ea); + BoolExpr attValAssertion = + ctx.mkEq(ctx.mkApp(attFunc, eObject2z3Expr.get(eo, ec)), attVal); + modelAssertions.add(attValAssertion); + } + } + } + + EList<EReference> references = ec.getEAllReferences(); + for(EReference er : references) { + if(translatedReferences.contains(er)) { + FuncDecl<?> refFunc = eReference2FunDecl.get(er, ec); + for(EObject eo : objs) { + Expr<?> eoExpr = eObject2z3Expr.get(eo, ec); + Expr<?> refVal = translateReferenceValue(eo, er); + BoolExpr rafValAssertion = ctx.mkEq(ctx.mkApp(refFunc, eoExpr), refVal); + modelAssertions.add(rafValAssertion); + } + + // Null must always only point to null. + EClass refType = reference2TranslatedEClass.get(er); + Expr<?> nullElement = eClass2NullElement.get(ec); + if(er.getUpperBound() > 0) { + modelAssertions.add(ctx.mkEq(ctx.mkApp(refFunc, nullElement), + eClass2NullElement.get(refType))); + } else { + modelAssertions + .add(ctx.mkEq(ctx.mkApp(refFunc, nullElement), ctx.mkEmptySeq( + eClass2z3Sort.get(reference2TranslatedEClass.get(er))))); + } + } + } + } + } + + /** Translates the given instance of a relation between individual objects in the model. */ + @SuppressWarnings({"unchecked", "rawtypes"}) + private Expr<?> translateReferenceValue(EObject eo, EReference er) { + Object value = eo.eGet(er); + EClass refType = reference2TranslatedEClass.get(er); + Expr<?> refNullValue = eClass2NullElement.get(refType); + + FuncDecl<?> refSelFun = eClass2SelectionFunction.get(refType); + + if(er.getUpperBound() < 0) { + // Case for lists. + List<?> values = (List<?>)value; + + if(values.size() == 0) { + return ctx.mkEmptySeq(getSortForReference(er)); + } + + SeqExpr[] seqElems = new SeqExpr[values.size()]; + for(int i = 0; i < values.size(); i++) { + Object o = values.get(i); + + Expr<?> elemExpr = eObject2z3Expr.get((EObject)o, refType); + + SeqExpr<?> selectedExpr = ctx.mkUnit(elemExpr); + if(refSelFun != null) { + SeqExpr notSelectedExpr = ctx.mkEmptySeq(getSortForReference(er)); + seqElems[i] = (SeqExpr<?>)ctx.mkITE((BoolExpr)ctx.mkApp(refSelFun, elemExpr), + selectedExpr, notSelectedExpr); + } else { + seqElems[i] = selectedExpr; + } + } + + if(seqElems.length == 0) { + return ctx.mkEmptySeq(getSortForReference(er)); + } + if(seqElems.length == 1) { + return seqElems[0]; + } + return ctx.mkConcat(seqElems); + } + + if(value == null) { + return refNullValue; + } + + Expr singleValExpr = eObject2z3Expr.get((EObject)value, refType); + + if(refSelFun != null) { + // Case with variable target. + BoolExpr eoSel = (BoolExpr)ctx.mkApp(refSelFun, singleValExpr); + + return ctx.mkITE(eoSel, singleValExpr, refNullValue); + } + + // Default case with non variable target. + return singleValExpr; + } + + /** Translates the given EAttribute value for the given object to Z3. */ + @SuppressWarnings({"rawtypes", "unchecked"}) + private Expr<?> translateAttributeValue(EObject eo, EAttribute ea) { + Object value = eo.eGet(ea); + EDataType attType = ea.getEAttributeType(); + + if(ea.getUpperBound() < 0 && value instanceof List<?>) { + // Case for lists. + List<?> values = (List<?>)value; + + SeqExpr[] seqElem = new SeqExpr[values.size()]; + for(int i = 0; i < values.size(); i++) { + Object o = values.get(i); + Expr<?> elemExpr = translatePrimitiveObject(o, attType); + + seqElem[i] = ctx.mkUnit(elemExpr); + } + + return ctx.mkConcat(seqElem); + } + + return translatePrimitiveObject(value, attType); + } + + /** Translates the given object for a primitive type (Enums, Integer, String, Boolean) to Z3. */ + private Expr<?> translatePrimitiveObject(Object value, EDataType attType) { + // Single value. + if(attType.equals(EcorePackage.Literals.EINT)) { + if(value == null) { + logError(LOG_PREFIX + "null int found"); + return ctx.mkInt(0); + } + return ctx.mkInt((int)value); + } + if(attType.equals(EcorePackage.Literals.ESTRING)) { + if(value == null) { + return ctx.mkString(""); + } + return ctx.mkString((String)value); + } + if(attType.equals(EcorePackage.Literals.EBOOLEAN)) { + if(value == null) { + logError(LOG_PREFIX + "null bool found"); + return ctx.mkBool(false); + } + return ctx.mkBool((boolean)value); + } + if(attType instanceof EEnum) { + if(value == null) { + return eEnum2NullElement.get(attType); + } + return eLiteral2Expr.get(value); + } + + return null; + } + + /** Creates functions for all attributes and references of the meta model in Z3. */ + private void translateAttributesAndReferencesMetamodel() { + for(EClass ec : translatedClasses) { + for(EAttribute ea : ec.getEAllAttributes()) { + if(translatedAttributes.contains(ea)) { + String funId = ec.getName() + "_" + ea.getName(); + + EDataType attDataType = ea.getEAttributeType(); + Sort rangeSort = eDataType2Sort.get(attDataType); + if(attDataType instanceof EEnum) { + if(rangeSort == null) { + rangeSort = translateEnum((EEnum)attDataType); + eDataType2Sort.put(attDataType, rangeSort); + } + } + + if(rangeSort == null) { + // Attribute is not translated, as all attribute types except enums are + // known. + continue; + } + + FuncDecl<?> funDecl = ctx.mkFuncDecl(funId, eClass2z3Sort.get(ec), rangeSort); + + eAttribute2FunDecl.put(ea, ec, funDecl); + } + } + + for(EReference er : ec.getEAllReferences()) { + if(translatedReferences.contains(er)) { + String funId = ec.getName() + "_" + er.getName(); + + EClass refType = reference2TranslatedEClass.get(er); + + Sort refSort = eClass2z3Sort.get(refType); + + if(refSort == null) { + // Find translated subclass of reference target and attempt to use this. + for(EClass ecls : translatedClasses) { + if(refType.isSuperTypeOf(ecls)) { + refSort = eClass2z3Sort.get(ecls); + + logInfo(LOG_PREFIX + "The reference \"" + er.getName() + + "\" of type " + refType.getName() + + " is supposed to be translated for a product-line analysis. Since this type is not specified to be translated, the translated sub-class " + + ecls.getName() + " will be used."); + } + } + } + + if(refSort == null) { + String msg = "Reference " + er.getName() + + " shall be translated, but is of type " + refType.getName() + + " which is not translated. Add the type to the translated classes to translate this reference."; + + logError(LOG_PREFIX + msg, null); + throw new RuntimeException(msg); + } + + if(er.getUpperBound() < 0) { + // This is the case of unlimited multiplicity, i.e., lists. + refSort = ctx.mkSeqSort(refSort); + } + + FuncDecl<?> funDecl = ctx.mkFuncDecl(funId, eClass2z3Sort.get(ec), refSort); + + eReference2FunDecl.put(er, ec, funDecl); + } + } + } + } + + /** Translates the give enumeration. */ + private Sort translateEnum(EEnum en) { + String name = en.getName(); + EList<EEnumLiteral> enumLiterals = en.getELiterals(); + + // Null needs to be encoded as a dedicated literal. + int numLiterals = enumLiterals.size(); + String[] literals = new String[numLiterals + 1]; + for(int i = 0; i < numLiterals; i++) { + literals[i] = name + "_" + enumLiterals.get(i).getName(); + } + literals[numLiterals] = name + "_NONE_LITERAL"; + + EnumSort<?> enumSort = ctx.mkEnumSort(name, literals); + + // Add regular literals and null literal to the respective mappings. + for(int i = 0; i < numLiterals; i++) { + eLiteral2Expr.put((Enum<?>)enumLiterals.get(i).getInstance(), enumSort.getConst(i)); + } + eEnum2NullElement.put(en, enumSort.getConst(numLiterals)); + + return enumSort; + } + + /** Creates the types for all classes and objects in Z3. */ + private void translateClassesMetamodel() { + for(EClass cls : translatedClasses) { + List<EObject> objs = new ArrayList<EObject>(class2TranslatedEObjects.get(cls)); + + // The last index is added for the null element. + Symbol[] objSymbols = new Symbol[objs.size() + 1]; + String clsName = cls.getName(); + for(int i = 0; i < objs.size(); i++) { + String id = clsName + i; + + StringSymbol objSymbol = ctx.mkSymbol(id); + objSymbols[i] = objSymbol; + } + objSymbols[objs.size()] = ctx.mkSymbol(clsName + "NONE"); + + // Create EnumSort for class. + EnumSort<?> enumSort = ctx.mkEnumSort(ctx.mkSymbol(clsName), objSymbols); + eClass2z3Sort.put(cls, enumSort); + + // Map objects to z3 enum literals. + Expr<?>[] consts = enumSort.getConsts(); + for(int i = 0; i < objs.size(); i++) { + eObject2z3Expr.put(objs.get(i), cls, consts[i]); + z3Expr2EObject.put(consts[i], objs.get(i)); + } + Expr<?> noneExpr = consts[consts.length - 1]; + eClass2NullElement.put(cls, noneExpr); + } + } + + /** {@inheritDoc} */ + @Override + public Solver createSolver() { + Solver solver = ctx.mkSolver(); + + solver.add(featureModelAssertions.toArray(new BoolExpr[featureModelAssertions.size()])); + solver.add(presenceConditionAssertions + .toArray(new BoolExpr[presenceConditionAssertions.size()])); + solver.add(modelAssertions.toArray(new BoolExpr[modelAssertions.size()])); + solver.add(constraintAssertions.toArray(new BoolExpr[constraintAssertions.size()])); + + return solver; + } + + /** {@inheritDoc} */ + @Override + public Context getContext() { + return ctx; + } + + /** {@inheritDoc} */ + @Override + public EObject getEObjectForExpression(Expr<?> expr) { + return z3Expr2EObject.get(expr); + } + + /** {@inheritDoc} */ + @Override + public Expr<?> getNullElement(EClass cls) { + return eClass2NullElement.get(cls); + } + + /** {@inheritDoc} */ + @Override + public EnumSort<?> getDatatype(EClass ec) { + return eClass2z3Sort.get(ec); + } + + /** {@inheritDoc} */ + @Override + public FuncDecl<?> getAttributeReferenceFunctionDeclaration(EClass cVarType, String name) { + for(EReference ref : cVarType.getEAllReferences()) { + if(ref.getName().equals(name)) { + return eReference2FunDecl.get(ref, cVarType); + } + } + + for(EAttribute att : cVarType.getEAllAttributes()) { + if(att.getName().equals(name)) { + return eAttribute2FunDecl.get(att, cVarType); + } + } + + return null; + } + + /** {@inheritDoc} */ + @Override + public Map<BoolExpr, IProductLineConstraint> + translateConstraints(Collection<IProductLineConstraint> constraints) { + Map<BoolExpr, IProductLineConstraint> constraintTracker2Constraint = + new HashMap<BoolExpr, IProductLineConstraint>(); + + for(IProductLineConstraint constraint : constraints) { + Expr<?>[] quantifierValiables = constraint.getQuantifierVariables(); + EClass[] variableClasses = constraint.getVariablesClasses(); + BoolExpr[] containmentExprs = new BoolExpr[0]; + BoolExpr body = constraint.getBody(); + + boolean isForAll = constraint.isForAll(); + + BoolExpr quantifier = createLiftedConstraint(quantifierValiables, variableClasses, + containmentExprs, body, isForAll); + + BoolExpr constraintTracker = + ctx.mkBoolConst("CONSTRAINT_" + constraint.getConstraintName()); + constraintTracker2Constraint.put(constraintTracker, constraint); + + constraintAssertions.add(ctx.mkEq(constraintTracker, quantifier)); + } + + Set<BoolExpr> allConstraints = constraintTracker2Constraint.keySet(); + constraintAssertions.add(ctx.mkOr(allConstraints.toArray(new BoolExpr[0]))); + + return constraintTracker2Constraint; + } + + /** Automatically lifts the given constraint. */ + protected BoolExpr createLiftedConstraint(Expr<?>[] quantifierValiables, + EClass[] variableClasses, BoolExpr[] containmentExprs, BoolExpr body, + boolean isForAll) { + + BoolExpr[] selExprs = new BoolExpr[quantifierValiables.length + containmentExprs.length]; + for(int i = 0; i < quantifierValiables.length; i++) { + EClass cls = variableClasses[i]; + Expr<?> var = quantifierValiables[i]; + + FuncDecl<?> selFun = eClass2SelectionFunction.get(cls); + BoolExpr selected = (BoolExpr)ctx.mkApp(selFun, var); + BoolExpr notNull = ctx.mkNot(ctx.mkEq(var, getNullElement(cls))); + + selExprs[i] = ctx.mkAnd(selected, notNull); + } + + // Add containment expressions. + int j = 0; + for(int i = quantifierValiables.length; i < quantifierValiables.length + + containmentExprs.length; i++) { + selExprs[i] = containmentExprs[j++]; + } + + if(isForAll) { + BoolExpr liftedBody = ctx.mkImplies(ctx.mkAnd(selExprs), body); + return ctx.mkForall(quantifierValiables, liftedBody, 0, null, null, null, null); + } + + // else: Exits + BoolExpr liftedBody = ctx.mkAnd(ctx.mkAnd(selExprs), body); + return ctx.mkExists(quantifierValiables, liftedBody, 0, null, null, null, null); + } + + /** Utility method to get the z3 sort for a given reference. */ + private EnumSort<?> getSortForReference(EReference er) { + return eClass2z3Sort.get(reference2TranslatedEClass.get(er)); + } + + /** + * Retrieves the {@link PresenceCondition} that was assigned to 'modelElement' in the model. + * This function might be overwritten in case an alternative location for presence conditions + * was defined. + */ + protected PresenceConditionTerm getLocalPresenceCondition(EObject model) { + if(model instanceof IOptionalVariationPoint<?>) { + PresenceCondition presenceCondition = + ((IOptionalVariationPoint<?>)model).getPresenceCondition(); + + if(presenceCondition == null) { + return null; + } + + return presenceCondition.resolveToFeatureLiterals(); + } + if(model instanceof IAlternative) { + return ((IAlternative)model).getPresenceCondition().resolveToFeatureLiterals(); + } + + return null; + } + + /** {@inheritDoc} */ + @Override + public void setTranslatedEClasses(Collection<EClass> clss) { + translatedClasses.clear(); + + translatedClasses.addAll(clss); + } + + /** {@inheritDoc} */ + @Override + public void setTranslatedEReferences(Collection<EReference> refs) { + translatedReferences.clear(); + + translatedReferences.addAll(refs); + } + + /** {@inheritDoc} */ + @Override + public void setTranslatedEAttributes(Collection<EAttribute> atts) { + translatedAttributes.clear(); + + translatedAttributes.addAll(atts); + } + + /** + * Enables or disables the "island optimization" for which only optional parts of the model are + * translated. + * This optimization is disabled by default. + * + * Via the method {@code setIslandOptimizationStepNum()} it is possible to specify a range of + * transitive references to be guaranteed to be translated for all optional elements. + * Note, that this step size might be crucial for a constraint to checked correctly for + * interactions between optional and non-optional elements. + * + * @param setEnabled + * 'true' will enable the island optimization; 'false' will disable. + */ + public void setIslandOptimizationEnabled(boolean setEnabled) { + this.isIslandOptimizationEnabled = setEnabled; + } + + /** + * Specifies a number of transitive references starting from every optional element that will be + * guaranteed to be translated - even if they are non-optional. + * + * Note, that this step size might be crucial for a constraint to checked correctly for + * interactions between optional and non-optional elements. + * + * @param stepNum + * The number of transitive references to be guaranteed to be translated for all + * optional elements. + */ + public void setIslandOptimizationStepNum(int stepNum) { + this.islandOptimizationStepNum = stepNum; + } + + /** + * Utility method to get translated EClass for the given class. I.E. objClass or a super class + * in case objClass shall be translated. 'null' in case neither objClass nor a super type are + * specified to be translated. + */ + protected EClass getTranslatedClass(EClass objClass) { + if(translatedClasses.contains(objClass)) { + return objClass; + } + + for(EClass ecls : translatedClasses) { + if(ecls.isSuperTypeOf(objClass)) { + return ecls; + } + } + + return null; + } +} diff --git a/org.fortiss.variability/src/org/fortiss/variability/analysis/GenericProductLineAnalysis.java b/org.fortiss.variability/src/org/fortiss/variability/analysis/GenericProductLineAnalysis.java new file mode 100644 index 0000000000000000000000000000000000000000..1026cd6d7d0286c0f2402c5918d83cf7dc84407b --- /dev/null +++ b/org.fortiss.variability/src/org/fortiss/variability/analysis/GenericProductLineAnalysis.java @@ -0,0 +1,121 @@ +package org.fortiss.variability.analysis; + +import static com.microsoft.z3.Status.SATISFIABLE; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; + +import com.microsoft.z3.BoolExpr; +import com.microsoft.z3.Expr; +import com.microsoft.z3.Model; +import com.microsoft.z3.Solver; +import com.microsoft.z3.Status; + +/** + * Base class that implements the translation of model product-lines to SMT in order to perform + * product-line analysis via constraint lifting. + * + * @author bayha + */ +public abstract class GenericProductLineAnalysis { + + /** The product-line translation to be used. */ + protected final IProductLineTranslation translation; + + /** {@link EObject} of the model to be translated. */ + protected final EObject model; + + /** The constraints to be checked by this analysis. */ + protected Collection<IProductLineConstraint> plConstraints; + + /** + * Constructor. + */ + protected GenericProductLineAnalysis(EObject model, IProductLineTranslation translation) { + this.model = model; + this.translation = translation; + } + + /** Creates the {@link IProductLineConstraint}s to be checked by this analysis. */ + protected abstract Collection<IProductLineConstraint> createConstraints(); + + /** + * Performs a product-line analysis for the given model. + * + * @return 'true' if all constraints are fulfilled for all variants of the product-line + * analysis. 'false' otherwise. + */ + public List<ProductLineConstraintViolation> doCheck() { + plConstraints = createConstraints(); + + setTranslatedMetamodelElements(); + + translation.translateModel(model); + Map<BoolExpr, IProductLineConstraint> constraintTracker2Constraint = + translation.translateConstraints(plConstraints); + Solver solver = translation.createSolver(); + + Status result = solver.check(); + + List<ProductLineConstraintViolation> ret = new ArrayList<ProductLineConstraintViolation>(); + + if(result.equals(SATISFIABLE)) { + // A violating configuration (i.e., model for negated constraints) was found -> extract + // violating model elements. + Model z3Model = solver.getModel(); + + for(BoolExpr constTrack : constraintTracker2Constraint.keySet()) { + Expr<?> constInterp = z3Model.getConstInterp(constTrack); + + if(constInterp instanceof BoolExpr) { + if(constInterp.equals(translation.getContext().mkTrue())) { + IProductLineConstraint failedConstraint = + constraintTracker2Constraint.get(constTrack); + + List<EObject> violatingObjects = new ArrayList<EObject>(); + for(Expr<?> varTrack : failedConstraint.getVariableTracker()) { + Expr<?> interpr = z3Model.getConstInterp(varTrack); + EObject eObject = translation.getEObjectForExpression(interpr); + + violatingObjects.add(eObject); + } + + ret.add(new ProductLineConstraintViolation(failedConstraint, + violatingObjects, null)); + } + } + + } + } + + translation.getContext().close(); + + return ret; + } + + /** Retrieves the classes, references and attributes required by the constraints. */ + private void setTranslatedMetamodelElements() { + Set<EClass> classes = new HashSet<EClass>(); + Set<EReference> references = new HashSet<EReference>(); + Set<EAttribute> attributes = new HashSet<EAttribute>(); + + for(IProductLineConstraint constraint : plConstraints) { + classes.addAll(constraint.getTranslatedClasses()); + references.addAll(constraint.getTranslatedReferences()); + attributes.addAll(constraint.getTranslatedAttributes()); + } + + translation.setTranslatedEClasses(classes); + translation.setTranslatedEReferences(references); + translation.setTranslatedEAttributes(attributes); + } +} diff --git a/org.fortiss.variability/src/org/fortiss/variability/analysis/IProductLineConstraint.java b/org.fortiss.variability/src/org/fortiss/variability/analysis/IProductLineConstraint.java new file mode 100644 index 0000000000000000000000000000000000000000..1b0e1231cc578a6e7e544441ac33533b4feafeb1 --- /dev/null +++ b/org.fortiss.variability/src/org/fortiss/variability/analysis/IProductLineConstraint.java @@ -0,0 +1,118 @@ +/*-------------------------------------------------------------------------+ +| Copyright 2023 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.variability.analysis; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.fortiss.variability.model.features.configuration.VariantConfiguration; + +import com.microsoft.z3.BoolExpr; +import com.microsoft.z3.Expr; + +/** + * Interface for product line constraints to be checked by the {@link GenericProductLineAnalysis}. + * + * Note that usually this interface should not be implemented immediately. Instead use the base + * class {@link ProductLineConstraintBase} to define new constraints. + * + * @author bayha + */ +public interface IProductLineConstraint { + + /** + * The name of the constraint. + * + * @return The name as {@link String}. + */ + public String getConstraintName(); + + /** + * Creates a meaningful error message for violations of this constraint. + * + * @param violatingObjects + * The {@link EObject}s which violate the constraint in combination. + * @param violatingConfiguration + * A {@link VariantConfiguration} which will result in a model variant in which the + * 'violatingObjects' will violate this constraint. + * @return The error message as a {@link String}. + */ + public String createErrorMessage(List<EObject> violatingObjects, + VariantConfiguration violatingConfiguration); + + /** + * Retrieves the quantified variables for this constraint. + * + * @return An array of variables as {@link Expr}s. + */ + public Expr<?>[] getQuantifierVariables(); + + /** + * Retrieves the constrain body for this constraint. + * + * @return The constraint body as a {@link BoolExpr}. + */ + public BoolExpr getBody(); + + /** + * Specifies whether this constraint is quantified as "for all". + * + * @return 'true' if this constraint is quantified as "for all". 'false' if "exists". + */ + public boolean isForAll(); + + /** + * Retrieves the generated tracker variables to identify violating interpretations for the + * quantifier variables. + * + * @return An array of {@link Expr}s with the quantifier variables. + */ + public Expr<?>[] getVariableTracker(); + + /** + * Retrieves the {@link EClass} types for the quantified variables. + * + * @return An array of {@link EClass}s for all quantified variables. + */ + public EClass[] getVariablesClasses(); + + /** + * Specifies the classes which need to be translated in order to evaluate this constraint. + * + * @return A {@link Collection} with all {@link EClass} which will be required to be translated. + */ + public Collection<EClass> getTranslatedClasses(); + + /** + * Specifies the references which are used in this constraint and need to translated. + * + * @return A {@link Collection} with all {@link EReference} which will be required to be + * translated. + */ + public Collection<EReference> getTranslatedReferences(); + + /** + * Specifies the attributes which are used in this constraint and need to translated. + * + * @return A {@link Collection} with all {@link EAttribute} which will be required to be + * translated. + */ + public Collection<EAttribute> getTranslatedAttributes(); +} diff --git a/org.fortiss.variability/src/org/fortiss/variability/analysis/IProductLineTranslation.java b/org.fortiss.variability/src/org/fortiss/variability/analysis/IProductLineTranslation.java new file mode 100644 index 0000000000000000000000000000000000000000..733dae03e2baae237b6f0b33f0dd618a4f47cf73 --- /dev/null +++ b/org.fortiss.variability/src/org/fortiss/variability/analysis/IProductLineTranslation.java @@ -0,0 +1,149 @@ +/*-------------------------------------------------------------------------+ +| Copyright 2023 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.variability.analysis; + +import java.util.Collection; +import java.util.Map; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; + +import com.microsoft.z3.BoolExpr; +import com.microsoft.z3.Context; +import com.microsoft.z3.EnumSort; +import com.microsoft.z3.Expr; +import com.microsoft.z3.FuncDecl; +import com.microsoft.z3.Solver; + +/** + * Interface for generic translation of model product-lines to SMT. + * + * @author bayha + */ +public interface IProductLineTranslation { + + /** + * Retrieves the context used for this translation. + * + * @return The Z3 {@link Context}. + */ + public Context getContext(); + + /** + * Translates the given model to Z3 SMT. + * + * @param model + * {@link EObject} with model to be translated. + */ + public void translateModel(EObject model); + + /** + * Translates the given product-line constraints to Z3 SMT. + * + * @param constraints + * A {@link Collection} of {@link IProductLineConstraint} to be translated. + * + * @return A {@link Map} with Z3 {@link BoolExpr} to track the constraints in Z3 + * models. + */ + public Map<BoolExpr, IProductLineConstraint> + translateConstraints(Collection<IProductLineConstraint> constraints); + + /** + * Retrieves the model element which was the source for the given Z3 expression. + * + * @param expr + * The Z3 {@link Expr} for which to retrieve the originating {@link EObject}. + * + * @return The {@link EObject} which was the source for the given Z3 expression. + */ + public EObject getEObjectForExpression(Expr<?> expr); + + /** + * Creates and initializes the Z3 solver to be used for analyzes. + * + * Note, that {@code translateModel()} and {@code translateConstraints} should be called prior + * to this method. + * + * @return The Z3 {@link Solver} containing the model translation. + */ + public Solver createSolver(); + + /** + * Retrieves the Z3 expression representing null for the given {@link EClass}. + * + * @param cls + * The {@link EClass} to retrieve the Z3 null element for. + * @return The Z3 {@link Expr} encoding null. + */ + public Expr<?> getNullElement(EClass cls); + + /** + * Retrieves the Z3 sort which represents the given EClass and its objects. + * + * @param eClass + * The {@link EClass} to get the Z3 sort for. + * @return The Z3 {@link EnumSort} for the given eClass. + */ + public EnumSort<?> getDatatype(EClass eClass); + + /** + * Retrieve the Z3 function declaration which represents the given attribute or reference for + * the given EClass. + * + * @param eClass + * The {@link EClass} for which to get a attribute or reference function. + * @param attRefName + * {@link String} with the name for the attribute or reference. + * @return A Z3 {@link FuncDecl} representing the attribute or reference. + */ + FuncDecl<?> getAttributeReferenceFunctionDeclaration(EClass eClass, String attRefName); + + /** + * Specifies the classes for which model elements shall be translated. + * + * Note, that all classes which are relevant for evaluating the constraints need to specified + * here, before staring a translation. + * + * @param clss + * A {@link Collection} of all {@link EClass} to be translated. + */ + public void setTranslatedEClasses(Collection<EClass> clss); + + /** + * Specifies the references which shall be translated. + * + * Note, that all references which are used in the constraints need to specified + * here, before staring a translation. + * + * @param refs + * A {@link Collection} of all {@link EReference} to be translated. + */ + public void setTranslatedEReferences(Collection<EReference> refs); + + /** + * Specifies the attributes which shall be translated. + * + * Note, that all attributes which are used in the constraints need to specified + * here, before staring a translation. + * + * @param atts + * A {@link Collection} of all {@link EAttribute} to be translated. + */ + public void setTranslatedEAttributes(Collection<EAttribute> atts); +} diff --git a/org.fortiss.variability/src/org/fortiss/variability/analysis/ProductLineConstraintBase.java b/org.fortiss.variability/src/org/fortiss/variability/analysis/ProductLineConstraintBase.java new file mode 100644 index 0000000000000000000000000000000000000000..04097c7c31367fdd11a054ba2b259a0535a313f4 --- /dev/null +++ b/org.fortiss.variability/src/org/fortiss/variability/analysis/ProductLineConstraintBase.java @@ -0,0 +1,148 @@ +/*-------------------------------------------------------------------------+ +| Copyright 2023 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.variability.analysis; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.emf.ecore.EClass; + +import com.microsoft.z3.BoolExpr; +import com.microsoft.z3.EnumSort; +import com.microsoft.z3.Expr; + +/** + * Base class for product line constraints to be checked by the product-line analysis. + * + * All constraints are quantified expressions of the form: + * [ForAll|Exists] <list of quantifed variables>: <body using quantified variables> + * + * @author bayha + */ +public abstract class ProductLineConstraintBase implements IProductLineConstraint { + /** Prefix to label tracking variables. */ + private static final String TRACK_PREFIX = "TRACK_"; + + /** The body of this constraint. I.e. the quantified expression. */ + protected BoolExpr body; + + /** The {@link EClass} types of the quantified variables. */ + protected EClass[] variableTypes; + + /** The names of the quantified variables. */ + protected String[] variableNames; + + /** The quantified variables */ + protected Expr<?>[] variables; + + /** + * The tracking constants which are used to extract violating interpretations for the quantifier + * variables. + */ + protected Expr<?>[] trackerVars; + + /** A map from variable names to expressions which can be used in the body. */ + protected Map<String, Expr<?>> name2Variables = new HashMap<String, Expr<?>>(); + + /** The {@link IProductLineTranslation} to be used for creation of variables. */ + protected IProductLineTranslation translation; + + /** Constructor. */ + public ProductLineConstraintBase(IProductLineTranslation translation) { + this.translation = translation; + + variableTypes = createVariablesClasses(); + variableNames = createVariableNames(); + trackerVars = new Expr[variableNames.length]; + } + + /** Creates the actual body for this constraint using the quantified variables. */ + protected abstract BoolExpr createBody(); + + /** Specifies the names for the quantified variables. */ + protected abstract String[] createVariableNames(); + + /** Specifies the EClass types for the quantified variables. */ + protected abstract EClass[] createVariablesClasses(); + + /** {@inheritDoc} */ + @Override + public final Expr<?>[] getQuantifierVariables() { + if(variables == null) { + createVariables(); + } + return variables; + } + + /** {@inheritDoc} */ + @Override + public final Expr<?>[] getVariableTracker() { + return trackerVars; + } + + /** {@inheritDoc} */ + @Override + public final BoolExpr getBody() { + if(variables == null) { + createVariables(); + } + + if(body == null) { + body = createBody(); + createTracking(); + } + + return body; + } + + /** {@inheritDoc} */ + @Override + public final EClass[] getVariablesClasses() { + return variableTypes; + } + + /** Creates tracking variables and adds them to the body. */ + private final void createTracking() { + int numVariables = variableNames.length; + BoolExpr[] trackExprs = new BoolExpr[numVariables + 1]; + + for(int i = 0; i < variables.length; i++) { + trackExprs[i] = translation.getContext().mkEq(trackerVars[i], variables[i]); + } + + trackExprs[numVariables] = body; + + body = translation.getContext().mkAnd(trackExprs); + } + + /** Creates the Z3 variables for this constraint, using the translation. */ + private final void createVariables() { + int numVariables = variableTypes.length; + variables = new Expr[numVariables]; + + for(int i = 0; i < numVariables; i++) { + EClass ec = variableTypes[i]; + EnumSort<?> ecSort = translation.getDatatype(ec); + + String varName = variableNames[i]; + trackerVars[i] = translation.getContext().mkConst(TRACK_PREFIX + varName, ecSort); + + Expr<?> var = translation.getContext().mkConst(varName, ecSort); + variables[i] = var; + name2Variables.put(varName, var); + } + } +} diff --git a/org.fortiss.variability/src/org/fortiss/variability/analysis/ProductLineConstraintViolation.java b/org.fortiss.variability/src/org/fortiss/variability/analysis/ProductLineConstraintViolation.java new file mode 100644 index 0000000000000000000000000000000000000000..2a2bd9341e0b8f407ad9b4c663b507bd10d083ea --- /dev/null +++ b/org.fortiss.variability/src/org/fortiss/variability/analysis/ProductLineConstraintViolation.java @@ -0,0 +1,82 @@ +/*-------------------------------------------------------------------------+ +| Copyright 2023 fortiss GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.variability.analysis; + +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.fortiss.variability.model.features.configuration.VariantConfiguration; + +/** + * Class representing one error identified by a product line analysis run. + * + * @author bayha + */ +public class ProductLineConstraintViolation { + + /** The model elements which cause a constraint violation. */ + protected List<EObject> violatingElements; + + /** The violated constraint. */ + protected IProductLineConstraint constraint; + + /** The configuration which will result in a model variant which violates the constraint. */ + private VariantConfiguration violatingConfiguration; + + /** Constructor. */ + public ProductLineConstraintViolation(IProductLineConstraint constraint, + List<EObject> violatingElements, VariantConfiguration violatingConfiguration) { + this.constraint = constraint; + this.violatingElements = violatingElements; + this.violatingConfiguration = violatingConfiguration; + } + + /** + * Returns the elements which causes the violation. + * + * @return The elements which causes the violation. + */ + public List<EObject> getViolatingElements() { + return violatingElements; + } + + /** + * Returns the error message. + * + * @return The error message. + */ + public String getErrorMessage() { + return constraint.createErrorMessage(violatingElements, violatingConfiguration); + } + + /** + * Returns the constraint that has been violated. + * + * @return The constraint that has been violated. + */ + public IProductLineConstraint getConstraint() { + return constraint; + } + + /** + * Returns the configuration which will violate the constraint. + * + * @return The configuration which will violate the constraint. + */ + public VariantConfiguration getViolatingConfiguration() { + return violatingConfiguration; + } +} diff --git a/org.fortiss.variability/src/org/fortiss/variability/model/.ratings b/org.fortiss.variability/src/org/fortiss/variability/model/.ratings index 4b54c831621b6bcf35f4ed0fc6eec363252d08ca..a515450eb50c0424928819d3097dd2279dc460bb 100644 --- a/org.fortiss.variability/src/org/fortiss/variability/model/.ratings +++ b/org.fortiss.variability/src/org/fortiss/variability/model/.ratings @@ -1,2 +1,2 @@ VariabilityModelElementFactory.java 5a50d78b0fc94a20329b95991b519a3e3fbf4410 GREEN -VariabilityStaticImpl.java 96bc4364ebe635c94fafbd3ef60b8237b18c17c6 GREEN +VariabilityStaticImpl.java 9d913de8c14b22b07d318084abd911c6d5692977 GREEN diff --git a/org.fortiss.variability/src/org/fortiss/variability/model/VariabilityStaticImpl.java b/org.fortiss.variability/src/org/fortiss/variability/model/VariabilityStaticImpl.java index 96bc4364ebe635c94fafbd3ef60b8237b18c17c6..9d913de8c14b22b07d318084abd911c6d5692977 100644 --- a/org.fortiss.variability/src/org/fortiss/variability/model/VariabilityStaticImpl.java +++ b/org.fortiss.variability/src/org/fortiss/variability/model/VariabilityStaticImpl.java @@ -17,10 +17,12 @@ package org.fortiss.variability.model; import static java.util.stream.Collectors.toList; import static org.eclipse.emf.ecore.util.EcoreUtil.delete; +import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy; import static org.fortiss.tooling.kernel.utils.EcoreUtils.getChildrenWithType; import static org.fortiss.variability.model.VariabilityModelElementFactory.createAndPC; import static org.fortiss.variability.model.VariabilityModelElementFactory.createLiteralPC; import static org.fortiss.variability.model.VariabilityModelElementFactory.createNotPC; +import static org.fortiss.variability.model.VariabilityModelElementFactory.createOrPC; import java.util.List; import java.util.stream.Stream; @@ -335,4 +337,62 @@ public class VariabilityStaticImpl { return target.getClass() == subject.getClass() && ((AbstractFeature)target).getName().equals(subject.getName()); } + + /** + * Creates a new {@link PresenceConditionTerm} which is semantically equivalent to the given + * {@link AndPC} but only uses features as literals. + * + * @param and + * The {@link AndPC} to resolve. + * @return A {@link PresenceConditionTerm} with features as literals, only. + */ + public static PresenceConditionTerm resolveToFeatureLiterals(AndPC and) { + return createAndPC(and.getOperand1().resolveToFeatureLiterals(), + and.getOperand2().resolveToFeatureLiterals(), ""); + } + + /** + * Creates a new {@link PresenceConditionTerm} which is semantically equivalent to the given + * {@link OrPC} but only uses features as literals. + * + * @param or + * The {@link OrPC} to resolve. + * @return A {@link PresenceConditionTerm} with features as literals, only. + */ + public static PresenceConditionTerm resolveToFeatureLiterals(OrPC or) { + return createOrPC(or.getOperand1().resolveToFeatureLiterals(), + or.getOperand2().resolveToFeatureLiterals(), ""); + } + + /** + * Creates a new {@link PresenceConditionTerm} which is semantically equivalent to the given + * {@link NotPC} but only uses features as literals. + * + * @param not + * The {@link NotPC} to resolve. + * @return A {@link PresenceConditionTerm} with features as literals, only. + */ + public static PresenceConditionTerm resolveToFeatureLiterals(NotPC not) { + return createNotPC(not.getOperand().resolveToFeatureLiterals(), ""); + } + + /** + * Creates a new {@link PresenceConditionTerm} which is semantically equivalent to the given + * {@link LiteralPC} but only uses features as literals. + * + * In case the given literal refers to a feature already, the result will be syntactically + * equivalent. + * + * @param literal + * The {@link LiteralPC} to resolve. + * @return A {@link PresenceConditionTerm} with features as literals, only. + */ + public static PresenceConditionTerm resolveToFeatureLiterals(LiteralPC literal) { + ILiteralReferencable reference = literal.getLiteralReference(); + if(reference == null || reference instanceof AbstractFeature) { + return copy(literal); + } + + return reference.resolveToFeatureLiterals(); + } } diff --git a/org.fortiss.variability/src/org/fortiss/variability/util/.ratings b/org.fortiss.variability/src/org/fortiss/variability/util/.ratings index b28b2cb079583a317c351b366907e7ce244711a8..d1f61dabfafe990f1108d025ca4514a3ff1a89c3 100644 --- a/org.fortiss.variability/src/org/fortiss/variability/util/.ratings +++ b/org.fortiss.variability/src/org/fortiss/variability/util/.ratings @@ -1,4 +1,4 @@ FeatureModelTransformationUtils.java b38702296dcb48ff311b382bb9c05d2590e2dfac GREEN Pair.java 2dfd7dc65f7b9ba09a120f1a6058d1e8e9556a37 GREEN VariabilityUtils.java 3e57a37ced6396076c71227aea8de534381b6ace GREEN -VariabilityUtilsInternal.java 9c781a47513bb0c4ddcd13be1c27d62b70f25998 GREEN +VariabilityUtilsInternal.java 612c248ae391aeeb0ad80a23abc50974004c5349 GREEN diff --git a/org.fortiss.variability/src/org/fortiss/variability/util/VariabilityUtilsInternal.java b/org.fortiss.variability/src/org/fortiss/variability/util/VariabilityUtilsInternal.java index 9c781a47513bb0c4ddcd13be1c27d62b70f25998..612c248ae391aeeb0ad80a23abc50974004c5349 100644 --- a/org.fortiss.variability/src/org/fortiss/variability/util/VariabilityUtilsInternal.java +++ b/org.fortiss.variability/src/org/fortiss/variability/util/VariabilityUtilsInternal.java @@ -16,9 +16,14 @@ +--------------------------------------------------------------------------*/ package org.fortiss.variability.util; +import static org.eclipse.core.runtime.IStatus.ERROR; +import static org.eclipse.core.runtime.IStatus.INFO; +import static org.eclipse.core.runtime.IStatus.WARNING; import static org.eclipse.emf.ecore.util.EcoreUtil.getAllContents; import static org.eclipse.emf.ecore.util.EcoreUtil.getRootContainer; import static org.eclipse.emf.ecore.util.EcoreUtil.UsageCrossReferencer.find; +import static org.fortiss.variability.VariabilityActivator.getDefault; +import static org.fortiss.variability.model.VariabilityModelElementFactory.createAndPC; import java.util.Collection; import java.util.LinkedList; @@ -27,6 +32,9 @@ import java.util.Map; import java.util.Queue; import java.util.function.Predicate; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Plugin; +import org.eclipse.core.runtime.Status; import org.eclipse.emf.common.util.BasicEList; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.TreeIterator; @@ -35,10 +43,15 @@ import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.ecore.util.EcoreUtil; +import org.fortiss.variability.model.presence.IHasPresenceCondition; +import org.fortiss.variability.model.presence.PresenceConditionTerm; /** * Utility functions that are used within the variability layers. * + * This class contains duplicates of EcoreUtils of the fortiss Tooling Kernel to enable a usage of + * this variability plugin independent of the tooling kernel. + * * @author bayha */ public class VariabilityUtilsInternal { @@ -222,4 +235,93 @@ public class VariabilityUtilsInternal { return usages; } + /** + * Calculates a self contained presence condition of the given element which takes into account + * all presence conditions of parent objects in the containment hierarchy. + * + * Note, that this util method should only be used internally in this plugin, as the variation + * point implementation could be different in higher level plugins. + * + * @param elem + * The {@link EObject} object for which to calculate a global + * {@link PresenceConditionTerm}. + * @return A {@link PresenceConditionTerm} which expresses the presence condition including + * constraints of all parents; 'null' if there is no restriction. + */ + public static PresenceConditionTerm calculateGlobalPresenceCondition(EObject elem) { + EObject parent = elem.eContainer(); + PresenceConditionTerm parentPC = null; + + if(parent != null) { + parentPC = calculateGlobalPresenceCondition(parent); + } + + PresenceConditionTerm rest = null; + if(elem instanceof IHasPresenceCondition) { + // Here, DEFAULT literals need to be resolved. + rest = ((IHasPresenceCondition)elem).getPresenceCondition().resolveToFeatureLiterals(); + } + + if(parentPC != null) { + if(rest != null) { + return createAndPC(parentPC, rest, ""); + } + return parentPC; + } + + return rest; + } + + /** + * Logs a message that occurred in the context of the given plug-in with the + * given severity and a given {@link Throwable} that originally caused this + * log message. + */ + private static void log(Plugin plugin, String message, int severity, Throwable cause) { + String pluginId = plugin.getBundle().getSymbolicName(); + IStatus status = new Status(severity, pluginId, message, cause); + plugin.getLog().log(status); + } + + /** + * Logs an info message that occurred in the context of the variability plug-in. + * + * @param message + * The {@link String} with the info message to be logged. + */ + public static void logInfo(String message) { + log(getDefault(), message, INFO, null); + } + + /** + * Logs a warning that occurred in the context of the variability plug-in. + * + * @param message + * The {@link String} with the warning message to be logged. + */ + public static void logWarning(String message) { + log(getDefault(), message, WARNING, null); + } + + /** + * Logs an error that occurred in the context of the variability plug-in. + * + * @param message + * The {@link String} with the error message to be logged. + * @param exception + * The {@link Exception} that originally caused this log message. + */ + public static void logError(String message, Exception exception) { + log(getDefault(), message, ERROR, exception); + } + + /** + * Logs an error that occurred in the context of the variability plug-in. + * + * @param message + * The {@link String} with the error message to be logged. + */ + public static void logError(String message) { + log(getDefault(), message, ERROR, null); + } }